-
Notifications
You must be signed in to change notification settings - Fork 3
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 with lat/lon and latitude/longitude raise error with get_coord_type #61
Comments
@ellesmith88: this does look strange. I did an
It seems like the data is erroneous - I can't understand why the Does this error appear in other data or only in this dataset? The short-term solution is to put this on an EXCLUDE_LIST of datasets that we are not processing right now. We should discuss with Ruth and Martin. |
At the moment it is looking to be around 25 datasets that are affected - I will update once I have confirmed this. Steps to follow:
|
There are 23 datasets that raise this error:
|
Tagging @RuthPetrie and @martinjuckes @ellesmith88: Myself and Ruth just found this:
So, the longitude values are actually varying slowly over time. |
So, the problem in the code here is probably that
|
Interesting catch. The @agstephens : I agree with your interpretation, apart from the interpretation of |
The same thing exists in 81 out of 517 datasets of the BCC-CSM2-MR model in our archive. The datasets affected are listed in the attached file. |
ECMWF have agreed that we can omit these datasets from the first inventory/release. |
NB: this data is on the ocean grid. I think the It is interesting that this is not captured as a CF error .. it is probably not explicitly mentioned as an error because it is obviously wrong. It may be worth proposing an additional CF rule. |
@agstephens @ellesmith88 : let's raise this as an issue with CF. It might be an error in the conventions or in the cf-checker. |
Description
When scanning for the inventory a few datasets have raised an error when we attempt to identify their coordinate types:
roocs-utils/roocs_utils/inventory/inventory.py
Lines 33 to 52 in 887377c
On closer inspection these datasets have coordinates like the below (c3s-cmip6.ScenarioMIP.BCC.BCC-CSM2-MR.ssp126.r1i1p1f1.SImon.siconc.gn.v20200219)
and so when
cf-xarray
attempts to identify latitude/longitude it finds two coordinates for each and raises the errorValueError: Receive multiple variables for key 'longitude': ['longitude', 'lon']. Expected only one. Please pass a list ['longitude'] instead to get all variables matching 'longitude'.
Both latitudes have the same values but
lon
is from -280 to 80 andlongitude
from 0 to 360So it is the lines
roocs-utils/roocs_utils/xarray_utils/xarray_utils.py
Lines 62 to 63 in 887377c
and
roocs-utils/roocs_utils/xarray_utils/xarray_utils.py
Lines 78 to 79 in 887377c
where the issue arises.
It also raises the question of which values we would want to be represented in the inventory as longitude and latitude min/max values. I expect it would be longitude from 0 to 360.
For now I could try commenting those lines out to scan them - but the datasets would still raise issues elsewhere when being processed
The text was updated successfully, but these errors were encountered: