Skip to contents

This module reads the grid cell area of the first grid from the input stream. If the grid cell area is missing it will be computed from the grid coordinates. The area of a grid cell is calculated using spherical triangles from the coordinates of the center and the vertices. The base is a unit sphere which is scaled with the radius of the planet. The default planet radius is 6371000 meter. The parameter radius or the environment variable PLANET_RADIUS can be used to change the default. Depending on the chosen operator the grid cell area or weights are written to the output stream.

Usage

cdo_gridarea(ifile, radius = NULL, ofile = NULL)

cdo_gridweights(ifile, radius = NULL, ofile = NULL)

Arguments

ifile

String with the path to the input file.

radius

FLOAT - Planet radius in meter

ofile

String with the path to the output file.

Details

gridarea     Grid cell area
             Writes the grid cell area to the output stream. If the grid cell area have to
             be computed it is scaled with the planet radius to square meters.
gridweights  Grid cell weights
             Writes the grid cell area weights to the output stream.