XMDF  2.2
4.12.2. Properties

There are a few "reserved" properties when dealing with data sets. These are Datatype, Datalocation, DatalocationI, DatalocationJ, DatalocationK, and ComponentsIJK. The datatype attribute specifies whether the data set is for scalar data, 2D vector data or 3D vector data and is stored automatically when the data set is created.

Data sets on grids may be at various locations. The Datalocation attributes are used to indicate where the data is stored for each cell. These include the grid centers, corners, faces, or on faces in a particular direction. Also, an 3D or Extruded 2D grid may have a data sets for each column rather than for each cell (for example CH3D uses a 2D water surface elevation for each column). For vector data sets each component may have a different data location. The following functions are used to set the data locations for a data set. The following locations are supported for datasets GRID_LOC_CENTER, GRID_LOC_CORNER, GRID_LOC_FACES, GRID_LOC_FACE_I, GRID_LOC_FACE_J, GRID_LOC_FACE_K, and GRID_LOC_COLUMN.

C/C++
int xfScalarDataLocation(xid DatasetId, int DataLocation);
int xfVector2DDataLocations(xid DatasetId, int DataLocationI, int DataLocationJ);
int xfVector3DDataLocations(xid DatasetId, int DataLocationI, int DataLocationJ,
int DataLocationK);
FORTRAN
SUBROUTINE XF_SCALAR_DATA_LOCATION(DatasetsId, DataLocation, Error)
INTEGER(XID), INTENT(IN) :: DatasetsId
INTEGER, INTENT(IN) :: DataLocation
INTEGER, INTENT(OUT) :: Error
SUBROUTINE XF_VECTOR_2D_DATA_LOCATIONS(DatasetsId, DataLocationI, DataLocationJ, Error)
INTEGER(XID), INTENT(IN) :: DatasetsId
INTEGER, INTENT(IN) :: DataLocationI, DataLocationJ
INTEGER, INTENT(OUT) :: Error
SUBROUTINE XF_VECTOR_3D_DATA_LOCATIONS(DatasetsId, DataLocationI, DataLocationJ,
DataLocationK, Error)
INTEGER(XID), INTENT(IN) :: DatasetsId
INTEGER, INTENT(IN) :: DataLocationI, DataLocationJ, DataLocationK
INTEGER, INTENT(OUT) :: Error

These functions get the data locations for a data set.

C/C++
int xfGetScalarDataLocation(xid DatasetId, int *DataLocation);
int xfGetVector2DDataLocations(xid DatasetId, int *DataLocationI,
int *DataLocationJ);
int xfGetVector3DDataLocations(xid DatasetId, int *DataLocationI,
int *DataLocationJ, int *DataLocationK);
FORTRAN
SUBROUTINE XF_GET_SCALAR_DATA_LOCATION(DatasetsId, DataLocation, Error)
INTEGER(XID), INTENT(IN) :: DatasetsId
INTEGER, INTENT(OUT) :: DataLocation
INTEGER, INTENT(OUT) :: Error
SUBROUTINE XF_GET_VECTOR_2D_DATA_LOCATIONS(DatasetsId, DataLocationI, DataLocationJ,
Error)
INTEGER(XID), INTENT(IN) :: DatasetsId
INTEGER, INTENT(OUT) :: DataLocationI, DataLocationJ
INTEGER, INTENT(OUT) :: Error
SUBROUTINE XF_GET_VECTOR_3D_DATA_LOCATIONS(DatasetsId, DataLocationI, DataLocationJ,
DataLocationK, Error)
INTEGER(XID), INTENT(IN) :: DatasetsId
INTEGER, INTENT(OUT) :: DataLocationI, DataLocationJ, DataLocationK
INTEGER, INTENT(OUT) :: Error

Vector data sets on Cartesian grids may have components in local I, J, and K coordinates rather than global x, y, and z. This function should be called for all vector data sets that use local coordinates.

C/C++
int xfVectorsInLocalCoords(xid DatasetId);
FORTRAN
SUBROUTINE XF_VECTORS_IN_LOCAL_COORDS(DatasetsId, Error)
INTEGER(XID), INTENT(IN) :: DatasetsId
INTEGER, INTENT(OUT) :: Error

This function is used to determine if vector data is given in local IJK coordinates or the default XYZ coordinates.

C/C++
int xfAreVectorsInLocalCoords(xid DatasetId, int *LocalCoords);
FORTRAN
SUBROUTINE XF_ARE_VECTORS_IN_LOCAL_COORDS(DatasetsId, LocalCoords, Error)
INTEGER(XID), INTENT(IN) :: DatasetsId
LOGICAL, INTENT(OUT) :: LocalCoords
INTEGER, INTENT(OUT) :: Error