-
Notifications
You must be signed in to change notification settings - Fork 32
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
nwdFracLut in Emon #535
Comments
Ok, I made some progresses with that variable. There seems to be a problem with a standard_name check. If I change in CMIP6_coordinate.json
into
I am able to create a file of
Please try to reconstruct it, I made a test file in #539 |
@wachsylon This looks like a bug in CMOR. Please let us know if somehow you've managed to fix the problem. I don't think changing the standard_name to |
I have identified three issues occurring with There is an issue with the standard_name check in the section below. Lines 1477 to 1541 in e0eac64
Since both the landUse and typenwd dimension in nwdFracLut have the standard name of area_type , it will mistake one for the other and prevent the "dummy" axis from being created for the singleton. I'm not sure what was the intention with this check only looking at the standard name for the dimensions. We should change it to also check the id attribute of the dimensions.
There is also an issue with the NetCDF dimension Lines 3545 to 3556 in e0eac64
However, in a section that creates a singleton dimension, another strlen dimension will be created for typenwd .Lines 4236 to 4245 in e0eac64
When the strlen dimension is already defined, defining another dimension of the same name doesn't work. It does not overwrite the original value of the dimension. This will cause issues if the only landUse values are "pastures", "crops", and "urban" since their string lengths are shorter than that of typenwd 's "herbaceous_vegetation". I am trying to find a way to change the value of the dimension if the new value is greater than the old value.
The third issue seems to be due to how the values for
The test stored garbled data for the
What worked was creating a 2D char array and then copying the values into the array.
|
Wow! An impressive analysis of the problem. Let me know if I can help. |
Getting back to this issue, I have some questions about the If a NetCDF dimension already exists, then an error will occur if you try to create another dimension with the same name. A dimension can be renamed but not be resized. Here are some solutions:
@wachsylon @taylor13 @durack1 What are your thoughts on this problem? |
The first (easiest) proposed solution above is aesthetically not very satisfying because strings would have lots of extra "spaces". The second solution looks pretty difficult, but would affect only Another option would be: For cases (only one found in CMIP6) where two string dimensions are defined, name for the 2nd one its string length as Unless this last option is easier to implement than your second option, I would go with your 2nd option. Happy to discuss further. |
Hi,
when I try to produce
nwdFracLut
fromEmon
, I receiveafter I call
cmor_variable
.I skip the registration of axis
typenwd
since it is a singleton.Are you able to produce nwdFracLut or reproduce the error?
Best regards,
Fabi
The text was updated successfully, but these errors were encountered: