Skip to content
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

On using "convert_units" preprocessor, units in configuration file not changed #866

Closed
bettina-gier opened this issue Nov 19, 2020 · 5 comments
Labels
cmor Related to the CMOR standard

Comments

@bettina-gier
Copy link
Contributor

when using the convert_units preprocessor, the units in both the "metadata.yml", as well as "var_info.ncl" are kept as the cmor units, while the data fed to the diagnostics has different units. I feel like the updated units due to the preprocessor should be reflected, especially as I wanted to used the units attribute from these file for my plots, and I feel this may be a common occurence?

@nielsdrost
Copy link
Member

Perhaps @jvegasbsc knows? :-)

@nielsdrost nielsdrost added the cmor Related to the CMOR standard label Nov 25, 2020
@jvegreg
Copy link
Contributor

jvegreg commented Nov 25, 2020

Good catch! I am not sure how to proceed: the correct units are on the file, the var_info contains the original info. I think we should not change that info during the preprocessor, but I am not really sure. The safest way will be to read the units attribute from the NetCDF file and use this.

By the way, you opened Pandora's box here, as we are not taking this into account in any preproc function, and even some of them don't produce the correct units. A couple of examples:

  • We are not changing them from mm day-1 to mm yr-1 when doing a yearly sum on pr
  • We are not changing them from whatever m-2 to whatever when doing area sums

@bettina-gier
Copy link
Contributor Author

Right, I'll use the units from the file then. Ideally I suppose you would have an "original units" attribute for the cmor info and then a "preproc units" for anything that the preprocessor did to it, though I can see how that might be hard to do. In this case at least the netcdf file has the correct attributes, while I guess the sums you mentioned above do not.

@bouweandela
Copy link
Member

The original issue, as reported by @bettina-gier is a duplicate of #505. The issues reported by @jvegasbsc should probably be made into new issues.

@znicholls
Copy link

  • We are not changing them from whatever m-2 to whatever when doing area sums

Made a specific issue for this here: #1613

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmor Related to the CMOR standard
Projects
None yet
Development

No branches or pull requests

5 participants