Skip to content

Commit

Permalink
Add some notes
Browse files Browse the repository at this point in the history
suggested by K
  • Loading branch information
zmoon committed Jun 26, 2024
1 parent 8a558ea commit c81741b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/examples/sample-mpas-ug-data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@
"id": "13",
"metadata": {},
"source": [
"## Precip inside CE"
"## Precip inside CE\n",
"\n",
"This figure is intended to demonstrate what {func}`tams.data_in_contours` does."
]
},
{
Expand Down
10 changes: 10 additions & 0 deletions docs/examples/sample-satellite-data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@
"contour_sets[0].head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```{note}\n",
"`inds219` gives the indices of 219 (cold-core) shapes in a `contour_sets_219` dataframe that are inside a certain 235 shape (row in a `contour_sets` dataframe).\n",
"This is for internal debugging purposes and may be removed in the future.\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
25 changes: 23 additions & 2 deletions tams/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def load_example_tb() -> xarray.DataArray:


def load_example_mpas() -> xarray.Dataset:
"""Load the example MPAS dataset.
r"""Load the example MPAS dataset.
This is a spatial and variable subset of native MPAS output,
Furthermore, it has been regridded to a regular lat/lon grid (0.25°)
Expand All @@ -197,6 +197,16 @@ def load_example_mpas() -> xarray.Dataset:
and ``precip`` (precipitation rate, derived by summing the MPAS accumulated
grid-scale and convective precip variables ``rainnc`` and ``rainc`` and differentiating).
``tb`` was estimated using the (black-body) Stefan--Boltzmann law:
.. math::
E = \sigma T^4
\implies T = (E / \sigma)^{1/4}
where :math:`E` is the OLR (outgoing longwave radiation, ``olrtoa`` in MPAS output)
in W m\ :sup:`-2`
and :math:`\sigma` is the Stefan--Boltzmann constant.
This dataset contains 127 time steps of hourly data:
2006-09-08 12 -- 2006-09-13 18.
Expand Down Expand Up @@ -226,7 +236,7 @@ def load_example_mpas() -> xarray.Dataset:


def load_example_mpas_ug() -> xarray.Dataset:
"""Load the example MPAS unstructured grid dataset.
r"""Load the example MPAS unstructured grid dataset.
This is a spatial and variable subset of native 15-km global mesh MPAS output.
Expand All @@ -242,6 +252,17 @@ def load_example_mpas_ug() -> xarray.Dataset:
for the period
2006-09-08 12 -- 2006-09-13 18.
Like the regridded MPAS dataset,
``tb`` was estimated using the (black-body) Stefan--Boltzmann law:
.. math::
E = \sigma T^4
\implies T = (E / \sigma)^{1/4}
where :math:`E` is the OLR (outgoing longwave radiation, ``olrtoa`` in MPAS output)
in W m\ :sup:`-2`
and :math:`\sigma` is the Stefan--Boltzmann constant.
See Also
--------
:func:`tams.data.download_examples`
Expand Down

0 comments on commit c81741b

Please sign in to comment.