[gradsusr] doubt in cat command in grads
Eric Altshuler
ela at cola.iges.org
Sun Nov 27 00:24:11 EST 2011
Dipak,
As far as I know, the only type of binary files you can 'cat' correctly are GRIB files. In general, if you cat two binary (or netcdf) files to make a third file, the output file will contain a spurious end-of-file (EOF) character that causes it to be corrupted. You're better off keeping the two files separate:
'open rainc.ctl'
'open rainnc.ctl'
'set t 9'
'd rainc.1+rainnc.2'
Eric
----- Original Message -----
From: "dipak sahu" <dipakmath at gmail.com>
To: gradsusr at gradsusr.org
Sent: Saturday, November 26, 2011 6:37:54 AM
Subject: [gradsusr] doubt in cat command in grads
Dear grads user
I have some doubt in cat command in grads. I have two sets of ctl and dat files in grads one is RAINC.ctl, RAINC.dat and another one is RAINNC.ctl, RAINNC.dat. And I tried to make these two .ctl file to one .ctl file. so I tried the following command to creat one .dat file
$ cat RAINC.dat RAINNC.dat > RAIN.dat
and also make one .ctl file RAIN.ctl containing both the parameters RAINC (1st variable)and RAINNC (2nd variable)
for verification I tried two cases in grads
case-1
open RAIN.ctl
set t 9
d rainc+rainnc (it gives value 0 90)
case-2
open RAINC.ctl
open RAINNC.ctl
set t 9
d rainc.1+rainnc.2 (it gives value 0 35)
So, is there anything wrong with the cat command in grads. If so what is the alternate procedure to combine two .ctl and .dat files to make one file?
welcome for your suggestion
dipak
--
********************************************
Dipak kumar Sahu,
Research Scholar,
Centre for Atmospheric Sciences.,
Indian Institute of Technology,Delhi
email:- dipak_math at yahoo.com
**********************************************
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr
More information about the gradsusr
mailing list