[gradsusr] save image for each time step
Jennifer Adams
jma at cola.iges.org
Wed Feb 11 08:49:37 EST 2015
The syntax error may also be related to whitespace characters that the scripting language doesn’t like. Make sure there are no tabs or line feeds. —Jennifer
On Feb 11, 2015, at 8:25 AM, Stephen McMillan <smcmillan at planalytics.com> wrote:
> Jason,
> What you added, in itself, is okay. Please include the entire portion of the script that generated the error so others can evaluate the cause.
> Stephen
>
> On Wed, Feb 11, 2015 at 6:09 AM, <webmaster at solargrafix.com> wrote:
> I added this, and received a syntax error for the line: fmt=‘%02.0f’
>
>
>
>
>
> From: Jennifer Adams [mailto:jma at cola.iges.org]
> Sent: Tuesday, February 10, 2015 8:33 AM
> To: webmaster at solargrafix.com; GrADS Users Forum
> Subject: Re: [gradsusr] save image for each time step
>
>
>
> Hi, Jason —
>
> Add these to your script:
>
>
>
> fmt=‘%02.0f’
>
> cc=math_format(fmt,count)
>
> ‘printim GFS-‘cc’.png x1280 y960’
>
>
>
> —Jennifer
>
>
>
>
>
> On Feb 10, 2015, at 8:30 AM, webmaster at solargrafix.com wrote:
>
>
>
>
> Hello,
>
> Thank you all for your help. I finally got it working. I had the cases
> wrong on a couple of the instances of 'count' . Once I made them all the
> same, it worked.
>
> Here is another quick question, when I save the image, I use the following
> format:
>
> 'printim GFS-'count'.png x1280 y960'
>
> This saves an image with the file name: GFS-1.png
>
> What do I need to do to get it to save with a double digit count as follows:
> GFS-01.png
>
> Thanks again for your assistance.
>
> Jason
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Howard Staines [mailto:metris at xtra.co.nz]
> Sent: Monday, February 09, 2015 10:15 PM
> To: webmaster at solargrafix.com
> Subject: RE: [gradsusr] save image for each time step
>
> Hi
>
> Could you send me the section of the script just the loop start and finish
> ie/
>
> While ...
> And
>
> Endwhile
>
> Howard :)
>
> -----Original Message-----
> From: webmaster at solargrafix.com [mailto:webmaster at solargrafix.com]
> Sent: Tuesday, 10 February 2015 4:10 p.m.
> To: info at metris.co.nz; gradsusr at gradsusr.org
> Subject: RE: [gradsusr] save image for each time step
>
> Hello,
>
> I tried that, and now I get an error that says "Set error, missing or
> invalid arguments for T option, then is starts looping the first timestep.
>
>
>
>
> -----Original Message-----
> From: Howard Staines [mailto:metris at xtra.co.nz]
> Sent: Monday, February 09, 2015 6:14 PM
> To: webmaster at solargrafix.com
> Subject: RE: [gradsusr] save image for each time step
>
> Hi
> After the while
> 'Set t 'count
>
> ....
> Then the next time around the time step will increase ( count = count +1)
> ie/ one time step advanced)
>
> Should work then
>
> Cheers Howard
>
> -----Original Message-----
> From: webmaster at solargrafix.com [mailto:webmaster at solargrafix.com]
> Sent: Tuesday, 10 February 2015 12:08 p.m.
> To: info at metris.co.nz; 'GrADS Users Forum'
> Subject: RE: [gradsusr] save image for each time step
>
> Hi,
>
> I almost have this working, but it does not advance through the timesteps.
> It loads the first timestep, saves the image, then clears the screen, and
> then loads the first timestep again, saves it, and so on.
>
> Below is the script I set up to test this, so perhaps you can see where I
> went wrong. Thanks!
>
>
>
>
> 'set datawarn off'
> 'sdfopen
> http://nomads.ncep.noaa.gov:80/dods/gfs_0p25/gfs20150209/gfs_0p25_12z'
>
> Count = 1
> while (count > 80)
>
> 'set t '1
>
> 'set lat 35 50'
> 'set lon -95 -65'
> 'set mproj scaled'
> 'set display color white'
> 'set map 1'
> 'set mpdset hires'
> 'set mpdraw on'
> 'set timelab off'
> 'set grid off'
> 'set font 0'
> 'set strsiz .1'
>
> 'q time'
> timestr=subwrd(result, 3)
> weekday1=subwrd(result,6)
> day=substr(result, 11, 9)
> hr=substr(result, 8, 2)
> 'draw string 9.1 0.2 'day' 'hr z
> 'draw string 8.7 0.2 'weekday1
>
> 'set csmooth on'
> 'set cterp on'
> 'set gxout contour'
> 'set clopts -1 -1 0.06'
> 'set cmin 900'
> 'set cmax 1100'
> 'color 900 1100 2 -gxout contour -kind
> purple->darkblue->darkgreen->orange->red->darkred'
> 'set cthick 2'
> 'd smth9(prmslmsl/100)'
>
> 'printim test'day'-'hr'z.png x1280 y960'
>
> Count = Count + 1
> 'c'
> endwhile
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org]
> On Behalf Of Howard Staines
> Sent: Monday, February 09, 2015 1:44 PM
> To: gradsusr at gradsusr.org
> Subject: [gradsusr] Re image for each time step
>
>
> Print many variables for a time series (step through time series)
>
> Count = 1
> While (Count> 120 final time step
>
> 'set t 'count ie/ first time step
>
> 'set stuff lat lon maps etc
>
> 'd apcpsfc' display variable
> 'd t2m' display another variable
> 'd mslp' etc
>
> Print image
> 'gxprint image_'Count .png x1200 y800'
>
> Count = Count + 1 next time step
> 'c' clear display
> Endwhile loops between While and
> endwhile to print individual time steps
>
>
> kind regards
>
> Howard Staines
> Metris New Zealand
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
> _______________________________________________
> 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
>
>
>
>
>
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
> _______________________________________________
> 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/20150211/fe42189c/attachment-0001.html
More information about the gradsusr
mailing list