Project

General

Profile

Regridding using CDO

Added by Angelo Teixeira Lemos 3 months ago

Dear colleagues,
I am using the following cdo command to obtain the information of a grid file (from AQUA/Modis):
cdo griddes file_AQUA.nc

In this step, the following information was obtained: #
  1. gridID 1 #
    gridtype = lonlat
    gridsize = 37324800
    xsize = 8640
    ysize = 4320
    xname = lon
    xlongname = "Longitude"
    xunits = "degrees_east"
    yname = lat
    ylongname = "Latitude"
    yunits = "degrees_north"
    xfirst = -179.9792
    xinc = 0.04166667
    yfirst = 89.97916
    yinc = -0.04166667 #
  2. gridID 2 #
    gridtype = generic
    gridsize = 768
    xsize = 256
    ysize = 3
    cdo griddes: Processed 3 variables [0.00s 11MB]

My next step was to generate a text file with the grid information of the AQUA/Modis file through the command:
cdo griddes file_AQUA.nc > grid_file_AQUA.txt

I would like to use this text grid file information to regridding a NetCDF file (from ORAS5).
I am using this command:

cdo -O remapbil,grid_file_AQUA.txt file_ORAS.nc new_file_ORAS.nc

The file was created, but the temperature variable is incorrect when I tryied to extract it.
(Expected COUNT to be positive)

Anyone can help?


Replies (1)

RE: Regridding using CDO - Added by Estanislao Gavilan 3 months ago

Hi Angelo,

I think the the problem is your yinc is negative and it should be positive. It could be a consequence of your yfirst. Try to change the signs to see if it works. Also, I can observe that you have 2 grids..(gridID 1 and 2). That is going to give you trouble. Your grid file should only have information about the destination grid, so you must delete the repeated information.

Kind regards,

Estanislao

    (1-1/1)