2011 Unidata NetCDF Workshop > Use of Iterators for Data Access
24.0 The Problem
How can you write code to process all the values of any
multidimensional variable?
The nccopy utility solves this problem with iterators,
implemented in C.
Ideally, a solution should use the same code to efficiently handle
- Any size of variable
- small: fits in memory
- large: only fits on disk
- Any dimensionality: scalar (0-dimensional), 1D, 2D, 3D, ...
- Any type of array elements
Example applications: copy all values, compute the average of all
values, determine how many fill values, run some function on each value
of a variable, etc.
2011 Unidata NetCDF Workshop > Use of Iterators for Data Access