The ScalarField class supplies two-dimensional scalar field data.
Header file: ncarg/hlu/ScalarField.h Class name: scalarFieldClass Class pointer: NhlscalarFieldClass Fortran class pointer: NHLFSCALARFIELDCLASS Superclass: DataItem Composite classes: <None>
+---------------------------------------------------------------+ | ScalarField Resource Set | |---------------------------------------------------------------| | NAME TYPE ACCESS | | CLASS DEFAULT | |===============================================================| | sfDataArray NhlTGenArray RCSG | | SfDataArray NULL | |---------------------------------------------------------------| | sfXArray NhlTGenArray RCSG | | SfXArray NULL | |---------------------------------------------------------------| | sfYArray NhlTGenArray RCSG | | SfYArray NULL | |---------------------------------------------------------------| | sfCopyData NhlTBoolean RCSG | | diCopyData True | |---------------------------------------------------------------| | sfExchangeDimensions NhlTBoolean RCSG | | SfExchangeDimensions False | |---------------------------------------------------------------| | sfMissingValueV NhlTVariable RCSG | | SfMissingValueV NULL | |---------------------------------------------------------------| | sfDataMinV NhlTVariable RCSG | | SfDataMinV <Dynamic> | |---------------------------------------------------------------| | sfDataMaxV NhlTVariable RCSG | | SfDataMaxV <Dynamic> | |---------------------------------------------------------------| | sfXCStartV NhlTVariable RCSG | | SfXCStartV <Dynamic> | |---------------------------------------------------------------| | sfXCEndV NhlTVariable RCSG | | SfXCEndV <Dynamic> | |---------------------------------------------------------------| | sfYCStartV NhlTVariable RCSG | | SfYCStartV <Dynamic> | |---------------------------------------------------------------| | sfYCEndV NhlTVariable RCSG | | SfYCEndV <Dynamic> | |---------------------------------------------------------------| | sfXCStartSubsetV NhlTVariable RCSG | | SfXCStartSubsetV <Dynamic> | |---------------------------------------------------------------| | sfXCEndSubsetV NhlTVariable RCSG | | SfXCEndSubsetV <Dynamic> | |---------------------------------------------------------------| | sfYCStartSubsetV NhlTVariable RCSG | | SfYCStartSubsetV <Dynamic> | |---------------------------------------------------------------| | sfYCEndSubsetV NhlTVariable RCSG | | SfYCEndSubsetV <Dynamic> | |---------------------------------------------------------------| | sfXCStartIndex NhlTInteger RCSG | | SfXCStartIndex <Dynamic> | |---------------------------------------------------------------| | sfXCEndIndex NhlTInteger RCSG | | SfXCEndIndex <Dynamic> | |---------------------------------------------------------------| | sfYCStartIndex NhlTInteger RCSG | | SfYCStartIndex <Dynamic> | |---------------------------------------------------------------| | sfYCEndIndex NhlTInteger RCSG | | SfYCEndIndex <Dynamic> | |---------------------------------------------------------------| | sfXCActualStartF NhlTFloat G | | SfXCActualStartF <Dynamic> | |---------------------------------------------------------------| | sfXCActualEndF NhlTFloat G | | SfXCActualEndF <Dynamic> | |---------------------------------------------------------------| | sfYCActualStartF NhlTFloat G | | SfYCActualStartF <Dynamic> | |---------------------------------------------------------------| | sfYCActualEndF NhlTFloat G | | SfYCActualEndF <Dynamic> | |---------------------------------------------------------------| | sfXCStride NhlTInteger RCSG | | SfXCStride 1 | |---------------------------------------------------------------| | sfYCStride NhlTInteger RCSG | | SfYCStride 1 | +---------------------------------------------------------------+
The ScalarField object automatically converts data specified using a variety of numerical types into the NhlTFloat type expected by HLU data receiver objects. The types it currently handles are:
ScalarField can pre-process the array in a number of ways before handing it off to the receiving object. You can exchange the dimensions of the array, effectively turning the data on its side. You can reverse the direction of the data along either or both axes with suitable specification of the endpoints in data coordinate space. You can also make an overly dense array of data more sparse by specifying an index stride value along either or both the X and the Y dimensions.
Instead of sending the complete array to the receiver object, you can pass it any contiguous rectangular subset of the array, specified either by array index or by location in the data coordinate space. Unless the data array dimension sizes also change, ScalarField preserves the subset resource settings when the data array changes. This makes it easy to step through a subset of a time- or level-related series of data arrays. If the dimension sizes change, ScalarField assumes that the meaning of the data has also changed and that therefore the currently defined subset, besides potentially being out of range, is most likely not meaningful. In this case, the subset resources are reset to include all elements of the data arrays.
1.
Note that even if the values of the coordinate array resources
(sfXArray and sfYArray) are actually equally spaced,
plot objects such as ContourPlot currently use the
presence of a coordinate array as a signal that the data are
irregularly spaced along the axis in question. In this case, the
plot object uses an IrregularTransformation object rather
than a LogLinTransformation object when plotting the
data. The practical consequence, besides a small performance penalty,
is that it will then be necessary to overlay the plot on a
LogLinPlot if it is desired to make the X-Axis
logarithmic. If the axis is actually regularly spaced, you can avoid this
problem by setting sf...Array to NULL
,
sf...CStartV to the value of the array's first element, and
sf...CEndV to the value of the array's last element.
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?