Closed naomi-henderson closed 4 years ago
@naomi-henderson, I just fixed this in #176 (the way we were manipulating the path was causing confusion to xarray).
In [1]: import intake
In [2]: col = intake.open_esm_datastore("http://haden.ldeo.columbia.edu/catalogs/hyrax_cmip6.json")
In [4]: cat = col.search(source_id="CAMS-CSM1-0", experiment_id="historical", member_id="r1i1p1f1", table_id="Amon", grid_label
...: ="gn", version="v1")
In [5]: cat.df
Out[5]:
activity_id ... path
0 CMIP ... /m2/haibo/CMIP6mon/CMIP/CAMS/CAMS-CSM1-0/histo...
1 CMIP ... /m2/haibo/CMIP6mon/CMIP/CAMS/CAMS-CSM1-0/histo...
[2 rows x 13 columns]
In [6]: dsets = cat.to_dataset_dict(cdf_kwargs = {"chunks": {"time": 36}})
--> The keys in the returned dictionary of datasets are constructed as follows:
'activity_id.institution_id.source_id.experiment_id.table_id.grid_label'
--> There will be 1 group(s)
In [7]: dsets
Out[7]:
{'CMIP.CAMS.CAMS-CSM1-0.historical.Amon.gn': <xarray.Dataset>
Dimensions: (bnds: 2, lat: 160, lon: 320, member_id: 1, time: 1980)
Coordinates:
* lon (lon) float64 0.0 1.125 2.25 3.375 ... 355.5 356.6 357.8 358.9
* time (time) object 1850-01-16 12:00:00 ... 2014-12-16 12:00:00
* lat (lat) float64 -89.14 -88.03 -86.91 -85.79 ... 86.91 88.03 89.14
* member_id (member_id) <U8 'r1i1p1f1'
Dimensions without coordinates: bnds
Data variables:
lat_bnds (time, lat, bnds) float64 dask.array<chunksize=(1980, 160, 2), meta=np.ndarray>
lon_bnds (time, lon, bnds) float64 dask.array<chunksize=(1980, 320, 2), meta=np.ndarray>
time_bnds (time, bnds) object dask.array<chunksize=(36, 2), meta=np.ndarray>
ps (member_id, time, lat, lon) float32 dask.array<chunksize=(1, 36, 160, 320), meta=np.ndarray>
ts (member_id, time, lat, lon) float32 dask.array<chunksize=(1, 36, 160, 320), meta=np.ndarray>
Attributes:
DODS_EXTRA.Unlimited_Dimension: time
Conventions: CF-1.7 CMIP-6.2
external_variables: areacella
grid_label: gn
mip_era: CMIP6
data_specs_version: 01.00.30
institution_id: CAMS
cmor_version: 3.4.0
variant_label: r1i1p1f1
parent_variant_label: r1i1p1f1
parent_source_id: CAMS-CSM1-0
branch_method: Standard
run_variant: forcing: greenhouse gases,aerosol,solar ...
comment: The model integration starts from the pi...
branch_time_in_child: 0.0
nominal_resolution: 100 km
product: model-output
activity_id: CMIP
parent_experiment_id: piControl
history: 2019-06-11T11:01:52Z ;rewrote data to be...
source_id: CAMS-CSM1-0
title: CAMS-CSM1-0 output prepared for CMIP6
branch_time_in_parent: 3025.0
tracking_id: hdl:21.14100/5dc697e7-4e9e-4c16-838e-c01...
realm: atmos
experiment_id: historical
parent_activity_id: CMIP
experiment: all-forcing simulation of the recent past
grid: T106
further_info_url: https://furtherinfo.es-doc.org/CMIP6.CAM...
contact: Dr. Xinyao Rong (rongxy@cma.gov.cn)
source: CAMS_CSM 1.0 (2016): \naerosol: none\nat...
table_info: Creation Date:(30 April 2019) MD5:cc2ae5...
physics_index: 1
references: Model described by Rong et al (J. Meteor...
table_id: Amon
realization_index: 1
forcing_index: 1
parent_time_units: days since 1850-01-01
description: DECK: historical
source_type: AOGCM
institution: Chinese Academy of Meteorological Scienc...
frequency: mon
initialization_index: 1
sub_experiment_id: none
parent_mip_era: CMIP6
license: CMIP6 model data produced by Lawrence Li...
sub_experiment: none}
Fantastic! Many thanks. I will close this issue
You are welcome, and thank you for bringing attention to this issue
Here at LDEO, we have an
OPeNDAP
server on one of our local machines with CMIP6Amon
data and would like remote users (students in a class, for example) to be able to useintake-esm
with this data. You can see the collection here:Has anyone been using OPeNDAP urls in their collections? Any words of wisdom?
It looks like we are really close to getting this to work (searches are fine, etc), but
to_dataset_dict
is having trouble withfsspec.mapping.FSMap
.