Project

General

Profile

Interpolate a rotated grid data to lonlat: remapcon does not work

Added by Sajjad Saeed about 8 years ago

Dear all,
I have a similar problem as Marissa Castro. I want to regridd the COSMO CLM data from rotated grid to lonlat grid using remapcon function but i get an error

cdo remapcon (Abort): Grid corner missing!

I also tried remapycon and remapcon2 but got the same error. Here is the command i used

cdo remapcon,grid_EOBS.nc TPREC_JAN2060_test.nc test.nc

I also tried to generate weights using genycon and gencon but got the same error as above.

Please find attached files.

I will very much appreciate you kind help in this regard.

Best regards
Sajjad


Replies (3)

RE: Interpolate a rotated grid data to lonlat: remapcon does not work - Added by Jaison-Thomas Ambadan about 8 years ago

Hi Sajjad,

The remapcon CDO operator needs grid corners -see Uwe's reply: https://code.zmaw.de/boards/1/topics/2198?r=2226#message-2226

If NCL is available, you could use NCL regridding function curvilinear_to_SCRIP to generate equivalent SCRIP grid for your input file and then remapcon works with setgrid

Attached is an example NCL script and the SCRIP grid that I generated using your input file

cdo -remapcon,grid_EOBS.nc -setgrid,TPREC_JAN2060_SCRIP_grid.nc TPREC_JAN2060.nc ofile.nc

Hope this help!
J

PS: you could use remapnn instead remapcon

RE: Interpolate a rotated grid data to lonlat: remapcon does not work - Added by Sajjad Saeed about 8 years ago

Dear Jaison,

Nice to see your message and quick response on the above problem.
Thanks a lot. Hope you are doing well.

I will test it and will let you know is there is any problem.

Best regards
Sajjad

RE: Interpolate a rotated grid data to lonlat: remapcon does not work - Added by Wei Chow almost 8 years ago

Hi Sajjad,
I'm used to write a CDO grid description myself for COSMO-CLM
an example:

gridtype = lonlat
gridsize = 10000
xname = rlon
xlongname = rotated longitude
xunits = degrees
yname = rlat
ylongname = rotated latitude
yunits = degrees
xsize = 100
ysize = 100
xnpole = ?-162.0?
ynpole = ?39.25?
xfirst = ?-12.00?
xinc = ?0.22?
yfirst = ?-12.00?
yinc = ?0.22?

fill in xnpole/ynpole/xfirst/xinc/yfirst/yinc with your own CCLM settings
you can find those keywords' definition in CDO User's Guide
save above as a text file (e.g. grid_TPREC.txt)
then

cdo remapcon,grid_EOBS.nc -setgrid,grid_TPREC.txt TPREC_JAN2060.nc ofile.nc

should works

    (1-3/3)