Project

General

Profile

How-to sum fluxes (kg/m2s) over time

Added by Matthias Cuntz almost 14 years ago

Dear all,

I want to calculate the temporal sum of a flux.
The operator timsum seems to do a simple sum of the time steps, which I then have to multiply with the time step.

But say I have monthly mean fluxes given in kg m^-2 s^-1. How much is the total flux in kg (or kg m^-1) in this month? The number of seconds is different in each month.

Cheers
Matthias


Replies (3)

RE: How-to sum fluxes (kg/m2s) over time - Added by Ralf Mueller almost 14 years ago

So, you're looking for some kind of temporal weight?

RE: How-to sum fluxes (kg/m2s) over time - Added by Matthias Cuntz almost 14 years ago

Yes, exactly.

I understand that it is not clear what the temporal weight should be because it depends on the units of your fluxes: per month, per sec, etc.
But the only problem are the number of days per month (e.g. February) and year (leap) so that per day or per second would be a natural unit for such a temporal weight.
Other weights can be done easily outside of cdo by the user.

Of course, I can write a script that does it itself, for example by splitting the input per month, multiply with the appropriate seconds, and mergetime again, but I was just wondering if there is a smarter way to do this.

Cheers
Matthias

RE: How-to sum fluxes (kg/m2s) over time - Added by Ralf Mueller almost 14 years ago

The operators muldpm, muldpy, divdpm and divdpy (see docu) have been created for that purpose.

    (1-3/3)