-
Notifications
You must be signed in to change notification settings - Fork 48
Description
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:
[durack1@oceanonly ~/141105_pcmdi_metrics]$ ls /clim_obs/obs/ocn/mo/sos/*/ac/*.nc
sos_pcmdi-metrics_Omon_JPL-Aquarius-v2_201108-201304-clim.nc
sos_pcmdi-metrics_Omon_NODC-WOA09_177201-200812-clim.nc
sos_pcmdi-metrics_Omon_UCSD-ARGO_200401-201212-clim.nc
[durack1@oceanonly ~/141105_pcmdi_metrics]$ ls /clim_obs/obs/ocn/mo/sos/*/ac/*.nc | xargs -n 1 ncdump -h | grep 'sos:units'
sos:units = "1e-3" ;
sos:units = "PSS-78" ;
sos:units = "Practical Salinity Scale 78" ;
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:
OBS SHAPE IS (12, 72, 144)
sos ACCESS1-0 (12, 72, 144) (12, 72, 144) default
Error while processing observation sos for variable default:
Could not convert model units (psu) to obs units: (PSS-78)
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-242
As 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