-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cdscan KeyError: 'height' #421
Comments
@mzelinka you might want to bump your env up to cdat/label/v8.2.1 just to make sure this issue remains, which it most likely does |
I just checked and I do not have this issue with CDAT8.2.1. Maybe this fix helped: #397. |
Upgrading to the latest CDAT via these instructions did not resolve this for me. Same error. |
Sorry - I was incorrect. I was mistakenly reading the netcdf file not the xml file. This does not work in CDAT8.2 or CDAT8.2.1. |
@mzelinka - I've hit this bug now, too. I have modified my trimmodellist functionality to skip these files (and print a warning for now)... |
Describe the bug
I can read in a netcdf file without issue, but when I try to read in data from a cdscan-generated xml that points to that same file, I get KeyError: 'height'.
To Reproduce
Steps to reproduce the behavior (on feedback2.llnl.gov):
I am able to open this netcdf file without any problem:
f=cdms2.open('/p/css03/esgf_publish/CMIP6/CMIP/KIOST/KIOST-ESM/abrupt-4xCO2/r1i1p1f1/Amon/tas/gr1/v20191106/tas_Amon_KIOST-ESM_abrupt-4xCO2_r1i1p1f1_gr1_185001-200012.nc')
Generate an xml pointing to this file via cdscan:
In [69]: import os
In [70]: os.system('cdscan -x temp.xml /p/css03/esgf_publish/CMIP6/CMIP/KIOST/KIOST-ESM/abrupt-4xCO2/r1i1p1f1/Amon/tas/gr1/v20191106/tas_Amon_KIOST-ESM_abrupt-4xCO2_r1i1p1f1_gr1_185001-200012.nc')
Finding common directory ...
Common directory: /p/css03/esgf_publish/CMIP6/CMIP/KIOST/KIOST-ESM/abrupt-4xCO2/r1i1p1f1/Amon/tas/gr1/v20191106/
Scanning files ...
/p/css03/esgf_publish/CMIP6/CMIP/KIOST/KIOST-ESM/abrupt-4xCO2/r1i1p1f1/Amon/tas/gr1/v20191106/tas_Amon_KIOST-ESM_abrupt-4xCO2_r1i1p1f1_gr1_185001-200012.nc
Setting reference time units to days since 1850-01-01
temp.xml written
Out[70]: 0
In [71]: f=cdms2.open('temp.xml')
KeyError Traceback (most recent call last)
in
----> 1 f=cdms2.open('temp.xml')
~/workdir2/miniconda3/envs/cdat82/lib/python3.7/site-packages/cdms2/dataset.py in openDataset(uri, mode, template, dods, dpath, hostObj)
570 dpath = head
571
--> 572 dataset = Dataset(uri, mode, datanode, None, dpath)
573 return dataset
574
~/workdir2/miniconda3/envs/cdat82/lib/python3.7/site-packages/cdms2/dataset.py in init(self, uri, mode, datasetNode, parent, datapath)
762 # Collect named children (having attribute 'id') into dictionaries
763 if datasetNode is not None:
--> 764 coordsaux = self.convention.getDsetnodeAuxAxisIds(datasetNode)
765
766 for node in list(datasetNode.getIdDict().values()):
~/workdir2/miniconda3/envs/cdat82/lib/python3.7/site-packages/cdms2/convention.py in getDsetnodeAuxAxisIds(self, dsetnode)
147 # Check the rank, don't include if not 1D or 2D (e.g.,
148 # scalar coordinate)
--> 149 domnode = dsetdict[item].getDomain()
150 if domnode.getChildCount() not in [1, 2]:
151 continue
KeyError: 'height'
Expected behavior
I expected no problem opening this xml file, just as I experienced no problem opening the netcdf that it points to.
Environment Information
`conda info`
`conda config --show-sources`
`conda list --show-channel-urls`
The text was updated successfully, but these errors were encountered: