Project

General

Profile

Variable has unsupported generic grid when remapping

Added by Justin Hicks over 6 years ago

Hello,

I am trying to do a 2nd order conservative remapping of the NVAP-M total precipitable water vapor dataset using the following command:

cdo remapcon2,/data2/NEWS_SWEC/Products/Ancillary_Products/SWECarea.nc 2009.365.NVAPC.tpw.1xdaily.nc 2009.365.NVAPC.tpw.1xdaily.rmp.nc

However, I get the following error: cdo remapcon2 (Abort): Variable water_vapor has an unsupported generic grid!

I've used the 'selname' option to remap a specific variable before, but that would not work in this case because everything has a generic grid.

The results of typing in 'cdo sinfov 2009.365.NVAPC.tpw.1xdaily.nc' are below:

File format : NetCDF4 ZIP
-1 : Institut Source Steptype Levels Num Points Num Dtype : Parameter name
1 : unknown unknown constant 1 1 64800 1 F32z : water_vapor
2 : unknown unknown constant 6 2 64800 1 I8 z : SSMI_DSC
3 : unknown unknown constant 8 3 64800 1 I8 z : HIRS_DSC
4 : unknown unknown constant 1 1 64800 1 I8 z : Sonde_DSC
5 : unknown unknown constant 1 1 64800 1 I8 z : AIRS_DSC
Grid coordinates :
1 : generic : points=64800 (360x180)
Vertical coordinates :
1 : surface : levels=1
2 : generic : levels=6
lev : 1 to 6 by 1 level
3 : generic : levels=8
lev : 1 to 8 by 1 level
cdo sinfon: Processed 5 variables ( 0.01s )

How can I change the generic grid to one that is supported using this remapping technique?

Thanks,

-Justin


Replies (4)

RE: Variable has unsupported generic grid when remapping - Added by Karin Meier-Fleischer over 6 years ago

Hi Justin,

is it possible to upload a test file, e.g. one timestep for an affected variable.

-Karin

RE: Variable has unsupported generic grid when remapping - Added by Justin Hicks over 6 years ago

Hi Karin,

I will attach a test file on this reply. The file has a single day of data.

Thanks,

-Justin

RE: Variable has unsupported generic grid when remapping - Added by Karin Meier-Fleischer over 6 years ago

Hi Justin,

cdo says you have a generic grid because your data file hasn't have coordinate variables lon and lat.
You can add these variables using the setgrid operator. First, you must know which grid it is and I assume based on the ncdump output

ncdump -h 2000.001.NVAPC.tpw.1xdaily.nc

netcdf \2000.001.NVAPC.tpw.1xdaily {
dimensions:
    nx = 360 ;
    ny = 180 ;
    n_ssmi = 6 ;
    n_hirs = 8 ;
variables:
    float water_vapor(ny, nx) ;
        water_vapor:standard_name = "atmosphere_mass_content_of_water_vapor" ;
        water_vapor:long_name = "NVAP-M Climate Total Column Water Vapor" ;
        water_vapor:units = "mm" ;
        water_vapor:production_version = "1.0" ;
        water_vapor:missing_value = -9999.f ;
        water_vapor:valid_range = 0.f, 80.f ;
    byte SSMI_DSC(n_ssmi, ny, nx) ;
        SSMI_DSC:long_name = "Data Source Code for SSM/I on DMSP F08-F15" ;
        SSMI_DSC:valid_range = 0s, 1s ;
        SSMI_DSC:ssmi_platforms = "F08, F10, F11, F13, F14, F15" ;
    byte HIRS_DSC(n_hirs, ny, nx) ;
        HIRS_DSC:long_name = "Data Source Code For HIRS on NOAA 09-17" ;
        HIRS_DSC:valid_range = 0s, 1s ;
        HIRS_DSC:hirs_platforms = "N09, N10, N11, N12, N14, N15, N16, N17" ;
    byte Sonde_DSC(ny, nx) ;
        Sonde_DSC:long_name = "Data Source Code for Radiosonde" ;
        Sonde_DSC:valid_range = 0s, 1s ;
    byte AIRS_DSC(ny, nx) ;
        AIRS_DSC:long_name = "Data Source code for AIRS" ;
        AIRS_DSC:valid_range = 0s, 1s ;

// global attributes:
        :conventions = "CF-1.6" ;
        :title = "NASA Water Vapor Project - MEaSUREs Dataset" ;
        :institution = "Science and Technology Corp., METSAT Division" ;
}

that it is a latlon grid where lon=0 to 360 degrees and lat=-90 to 90 degrees with 1 degree interval each (if this is wrong you have to change the grid file below).

The grid file, here 'grid_latlon_global.txt', would look like the following

gridtype  = lonlat
gridsize  = 64800
xsize     = 360
ysize     = 180
xname     = lon
xlongname = "longitude" 
xunits    = "degrees_east" 
yname     = lat
ylongname = "latitude" 
yunits    = "degrees_north" 
xfirst    = 0
xinc      = 1.0 
yfirst    = 90
yinc      = 1.0

Add the coordinates and write the data to e.g. 'data_with_latlon.nc'

cdo -f nc -setgrid,grid_latlon_global.txt 2000.001.NVAPC.tpw.1xdaily.nc data_with_latlon.nc

Now, you can remap the data to another grid, like

cdo remapcon2,/data2/NEWS_SWEC/Products/Ancillary_Products/SWECarea.nc  data_with_latlon.nc  data_with_latlon.rmp.nc

-Karin

RE: Variable has unsupported generic grid when remapping - Added by Justin Hicks over 6 years ago

Karin,

Thank you!! This works perfectly!

-Justin

    (1-4/4)