Skip to content

Commit 3c47dcf

Browse files
committed
Update rprof documentation
1 parent f886be0 commit 3c47dcf

File tree

1 file changed

+7
-24
lines changed

1 file changed

+7
-24
lines changed

docs/sources/stagyydata.rst

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -86,32 +86,15 @@ are given a default value according to the par file ``~/.config/stagpy/par``.
8686
Radial profiles
8787
---------------
8888

89-
Radial profile data are contained in the
90-
:attr:`~stagpy.stagyydata.StagyyData.rprof` attribute of a
91-
:class:`~stagpy.stagyydata.StagyyData` instance. This attribute is a
89+
Radial profile data are contained in the :attr:`~stagpy._step.Step.rprof`
90+
attribute of a :class:`~stagpy._step.Step` instance. This attribute is a
9291
:class:`pandas.DataFrame`. Its :attr:`columns` are the names of available
93-
variables (such as e.g. ``'Tmean'`` and ``'ftop'``). Its :attr:`index` is a 2
94-
levels multi-index, the first level being the time step number (:attr:`istep`),
95-
and the second level being the cells number (from ``0`` to ``nz-1``). The list
96-
of available variables can be obtained by running ``% stagpy var``.
97-
98-
The radial profile of a given time step can be accessed from :attr:`_Step.rprof
99-
<stagpy.stagyydata._Step.rprof>`. For example, ``sdat.steps[1000].rprof`` is
100-
equivalent to ``sdat.rprof.loc[1000]``. The columns of the obtained dataframe
101-
are the variable names, and its index is the cells number.
102-
103-
As an example, the following lines are two ways of accessing the horizontal
104-
average temperature in the bottom cell, at the 1000th timestep::
105-
106-
# extract rprof data for the 1000th timestep,
107-
# and then take the temperature in the bottom cell
108-
sdat.rprof.loc[1000].loc[0,'Tmean']
109-
# extract the temperature profile for the 1000th timestep,
110-
# and then take the bottom cell
111-
sdat.rprof.loc[1000,'Tmean'][0]
92+
variables (such as e.g. ``'Tmean'`` and ``'ftop'``). Its :attr:`index` is the
93+
cell number (from ``0`` to ``nz-1``). The list of available variables can be
94+
obtained by running ``% stagpy var``.
11295

113-
If the radial profiles of the 1000th timestep are not available, these would
114-
both result in a ``KeyError``.
96+
For example, ``sdat.steps[1000].rprof['Tmean']`` is the temperature profile of
97+
the 1000th timestep.
11598

11699
Time series
117100
-----------

0 commit comments

Comments
 (0)