Project

General

Profile

gridarea not working with MOZART-output-file

Added by Katinka Petersen almost 14 years ago

I want to calculate the gridbox area of MOZART3-output file with cdo gridarea. The griddes shows me that there are two grids (see below). If I want to calculate the gridarea, cdo realizes that there are two grids and it takes the first one (but that is a wrong one, or what is it?):

cdo gridarea h0001_jan.nc gboxarea

cdo gridarea (Warning): Found more than 1 grid, using the first one!
cdo gridarea (Abort): Gridarea for generic data failed!

Is there a way to tell gridarea to calculte the area for gridID1 (and not gridID0), or has anyone an idea how I can calculate the gridarea?

Thank you! And regards,
Katinka

#
  1. gridID 0 #
    gridtype = generic
    gridsize = 1
    xname = x
    xunits = degrees
    yname = y
    yunits = degrees #
  2. gridID 1 #
    gridtype = lonlat
    gridsize = 18432
    xname = lon
    xlongname = longitude
    xunits = degrees_east
    yname = lat
    ylongname = latitude
    yunits = degrees_north
    xsize = 192
    ysize = 96
    xfirst = 0
    xinc = 1.875
    yfirst = -90
    yinc = 1.89474

Replies (1)

RE: gridarea not working with MOZART-output-file - Added by Uwe Schulzweida almost 14 years ago

Hi Katinka,
You can use the CDO operator sinfov to find out the variable names and the associated grids of your dataset. The CDO grid numbers and a short grid description are listed after "Horizontal grids :". To calculate the grid area of the second grid use:

cdo gridarea -selgrid,2 ifile ofile
Best wishes,
Uwe

    (1-1/1)