Project

General

Profile

eca_cwdi: error with "Input streams have different number of time steps!"

Added by Ralf Mueller about 13 years ago

originally from


Replies (5)

RE: eca_cwdi: error with "Input streams have different number of time steps!" - Added by Chris Fletcher about 13 years ago

Hi, I couldn't see an actual message here, but I found this thread because we are seeing the same error when using eca_hwfi and perhaps it is related.

Here are the symptoms: infile contains June-July-August daily mean temperature (T) for 5 years. First, I find the 90th percentile, which will be the threshold temperature for eca_hwfi (thus my "reference period" is simply all the days in infile):

cdo timpctl,90 infile -timmin infile -timmax infile temp90

Next, I wish to compute the warm spell index for infile, i.e. the number of consecutive days where T > temp90:
cdo eca_hwfi infile temp90 hwfi_file
cdo eca_hwfi (Abort): Input streams have different number of time steps!

I realise that temp90 has only 1 time step, while infile has 5 years x 92 days = 460 time steps. However, I want to reference the temperatures in infile to a fixed reference threshold. I can achieve this by using NCL to "extend" the temp90 file to have the same number of time steps as infile, by repeating the temp90 data 460 times. But is there a simpler way to achieve this within CDO alone? And could (should?) eca_hwfi (and other climate indices) be updated to allow users to specify a reference field with only 1 time step?

I note that there was a very similar question about 1 year ago concerning the eca_tn10p operator. Was this issue ever fully resolved?
https://code.zmaw.de/boards/2/topics/14#message-63

Thanks in advance.

RE: eca_cwdi: error with "Input streams have different number of time steps!" - Added by Ralf Mueller about 13 years ago

You can use a combination of add and sub to do it:

cdo -add temp90 -sub infile infile temp90_with_timesteps

The output should have as many timesteps as the input file.

RE: eca_cwdi: error with "Input streams have different number of time steps!" - Added by David Gobbett about 12 years ago

(This post edited for clarity on 14-Mar-2012)
Hello,

I am wondering whether someone could provide an example of using ECA_CWDI (or similar function), particularly creation of the TNNorm reference file which is a running mean of 5 days of values centred on each day of the reference period.

To create a TNNorm file I use ydrunmean. I have a reference period of 30 years. The output reference file contains 366 dates, but some out of sequence dates, which include 29-Feb from the previous leap year, and the last two dates in December are from a previous year. I assume that is OK, or is there a way around this?

Now I only want to only use ECA_CWDI on selected months over a different range of years (e.g. August for a particular decade), and as per this thread, I am aware that the number of time steps in the TNNorm file should correspond to those in the TNNorm file. Is there an elegant way using CDO to replicate those August TNNorm values to match the number of years in my file of August minimum temperatures?

Regards
David

(running CDO 1.5.3 under Cygwin on Win 7 64 bit)

RE: eca_cwdi: error with "Input streams have different number of time steps!" - Added by David Gobbett about 12 years ago

I have found the following solution to my query above... In order to apply a the file containing a whole year of daily values to a file of multiple years, the previous suggestion using the add operator did not work. Instead where the percentile or running mean file contains multiple timesteps, use the ydayadd operator instead.

This example should create a TNnorm file (for the ECACWDI operator) of daily running mean values from a reference period (1960-1990), applied to a file of a different time period (in my case 1961 to 2010).

First create a file containing all zero values...

cdo sub TMinFile TMinFile ZeroFile

then generate the running mean (or perhaps percentile) values from the reference period (output contains 366 daily time steps) ...
cdo ydrunmean,5 -selyear,1960/1990 TMinFile TNnormRefYear

then apply the 366 daily values to the full period using ydayadd
cdo ydayadd ZeroFile TNnormRefYear TNnormFile

cheers
David

    (1-5/5)