Given a new filename, DFSDstartslab will create a new HDF file with the specified name. Given an existing filename, it will open the named file and append the new data set to the end of the file. Its only parameter is
filename. DFSDendslab has no parameters and need only be called once per file. DFSDendslab will write any attributes defined immediately before the data set is created.For more information on assigning attributes, see Section 12.7.3 on page 377.
TABLE 12I - DFSDstartslab Parameter List
|
|
|
|
| |
|
|
| |||
|
|
|
Name of the file containing the data set.
| |
More specifically, the DFSD programming model for writing slabs to an SDS is as follows:
Although not specifically defined as a slab routine, in practice, the DFSDsetfillvalue routine is used to initialize array elements between non-contiguous slab write operations. Setting a fill value places the same value in every array location before the first slab is written. Any hole created by non-contiguous writes can then be recognized by identifying the known fill value. The fill value must have the same number type as the values in the data set. For more information on fill values refer to Section 12.7.1.2 on page 374.
To write a slab to a new data set, the calling program must include the following routine calls:
C: status = DFSDsetdims(rank, dimsizes);
status = DFSDsetNT(num_type);
status = DFSDstartslab(filename);
status = DFSDwriteslab(start, stride, count, data);
status = DFSDendslab( );
FORTRAN: status = dssnt(num_type)
status = dssdims(rank, dim_sizes)
status = dssslab(filename)
status = dswslab(start, stride, edge, data)
status = dseslab( )
When writing slabs to an existing data set, it is impossible to change the number type, array boundaries, fill value, or calibration information. Consequently DFSDsetNT, DFSDsetdims, DFSDsetcal, and DFSDsetfillvalue will generate errors if called for an existing data set. C: status = DFSDwriteref(filename, ref);
status = DFSDstartslab(filename);
status = DFSDwriteslab(start, stride, count, data);
status = DFSDendslab( );
FORTRAN: status = dswref(filename, ref)
status = dssslab(filename)
status = dswslab(start, stride, edge, data)
status = dseslab( )
Because DFSDwriteslab offers no overwrite protection, the calling program is responsible for eliminating overlap when arranging slabs within the newly defined data set. start, stride, edge, and data. The arguments start, stride, and edge are defined as they are in the corresponding SD routines.start array as the stride parameter as a place holder. Whatever is passed as the stride parameter will r>
To review, a slab is an n-dimensional array whose dimensions are smaller than those of the SDS array into which it is written or from which it is read. 12.6.1 Accessing Slabs: DFSDstartslab and DFSDendslab
There are two routines required for every DFSD slab operation - DFSDstartslab and DFSDendslab. DFSDstartslab is used to initialize the slab interface and to initiate access to new or existing data sets. DFSDendslab is used to terminate access to open data sets. DFSDstartslab must be called before any read or write slab operation and DFSDendslab must be called after the slab operation is completed. Both routines are required when reading and writing slabs.filename. DFSDendslab has no parameters and need only be called once per file. DFSDendslab will write any attributes defined immediately before the data set is created.
TABLE 12I - DFSDstartslab Parameter List
|
|
|
|
| |
|
|
| |||
|
|
|
Name of the file containing the data set.
| |
More specifically, the DFSD programming model for writing slabs to an SDS is as follows:
Although not specifically defined as a slab routine, in practice, the DFSDsetfillvalue routine is used to initialize array elements between non-contiguous slab write operations. Setting a fill value places the same value in every array location before the first slab is written. Any hole created by non-contiguous writes can then be recognized by identifying the known fill value. The fill value must have the same number type as the values in the data set. For more information on fill values refer to Section 12.7.1.2 on page 374.
To write a slab to a new data set, the calling program must include the following routine calls:
C: status = DFSDsetdims(rank, dimsizes);
status = DFSDsetNT(num_type);
status = DFSDstartslab(filename);
status = DFSDwriteslab(start, stride, count, data);
status = DFSDendslab( );
FORTRAN: status = dssnt(num_type)
status = dssdims(rank, dim_sizes)
status = dssslab(filename)
status = dswslab(start, stride, edge, data)
status = dseslab( )
When writing slabs to an existing data set, it is impossible to change the number type, array boundaries, fill value, or calibration information. Consequently DFSDsetNT, DFSDsetdims, DFSDsetcal, and DFSDsetfillvalue will generate errors if called for an existing data set. C: status = DFSDwriteref(filename, ref);
status = DFSDstartslab(filename);
status = DFSDwriteslab(start, stride, count, data);
status = DFSDendslab( );
FORTRAN: status = dswref(filename, ref)
status = dssslab(filename)
status = dswslab(start, stride, edge, data)
status = dseslab( )
Because DFSDwriteslab offers no overwrite protection, the calling program is responsible for eliminating overlap when arranging slabs within the newly defined data set. start, stride, edge, and data. The arguments start, stride, and edge are defined as they are in the corresponding SD routines.start array as the stride parameter as a place holder. Whatever is passed as the stride parameter will r>
To review, a slab is an n-dimensional array whose dimensions are smaller than those of the SDS array into which it is written or from which it is read. 12.6.1 Accessing Slabs: DFSDstartslab and DFSDendslab
There are two routines required for every DFSD slab operation - DFSDstartslab and DFSDendslab. DFSDstartslab is used to initialize the slab interface and to initiate access to new or existing data sets. DFSDendslab is used to terminate access to open data sets. DFSDstartslab must be called before any read or write slab operation and DFSDendslab must be called after the slab operation is completed. Both routines are required when reading and writing slabs.filename.