-
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
Modify MPAS-Ocean Registry files to have CF compliant units #24
Modify MPAS-Ocean Registry files to have CF compliant units #24
Conversation
Modify the namelist variables to allow up to 15 EAM output tapes. [BFB] - Bit-For-Bit [NML] - Namelist Changing
Add CF compliant units to registry Change non-CF compliant units in registry to CF compliant ones Reformat Registry for clarity Moved incremental remapping fields to separate registry file
Some remaining errors from using
|
In EAM and ELM, we gave dimensionless variables a unit of "1" which is CF compliant. That seemed better than no "units" attribute at all. Not sure if we want an E3SM-wide standard for that or not. |
As @czender explained it to us, there are variables (like slope or other dimensionless ratios) where a unit of "1" makes sense. But there are lots of variables where no unit (even "1") would make sense, like an integer or logical field. So I would think places with |
@darincomeau, I can deal with these as part of my work on the |
Thanks for the comments @xylar . There are only a handful of For the time coordinate units, I haven't been able to find it from a cursory grep of framework yet. So either you or I could do it, but either way seems like it would be a separate branch from this one with strictly ocn Registry changes. |
I think you'll find it in the time series stats analysis member in the ocean core. I believe it must be defined here: |
Thanks @xylar for the pointer, that was indeed the place. Now down to just 5 NA/nondimensional errors... |
Discussion items from this morning's hackathon meeting:
|
Question: Should dimensions that are clearly integers (e.g. |
@darincomeau Attributes can only be attached to netCDF variables, not dimensions, so I do not understand the context of your question. If there is somewhere a (coordinate) variable named |
A agree with @czender. If the question refers to an index array instead (e.g. |
@czender @xylar thanks for the comments. It seems like these shouldn't have been introduced at all, and this branch is clearing them. I don't see how to link file changes here, but if you look at the Files Changed in this PR, and open up |
<dim name="nCells" units="unitless" | ||
<dim name="nCells" | ||
description="The number of polygons in the primary grid." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@darincomeau, yep, this is definitely a desired change. To comment, you want to go to Files changed
and use the blue plus sign to highlight one or more lines. Then, type your comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isn't another way to link to the diff as far as I know. You can link to the file itself.
Collaborators have requested that these fields always be included in simulations with ice-shelf cavities so they can study the relationship between melt rates, thermal driving and friction velocity in the sub-ice-shelf boundary layer across many models. This output would also likely be of interest to us, particularly as we explore new vertical coordinates in ice-shelf cavities.
Add 5 ice-shelf BL fields to MPAS-Ocean monthly output Collaborators have requested that these fields always be included in simulations with ice-shelf cavities so they can study the relationship between melt rates, thermal driving and friction velocity in the sub-ice-shelf boundary layer across many models. This output would also likely be of interest to us, particularly as we explore new vertical coordinates in ice-shelf cavities. [BFB]
@darincomeau, could you rebase when you get a chance to handle the 2 conflicting files (and make sure no new non-CF units were added in the meantime)? |
@vanroekel, @milenaveneziani, @mark-petersen could the 3 of you have a look at these changes? Let us know if there are questions. The gist is that CF compliance requires that
@darincomeau, please edit if I missed anything. Everyone, please feel free to ping others to have a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes seem consistent with the CF compliance defined in the comment. This is a great piece of work, lots of very careful combing through registry.
@xylar or @darincomeau a stupid question -- does the Registry name, units, etc... populate the netcdf output metadata? I guess that makes sense, but I had originally thought that was just for the users guide. |
@vanroekel, yes, many of those things end up as attributes in the NetCDF output. Since we aren't doing a good job at keeping the user's guide updated, that is the primary thing they do at this point. |
@xylar yes I'll do a rebase, and thanks for providing the summary. Some notes/comments:
|
I agree, this clean-up belongs as part of the PR. These units aren't useful and it's a lot easier to clean them up everywhere, not just in variables.
Are these ones where you can just remove them (like `units="NA")?
Do you know what CF wants us to do for these? |
Allow up to 15 EAM history tapes The "SPECIAL" v2 production runs require more than 10 EAM history output tapes (https://acme-climate.atlassian.net/wiki/spaces/EWCG/ pages/1850376218/E3SMv2+history+variable+namelists+for+production+ runs), exceeding the current limit (10 tapes). This PR includes changes to both the code and namelist variables and increases the limit to 15 tapes. We should merge this to both maint-2.0 and master, but when I issued the PR for merging to maint-2.0 (#4891), lots of unrelated commits were included (We only need the two commits in the present PR). I am not sure how to fix the PR to maint-2.0, so closed it for now. The tests are successful and located at /lcrc/group/e3sm/ac.qtang/ E3SMv2/test-output-maint-2.0.v2.NARRM.amip/tests. * tangq/atm/increase_eam_tapes: Change code to support up to 15 EAM tapes Increase the max number of EAM history tapes to 15
Sverdrup (but not Sv) is well-defined by UDUnits and thus CF:
petawatts is also well-defined by UDUnits and CF, so I do not know what the problem with the checker is, but it is acceptable to use "petawatts" as a unit.
|
Cleanup of sea ice registry Cleanup of mpas-seaice Registry files, including: * Add CF compliant units to Registry * Change non-CF compliant units in Registry to CF compliant ones * Reformat Registry for clarity * Moved incremental remapping fields to separate Registry file [BFB]
Thanks @xylar , @czender . I haven't actually run any variables with units "petawatts" through the checker yet, I only tried searching for that and Sv in the CF Standard Names table and didn't see them. "Sv" appears only twice Regarding |
...and just found some |
b38ebc1
to
7f6949d
Compare
welp, i messed up the rebase Edit: Actually I think I did it correctly, and the unintended changes showing up here are just very recent E3SM changes. If I go to open a PR from this branch into E3SM, only the intended commits/file-changes show up. Anyways, apart from the BGC Registry files, I've now changed everything I'm aware of and intended to do for this PR. |
Yeah, I can update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks consistent with the CF-compliant changes that we've discussed. Thanks for your work on this.
@darincomeau, can we close this now that we have E3SM-Project#5027? I get 2 emails every time you push something to this branch. |
Closing per E3SM-Project#5027 |
Make MPAS-Ocean units CF compliant This makes changes to the units in MPAS-Ocean's Registry files to be CF compliant. The main changes for CF compliance are: * variables not have a units attribute if they are unitless (i.e. no units='unitless', units='NA', etc.) * variables should have units=1 if they are dimensionless (e.g. real-valued coefficients) * we cannot use latex symbols like { and } in the units * we cannot use units='PSU' for salinity, we need to use units=1e-3, though we can state that the units are grams per kilogram in the description (used as the long_name attribute in output files). Further discussion found in E3SM-Ocean-Discussion#24 Note this does not change any units on BGC variables [BFB]
Make MPAS-Ocean units CF compliant This makes changes to the units in MPAS-Ocean's Registry files to be CF compliant. The main changes for CF compliance are: * variables not have a units attribute if they are unitless (i.e. no units='unitless', units='NA', etc.) * variables should have units=1 if they are dimensionless (e.g. real-valued coefficients) * we cannot use latex symbols like { and } in the units * we cannot use units='PSU' for salinity, we need to use units=1e-3, though we can state that the units are grams per kilogram in the description (used as the long_name attribute in output files). Further discussion found in E3SM-Ocean-Discussion#24 Note this does not change any units on BGC variables [BFB]
updating Icepack to hash e8e7d7d
This modifies MPAS-Ocean Registry files to have CF compliant units, using
cfchecker
to find errors.CF Standard Units
[WIP]