Merge monthly files that have same starting time
Added by Justin Hicks over 7 years ago
Hello,
I am trying to merge AIRS monthly data files (September 2002 to December 2010) together into one file, but each individual file contains the same initial timestep of 1:1:1:0 (i.e. 00Z01JAN0001). Is there any CDO command that could merge these monthly files into one single file...where each time step represents the net chronological file?
In short, I have files such as: AIRS.2002.09.nc AIRS.2002.10.nc AIRS.2002.11.nc AIRS.2002.12.nc AIRS.2003.01.nc and so on, each with the same starting time. I want to merge these into one file, but mergetime just seems to plot one time value (I assume because each file has the same starting time).
Thanks,
-Justin
Replies (2)
RE: Merge monthly files that have same starting time - Added by Justin Hicks over 7 years ago
*next...not net
RE: Merge monthly files that have same starting time - Added by Ralf Mueller over 7 years ago
Hi Justin!
IMO you should give enery file a reasonalbe time axis FIRST.
could be done like this
for file in AIRS.*nc; do year=$(echo $file | cut -d '.' -f 2) month=$(echo $file | cut -d '.' -f 3) cdo -settaxis,"${year}-${month}-01",00:00:00,days $file _${file} done cdo -merge '_AIRS*nc' all.nc
hth
ralf