[gradsusr] save image for each time step

Thomas Robinson ter at hawaii.edu
Mon Feb 9 18:26:14 EST 2015


You need to change your set t line

'set t '1

change to
'set t ' count

Right now you are setting t to 1 for every plot you make.  Change that 1 to
count and you should be good

On Mon, Feb 9, 2015 at 1:08 PM, <webmaster at solargrafix.com> wrote:

> 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
>



-- 
Tom Robinson
Treasurer - Graduate Student Organization
Secretary - Student Athletic Fee Committee
Graduate Student - Department of Atmospheric Science
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20150209/27350853/attachment.html 


More information about the gradsusr mailing list