[gradsusr] fprintf for aave loop

Roberto Mera rjmera at coas.oregonstate.edu
Mon Jun 4 20:05:31 EDT 2012


Hi all,

I'm trying to write a script to write a bunch of area average numbers to 
a single text file for analysis with other software. The fprintf command 
only returns one value for area average when I run my area average 
script. Below is my area average script. How do I go about creating a 
text file for this?

Thanks


count = 1
while (count < 151)
'set e 'count
*'set e 1 10'
*Cascades, Peuget north of 45N
*'areal=aave(maskout(pmax1,mskgrd(t=1)),x=147.934,x=194.184,y=209.807,y=246.807)'
*Olympic Peninsula
'areal=aave(pmax1,x=154.871,x=166.434,y=228.307,y=239.869)'
'fprintf areal aereal.txt'
'd areal'
areal=subwrd(result,4)
say areal
if (rc != 0) ; break ; endif
count = count +1
*count = count +12
endwhile




More information about the gradsusr mailing list