Project

General

Profile

time weighted average

Added by Rodrigo Sousa almost 9 years ago

I need to perform a time-weighted average. For example: I have 10 netcdf files numbered of 1 to 10 and would make an average of these files giving greater weight to the first file. It is possible to do this in CDO?


Replies (1)

RE: time weighted average - Added by Uwe Schulzweida almost 9 years ago

Time-weighted average is not directly supported in CDO. You can try to do it manually with CDO:
1. Apply the weight factor to the first file, e.g. 2:

cdo mulc,2 file1 file1w
2. Calculate the sum over all 10 files:
cdo enssum file1w file2 ... file10 sum
3. Divide the sum by the sum of weights (for this example 11):
cdo divc,11 sum average

    (1-1/1)