[gradsusr] Help with fwrite
Davide Sacchetti
davide.sacchetti at arpal.gov.it
Mon Feb 24 09:59:24 EST 2014
it may be
'set z 1.00002 1111'
was:
'set x 1.00002 1111'
bye bye
Davide
On Mon, 2014-02-24 at 09:37 -0500, eaw24 at nc.rr.com wrote:
> Hi all,
>
> I'm trying to use fwrite to save PV values to their own ctl file. I've looped through the levels and have calculated PV for each level (minus the first and last since the formula involves a central difference). I'm running into problems when I'm looping through *all* levels to create my .dat and new ctl file. At this time, I'm only interested in one time so I'm setting my time to the first in the file even though I am looping through it in my code. My ctl file has all the levels listed in it; however, when I go to plot PV, it's only plotting the last level for each level. In other words, it seems that it's only saving the final level in my .dat file. I know the PV formula is correct because I have already calculated and plotted PV for other levels and it changes as expected. Right now, my code is in flux, but I can copy pertinent sections to this email to see if anyone knows what may be going on.
>
> Thanks!
>
> Elizabeth
>
> 'set fwrite test.dat'
> 'set gxout fwrite'
>
> levs=''
> i=1
> while(i<2)
> 'set t 'i
> z=1
> while(z<=29)
> 'set z 'z
> 'set z 1.00002 1111'
> 'set y 1 247'
> 'q dims'
> level=sublin(result,4)
> lev=subwrd(result,6)
> levs=levs' 'lev''
> 'd pv'
> z=z+1
> endwhile
>
> i=i+1
> endwhile
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
--
Davide Sacchetti
Centro Funzionale Meteo Idrologico di Protezione Civile della Regione Liguria
ARPAL Unità Tecnica Complessa di livello Regionale
V.le Brigare Partigiane 2 16121 Genova (I)
tel: +39 010 6437535 fax: +39 010 6437520
mail: davide.sacchetti at arpal.gov.it web: www.meteoliguria.it
More information about the gradsusr
mailing list