[gradsusr] Anyway to have a 'master' file that gets included before anything else in a .gs file?

Christopher Gilroy chris.gilroy at gmail.com
Fri Oct 30 12:54:54 EDT 2015


So basically instead of having:

function map(arg)
if (arg = '')
   pull cmdline
else
   cmdline=arg
endif

map=subwrd(cmdline,1)

if (map = 'conus')
  latr='18 62'
  lonr='-130 -58'
endif

if (map = 'alaska')
  latr='50 74'
  lonr='-170 -135'
endif

if (map = 'test')
  latr='48 56'
  lonr='-85 -63'
endif

if (map = 'blah')
  latr='62 70'
  lonr='-162 -150'
endif

'open /gfsmodeldata/gfs.ctl'
'set dfile 1'

'set mproj latlon'
'set display color white'
'set csmooth on'
'set grid off'
'set grads off'
'set mpdset hires'
'set map auto'
'set line 1'
'set csmooth on'
'set grads off'
'set gxout shaded'
*PAGE SIZE
'set vpage 0.0 11.0 0.0 8.5'
*PLOT SIZE
'set parea 0.4 10.3 0.4 7.9'

at the top of all of our gfs scripts, we can put that into a "gfs_master.gs"
and just "include" that in at the very top of all of our gfs scripts? This
way as we add more "defaults" to the configuration we just edit one file
instead of every single script?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20151030/a2c32ff5/attachment.html 


More information about the gradsusr mailing list