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

Jennifer Adams jma at cola.iges.org
Fri Oct 30 18:13:38 EDT 2015


What you are talking about are GrADS script functions. http://iges.org/grads/gadoc/gsf.html
—Jennifer

On Oct 30, 2015, at 12:54 PM, Christopher Gilroy <chris.gilroy at gmail.com> wrote:

> 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?
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer M. Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20151030/56b39576/attachment.html 


More information about the gradsusr mailing list