Project

General

Profile

Problem in grib file in setting setzaxis and setreftime ?

Added by jyoti lodha over 6 years ago

Hi,
When I am setting my setzaxis and my reference time in my grib file, it is changing my bounds values and depth values as I have shown in
example.

me@ba0b6eadaf2d:~$ cdo sinfon /ankit/tsl2.grb
File format : GRIB
-1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter name
1 : unknown unknown v instant 4 1 27648 1 P16 : var11
Grid coordinates :
1 : lonlat : points=27648 (192x144)
lon : 0.938 to 359.063 by 1.875 degrees_east circular
lat : -89.375 to 89.375 by 1.25 degrees_north
Vertical coordinates :
1 : depth_below_land * : levels=4
depth : 2.5 to 150
bounds : 0-5 to 100-200*
Time coordinate : 1 step
RefTime = 2005-01-11 12:00:00 Units = days Calendar = proleptic_gregorian
YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss
2005-01-12 12:00:00
cdo sinfon: Processed 1 variable over 1 timestep [0.01s 13MB]

me@ba0b6eadaf2d:~$ cdo setreftime,2005-01-12,12:00:00,1day -settaxis,2005-01-12,12:00:00,1day -setcalendar,standard /ankit/tsl2.grb /ankit/tsl2ref.grb
cdo setreftime: Started child process "settaxis,2005-01-12,12:00:00,1day -setcalendar,standard /ankit/tsl2.grb (pipe1.1)".
cdo(2) settaxis: Started child process "setcalendar,standard /ankit/tsl2.grb (pipe2.1)".
cdo(3) setcalendar: Processed 110592 values from 1 variable over 1 timestep [0.01s]
cdo(2) settaxis: Processed 110592 values from 1 variable over 1 timestep [0.01s]
cdo setreftime: Processed 110592 values from 1 variable over 1 timestep [0.01s 14MB]
me@ba0b6eadaf2d:~$ cdo sinfon /ankit/tsl2ref.grb
File format : GRIB
-1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter name
1 : unknown unknown v instant 4 1 27648 1 P16 : var11
Grid coordinates :
1 : lonlat : points=27648 (192x144)
lon : 0.938 to 359.063 by 1.875 degrees_east circular
lat : -89.375 to 89.375 by 1.25 degrees_north
Vertical coordinates :
1 : depth_below_land : levels=4
depth : 122 to 220
bounds : 0-244 to 244-196

Time coordinate : 1 step
RefTime = 2005-01-12 12:00:00 Units = days Calendar = proleptic_gregorian
YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss
2005-01-12 12:00:00

Why it is so? When setting my refence time and performing any other operation(like mulc)not shown here on grib file my depth value and my bounds are changed?. Please tell me the solution how to keep the bounds and depth value same with grib file.

Thanks

tsl2ref.grb (216 KB) tsl2ref.grb reference file
tsl2.grb (216 KB) tsl2.grb original file

Replies (4)

RE: Problem in grib file in setting setzaxis and setreftime ? - Added by Karin Meier-Fleischer over 6 years ago

Hi Jyoti,

I was able to reproduce the problem and it seems to be a problem with GRIB format. After converting the tsl2.grb file to netCDF format everythings works as aspected.

cdo -f nc copy tsl2.grb tsl2.nc

cdo setreftime,2005-01-12,12:00:00,1day -settaxis,2005-01-12,12:00:00,1day -setcalendar,standard tsl2.nc out.nc

cdo sinfon out.nc

   File format : NetCDF2
    -1 : Institut Source   T Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  unknown  v instant       4   1     27648   1  F32  : var11         
   Grid coordinates :
     1 : lonlat                   : points=27648 (192x144)
                              lon : 0.938 to 359.063 by 1.875 degrees_east  circular
                              lat : -89.375 to 89.375 by 1.25 degrees_north
   Vertical coordinates :
     1 : generic                  : levels=4
                            depth : 2.5 to 150 
                           bounds : 0-5 to 100-200 
   Time coordinate :  1 step
     RefTime =  2005-01-12 12:00:00  Units = days  Calendar = standard
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  2005-01-12 12:00:00
cdo sinfon: Processed 1 variable over 1 timestep ( 0.01s 20MB )


-Karin

RE: Problem in grib file in setting setzaxis and setreftime ? - Added by jyoti lodha over 6 years ago

Hi
Thanks for the reply.But I want the grib format for the above data, as WRF model which I am using for my research requires grib data for processing .So,can u find out some other solution so that input and output format grib remains the same.

Thanks

RE: Problem in grib file in setting setzaxis and setreftime ? - Added by Karin Meier-Fleischer over 6 years ago

Hi Jyoti,

which version are you using? It should work with version 1.9.4 (thanks to Uwe for the info).

-Karin

RE: Problem in grib file in setting setzaxis and setreftime ? - Added by jyoti lodha over 6 years ago

Hi
Thanks a lot , I was using 1.9.3 on docker, I will install and check it again.

    (1-4/4)