Project

General

Profile

Rotated Coordinates

Added by Alejandro Martínez over 13 years ago

Hello:

I'm trying to analyse a data set on EXTRA format, but the field is on rotated coordinates. I used the remapbil operator of CDO to obtain an interpolated field to geographic coordinates but I don't know how to define properly the target grid: on page 12 of CDO guide there is some information but when I type

..$ cdo remapbil,mygrid.txt ifile ofile

I get the line:

cdo remapbil (Abort): Remapping of generic data failed!

I'm using an ASCII file, "mygrid.txt", with the following information:

gridtype = lonlat
xsize = 360
ysize = 180
xfirst = −179.5
xinc = 1
yfirst = -89.5
yinc = 1
xnpole = -90
ynpole = -25

If I change xsize and ysize by the number of longitudes and latitudes, respectively, on the original data set, I get an ofile that seems identical to the original data set ifile: It is like if no interpolation is performed (I checked the first grid boxes).
I will apreciate any information about this questions.
Best regards
Alejandro


Replies (5)

RE: Rotated Coordinates - Added by Uwe Schulzweida over 13 years ago

Hi Alejandro,

Remapping of generic data failed!
means that the remapping routine couldn't find data on a geographic grid. Thats because the inputfile (EXTRA format) doesn't contain any grid information. In this case you have to specify the grid information of the source data before the remapping. This can be done with the operator setgrid:
cdo remapbil,targetgrid -setgrid,sourcegrid ifile ofile

Regards, Uwe

RE: Rotated Coordinates - Added by Alejandro Martínez over 13 years ago

Hi Uwe,

Thank you very much for your answer. I wrote a sourcegrid with this information:

gridtype = lonlat
xsize = 121
ysize = 145
xfirst = -30.75
xinc = 0.5
yfirst = -20.75
yinc = 0.5
xnpole = -90
ynpole = 25

where xfirst and yfirst are the coordinates of the bottom left corner on the rotated grid with pole at (-90,25) in the geographic grid.
The target grid is:

gridtype = lonlat
xsize = 720
ysize = 360
xfirst = −179.5
xinc = 0.5
yfirst = -89.5
yinc = 0.5

I expected the new field to have nonzero values on a region and zero for the rest of the domain specified in the target grid. However I obtained two regions with the constant field value -9e+33 separated by a boundary with value -10e+33. I also tried using xsize=121 and ysize= 145 on the target grid (as on the source grid) but I obtained a constant field with value -9e+33 (the undef value).
Thanks in advance for any information.
Best regards,
Alejandro

RE: Rotated Coordinates - Added by Uwe Schulzweida over 13 years ago

Hi Alejandro,
Could you please attach an example file, that will help to analyze this problem.
Cheers,
Uwe

RE: Rotated Coordinates - Added by Alejandro Martínez over 13 years ago

Hi Uwe,

I figured out that I had a problem when displaying the data after the rotation: I got rid of the missvalues by redefining them to a constant. Now I can see the fields on GrADS. Thank you very much for your advice. However I still have a problem: the field is interpolated to the wrong region, and deformed. I think the problem is the set of parameters I'm using for the rotated grid. I'm specifying the rotated pole for the input field (the source grid you mentioned before), and as far as I know the xfirst and yfirst parameters are the coordinates of the bottom left corner of the domain in rotated coordinates. I want to be sure I'm specifying the source and target grids properly, as seen above. I'm sending to you two images. In 'withOutRot.gif' I'm using a sourcegrid with north pole equal to the geographic pole, and the (xfirst,yfirst) coordinates equal to the aproximated geographic coordinates of the domain. In 'withRot.gif' I'm using the parameters specified above for the sourcegrid. I just want to confirm if the rotated pole is specified in the source grid. In the case the source grid is correct, I will know that the rotated parameters (xnpole,xfirst,...) are wrong.

Thanks again for your atention.
Regards

Alejandro

RE: Rotated Coordinates - Added by Alejandro Martínez over 13 years ago

Alejandro Martínez wrote:

Hi Uwe,

I figured out that I had a problem when displaying the data after the rotation: I got rid of the missvalues by redefining them to a constant. Now I can see the fields on GrADS. Thank you very much for your advice. However I still have a problem: the field is interpolated to the wrong region, and deformed. I think the problem is the set of parameters I'm using for the rotated grid. I'm specifying the rotated pole for the input field (the source grid you mentioned before), and as far as I know the xfirst and yfirst parameters are the coordinates of the bottom left corner of the domain in rotated coordinates. I want to be sure I'm specifying the source and target grids properly, as seen above. I'm sending to you two images. In 'withOutRot.gif' I'm using a sourcegrid with north pole equal to the geographic pole, and the (xfirst,yfirst) coordinates equal to the aproximated geographic coordinates of the domain. In 'withRot.gif' I'm using the parameters specified above for the sourcegrid. The images include names for the corners of the domain to compare the distortion (1,2,3,4 in white). I need to obtain something as 'withOutRot.gif'

I just want to confirm if the rotated pole is specified in the source grid. In the case the source grid is correct, I will know that the rotated parameters (xnpole,xfirst,...) are wrong.

Thanks again for your atention.
Regards

Alejandro

    (1-5/5)