ensembles and number of files
Added by Miles Sowden over 2 years ago
The help files for ensembles 2.8.4 ENSSTAT - Statistical values over an ensemble states multiple files can be used as below
cdo ensmean infile[1-6] outfile
cdo enspctl,50 infile1 infile2 infile3 infile4 infile5 infile6 outfile
I wish to do a 30-year (1961-1990) ensemble where each year is in a separate file
cdo ensmean infile_19[61-90].nc outfile fails
cdo ensmean infile_19??.nc outfile quick and dirty works but it has extra years
cdo ensmean infile_19[6-8][1-9].nc infile_19[7-9]0.nc outfile also works but is untidy
It seems the filename substitution can only handle one character (at a time) or is there a way to do this that's neater than the above?
Thanks
Replies (1)
RE: ensembles and number of files - Added by Estanislao Gavilan over 2 years ago
Hi Miles,
I think you can try this:
cdo ensmean -selyear,1961/1990 -cat filein*.nc fileout.nc
This code calls all the files, but selects only those years