Project

General

Profile

frome fine to coarse resolution: simple average?

Added by Philippe Roudier over 11 years ago

Hi
I have a problem, I don't find the solution in th manual.
I have a grid (netcdf of course) with fine spatial resolution and I would like to convert it into a one with coarser resolution. I would like to do it performing a simple average on the pixels covered by the "big cell", so remapnn or remapbil are not relevant.
any ideas?
thanks for your help


Replies (6)

RE: frome fine to coarse resolution: simple average? - Added by Uwe Schulzweida over 11 years ago

You can also try gridboxmean, use

cdo gridboxmean,2,2 ifile ofile
to perform a weighted average on 2x2 pixels.

RE: frome fine to coarse resolution: simple average? - Added by Philippe Roudier over 11 years ago

Thanks for your help. I was thinking about remapcon
I am trying to understand what remapcon does exactly reading the doc file, but it is not that easy. Do you know by chance a link with illustrated example of this function?
In my case, for variables like runoff I need to go from a curvilinear (5*5km) grid to a lonlat (0.5*0.5degree) one.

RE: frome fine to coarse resolution: simple average? - Added by Ralf Mueller over 11 years ago

conservative remapping computes for each target cell the weighted sum (by contributing area) of all contributing source cells.

RE: frome fine to coarse resolution: simple average? - Added by Philippe Roudier over 11 years ago

I think this is indeed the good function, however I got an error message when trying:

cdo remapcon,target_grid.txt input.nc output.nc

cdo remapcon (Abort): grid1 corner missing!

It seems to be a prb my one of the grid (surely the 2nd one):

target grid: #
  1. gridID 0 #
    gridtype = lonlat
    gridsize = 8584
    xname = lon
    xlongname = longitude
    xunits = degrees
    yname = lat
    ylongname = latitude
    yunits = degrees
    xsize = 116
    ysize = 74
    xfirst = -24.75
    xinc = 0.5
    yfirst = 35.25
    yinc = 0.5

input.nc grid

#
  1. gridID 0 #
    gridtype = curvilinear
    gridsize = 550800
    xname = lon
    xlongname = longitude
    xunits = degrees_east
    yname = lat
    ylongname = latitude
    yunits = degrees_north
    xsize = 680
    ysize = 810
    xvals = -9.46942234 -9.41638756 -9.36334133 -9.31028366 -9.25721455 -9.20413494
    -9.15104294 -9.09793949 -9.04482555 -8.99170017 -8.93856335 -8.88541508
    -8.83225632 -8.77908516 -8.72590351 -8.67271137 -8.61950779 -8.56629276
    -8.51306629 -8.45983028 -8. etc............

RE: frome fine to coarse resolution: simple average? - Added by Uwe Schulzweida over 11 years ago

The conservative remapping with remapcon needs the coordinates of all gridcell corners for the source and the target grid. For a regular lonlat grid these corners can be recomputed in CDO. But this is not possible for a curvilinear grid.

    (1-6/6)