-
Notifications
You must be signed in to change notification settings - Fork 37
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
Deal with salinity unit variants better #162
Comments
As I expected it doesn't seem that even the latest release of UDUNITS (2.2.17) can deal with any of the salinity "unit" variants: http://www.unidata.ucar.edu/software/udunits/udunits-2.2.17/doc/udunits/udunits2.html#Database |
thanks for checking though! |
@doutriaux1 did you need a brain dump for me on this? Or do you have enough to kick things off? |
i got enough to get started I think, I'll get back to you when I know more precisely what stops me. |
Looks like we'll have to go it alone on this one: Unidata/UDUNITS-2#27 (comment) As we're not adding salinities in the package we won't hit the issue that was raised in the comment above. |
@doutriaux1 moving to a 1.1 milestone as 1.0.0 should be tagged now. |
@doutriaux1 it would be great to get this sorted out next week.. I really do need to start generating some metrics on the CMIP5 salinity fields.. |
@doutriaux1 any movement on this? |
@durack1 @doutriaux1 same probleme on my side: |
Yep, this is something that I hope @doutriaux1 can get to early next week.. He's under the pump now finalising the 2.2 release for UV-CDAT.. |
Perfect. I've fixed (at least for the moment) the bounds issue, so now I'm ready to compute metrics on the ORCA grid. |
@jservonnat great, you're linked into this issue so you should get an email notification when the status changes (it's fixed) |
from udunits1 model to udunits2 model also added functions to add user-designed units this is need by pcmdi metrics project see: PCMDI/pcmdi_metrics#162
@durack1 please confirm, I'm going to go with this for now:
please correct me if I'm wrong. |
@durack1 getting there:
|
@doutriaux1 yep your equality above is correct |
from udunits1 model to udunits2 model also added functions to add user-designed units this is need by pcmdi metrics project see: PCMDI/pcmdi_metrics#162
The current version of all sos obs store data using the "PSS-78" scale/units (which stands for the Practical Salinity Scale 1978) and variants around this:
Modeling centers often use
psu
(the case with GFDL), and consequently we we should make sure that the metrics package automatically deals with this variable, which is not the case currently:I suggest that any of the valid variants
1e-3
,g kg-1
,g/kg
,ppt
,Practical Salinity Scale 1978
,Practical Salinity Scale 78
,pss78
,PSS78
,pss-78
,PSS-78
,psu
,PSU
should be dealt with automagically. It's also likely that NCAR will provide data literally offset by 1e-3 (so rather than valid values from ~2 to ~40, they're ~0.002 to ~0.04) and the following durolib code checks and corrects this: https://github.com/durack1/pylib/blob/master/durolib.py#L189-242As an aside, it appears that https://github.com/PCMDI/cmor can in fact deal with
psu
:https://github.com/PCMDI/cmip5-cmor-tables/blob/master/Tables/CMIP5_Omon#L2925-2989
The text was updated successfully, but these errors were encountered: