Reading variable only

From: Steeven Paul Yerraguntla <steevenpaul_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 12 2014 - 23:52:37 MDT

Hi NCL Users,
           I am using number of netcdf files having single variables and
those are station time series data. I wanted to use the variable(like sst,
airt but not lat, lon, depth etc) in the script using
*getfilevarnames*function as follows.

f = addfile ("station_data.nc","r")
vNames = dimsizes(vNames)
V=f->$vNames(*n-1*)$

I am expecting the n value to be same(it is changing from file to file
though they are of equal dimensions) for all netcdf files so that i need
not worry about the mentioning of variable name in every script. In short,
is there any way to extract variable name without mentioning it directly in
the script?

Thanks in advance

regards,
Paul.

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 12 23:53:30 2014

This archive was generated by hypermail 2.1.8 : Fri Mar 14 2014 - 15:08:52 MDT