I think this has been addressed before, but I can't find it in the
archives.
I'm trying to loop through program variables using a list of the variable
names. One can read in file variables by using $filevar$, but this doesn't
work for program variables. How do I do the same thing with file
variables? The variables are all of type float. Code snippet below.
Thanks,
Nicole
Code snippet:
varname = [/"pr","pw","mfc","evap"/]
do i=0,nvars-1 ;variables
print(varname[i])
calcdata = calc_stats(varname[i],region,nruns,nstat)
end do ;variables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Nicole Schiffer
* Science Writing Intern (NCSA)
* Graduate Research Fellow (Dept. of Energy)
* Department of Atmospheric Sciences
* University of Illinois, Urbana-Champaign
* Email: nschiff2 [at] illinois [dot] edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Oct 3 14:46:02 2012
This archive was generated by hypermail 2.1.8 : Mon Oct 08 2012 - 15:54:16 MDT