Coder Social home page Coder Social logo

updates for mip-cmor-tables about cmor HOT 4 CLOSED

durack1 avatar durack1 commented on July 3, 2024
updates for mip-cmor-tables

from cmor.

Comments (4)

durack1 avatar durack1 commented on July 3, 2024

Just linking across repos so we don't miss fixes
cmip-ipo-internal/CVTool#16

from cmor.

durack1 avatar durack1 commented on July 3, 2024

This is a dupe of #718 - so both should be closed when the 3.8.0 changes are in place

from cmor.

mauzey1 avatar mauzey1 commented on July 3, 2024

As mentioned in the mip-cmor-tables wiki, the modeling_realm attribute in variable entries will become a list instead of a string. We want to concatenate the values in that list into a string of values separated by spaces.

["ocean", "land"] -> "ocean land"

The changes that I made to turn the list of dimensions into a space-separated list string also applies this change to the modeling realm values. However, when I tried creating a NetCDF file where the modeling_realm attribute had multiple values I only got the first value saved to the NetCDF file. This is being caused by the following code.

cmor/Src/cmor.c

Lines 2941 to 2952 in 047fd2c

if (cmor_tables[nVarRefTblID].vars[ref_var_id].realm[0] != '\0') {
szToken = strtok(cmor_tables[nVarRefTblID].vars[ref_var_id].realm, " ");
if (szToken != NULL) {
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_REALM,
szToken, 0);
} else {
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_REALM,
cmor_tables
[nVarRefTblID].vars
[ref_var_id].realm, 0);
}
} else {

I'm not sure why it was decided to only use the first value in a list of realms. Should this be removed so that every value in the list is included?

@durack1 @matthew-mizielinski

from cmor.

durack1 avatar durack1 commented on July 3, 2024

@mauzey1 this seems like another bug. The realm is not being used in either the DRS/directory or filename (the table_id captures this info and is included in both) so should be written out to the file as provided by the table entries

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.