Project

General

Profile

fldmean weigths

Added by e ddc almost 13 years ago

Hi Uwe,

In the cdo documentation is said that:

fldmean computes the mean over a grid as :
For every gridpoint x1 , ..., xn of the same field [the mean] is:
o(t, 1) = mean{i(t, x ), x1 < x ≤ xn }
weighted by area weights obtained by the input field.

1) Suppose you have a grid as the ORCA oceanic grid (http://www.nemo-ocean.eu/About-NEMO/Gallery/Meshmask-grid) very irregular near the North Pole. How cdo compute the weights?

2) and, if necessary, how can the user modify or specify the weights used by fldmean ?

3) If the grid is a regular lat/lon grid are the weights 1/cos(lat) or 1/(cos^2(lat)) ?

Thanking you in advance,

Best regards,

Eduardo


Replies (1)

RE: fldmean weigths - Added by Uwe Schulzweida almost 13 years ago

Hi Eduardo,

The weights are exclusive computed from the grid cell area. The netCDF variable for the cell area is defined by the attribute cell_measures:

  var:cell_measures = "area: cell_area" ;
If the cell area is not available then it will be computed from the geographical coordinates via spherical triangles. This is only possible if the geographical coordinates of the grid cell corners are available or derivable. Otherwise fldmean gives a warning message and uses constant area weights.
You can overwrite/set the grid cell area with the undocumented CDO function setgridarea. The parameter for this function is a data file with one field. This field must have the same grid size as the input file:
cdo -fldmean -setgridarea,gridareafile  ifile ofile

The ORCA files I have (some years old) are without the coordinates of the grid cell corners. In this case fldmean is using constant area weights or you have to set it with setgridarea.

Best regards,
Uwe

    (1-1/1)