[ncl-talk] How to read a specific variable name

Laura Fowler laura at ucar.edu
Tue Nov 29 17:24:18 MST 2016


Hello:

I am trying the following command line:

ncl 'filename="2621442.cldfrac.mp_thompson_aerosols.2011-01-31_18.00.00.nc"'
'date="2011-01-31_18.00.00.nc"' 'field="cldfrac"'
write.rectangular.toNETCDFs.ncl in which the variable cldfrac is the
actual name of the variable I would liked to read.

Inside the ncl script write.rectangular.toNETCDFs.ncl, how do I read
that variable using the generic variable field? I tried something like
diag = f->"field" and other combinations bu that did not work.

When I write a new netcdf file out, how do I use
ncdf->field = ....

Looks like I always come up with a syntax error and have not been able
to fix it.

Thanks,
Laura



-- 
!-------------------------------------------------------------------------------------------------------------
Laura D. Fowler
Mesoscale and Microscale Meteorology Division (MMM)
National Center for Atmospheric Research
P.O. Box 3000, Boulder CO 80307-3000

e-mail: laura at ucar.edu
phone: 303-497-1628

!-------------------------------------------------------------------------------------------------------------


More information about the ncl-talk mailing list