Project

General

Profile

Weight Sum?

Added by Jonathan Buzan almost 3 years ago

Hi CDO Staff:

I am attempting to sum up globally distributed atmospheric carbon.
he carbon is 4D variable on sigma-hybrid coordinate system.
float CO2 ;
CO2:mdims = 1 ;
CO2:units = "kg/kg" ;
CO2:mixing_ratio = "dry" ;
CO2:long_name = "CO2" ;
CO2:cell_methods = "time: mean" ;

I see the function, zonsum.
For every latitude the sum over all longitudes is computed.

But I do not see a CDO function that accounts for the gaussian weights of latitude, and the sigma hybrid coordinates of the atmospheric column. Is there a way for CDO to calculate the global sum of carbon?

Cheers,
-Jonathan


Replies (5)

RE: Weight Sum? - Added by Ralf Mueller almost 3 years ago

hi Jonathan!

What about the fldint operator? It computed an area-weighted sum over all gridpoints...

cheers
ralf

RE: Weight Sum? - Added by Jonathan Buzan almost 3 years ago

Hi Ralf,

I execute:

cdo -h fldsum

fldsum Field sum
For every gridpoint x_1, ..., x_n of the same field it is:

o(t,1) = sum{i(t,x'), x_1<x'<=x_n}

Unfortunately, I do not see anything about gaussian weights in the command. Other commands, like 'fldstd' explicitly state they are area weighted.

Cheers,
-Jonathan

RE: Weight Sum? - Added by Ralf Mueller almost 3 years ago

Jonathan Buzan wrote in RE: Weight Sum?:

Hi Ralf,

I execute:

cdo -h fldsum

fldsum Field sum
For every gridpoint x_1, ..., x_n of the same field it is:

o(t,1) = sum{i(t,x'), x_1<x'<=x_n}

Unfortunately, I do not see anything about gaussian weights in the command. Other commands, like 'fldstd' explicitly state they are area weighted.

Cheers,
-Jonathan

Thats why I suggested fldint - it respect the area weights? you could also use fldmean to get the division by the total area.

What is the point gaussian weights?

RE: Weight Sum? - Added by Jonathan Buzan almost 3 years ago

Hi Ralf,

My data is on a lat-lon grid, and has a gaussian weights variable. The grid cells are not evenly sized, hence the requirement for weighted sums.

I'll try this out.

Thanks,
-Jonathan

RE: Weight Sum? - Added by Ralf Mueller almost 3 years ago

in that case you can to the weighting yourself:

  • multiplication with the weights:
    cdo mul <data file> <cell area input> <output>
  • sum up without another weighting with fldsum

hth
ralf

    (1-5/5)