Project

General

Profile

Unsupported target grid type (generic)

Added by buse uysaler over 1 year ago

Dear all,

I have been trying to interpolate a data from ISIMIP with using mask file by:

cdo remapbil,black_sea.mask.nc out.nc out_bs.nc

And I got the remapbil (Abort): Unsupported target grid type (generic)! . Then I tried to solve this with "ncatted". I have edited the long_name,lat_name,units of lon and lat; however I have still get the same error.
I know that this asked many times and I tried to solve with the suggestions; however, I still have the same error.

I will share the information of ISIMIP data, the original mask file, and then edited version of this file.

The information of netcdf:

gridtype  = lonlat
gridsize  = 64800
xsize     = 360
ysize     = 180
xname     = lon
xlongname = "Longitude" 
xunits    = "degrees_east" 
yname     = lat
ylongname = "Latitude" 
yunits    = "degrees_north" 
xfirst    = -179.5
xinc      = 1
yfirst    = 89.5
yinc      = -1
scanningMode = 64

dimensions:
    lat = 180 ;
    lon = 360 ;
    time = UNLIMITED ; // (2 currently)
variables:
    double lat(lat) ;
        lat:standard_name = "latitude" ;
        lat:long_name = "Latitude" ;
        lat:units = "degrees_north" ;
        lat:axis = "Y" ;
    double lon(lon) ;
        lon:standard_name = "longitude" ;
        lon:long_name = "Longitude" ;
        lon:units = "degrees_east" ;
        lon:axis = "X" ;
    double time(time) ;
        time:standard_name = "time" ;
        time:long_name = "Time axis" ;
        time:units = "months since 1601-1-1 00:00:00" ;
        time:calendar = "gregorian" ;
        time:axis = "T" ;
    float zmeso-vint(time, lat, lon) ;
        zmeso-vint:_FillValue = 1.e+20f ;
        zmeso-vint:missing_value = 1.e+20f ;
        zmeso-vint:standard_name = "mole_content_of_mesozooplankton_expressed_as_carbon_in_sea_water" ;
        zmeso-vint:long_name = "Mole Content of Mesozooplankton expressed as Carbon in sea water" ;
        zmeso-vint:units = "mol m-2" ;
        zmeso-vint:comment = "vertically integrated over all ocean levels by ISIMIP data management team" ;

The information of mask file

# gridID 1
#
gridtype  = generic
gridsize  = 22750
xsize     = 182
ysize     = 125
scanningMode = 64

netcdf black_sea.mask {
dimensions:
    y = 125 ;
    x = 182 ;
variables:
    double lon(y, x) ;
        lon:long_name = "easting of elevation points" ;
        lon:units = "degree" ;
        lon:coords = "east_e north_e" ;
    double mask(y, x) ;
        mask:long_name = "free surface mask" ;
        mask:units = "dimensionless" ;
        mask:coords = "east_e north_e" ;
    double lat(y, x) ;
        lat:long_name = "northing of elevation points" ;
        lat:units = "degree" ;
        lat:coords = "east_e north_e" ;

The information of edited black sea mask

netcdf black_sea.mask {
dimensions:
    y = 125 ;
    x = 182 ;
variables:
    double lon(y, x) ;
        lon:units = "degrees_east" ;
        lon:coords = "east_e north_e" ;
        lon:long_name = "Longitude" ;
    double mask(y, x) ;
        mask:long_name = "free surface mask" ;
        mask:units = "dimensionless" ;
        mask:coords = "east_e north_e" ;
    double lat(y, x) ;
        lat:long_name = "Latitude" ;
        lat:units = "degrees_north" ;
        lat:coords = "east_e north_e" ;

out.nc (293 KB) out.nc
black_sea.mask.nc (534 KB) black_sea.mask.nc the original one. before editted.

Replies (1)

RE: Unsupported target grid type (generic) - Added by Karin Meier-Fleischer over 1 year ago

Mask file: the coordinates attribute for mask is missing and the units of lon and lat are wrong.

ncatted -a coordinates,mask,c,c,"lat lon" \
        -a units,lat,o,c,"degrees_north" \
        -a units,lon,o,c,"degrees_east" 
        black_sea.mask.nc black_sea.mask_with_coordinates.nc
    (1-1/1)