-
Notifications
You must be signed in to change notification settings - Fork 0
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
Datasets failing on get_bbox #11
Comments
Hi @ellesmith88: I think that I am in favour of updating |
|
This was referenced Dec 6, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some datasets for c3s-cordex are failing on get_bbox:
catalog-maker/catalog_maker/catalog.py
Lines 49 to 67 in 4ba705a
with the error
AttributeError: 'NoneType' object has no attribute 'values'
An example file is
/gws/nopw/j04/cp4cds1_vol1/data/c3s-cordex/output/EUR-11/CNRM/CNRM-CERFACS-CNRM-CM5/rcp45/r1i1p1/CNRM-ALADIN63/v2/day/sfcWind/v20190828/sfcWind_EUR-11_CNRM-CERFACS-CNRM-CM5_rcp45_r1i1p1_CNRM-ALADIN63_v2_day_20360101-20401231.nc
Looking into these files I see that lat/lon are data variables rather than coordinates (with, for example, x and y and time only as coordinates), where as previously all datasets have had latitude and longitude as coordinates.
So our function
get_coord_by_type
(https://github.com/roocs/roocs-utils/blob/152f33650a44fe3466ffbc8dbd99ebb9f8de783e/roocs_utils/xarray_utils/xarray_utils.py#L235-L260) doesn't find them.I can fix this by using ds.cf['latitude'] and ds.cf['longitude'] - when I use these I can generate the bbox.
However, we use
get_coord_by_type
in several places, e.g. in clisops, so this would need to be updated throughout, otherwise these datasets would fail elsewhere.@agstephens So, I can include the datasets in the catalog with their correct bbox and fix the issue in the other packages. Maybe the best way would be to update the
get_coord_by_type
function to use cf-xarray?The text was updated successfully, but these errors were encountered: