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 | |---------------------------------------------------------------| | sfSubsetByIndex NhlTBoolean RCSG | | SfSubsetByIndex False | |---------------------------------------------------------------| | 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> | |---------------------------------------------------------------| | 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 the receiving plot object. The types it currently handles are as follows:
ScalarField can pre-process the array in a number of ways before handing it off to the receiving object. Instead of sending the whole array you can pass any contiguous rectangular subset of the array, specified either by array index or by location in the data coordinate space. 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. In addition, you can 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.
1: Currently, once you have set either the sfXArray or the sfYArray, there is no way to return the ScalarField object to a state in which the coordinates are not treated as irregularly gridded. The only work-around is to create a new ScalarField object.
NG4 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?