Project

General

Profile

Transformation of data from a rotated grid to a geographical coordinate system

Added by Semjon Schimanke over 7 years ago

Hello everyone,

for the first time, I am working with data on a rotated grid. Naturally, the first thing I would like to do is to transfer this data back onto the corresponding real grid, e.g. lon/lat coordinates. Herewith, several questions occur to me. The CDOs seem to offer different ways how to do that. But, which one is correct or best?

1. Do it by interpolation. This is one way how I managed to change it.
cdo -f nc remapbil,New_coordinates.txt Data_on_rotated_grid.grb Outfile.nc
However, CDOs offer a lot of different interpolation methods. Which should be best if interpolating from a rotated grid?

2. For scalar fields, it should be OK to simple change the grid description, or? So, knowing the real lon/lat coordinates you could do:
cdo -f nc setgrid,New_coordinates.txt Data_on_rotated_grid.grb Outfile.nc
However, yet I did not compute the exact coordinates of the rotated grid in the real world. Therefore, I used the interpolation method so far. Should the outcome be identical in both cases, at least more or less if the same grid is used for the interpolation method? Moreover, is there a CDO command to compute the real coordinates and write them to a file? I am pretty sure the CDOs compute these coordinates for some commands internal, so there should be a way.

3. Now it comes to wind fields. These must be handled more carefully. Here, the CDOs offer a special operator: rotuvb. I used that for my wind fields but I feel unconfident with the output. The wind data is changing so some transformation takes place, but the grid description is not changing. Do I have to set the grid description manual? Or do I misunderstand the intention of this command and the data is still on the old rotated grid?

Finally, here is a grid description of one example file:
cdo griddes Wind_196212_both.grb #
  1. gridID 0 #
    gridtype = lonlat
    gridsize = 38316
    xname = rlon
    xlongname = longitude in rotated pole grid
    xunits = degrees
    yname = rlat
    ylongname = latitude in rotated pole grid
    yunits = degrees
    xsize = 186
    ysize = 206
    xnpole = -162
    ynpole = 39.25
    xfirst = -23.38
    xinc = 0.22
    yfirst = -22.44
    yinc = 0.22

Thanks a lot for any help,
Semjon


Replies (2)

RE: Transformation of data from a rotated grid to a geographical coordinate system - Added by Semjon Schimanke over 7 years ago

Hi,

meanwhile, I found some of the answers myself.
1. If you know (or compute) the geographical coordinates it does not make a big difference whether you use "setgrid" or "remapbil". Only small differences exist between both fields (see below) which will be related to rounding while interpolating - I guess. Moreover, you get some NaN at the boundary if an interpolation was not possible. In general, the "setgrid"-command should be prefered, I would say.
2. Wind fields: It seems necessary to set the grid manually after the rotation ("rotuvb").

Regards,
Semjon

PS:
tmp$ cdo -f nc -s remapbil,RCA4_grid.txt Temperature.grb Temperature_remapbil.nc
tmp$ cdo -f nc -s setgrid,RCA4_grid.txt Temperature.grb Temperature_setgrid.nc
tmp$ cdo info -sub Temperature_remapbil.nc Temperature_setgrid.nc
cdo info: Started child process "sub Temperature_remapbil.nc Temperature_setgrid.nc (pipe1.1)".
-1 : Date Time Param Level Size Miss : Minimum Mean Maximum
1 : 1962-01-01 00:00:00 250.1 1 38316 361 : -0.00024414 3.4976e-08 0.00021362
2 : 1962-01-01 03:00:00 250.1 1 38316 361 : -0.00024414 5.0655e-08 0.00021362
3 : 1962-01-01 06:00:00 250.1 1 38316 361 : -0.00024414 -1.4872e-05 0.00021362
4 : 1962-01-01 09:00:00 250.1 1 38316 361 : -0.00021362 6.1510e-08 0.00018311
5 : 1962-01-01 12:00:00 250.1 1 38316 361 : -0.00018311 5.4675e-08 0.00015259
6 : 1962-01-01 15:00:00 250.1 1 38316 361 : -0.00012207 4.1006e-08 0.00012207
7 : 1962-01-01 18:00:00 250.1 1 38316 361 : -9.1553e-05 1.4788e-05 0.00013733
8 : 1962-01-01 21:00:00 250.1 1 38316 361 : -0.00012207 1.4799e-05 0.00013733
9 : 1962-01-02 00:00:00 250.1 1 38316 361 : -0.00015259 3.6182e-09 0.00013733
10 : 1962-01-02 03:00:00 250.1 1 38316 361 : -0.00015259 1.4690e-05 0.00012207
11 : 1962-01-02 06:00:00 250.1 1 38316 361 : -0.00012207 1.4716e-05 0.00015259
12 : 1962-01-02 09:00:00 250.1 1 38316 361 : -9.1553e-05 1.4825e-05 0.00015259

RE: Transformation of data from a rotated grid to a geographical coordinate system - Added by Uwe Schulzweida over 7 years ago

Hi Semjon,

yes, setgrid should be prefered if you have the geographical coordinates available. You can also use remapnn instead of remapbil, but remapping is not needed in this case.
You can also use setgridtype,curvilinear to transform the rotated coordinates to geographical coordinates.
The undocumented operator rotuvb rotates the wind components back to a geographical system. The coordinates of the wind components have to be the same. No transformation takes place! You have to transform the wind coordinates to the scalar coordinates, if the data are e.g. on a C-Grid.

Regards,
Uwe

    (1-2/2)