Project

General

Profile

regriding data with CDO

Added by Serge Tom 19 days ago

Hello everyone,
I am new in cdo, and trying to use cdo to regrid irregular grid data to regular grid but I try to use all the supporting information in the forum but I an still getting this error message (cdo remapcon (Abort): Unsupported target grid type (generic)!)
my new grid info is gridtype = lonlat
gridsize = 25921
datatype = float
xsize = 161
ysize = 161
xname = LON
xlongname = "Longitude"
xunits = "degrees_east"
yname = LAT
ylongname = "Latitude"
yunits = "degrees_north"
xfirst = -20
xinc = 0.5
yfirst = -40
yinc = 0.5
scanningMode = 64
I am using the remapcon
cdo remapcon,mygrid Afrange_tree_230224_a.nc
however I don't know if the remapcon is the best interpollation
please help me to sort out where the mistake is in my regriding and advise which would be the best interpolation.
please find attached file.
Thank you in advance


Replies (2)

RE: regriding data with CDO - Added by Karin Meier-Fleischer 18 days ago

Hi Serge,

one attribute of the coordinate variables lon and lat has the wrong name 'unit', it has to be 'units'. IMO there is no way to directly rename an attribute of a coordinate variable, but you can delete it and create a new attribute with the correct 'units' name with ncatted from NCO.

ncatted -O -a unit,lon,d,, -a units,lon,c,c,"degrees_east" \
           -a unit,lat,d,, -a units,lat,c,c,"degrees_north" \
           Afrange_tree_230224_a.nc Afrange_tree_230224_a_lonlat.nc

RE: regriding data with CDO - Added by Serge Tom 13 days ago

Thank you so much Karin. It works

    (1-2/2)