[gradsusr] Problem to concatenate the years in grads

kaleem Sial kaleemsial at hotmail.com
Tue May 22 12:27:37 EDT 2012


Hello to everyone,

I have problem to concatenate the whole years from 1995 to 2005 into one ctl file.

The script which i am using to concatenate these years is given below;

cdo cat year1995,year1996,year1997...............,year2005

before these commands, i used the above command

cdo dv2uv echam_yearout9508 echam_yearout9508_dv2uv.grb [To change it from divergence and vorticity to horizontal wind u,v] 

cdo selcode,130,131,132,133,134,142,144,147,157,182,223 echam_yearout9508_dv2uv.grb echam_yearout9508_dv2uv_TUVP.grb [To include the variables generated by the model].

cdo sp2gp echam_yearout9508_dv2uv_TUVP.grb echam_yearout9508_dv2uv_TUVP_grid.grb [Change from Spectral to gridpoint]

cdo ml2pl,100000,80000,50000,20000,10000 echam_yearout9508_dv2uv_TUVP_grid.grb echam_yearout9508_dv2uv_TUVP_grid_press.grb [To Include the Pressure Level before this it was using the hybrid level]

cdo gradsdes2 echam_yearout9508_dv2uv_TUVP_grid_press.grb [To create the ctl file]

And this cdo stuff then generated the ctl file which looks much perfect however as i opened it. It only showed my the 1995:01:01 to last time step 1995:12:31

I then changed the tdef in the ctl file by using the text editor, instead of this it does not work. It showed me the message that memory dump.

* Generated by CDO version 1.5.0
*
DSET  ^echam_yearout9508_dv2uv_TUVP_grid_press.grb
DTYPE  GRIB
INDEX  ^echam_yearout9508_dv2uv_TUVP_grid_press.gmp
XDEF 192 LINEAR 0.000000 1.875000
YDEF 96 LEVELS -88.572 -86.723 -84.862 -82.999 -81.135 -79.271 
               -77.406 -75.541 -73.676 -71.811 -69.946 -68.081 
               -66.216 -64.351 -62.486 -60.620 -58.755 -56.890 
               -55.025 -53.160 -51.294 -49.429 -47.564 -45.699 
               -43.833 -41.968 -40.103 -38.238 -36.372 -34.507 
               -32.642 -30.777 -28.911 -27.046 -25.181 -23.316 
               -21.450 -19.585 -17.720 -15.855 -13.989 -12.124 
               -10.259  -8.394  -6.528  -4.663  -2.798  -0.933 
                 0.933   2.798   4.663   6.528   8.394  10.259 
                12.124  13.989  15.855  17.720  19.585  21.450 
                23.316  25.181  27.046  28.911  30.777  32.642 
                34.507  36.372  38.238  40.103  41.968  43.833 
                45.699  47.564  49.429  51.294  53.160  55.025 
                56.890  58.755  60.620  62.486  64.351  66.216 
                68.081  69.946  71.811  73.676  75.541  77.406 
                79.271  81.135  82.999  84.862  86.723  88.572 
ZDEF 5 LEVELS 1000 800 500 200 100 
TDEF 16068 LINEAR 18:00Z01jan1995 6hr [after 1705 time step round about 2006:03:30, it gave the message memory dumped]
TITLE  echam_yearout9508_dv2uv_TUVP_grid_press.grb  T63 grid
OPTIONS yrev
UNDEF  -9e+33
VARS  11
var130             5  130,100  var130
var133             5  133,100  var133
var134             0  134,1  var134
var142             0  142,1  var142
var144             0  144,1  var144
var147             0  147,1  var147
var157             5  157,100  var157
var182             0  182,1  var182
var223             5  223,100  var223
var131             5  131,100  var131
var132             5  132,100  var132
ENDVARS

And now as i read in the user manual of grads that we can extend the number of year through this way, Can anybody tell me where should i have to use those lines???

Multiple file time series
GrADS now allows you to handle many actual data files as one GrADS file, if the individual data
files are in a GrADS readable format, and if the files are split along time. In the initial
implementation, the time(s) that are in each file are indicated by the file name.
An example of this might be hourly data, where each 24 hours has been placed in a separate file.
Each file is named this way:
1may92.dat
2may92.dat
etc.
You indicate to GrADS that there are multiple files in this time series by giving a substitution
template as the file name:

dset %d1%mc%y2.dat        [Where should i have to write this command and will it works then for ctl file as well]

What more things i have to include in this script as i simulated the 6 hourly data??


and giving an options record that looks like:
100
options template
and specifying the time range and increment in the tdef record:
tdef 72 linear 0z1may1993 1hr
GrADS will figure out automatically that there are 24 times in each file, and what file names
correspond to what times. As you display data, GrADS will only open one file at a time. As you
change times such that another file is referred to, the open file is closed, and the new file is opened.
Valid substitutions are:

%y2 - 2 digit year (last 2 digits)
%y4 - 4 digit year
%m1 - 1 or 2 digit month
%m2 - 2 digit month (leading zero if needed)
%mc - 3 character month abbreviation
%d1 - 1 or 2 digit day
%d2 - 2 digit day
%h1 - 1 or 2 digit hour
%h2 - 2 digit hour
%h3 - 3 digit hour (e.g., 120 or 012)
%f2 - 2 or 3 digit forecast hour
%f3 - 3 digit forecast hour
%n2 - 2 digit minute (leading zero if needed)
for specifying the initial time (e.g., NWP model output from NMC and FNMOC)
%iy2 - initial 2 digit year (last 2 digits)
%iy4 - initial 4 digit year
%im1 - initial 1 or 2 digit month
%im2 - initial 2 digit month (leading zero if needed)
%in2 - initial 2 minute (leading zero if needed)
%imc - initial 3 character month abbreviation
%id1 - initial 1 or 2 digit day
%id2 - initial 2 digit day
%ih1 - initial 1 or 2 digit hour
%ih2 - initial 2 digit hour
%ih3 - initial 3 digit hour
(time increment must be hours)
This support works on all supported GrADS data types (GrADS gridded, GRIB, GrADS station
data). If you specify file format options, the options must apply equally to each file.
The real-time data on DECstations makes use of this new feature. See the data descriptor files:
/data/wx/grads/sa.ctl
/data/wx/grads/sareps.ctl
/data/wx/grads/wx.ctl
for additional examples.


Kind Regards,

Kaleem

PhD Student
Uni-Bonn Germany
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120522/ee5514b2/attachment-0003.html 


More information about the gradsusr mailing list