Project

General

Profile

Conservative Remapping: Unsupported generic coordinates (Variable: block1)!

Added by Eric Keenan over 5 years ago

Hello! I am attempting to regrid a RCM precipitation data set from a rotated pole projection to a regular lat-lon projection using remapcon. However, I am receiving an error I am not sure how to resolve. Any advice/insight into 1) what is causing this issue and 2) how to resolve it would be much appreciated. For reference, I am using cdo version 1.9.4. Thanks!

The error is the following: cdo remapcon (Abort): Unsupported generic coordinates (Variable: block1)!

Command: cdo remapcon,RACMO2_output_grid_description.txt -setgrid,RACMO2_input_grid_description.txt precip.KNMI-2001.DMIS055.ERAIN.DD.nc regrid_precip.nc

The input grid descriptions are as follows:
gridtype = projection
xsize = 486
ysize = 200
xunits = 'degrees'
yunits = 'degrees'
xfirst = -12.25
xinc = 0.05
yfirst = -4.75
yinc = 0.05
grid_mapping_name = rotated_latitude_longitude
grid_north_pole_longitude = 13
grid_north_pole_latitiude = -161

The output grid descriptions are as follows:
gridtype = lonlat
xsize = 86
ysize = 15
xfirst = -29
xinc = 1
yfirst = -77
yinc = 1

ncdump command: "ncdump -h precip.KNMI-2001.DMIS055.ERAIN.DD.nc" yield the following:
netcdf precip.KNMI-2001.DMIS055.ERAIN.DD {
dimensions:
rlon = 486 ;
rlat = 200 ;
height = 1 ;
time = UNLIMITED ; // (3652 currently)
bnds = 2 ;
nblock1 = 40 ;
nblock2 = 400 ;
variables:
double lon(rlat, rlon) ;
lon:long_name = "longitude" ;
lon:units = "degrees_east" ;
double lat(rlat, rlon) ;
lat:long_name = "latitude" ;
lat:units = "degrees_north" ;
double dir(rlat, rlon) ;
dir:long_name = "angle of rotation" ;
dir:units = "degrees" ;
double rlon(rlon) ;
rlon:axis = "X" ;
rlon:long_name = "longitude in rotated pole grid" ;
rlon:standard_name = "grid_longitude" ;
rlon:units = "degrees" ;
double rlat(rlat) ;
rlat:axis = "Y" ;
rlat:long_name = "latitude in rotated pole grid" ;
rlat:standard_name = "grid_latitude" ;
rlat:units = "degrees" ;
double height(height) ;
height:axis = "Z" ;
height:standard_name = "height" ;
height:long_name = "height above the surface" ;
height:units = "m" ;
height:positive = "up" ;
int block1(nblock1) ;
block1:long_name = "GRIB Definition Block1" ;
int block2(nblock2) ;
block2:long_name = "GRIB Definition Block2" ;
double time(time) ;
time:axis = "T" ;
time:units = "days since 1950-01-01 00:00:00.0" ;
time:long_name = "time" ;
time:dtgstart = "2001010100" ;
time:bounds = "time_bnds" ;
time:calendar = "standard" ;
double time_bnds(time, bnds) ;
time_bnds:units = "days since 1950-01-01 00:00:00.0" ;
int dtg(time) ;
dtg:long_name = "Verifying Datum-Time Group at Start of Interval" ;
dtg:units = "yyyymmddhh" ;
int date_bnds(time, bnds) ;
date_bnds:long_name = "Verifying Date at Start and Finish of Interval" ;
date_bnds:units = "yyyymmdd" ;
int hms_bnds(time, bnds) ;
hms_bnds:long_name = "Verifying Hour-Minute-Second at Start and Finish of Interval" ;
hms_bnds:units = "hhmnss" ;
int assigned(time) ;
assigned:long_name = "Indicates whether data are stored (1) or not (0)" ;
assigned:units = "1" ;
float rotated_pole ;
rotated_pole:grid_mapping_name = "rotated_latitude_longitude" ;
rotated_pole:grid_north_pole_latitude = -161.f ;
rotated_pole:grid_north_pole_longitude = 13.f ;
rotated_pole:proj4_params = "-m 57.295779506 +proj=ob_tran +o_proj=latlon +o_lat_p=-161.0 +lon_0=193.0" ;
rotated_pole:proj_parameters = "-m 57.295779506 +proj=ob_tran +o_proj=latlon +o_lat_p=-161.0 +lon_0=193.0" ;
rotated_pole:projection_name = "rotated_latitude_longitude" ;
rotated_pole:long_name = "projection details" ;
rotated_pole:EPSG_code = "" ;
float precip(time, height, rlat, rlon) ;
precip:standard_name = "precipitation_flux" ;
precip:long_name = "Total Precipitative Flux" ;
precip:units = "kg m-2 s-1" ;
precip:cell_methods = "time: 24-hr averaged values" ;
precip:grid_mapping = "rotated_pole" ;
precip:coordinates = "lon lat" ;
precip:_FillValue = -9999.f ;

// global attributes:
:Conventions = "CF-1.4" ;
:source = "RACMO2" ;
:Domain = "DMIS055" ;
:Experiment = "ERAIN" ;
:institution = "Royal Netherlands Meteorological Institute (KNMI)" ;
:CreationDate = "Mon Jan 1 12:22:55 2018" ;
:comment = "asim2cdf: cpar=precip, iwmo=61, ilvt=105, ilev=0, idh=24, ihacc=24, ihstep=24, itmode=2, ivmode=0" ;
:title = "Total Precipitative Flux" ;
}


Replies (5)

RE: Conservative Remapping: Unsupported generic coordinates (Variable: block1)! - Added by Eric Keenan over 5 years ago

An update on the situation. I am able to get the function to work by only applying remapcon to the precip variable. However, I now receive many warnings that map weights are less than zero or greater than one. Is there a possible explanation for this?

command: cdo -L remapcon,RACMO2_output_grid_description.txt -selname,precip -setgrid,RACMO2_input_grid_description.txt precip.KNMI-2001.DMIS055.ERAIN.DD.nc regridded_precip.nc

warnings: cdo remapcon: Map weight < 0! grid1idx=15614 grid2idx=1032 nlink=16714 wts=-0.0152283
cdo remapcon: Map weight > 1! grid1idx=16100 grid2idx=1208 nlink=16789 wts=1.83306

RE: Conservative Remapping: Unsupported generic coordinates (Variable: block1)! - Added by Karin Meier-Fleischer over 5 years ago

Hi Eric,

can you upload your data file, RACMO2_input_grid_description.txt and RACMO2_output_grid_description.txt?

-Karin

RE: Conservative Remapping: Unsupported generic coordinates (Variable: block1)! - Added by Eric Keenan over 5 years ago

Karin,

Thanks for taking a look, much appreciated!

I've selected the first timestamp of the data file. Let me know if you need more. I'm also including a plot of the regrided precipitation .nc file currently produced by CDO. I should be clear that the command I included above (cdo -L remapcon,RACMO2_output_grid_description.txt -selname,precip -setgrid,RACMO2_input_grid_description.txt precip.KNMI-2001.DMIS055.ERAIN.DD.nc regridded_precip.nc) runs without errors, however, the output is unrealistic and is accompanied by the map weight errors. Thanks again!

RE: Conservative Remapping: Unsupported generic coordinates (Variable: block1)! - Added by Karin Meier-Fleischer over 5 years ago

Hi Eric,

the problem is conservative remapping remapycon or remapcon. If you use remapbil, remapnn or remapdis everything is ok when you don't use the setgrid operator.

cdo -remapbil,RACMO2_output_grid_description.txt -selname,precip precip.KNMI-2001.DMIS055.ERAIN.DD.nc regrid_precip.nc

Is the plot showing what you expect?

-Karin

RE: Conservative Remapping: Unsupported generic coordinates (Variable: block1)! - Added by Eric Keenan over 5 years ago

Karin,

Thanks, that trick worked! Yes, that is what I expect. Ideally, I'll sort out how to regrid while conserving mass. But for now, this is adequate. Thanks again!

    (1-5/5)