[gradsusr] Fwrite contd.

Charles Seman - NOAA Federal charles.seman at noaa.gov
Wed Jan 28 14:41:46 EST 2015


Geeta,

It may be because the longitude range is (-179.875,179.875); try to use 
lon, lat to define obs variables within longitude range (0.,360.).

In your GrADS script, try this:

'open rfaccum.ctl'
'set lon 0.125 359.875'
'set lat -49.875 49.875'
'set z 1' ;* just to be sure
'set t 1' ;* just to be sure
'define rf1=data(t=1)'
...
'printim figure1.gif'
'set gxout fwrite'
'set lon 0.125 359.875' ;* just to be sure
'set lat -49.875 49.875' ;* just to be sure
'set z 1' ;* just to be sure
'set t 1' ;* just to be sure
'd rf'
'disable fwrite'

Then, make a GrADS ctl file Obs22apr2011.ctl for Obs22apr2011.bin which 
uses the parameters:

XDEF  1440 LINEAR 0.125 0.25
YDEF  400 LINEAR  -49.875  0.25
ZDEF   1 LEVELS 1000
TDEF 1 LINEAR  00z22apr2011  1dy

now for Obs22apr2011.ctl you can use x, y coordinates...

'open Obs22apr2011.ctl'
'set gxout shaded'
'set x 1 1440'
'set y 1 400'
'set z 1'
'set t 1'
'd data'

Hope this helps,
Chuck

On 01/28/2015 02:49 AM, Geeta Geeta wrote:
> Hi Davide and all other users.
> This message is in continuation to my earlier e-mail in the previous
> Volume. I have to sum up all the 8 3 hourly TRMM binary files.
>
> Following was my CTL file.
>
> DSET ^3B42.1104%d2.%h2z.7.precipitation.bin
> options template
> TITLE  Precipitation estimates
> UNDEF  -9999.9
> XDEF 1440 LINEAR  -179.875 0.25
> YDEF  400 LINEAR  -49.875  0.25
> ZDEF   1 LEVELS 1000
> TDEF 8 LINEAR  06z22apr2011  3hr
> VARS 1
> data  0   99  3B42 TRMM precipitation estimates [mm/3hr]
> ENDVARS
>
> NOW in MY gs file, I forced grads to write the data.
> 'reinit'
> 'open rfaccum.ctl'
> 'define rf1=data(t=1)'
> 'define rf2=data(t=2)'
> 'define rf3=data(t=3)'
> 'define rf4=data(t=4)'
> 'define rf5=data(t=5)'
> 'define rf6=data(t=6)'
> 'define rf7=data(t=7)'
> 'define rf8=data(t=8)'
> 'define rf=rf1+rf2+rf3+rf4+rf5+rf6+rf7+rf8'
> 'd rf'
> 'printim figure1.gif'
> *_/'set x 1 1440'/_*
> *_/'set y 1 400 '/_*
> *_/'set fwrite  Obs22apr2011.bin'/_*
> 'set gxout fwrite'
> 'd rf'
> 'disable fwrite'
> I got same size of O/P file *_/Obs22apr2011.bin. /_*
> *_/
> 2304000 Jan 27 14:17 3B42.110423.00z.7.precipitation.bin
> -rw-r--r--    1 model    staff       2304000 Jan 27 14:18
> 3B42.110423.03z.7.precipitation.bin
> -rw-r--r--    1 model    staff       2304000 Jan 27 14:22
> 3B42_daily.2011.04.22.7.bin
> -rw-r--r--    1 model    staff       2304000 Jan 28 13:12 Obs22apr2011.bin
>
> Now when I PLOT Obs22apr2011.bin file, It is only plotting the eastern
> hemisphere. (Figures attached).
> Following is the CTL file------
> SET Obs22apr2011.bin
> options big_endian
> TITLE  Precipitation estimates
> UNDEF  -9999.9
> XDEF  1440 LINEAR -179.875 0.25
> YDEF  400 LINEAR  -49.875  0.25
> ZDEF   1 LEVELS 1000
> TDEF 1 LINEAR  00z22apr2011  1dy
> VARS 1
> data  0   99  3B42 TRMM precipitation estimates [mm/3hr]
> ENDVARS
> ~
> ~
> ~
> ~
> ~
> ~
> ~
> ~
> ~
> ~
> ~
> ~
> ~
> ~
> ~
> "dailyrf.ctl" 11 lines, 305 characters
>
>
> Kindly suggest.
> /_*
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>

-- 

Please note that Charles.Seman at noaa.gov should be considered my NOAA
email address, not cjs at gfdl.noaa.gov.

********************************************************************
  Charles Seman                                Charles.Seman at noaa.gov
  U.S. Department of Commerce / NOAA / OAR
  Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
  201 Forrestal Road                              fax: (609) 987-5063
  Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
********************************************************************

"The contents of this message are mine personally and do not reflect any
official or unofficial position of the United States Federal Government,
the United States Department of Commerce, or NOAA."


More information about the gradsusr mailing list