merge (lat, lon) .nc files to (time, lat, lon) output file
Added by Abdoulaye SY almost 7 years ago
Hi
I want to concatanate daily .nc files (from 2001_01_01.nc to 2001_12_31.nc) which dimensions are lat and lon to yearly output file with time, lat and lon dimensions.
Thanks
Replies (4)
RE: merge (lat, lon) .nc files to (time, lat, lon) output file - Added by Karin Meier-Fleischer almost 7 years ago
Hi Abdoulaye,
if your daily files do not have a time dimension you can create it using settaxis operator.
cdo -f nc -settaxis,2001-01-01,,1day -cat '*.nc' outfile
-Karin
RE: merge (lat, lon) .nc files to (time, lat, lon) output file - Added by Abdoulaye SY almost 7 years ago
Hello Karin
thank you for the answer
It works well
RE: merge (lat, lon) .nc files to (time, lat, lon) output file - Added by kunal bali almost 7 years ago
is it possible to create time dimension on the basis of the filename? I mean if I have a data file for one year but with some missing dates then will it create the time/date dimension correctly?
RE: merge (lat, lon) .nc files to (time, lat, lon) output file - Added by Karin Meier-Fleischer almost 7 years ago
Without any further information I would say you have to write a shell script to do that.