xMIP icon indicating copy to clipboard operation
xMIP copied to clipboard

Renaming dimensions 'i'/'j' not working properly

Open jbusecke opened this issue 2 years ago • 1 comments
trafficstars

Our current logic assumes that i/j correspond to x/y respectively. I just found an example dataset where that does not seem to be the case: 'CMIP.CMCC.CMCC-ESM2.historical.r1i1p1f1.Omon.tos.gn.gs://cmip6/CMIP6/CMIP/CMCC/CMCC-ESM2/historical/r1i1p1f1/Omon/tos/gn/v20210114/ image

from xmip.utils import google_cmip_col
col = google_cmip_col()
cat = col.search(
    variable_id='tos', 
    experiment_id=['historical', 'ssp245'], 
    table_id='Omon', 
    source_id=['CMCC-ESM2'],
    require_all_on=['source_id', 'grid_label', 'member_id']
)
cat
ddict_debug = cat.to_dataset_dict(aggregate=False, preprocess=None)
da_test = ddict_debug['CMIP.CMCC.CMCC-ESM2.historical.r1i1p1f1.Omon.tos.gn.gs://cmip6/CMIP6/CMIP/CMCC/CMCC-ESM2/historical/r1i1p1f1/Omon/tos/gn/v20210114/.20210114'].longitude
for co in da_test.coords:
    da_test.coords[co].attrs={}
da_test.attrs={}
da_test.plot()

image

I am wondering if this is faulty metadata for this particular dataset or if we need to revise our assumption here that e.g. i is always the label of the nominal east-west direction (which I am pretty sure x is in other datasets`).

jbusecke avatar Aug 28 '23 15:08 jbusecke

I investigated this a bit further here and so far it seems this is an issue with only one of institutions (CMCC) and their models.

I would be curious to see if we can confirm from official CMIP side that this is a bug.

jbusecke avatar Aug 28 '23 16:08 jbusecke