Closed ehogan closed 7 years ago
I talked to @taylor13 and he told me the WIP has not decided how to handle this yet.
Sorry about the confusion, the Table header have realm
which is a global attribute and the Variable has modeling_realm
which is a variable attribute. It seems as well that the CMIP6_day
table has a mixture of seaIce ocean
and atmos
variables. We might have to create 2 tables for day
stuff, I am not sure how to handle this just yet.
@dnadeau4 not certain what my role in this is?
@taylor13 What is the difference between realm (GLOBAL) attribute and modeling_realm (variable attribute). Can they be so different realm=atmos
modeling_realm=seaIce ocean
in the same file.
Solution: used the variable modeling_realm
as the global attribute realm
.
Will do soon....
This appears to be working in CMOR 3.2.2. I did notice the realm
in the Header
of the CMIP6_day.json
MIP table is now atmos
(see https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_day.json#L5), which matches with tasmin
. However, in the CMIP6_Amon.json
MIP table, the realm
in the Header
is atmos atmosChem
(see https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Amon.json#L5), but the realm in the output netCDF files is atmos
for e.g. ps
, (see https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Amon.json#L766) :)
I need to use modeling_realm
from tje variable metadata and pass it as Global Attribute
realm
. I have not got to this just yet. If I remember, the WIP
decided to use the first modeling_realm
value when you have 2 values.
Apologies for not being clear; I believe that the value of the modeling_realm
attribute from the variable metadata is already being used as the value of the realm
global attribute in the output netCDF file :)
Thanks! I just check the code and use modeling_realm
if it exist in the variable, otherwise I use realm
from the table. If we have 2 realms, both are passed to the file.
@dnadeau4 I'm just testing CMOR 3.2.2 and this issue has been reintroduced (the issue was resolved in CMOR 3.2.1), i.e. the realm
is being used instead of the modeling_realm
. Is there any chance you could take a look at this?
I did not change anything there....
https://github.com/PCMDI/cmor/blob/master/Src/cmor.c#L2621-L2633 Should take the variable realm first and then the table realm.
(I think the second table vars
should be indexed with var_id
not nVarRefTblID
).
Can you send me your variable and table as an example?
I'm so sorry @dnadeau4, I got myself confused (again!) :( Everything is working fine, please ignore me :)
I have produced an output netCDF file for
tasmin
using theCMIP6_day.json
MIP table. The value for themodeling_realm
attribute in theCMIP6_day.json
MIP table fortasmin
isatmos
(https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_day.json#L2932), but the value of therealm
global attribute in the output netCDF file isseaIce ocean
, which is equal to the value of therealm
attribute in the header of theCMIP6_day.json
MIP table (https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_day.json#L5). Should the value for themodeling_realm
attribute be used instead?