Vector subscripting on a file variable

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Mon, 03 Mar 2008 17:43:45 -0700

I would like to read selected records from a file variable. I would
like to use vector subscripting to read selected records and ignore
other records. Something like:

   f = addfile ("infile.nc", "r")
   record_nums = (/ 9, 10, 11, 21, 22, 23 /)

   data = f->precip(record_nums, :, :) ; time, lat, lon

My question is whether using vector subscripting on a large file
variable is reasonably efficient. NCL documentation warns against
using named subscripting on a file variable, and this seems related.

My index array "record_nums" is guaranteed to be monotonic and
increasing. Also in this case, the first subscript is the actual
Netcdf record dimension. Thank you for any advice.

Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
http://cires.colorado.edu/science/centers/cdc/
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
http://www.cdc.noaa.gov/
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 03 2008 - 17:43:45 MST

This archive was generated by hypermail 2.2.0 : Wed Mar 05 2008 - 00:45:46 MST