0

I am trying to understand why the following CMIP ocean model data file does not appear to load properly into iris. My understanding is that the variables for latitude and longitude should be mapped to grid_latitude and grid_longitude, but this is not happening. CMIP data is supposed to be CF compliant. Here is the ncdump for the file:

netcdf tos_Omon_GISS-E2-1-G_historical_r1i1p1f2_195001_r {
dimensions:
        time = UNLIMITED ; // (1 currently)
        bnds = 2 ;
        lon = 288 ;
        lat = 180 ;
variables:
        double time(time) ;
                time:standard_name = "time" ;
                time:long_name = "time" ;
                time:bounds = "time_bnds" ;
                time:units = "days since 1950-1-16 00:00:00" ;
                time:calendar = "365_day" ;
                time:axis = "T" ;
        double time_bnds(time, bnds) ;
        double lon(lon) ;
                lon:standard_name = "longitude" ;
                lon:long_name = "longitude" ;
                lon:units = "degrees_east" ;
                lon:axis = "X" ;
                lon:bounds = "lon_bnds" ;
        double lon_bnds(lon, bnds) ;
        double lat(lat) ;
                lat:standard_name = "latitude" ;
                lat:long_name = "latitude" ;
                lat:units = "degrees_north" ;
                lat:axis = "Y" ;
                lat:bounds = "lat_bnds" ;
        double lat_bnds(lat, bnds) ;
        float tos(time, lat, lon) ;
                tos:standard_name = "sea_surface_temperature" ;
                tos:long_name = "Sea Surface Temperature" ;
                tos:units = "degC" ;
                tos:_FillValue = 1.e+20f ;
                tos:missing_value = 1.e+20f ;
                tos:comment = "Potential temperature at the upper-most grid cell." ;
                tos:cell_methods = "area: mean where sea time: mean" ;
                tos:cell_measures = "area: areacello volume: volcello" ;
                tos:history = "2019-08-19T16:53:56Z altered by CMOR: replaced missing value flag (-1e+30) with standard missing value (1e+20)." ;

// global attributes:
.
.
.
}

Here is a print of the iris cube:

In [26]: print(cube)
sea_surface_temperature / (degC)    (time: 1; latitude: 180; longitude: 288)
    Dimension coordinates:
        time                             x            -               -
        latitude                         -            x               -
        longitude                        -            -               x
    Cell methods:
        mean where sea              area
        mean                        time
    Attributes:
.
.
.
Brendan
  • 31
  • 3
  • The Iris Cube structure is designed to follow the NetCDF structure, so if the SST’s dimensions are described by latitude and longitude in the file, then latitude and longitude become dimension coordinates on the SST cube. I think grid_latitude and grid_longitude are used to describe rotated pole grids, but I have no experience with them. – RuthC Apr 02 '22 at 19:52
  • Okay. Thanks. I was hoping Iris would abstract the geographic dimension names. I did not want to have to write code to deal with all the different possible names for lat and lon. – Brendan Apr 04 '22 at 12:17
  • You can get hold of the coordinates by `lat_coord = cube.coord(axis=“Y”)`. That should work whether it’s “latitude” or “grid_latitude”. Similarly using “X” for longitude. – RuthC Apr 04 '22 at 12:42

0 Answers0