[gradsusr] display values in a script
Frank Colby
Frank_Colby at uml.edu
Sun Sep 20 13:10:03 EDT 2020
Dear GradUsers,
I can open a file, set latitude and longitude and time, and display a
variable. The value of the variable displays in the command window.
If I try this in a script, it displays nothing.
Does anyone know why this is? The script is below.
Thanks,
Frank Colby
UMass Lowell
*********************Script
'set mpdset hires'
filen = 20100219
latt = 42.361
lont = -071.010
* All times in one file 'set t ' t1
say 'ERA5-'filen'-s2.nc'
'sdfopen ERA5-'filen'-s2.nc'
*
'set lat 'latt
'set lon 'lont
*
t1=1
t2=24
while (t1<=t2)
'set t ' t1
'd 'sp
*
say t1
say '<enter>=next, q=quit, b=back, t<enter>n<enter>=n-th step'
say 'i to create an image'
pull ans
*
if (ans ="q"); break; endif;
if (ans = "b")
t1 = t1 -2
endif
if (ans = "t"); say 'Time step =';pull num;
if (num > t2); say 'Timestep too high!'; num=t2-1; endif;
t1 = num - 1
endif
*
t1 = t1 + 1
'c'
endwhile
'reinit'
More information about the gradsusr
mailing list