Tutorial Datasets
The module melodies_monet.tutorial
enables automatic downloading and caching of small1 versions of the tutorial datasets.
This functionality requires pooch, an optional dependency.
import xarray as xr
import melodies_monet as mm
mm.tutorial.example_ids
['wrfchem:racm_esrl',
'wrfchem:racm_esrl_vcp',
'airnow:2019-09',
'airnow:2019-08',
'airnow:2019-07',
'camchem:fv',
'camchem:se',
'camchem:se_scrip',
'aeronet:2019-09',
'aeronet:2019-08',
'csn:2019_daily',
'improve:2019_daily',
'ncore:2019_daily']
The example IDs above can be used inside a control file to specify to use that dataset, downloading if necessary but otherwise loading from the pooch cache.
For example:
model:
cam-chem:
files: 'example:camchem:fv'
(for model)
obs:
airnow:
filename: 'example:airnow:2019-09'
(for obs)
Note that you can also use melodies_monet.tutorial.fetch_example()
to load data directly.
fp = mm.tutorial.fetch_example("camchem:fv")
xr.open_dataset(fp)
<xarray.Dataset> Dimensions: (time: 36, lev: 1, lat: 192, lon: 288, ilev: 2, nbnd: 2) Coordinates: * ilev (ilev) float64 985.0 1e+03 * lat (lat) float64 -90.0 -89.06 -88.12 -87.17 ... 88.12 89.06 90.0 * lev (lev) float64 992.5 * lon (lon) float64 0.0 1.25 2.5 3.75 5.0 ... 355.0 356.2 357.5 358.8 * time (time) datetime64[ns] 2019-09-01T06:00:00 ... 2019-09-10 Dimensions without coordinates: nbnd Data variables: O3 (time, lev, lat, lon) float32 ... P0 float64 1e+05 PM25 (time, lev, lat, lon) float32 ... PS (time, lat, lon) float32 ... date (time) int32 20190901 20190901 20190901 ... 20190909 20190910 datesec (time) int32 21600 43200 64800 0 21600 ... 0 21600 43200 64800 0 hyai (ilev) float64 4.805e-05 0.0 hyam (lev) float64 2.402e-05 hybi (ilev) float64 0.985 1.0 hybm (lev) float64 0.9925 time_bnds (time, nbnd) datetime64[ns] 2019-09-01 ... 2019-09-10 Attributes: Conventions: CF-1.0 source: CAM case: fmerra.2.1003.FCSD.f09.qfedcmip.56L.001.branch02 logname: buchholz host: cheyenne3 initial_file: /glade/p/cesmdata/cseg/inputdata/atm/cam/inic/fv/f.e20... topography_file: /glade/p/cesmdata/cseg/inputdata/atm/cam/met/MERRA2/0.... model_doi_url: https://doi.org/10.5065/D67H1H0V time_period_freq: hour_6 history: Mon Feb 28 16:25:23 2022: ncks -7 -L 1 --baa=4 --ppc d... NCO: netCDF Operators version 5.0.6 (Homepage = http://nco....
- 1
Only a few variables included, levels limited to surface or near-surface, NCO compression applied. Full versions are also available via https://csl.noaa.gov/groups/csl4/modeldata/melodies-monet/.