Project

General

Profile

remapping on a different grid

Added by Matteo Borgnino over 1 year ago

Hi,
I need to remap my data from this grid #
  1. gridID 1 #
    gridtype = curvilinear
    gridsize = 190404
    xsize = 387
    ysize = 492
    xname = XLONG
    xdimname = west_east
    xlongname = "longitude"
    xunits = "degree_east"
    yname = XLAT
    ydimname = south_north
    ylongname = "latitude"
    yunits = "degree_north"
    xvals = ...... (many values)
    yvals = ......
    scanningMode = 64
to this grid: #
  1. gridID 1 #
    gridtype = lonlat
    gridsize = 9672
    xsize = 78
    ysize = 124
    xname = lon
    xlongname = "longitude"
    xunits = "degrees_east"
    yname = lat
    ylongname = "latitude"
    yunits = "degrees_north"
    xfirst = -64.97118
    xinc = 0.259366
    yvals = 0.09808194 0.2942469 0.4904153 0.6865892 0.8827711 1.078963 1.275167
    1.471386 1.667621 1.863876 2.060152 2.256451 2.452776 2.64913 2.845513
    3.041929 3.23838 3.434869 3.631396 3.827965 4.024578 4.221237 4.417945
    4.614704 4.811515 5.008382 5.205307 5.402292 5.599339 5.796451 5.99363
    6.190878 6.388198 6.585592 6.783063 6.980612 7.178243 7.375957 7.573758
    7.771646 7.969626 8.167699 8.365868 8.564135 8.762503 8.960973 9.15955
    9.358233 9.557029 9.755938 9.954961 10.1541 10.35337 10.55275 10.75227
    10.95191 11.15168 11.35159 11.55163 11.75181 11.95213 12.1526 12.35322
    12.55398 12.7549 12.95598 13.15721 13.3586 13.56016 13.76188 13.96378
    14.16584 14.36808 14.57051 14.77311 14.97589 15.17887 15.38203 15.58539
    15.78894 15.99269 16.19665 16.40081 16.60518 16.80977 17.01457 17.21958
    17.42482 17.63029 17.83598 18.04191 18.24807 18.45447 18.66111 18.868
    19.07514 19.28253 19.49018 19.69809 19.90626 20.1147 20.32341 20.5324
    20.74166 20.95121 21.16105 21.37118 21.5816 21.79232 22.00334 22.21467
    22.42632 22.63828 22.85055 23.06316 23.27609 23.48935 23.70296 23.9169
    24.13119 24.34584 24.56084 24.7762 24.99192
    scanningMode = 64

If I do
cdo remapcon,<output_grid> <input_file> <output_file>
it returns
cdo remapcon (Abort): Source grid cell corner coordinates missing!

So i thought to do a sellonlatbox,4,20,-59,-50 of the larger (output) grid, but it gives me cdo sellonlatbox (Abort): Longitudinal dimension is too small!

How can i solve this?
Thanks!


Replies (4)

RE: remapping on a different grid - Added by Estanislao Gavilan over 1 year ago

Hi Matteo,

cdo needs the grid corners to interpolate a curvilinear grid into another. Therefore, your nc file should also have these variables: nvertex, xbounds and ybounds.

Kind regards,

Estanislao

RE: remapping on a different grid - Added by Ralf Mueller over 1 year ago

hi!
I think the problem is more, that you what to perform conservative remapping: this involves grid cell areas for which the cell corners are needed. if you choose another interpolation (e.b. bilinear) corners are note needed.

cheers
ralf

RE: remapping on a different grid - Added by Matteo Borgnino over 1 year ago

Thanks for the answers!
I tried with remapbil and it works, but it gives me some issues with some coordinates and variables. In particular it does not recognize time and it creates a new variable about time.
Here the details:
STARTING FILE INFO:
dimensions:
Time = UNLIMITED ; // (1 currently)
DateStrLen = 19 ;
west_east = 387 ;
south_north = 492 ;
bottom_top = 74 ;
bottom_top_stag = 75 ;
soil_layers_stag = 6 ;
west_east_stag = 388 ;
south_north_stag = 493 ;
seed_dim_stag = 34 ;
variables:
char Times(Time, DateStrLen) ;
float XLAT ;
....
float T2 ;

FINAL FILE INFO:
dimensions:
XTIME = UNLIMITED ; // (1 currently)
west_east = 387 ;
south_north = 492 ;
variables:
float XTIME ;
XTIME:standard_name = "time" ;
XTIME:units = "minutes since 2019-12-01 00:00:00" ;
XTIME:calendar = "standard" ;
XTIME:axis = "T" ;
float XLAT ;
....
float T2 ;

As you can see, a new variable XTIME is created and XLAT and T2 dimensions differ from the original ones
XLAT --> XLAT
T2 --> T2

How can I deal with this? Am i doing something wrong?

RE: remapping on a different grid - Added by Ralf Mueller over 1 year ago

no, u didnt do anything wrong. WRF output is not 100% CF-conform and CDO tries to handle this.
you might search for other WRF-related chats here in the forum (Search field in the upper right corner)

cheers
ralf

    (1-4/4)