ScalarField class

The ScalarField class supplies two-dimensional scalar field data.


Synopsis

Header file:		ncarg/hlu/ScalarField.h
Class name:		scalarFieldClass
Class pointer:		NhlscalarFieldClass
Fortran class pointer:	NHLFSCALARFIELDCLASS
Superclass:		DataItem
Composite classes:	<None>

Resources

Local resources

+---------------------------------------------------------------+
|			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                       |
+---------------------------------------------------------------+

Composite resources

The ScalarField object class has no composite class objects.

Superclass resources

Currently, no superclasses of the ScalarField object class define any resources.

Description

The ScalarField object encapsulates the functionality required to pass a two-dimensional scalar field data array to a receiving plot object. Currently the only object in the HLU library that can act as a receiver of scalar field data is the ContourPlot object. The ScalarField object requires one resource to be set: the two-dimensional array resource, sfDataArray, containing a reference to the storage location of the data array in memory. ScalarField handles both regularly and irregularly spaced rectangular data arrays. It assumes the grid is regularly spaced unless you set one or both of the supplementary array resources, sfXArray and sfYArray, that specify the irregularly spaced location of data points along their respective data coordinate axes.

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:

Many of the supplementary resources may also be set using any of these types.

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.


Support functions

The ScalarField object does not define any support functions, but inherits all the support functions available to its superclass.

Status

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.


See also


Copyright

Copyright 1987,1988,1989,1991,1993,1994,1995
University Corporation for Atmospheric Research
All Rights Reserved

Reference Manual Control Panel

NG4 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?


$Revision: 1.15 $ $Date: 1995/07/26 23:30:27 $