-
Notifications
You must be signed in to change notification settings - Fork 38
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
Units reported in metadata.yml may differ from actual units #505
Comments
@mattiarighi @schlunma Any idea if diagnostics actually use the units attribute from the interface instead of from the data? |
I have several examples where I check that both are equal (so it would be fine to just use once). I think it would be nice to drop the attributes in Alternatively, we could set the attribute to |
I tried to grep quickly through the NCL scripts and there are a lot of occurrence of Checking all the affected diags might be lot of work, it could be more effective:
Such a change would require testing all the affected recipes anyway. |
@bettina-gier Since you reported this issue again in #866, do you have an opinion on if having |
In ncl it's nice because a lot of diagnostics set up their arrays to save data in before loading it, and then they can already set the units in the same spot. But it's not a problem to do it later and probably better to read it from the data as that is more likely to be correct in the current state. |
@bouweandela is the underlying code that needs to be changed here somehow modified in #1609? I'd like to work on this since it's bothering me a lot lately, but don't want to create horrible merge conflicts for you. |
A bit but it shouldn't be a problem (you can see the changes here: https://github.com/ESMValGroup/ESMValCore/pull/1609/files#diff-4c5468e8eebd3bebe05236ed962fa98483d27a9374d17c0ad43ba19287435a5d). You'll probably want to update the |
Because the units reported in metadata.yml are read from the CMOR table, preprocessing operations that change the units of the data will make this information invalid.
Maybe we could just remove the units entry from metadata.yml/varname_info.ncl files, or we should read it from the cube before saving.
The text was updated successfully, but these errors were encountered: