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

fix variable metadata typos #249

Merged
merged 6 commits into from
Jan 21, 2021
Merged

fix variable metadata typos #249

merged 6 commits into from
Jan 21, 2021

Conversation

rabernat
Copy link
Member

Picks up where #247 left off.

@timothyas
Copy link
Member

Thanks for taking care of this!

@rabernat
Copy link
Member Author

When you make a 🤦 the best thing to do is fix it!

some more adjoint fixes
@timothyas
Copy link
Member

I just went through and made some changes directly. I think it's good once @mjlosch confirms a couple of variables as noted

Copy link
Member

@mjlosch mjlosch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for "psu" I am fine with the changes and apologise for my sloppiness.

xmitgcm/variables.py Show resolved Hide resolved
'ADJclimsst': dict(dims=['j', 'i'], attrs=dict(
standard_name="ADJclimsst",
long_name='dJ/dclimsst: Sensitivity to restoring surface temperature',
units='dJ/K')),
'ADJclimsss': dict(dims=['j', 'i'], attrs=dict(
standard_name="ADJclimsss",
long_name='dJ/dclimsss: Sensitivity to restoring surface salinity',
units='dJ/pss)')),
units='dJ/psu)')),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I disagree, although my solution is not optimal either. Salinity has no units. In particular "psu" (practical salinity unit) is something that should not be used. pss = practical salinity scale is a compromise but also not very good, see e.g. https://www.myroms.org/forum/viewtopic.php?t=294
If we want to use absolute salinity, the "unit" is g/kg, which again is 1/1000 with no units. In https://github.com/MITgcm/MITgcm/blob/master/model/inc/DYNVARS.h we have "ppt" (parts per thousand), which is again not a unit but just a ratio as it should be. To be consistent, we can change this to dJ/ppt if you like.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for another look at all of this @mjlosch! I don't have a strong opinion about what the "units" (or not!) of salinity are labeled as. I put psu because at the end of the day it is what the MITgcm diagnostics assigns to the variable SALT (and anything involving it like advection of salt, etc), at least for the setups I am using. I see what you're saying about DYNVARS.h. My vote is for consistency, and so if we go for e.g. ppt here, I would be in favor of opening this discussion in the MITgcm as well to change it there too.

Unless I'm missing something here... Let me know what you think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably go for g/kg, and then open an issue on MITgcm, where the comment need to be changed in DYNVARS.h and the units in diagnostics_main_init.F
@rabernat please decide on the "unit"/non-unit. We can always change it, once the MITgcm code is settled.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timothyas @rabernat
Yesterday, I talked to @jm-c, @christophernhill, @jrscott, @jahn and we agreed to replace the "units" of salinity by "g/kg" in the MITgcm code, so I suggest to do this here as well anticipating this change ("in vorauseilendem Gehorsam"). I can do that, if you agree.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good to me, I'm in favor of g/kg. If @rabernat agrees, we'll want to change it for every salinity instance in variables.py. Thanks @mjlosch

@timothyas
Copy link
Member

I'm having a hard time trusting my eyes these days, but this looks good to me 👍

@rabernat
Copy link
Member Author

Thanks everybody. I really appreciate the work.

@rabernat rabernat merged commit a4beec2 into master Jan 21, 2021
@mjlosch mjlosch deleted the fix-variable-metadatta branch January 22, 2021 14:16
fraserwg pushed a commit to fraserwg/xmitgcm that referenced this pull request Nov 23, 2021
* fix variable metadata typos

* Update variables.py

* Update variables.py

some more adjoint fixes

* Update variables.py

* fix two more instances of sloppiness

* replace "psu" by "g/kg"

Co-authored-by: Timothy Smith <[email protected]>
Co-authored-by: Martin Losch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants