Reading Group of files
MMME
mhsanabary9 at YAHOO.COM
Tue Feb 23 16:45:01 EST 2010
Hi
I have group of files and I want to read all of them by one script. Is it possible?
I have:
i=1
while (i < 9) 'sdfopen BlueNILEB-6i-ECMWF.nc'
'set prnopts %10.8
'set lat
'set lon
'set t 1
'd
ascii = result
asciifile = 'precipitation.asc'
numbers = sublin(result,2)
if (numbers != '')
rc = write (asciifile,numbers)
else
say 'no ascii data to write'
return
endif
* write out remaining ascii data
i=3
while(1)
numbers = sublin(result,i)
if (numbers != '')
rc = write (asciifile,numbers,append)
else
break
endif
i = i+1
endwhile
rc = close(asciifile)
say 'return code from close is:'rc'set gxout print'e1 1'7.5'35'1461'(cp+lsp+sf)*1000/60/60/6''set gxout contour'
'd cp'i = i + 1
endwhile
More information about the gradsusr
mailing list