Project

General

Profile

Insert dummy variables into grib2

Added by Jannek Squar almost 7 years ago

Hey,

I have two timesteps of a GFS forecast. The first timestep does miss some variables, because they are accumulated/avaraged over time and have their first appearance in the second timestep. Therefore the first timestep has 322 and every other timestep has 366 entries. If I now want to select a variable from both files cdo aborts:

cdo select,name=2t step0 step1 output
cdo select (Abort): Input streams have different number of variables per timestep!

Is there a way to fill the first timestep with senseless variables so that both timesteps have the same amount of variables?

Greetings


Replies (2)

RE: Insert dummy variables into grib2 - Added by Karin Meier-Fleischer almost 7 years ago

Hi Jannek,

I suggest that you should use

cdo select,name=t2,startdate=date step0 step1 output

where date is of format YYYY-MM-DDThh:mm:ss.

Bye,
Karin

RE: Insert dummy variables into grib2 - Added by Jannek Squar almost 7 years ago

Hey Karin, thanks for the reply.

the problem still persists. I added two example files to demonstrate the problem.

Information about the first file:
$ cdo showtime step000.grib2
00:00:00
$ cdo showname step000.grib2
2t

Information about the second file:

$ cdo showtime step003.grib2
03:00:00
$ cdo showname step003.grib2
2t 2r

Executing cdo select,name=2t,startdate=2016-01-01T00:00:00 step000.grib2 step003.grib2 step_2t.grib2 results in:
cdo select (Abort): Input streams have different number of variables per timestep!

Greetings
Jannek

    (1-2/2)