[ncl-talk] reordering variable attributes

Tabish Ansari tabishumaransari at gmail.com
Thu Jan 5 09:22:07 MST 2023


Hi

I'm getting an error "pio_support::pio_die:: myrank= -1 : ERROR" in the
CAM-Chem model when using new emission files. The only difference between
the new files and the old ones that work smoothly seems to be the order of
variable attributes.

These are the details of the old file that works:
netcdf edgar_HTAPv3_BIGALK_repaired2 {
dimensions:
        time = UNLIMITED ; // (228 currently)
        lon = 144 ;
        lat = 96 ;
variables:
        float time(time) ;
                time:standard_name = "time" ;
                time:long_name = "time" ;
                time:units = "days since 1997-01-01 00:00:00+0:00" ;
                time:calendar = "gregorian" ;
                time:axis = "T" ;
                time:_FillValue = 9.96921e+36f ;
        int date(time) ;
                date:units = "YYYYMMDD" ;
                date:long_name = "Date" ;
        double lon(lon) ;
                lon:units = "degrees_east" ;
                lon:long_name = "longitude" ;
                lon:axis = "X" ;
                lon:standard_name = "longitude" ;
        double lat(lat) ;
                lat:units = "degrees_north" ;
                lat:long_name = "latitude" ;
                lat:axis = "Y" ;
                lat:standard_name = "latitude" ;
        float HTAPv3_1_International_Shipping(time, lat, lon) ;
                HTAPv3_1_International_Shipping:units = "molecules/cm2/s" ;
                HTAPv3_1_International_Shipping:description =
"International_Shipping" ;
                HTAPv3_1_International_Shipping:long_name = "International
Shipping" ;
                HTAPv3_1_International_Shipping:remap = "remapped via
ESMF_regrid_with_weights: First-order Conservative" ;
                HTAPv3_1_International_Shipping:missing_value =
9.96921e+36f ;
                HTAPv3_1_International_Shipping:_FillValue = 9.96921e+36f ;
        float HTAPv3_2_1_Domestic_Aviation(time, lat, lon) ;
                HTAPv3_2_1_Domestic_Aviation:units = "molecules/cm2/s" ;
                HTAPv3_2_1_Domestic_Aviation:description =
"Domestic_Aviation" ;
                HTAPv3_2_1_Domestic_Aviation:long_name = "Domestic
Aviation" ;
                HTAPv3_2_1_Domestic_Aviation:remap = "remapped via
ESMF_regrid_with_weights: First-order Conservative" ;
                HTAPv3_2_1_Domestic_Aviation:missing_value = 9.96921e+36f ;
                HTAPv3_2_1_Domestic_Aviation:_FillValue = 9.96921e+36f ;
}

and here are the details of the new file that doesn't work:

dimensions:
        time = UNLIMITED ; // (228 currently)
        lon = 144 ;
        lat = 96 ;
variables:
        float time(time) ;
                time:standard_name = "time" ;
                time:long_name = "time" ;
                time:units = "days since 1997-01-01 00:00:00+0:00" ;
                time:calendar = "gregorian" ;
                time:axis = "T" ;
                time:_FillValue = 9.96921e+36f ;
        int date(time) ;
                date:units = "YYYYMMDD" ;
                date:long_name = "Date" ;
        double lon(lon) ;
                lon:units = "degrees_east" ;
                lon:long_name = "longitude" ;
                lon:axis = "X" ;
                lon:standard_name = "longitude" ;
        double lat(lat) ;
                lat:units = "degrees_north" ;
                lat:long_name = "latitude" ;
                lat:axis = "Y" ;
                lat:standard_name = "latitude" ;
        float HTAPv3_1_International_Shipping(time, lat, lon) ;
                HTAPv3_1_International_Shipping:remap = "remapped via
ESMF_regrid_with_weights: First-order Conservative" ;
                HTAPv3_1_International_Shipping:long_name = "International
Shipping" ;
                HTAPv3_1_International_Shipping:description =
"International_Shipping" ;
                HTAPv3_1_International_Shipping:units = "molecules/cm2/s" ;
                HTAPv3_1_International_Shipping:missing_value =
9.96921e+36f ;
                HTAPv3_1_International_Shipping:_FillValue = 9.96921e+36f ;
        float HTAPv3_2_1_Domestic_Aviation(time, lat, lon) ;
                HTAPv3_2_1_Domestic_Aviation:remap = "remapped via
ESMF_regrid_with_weights: First-order Conservative" ;
                HTAPv3_2_1_Domestic_Aviation:long_name = "Domestic
Aviation" ;
                HTAPv3_2_1_Domestic_Aviation:description =
"Domestic_Aviation" ;
                HTAPv3_2_1_Domestic_Aviation:units = "molecules/cm2/s" ;
                HTAPv3_2_1_Domestic_Aviation:missing_value = 9.96921e+36f ;
                HTAPv3_2_1_Domestic_Aviation:_FillValue = 9.96921e+36f ;
        float HTAPv3_2_2_International_Aviation(time, lat, lon) ;
                HTAPv3_2_2_International_Aviation:remap = "remapped via
ESMF_regrid_with_weights: First-order Conservative" ;
                HTAPv3_2_2_International_Aviation:long_name =
"International Aviation" ;
                HTAPv3_2_2_International_Aviation:description =
"International_Aviation" ;
                HTAPv3_2_2_International_Aviation:units = "molecules/cm2/s"
;
                HTAPv3_2_2_International_Aviation:missing_value =
9.96921e+36f ;
                HTAPv3_2_2_International_Aviation:_FillValue = 9.96921e+36f
;
}


Therefore, I want to change the order of the variable attributes to that in
the old file. Is there a way I can achieve this in NCL?

Thank you

with kind regards,

Tabish

-------------------------------
Dr Tabish Ansari
Research Associate
Air Quality Modelling Group
IASS-Potsdam
Germany
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20230105/ba0b3f7f/attachment.htm>


More information about the ncl-talk mailing list