Coder Social home page Coder Social logo

Comments (23)

doutriaux1 avatar doutriaux1 commented on July 20, 2024

thanks @durack1 I was thinking about this last night. Glad to open the issue before me.

from cmor.

durack1 avatar durack1 commented on July 20, 2024

We'll have to get a blessing from @taylor13 (if in fact Karl is actually a contributor on here..)

from cmor.

taylor13 avatar taylor13 commented on July 20, 2024

one option would be to get the udunits folks to add it, then we wouldn't
have to do anything. Right?
Karl

On 11/20/14, 9:48 AM, Paul J. Durack wrote:

We'll have to get a blessing from @taylor13
https://github.com/taylor13 (if in fact Karl is actually a
contributor on here..)


Reply to this email directly or view it on GitHub
#12 (comment).

from cmor.

durack1 avatar durack1 commented on July 20, 2024

@taylor13 I'm one step ahead of you Unidata/UDUNITS-2#27

from cmor.

doutriaux1 avatar doutriaux1 commented on July 20, 2024

yes we would still need to update the minimum requirements 😉

from cmor.

durack1 avatar durack1 commented on July 20, 2024

Looks like we'll have to go it alone on this one: Unidata/UDUNITS-2#27 (comment)

As we're not adding salinities, but just rewriting these in CMOR we won't hit the issue that was raised in the comment above.

from cmor.

doutriaux1 avatar doutriaux1 commented on July 20, 2024

@durack1 it is in metrics will copycat what we did there in here at the C level.

from cmor.

durack1 avatar durack1 commented on July 20, 2024

@doutriaux1 I will need to test the metrics functionality.. We can talk more about metrics later in the week..

from cmor.

dnadeau4 avatar dnadeau4 commented on July 20, 2024

@durack1 ping!!

from cmor.

durack1 avatar durack1 commented on July 20, 2024

@dnadeau4 ping indeed.. @doutriaux1 what is/was the status of the salinity fudges for CMOR2 is this something that can be pulled forward into CMOR3? I ask this as the inclusion of salinity units in UDUNITS was blocked

from cmor.

dnadeau4 avatar dnadeau4 commented on July 20, 2024

@durack1 should we close this issue?

from cmor.

doutriaux1 avatar doutriaux1 commented on July 20, 2024

@dnadeau4 no we should add all the units asked for by @durack1 in a similar fashion as what we did for psu

from cmor.

durack1 avatar durack1 commented on July 20, 2024

@dnadeau4, @doutriaux1 created the ability to add salinity "units" in CMOR, I had tried to get these into udunits upstream, but was blocked so instead wanted to catch this in the CMOR software. Has the salinity units work of @doutriaux1 been included in CMOR 3.2.x?

from cmor.

dnadeau4 avatar dnadeau4 commented on July 20, 2024

What is the salinity works of @doutriaux1? I don't think it is in CMOR.

from cmor.

durack1 avatar durack1 commented on July 20, 2024

@doutriaux1 was that units stuff in a branch?

from cmor.

dnadeau4 avatar dnadeau4 commented on July 20, 2024

@doutriaux1 where is you salinity code?

from cmor.

dnadeau4 avatar dnadeau4 commented on July 20, 2024

PCMDI/pcmdi_metrics#477

from cmor.

durack1 avatar durack1 commented on July 20, 2024

This is the more directly relevant code block

import unidata
# Created scaled units for dimless
unidata.addScaledUnit("psu", .001, "dimless")
unidata.addScaledUnit("PSS-78", .001, "dimless")
unidata.addScaledUnit("Practical Salinity Scale 78", .001, "dimless")

And what we have in the current CMIP6_Omon.json table

"sos": {
   "modeling_realm": "ocean", 
   "standard_name": "sea_surface_salinity", 
   "units": "0.001", 
   "cell_methods": "time: mean", 
   "cell_measures": "area: areacello", 
   "long_name": "Sea Surface Salinity", 
   "comment": "", 
   "dimensions": "longitude latitude time", 
   "out_name": "sos", 
   "type": "real", 
   "positive": "", 
   "valid_min": "", 
   "valid_max": "", 
   "ok_min_mean_abs": "", 
   "ok_max_mean_abs": ""
}

So we may need to augment the above to deal with the "units" 0.001

from cmor.

dnadeau4 avatar dnadeau4 commented on July 20, 2024

@durack1 I was able to create psu, PSS-78, Practical Salinity Scale 78. Here is the output:

	float sos(time, lat, lon) ;
		sos:standard_name = "sea_surface_salinity" ;
		sos:long_name = "Sea Surface Salinity" ;
		sos:units = "0.001" ;
		sos:original_units = "psu" ;
		sos:history = "2017-07-13T22:16:05Z altered by CMOR: Converted units from \'psu\' to \'0.001\'. 2017-07-13T22:16:05Z altered by CMOR: replaced missing value flag (0) with standard missing value (1e+20)." ;
		sos:cell_methods = "area: mean where sea time: mean" ;
		sos:cell_measures = "area: areacello" ;
		sos:missing_value = 1.e+20f ;
		sos:_FillValue = 1.e+20f ;

from cmor.

durack1 avatar durack1 commented on July 20, 2024

@dnadeau4 excellent, PSS-78 should be the units we aim for (as it is the correct notation).. not sure what CMIP6 specifies

from cmor.

taylor13 avatar taylor13 commented on July 20, 2024

for CMIP6 model output the correct units are 0.001

from cmor.

dnadeau4 avatar dnadeau4 commented on July 20, 2024

Actually udunits does not allow characters - and 0-9. The best I can do is "pss", which will also validate "pss-78".

Now, CMOR can convert PSS-78 to 0.001 which is what we want for CMIP6. This is good since you have the conversion in the history and the original_unis attributes.

If you want PSS-78 you need to talk to WCRP. I cannot change the tables.

from cmor.

durack1 avatar durack1 commented on July 20, 2024

@dnadeau4 what PR was this closed by? Actually found it, see #203

from cmor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.