Project

General

Profile

merging by time using GFS data

Added by Bianca Wright over 3 years ago

I am currently using GFS archived data with a 0.25 resolution.

I have tried to use cdo mergetime but I get this error on my terminal Input streams have different number of variables per timestep!

I have attached some of my data files below. Can anyone please help me with this? I've been trying to figure this out for a few days now but haven't been able to find a solution yet.


Replies (14)

RE: merging by time using GFS data - Added by Ralf Mueller over 3 years ago

hi Bianca!

your input files have different variables. you can check it with this for loop:

for file in gfs.*nc; do cdo -s showname $file; done
It seems to be the case that DZDT_P0_L100_GLL0 is present in some files, but not in all of them. I would use the 'cat' operator instead of 'mergetime'

cheers
ralf

RE: merging by time using GFS data - Added by Bianca Wright over 3 years ago

Thanks for the help Ralf. And would this have the same effect as merging it by time? As the data is forecasted at 6h intervals.

RE: merging by time using GFS data - Added by Ralf Mueller over 3 years ago

'cat' is just 'concatenation' and since your files are already ordered by data+time (encoded in the filename) 'cat' should work.

you might give it a try and check the result ;-)

cheers
ralf

RE: merging by time using GFS data - Added by Bianca Wright over 3 years ago

Ralf Mueller wrote:

'cat' is just 'concatenation' and since your files are already ordered by data+time (encoded in the filename) 'cat' should work.

you might give it a try and check the result ;-)

cheers
ralf

Hi Ralf,

Just tried using cat and I get the same error as I did using mergetime. Don

RE: merging by time using GFS data - Added by Ralf Mueller over 3 years ago

Because some of your files STILL have the same additional variable 'DZDT_P0_L100_GLL0'. try this:

cdo -cat -apply,delname,DZDT_P0_L100_GLL0 [ gfs.0p25.201906*nc ] _all6.nc
cdo -cat gfs.0p25.201905*nc _all5.nc
cdo cat _all5.nc _all6.nc gfs.all.nc

RE: merging by time using GFS data - Added by Bianca Wright over 3 years ago

Just tried the above and kept getting segmentation fault:11

At first didn't think it was an issue but when I tried to do your final command it stated that the _all5.nc file did not exist.

RE: merging by time using GFS data - Added by Ralf Mueller over 3 years ago

do you use the latest CDO release?

RE: merging by time using GFS data - Added by Bianca Wright over 3 years ago

I am using v 1.9.8 which I think is the latest.

RE: merging by time using GFS data - Added by Ralf Mueller over 3 years ago

yes, it is. can you post the commands with the corresponding error?

RE: merging by time using GFS data - Added by Bianca Wright over 3 years ago

Sure,

The code I inputted into my terminal was as follows:

cdo -cat -apply,delname, DZDT_P0_L100_GLL0 [/Volumes/WRIGHT/gfs/gfs.0p25.2019052000-2019061418.f048.grib2.wright439424.nc/gfs*.nc] _all5.nc

RE: merging by time using GFS data - Added by Ralf Mueller over 3 years ago

white-space is crucial here - try this please:

cdo -cat -apply,delname,DZDT_P0_L100_GLL0 [ /Volumes/WRIGHT/gfs/gfs.0p25.2019052000-2019061418.f048.grib2.wright439424.nc/gfs*.nc ] _all5.nc

RE: merging by time using GFS data - Added by Bianca Wright over 3 years ago

Thank you so much Ralph for all your help. Will keep all these tips you gave in mind.

It's all been resolved now. :)

RE: merging by time using GFS data - Added by Ralf Mueller over 3 years ago

perfect

best wishes
-ralf

RE: merging by time using GFS data - Added by shanker dhanushx over 3 years ago

I am using v 1.9.8 which I think is the latest.

    (1-14/14)