Project

General

Profile

ydrunpctl clipping yeardays

Added by Andrew Eichmann almost 10 years ago

Hello,

When running ydrunpctl while using running means greater than one day in length, the last records of the output get assigned a different year from the others. So when running the following:

cdo ydrunpctl,10,5 -selyear,1981/1985 temps.nc -ydrunmin,5 -selyear,1981/1985 temps.nc -ydrunmax,5 -selyear,1981/1985 temps.nc temps_10th_5d.nc

where temps.nc are multiple years of daily temperatures (with leap days removed), a "cdo sinfo" on temps_10th_5d.nc ends with the following:

1985-12-23 00:00:00  1985-12-24 00:00:00  1985-12-25 00:00:00  1985-12-26 00:00:00
1985-12-27 00:00:00 1985-12-28 00:00:00 1985-12-29 00:00:00 1984-12-30 00:00:00
1984-12-31 00:00:00
cdo sinfo: Processed 3 variables over 365 timesteps ( 0.56s )

Doing the same with a 15-day running mean leaves 7 days in the preceding year. I presume this has something to with not incorporating days after 31 Dec 1985 in the running mean, but the out-of-sequence year fouls later processing.

Is there a standard way of handling this?

This was the only possible reference to the issue I found:

https://code.zmaw.de/boards/2/topics/2283?r=2360#message-2360


Replies (3)

RE: ydrunpctl clipping yeardays - Added by Jaison-Thomas Ambadan almost 10 years ago

I presume this has something to with not incorporating days after 31 Dec 1985 in the running mean

From the CDO doc: "The date information in an output field is the date of the medium time step in the last contributing running window". so since day[(i(t + (nts - 1)∕2)] is not available for 30 and 31 Dec 1985, for nts 5 day, I guess it is ignored, and the contributing date is the preceding year.

but the out-of-sequence year fouls later processing.

yes, I agree. You could change the year or time-axis using setyear/settaxis operators manually after ydrunptl

RE: ydrunpctl clipping yeardays - Added by Andrew Eichmann almost 10 years ago

So I take it that the missing days on the beginning end are hidden by the use of the last affected year? That is, 1 Jan 1981 and 2 Jan 1981 also drop out, but since the 1985 values are used, they are set to 1984?

Any thoughts on how to fill those in if data exist beyond the bounds of the years examined (ie, making 31 Dec 1985 use the beginning of 1986)?

Thank you.

RE: ydrunpctl clipping yeardays - Added by Jaison-Thomas Ambadan almost 10 years ago

I don't think you can avoid the "begining/end" problem if it is a "running stats"

Cheers,
J
PS: I've deleted my old post since it doesn't make any sense - i was thinking about time percentile instead of mulityear running percentile - sorry for the confusion!

    (1-3/3)