Data Types | |
| type | gt_dimmap |
| type | map_table_entry |
| interface | dimrange |
Functions/Subroutines | |
| subroutine | dimrange_by_dimno (var, dimno, dimlo, dimhi) |
| subroutine | map_dup (var, source_var) |
| subroutine, public | map_create (var, class, cid, ndims, allcount, stat) |
| subroutine, public | maptabadd (mapid, vid) |
| subroutine, public | maptabdelete (var, err) |
| subroutine, public | map_lookup (var, vid, map, ndims) |
| subroutine | map_set (var, map, stat) |
| subroutine, public | var_class (var, class, cid) |
| subroutine | map_set_ndims (var, ndims, stat) |
| subroutine | map_set_rank (var, rank, stat) |
| subroutine, public | map_to_internal_specs (var, specs, ndims) |
| subroutine | map_allocate (map, ndims) |
| subroutine | map_apply (var, map) |
| subroutine | map_resize (var, ndims) |
| subroutine | gtvar_dump (var) |
| integer function | dimord_skip_compact (dimord, map) |
Map table management for gtool variables
A gtool variable is actually an integer handle that serves as a key to the map table. The map table (maptab) contains the entity table entry number and dimension rewriting/iterator tables.
Reference counting is not implemented at this level. That is, map table and entity table have one-to-one correspondence, and users are free to copy handles. Of course, users must close (i.e., MapTabDelete) the handle exactly once.
| integer function gtdata_internal_map::dimord_skip_compact | ( | integer, intent(in) | dimord, |
| type(gt_dimmap), dimension(:), intent(in) | map ) |
Find external dimension number for compact dimension order
Identifies the dimension at compact dimension order dimord (counting only non-degenerate dimensions) and returns the external dimension number.
| [in] | dimord | Compact dimension order |
| [in] | map | Dimension map array |
Definition at line 826 of file gtdata_internal_map.f90.
References dc_trace::dbgmessage().
| subroutine gtdata_internal_map::dimrange_by_dimno | ( | type(gt_variable), intent(in) | var, |
| integer, intent(in) | dimno, | ||
| integer, intent(out) | dimlo, | ||
| integer, intent(out) | dimhi ) |
Get internal index range for specified dimension
| [in] | var | Variable handle |
| [in] | dimno | Dimension number |
| [out] | dimlo | Lower bound of dimension |
| [out] | dimhi | Upper bound of dimension |
Definition at line 155 of file gtdata_internal_map.f90.
| subroutine gtdata_internal_map::gtvar_dump | ( | type(gt_variable), intent(in) | var | ) |
Dump variable properties for debugging
| [in] | var | Variable handle |
Definition at line 767 of file gtdata_internal_map.f90.
References dc_trace::dbgmessage(), and gtdata_internal_vartable::vartable_dump().
| subroutine gtdata_internal_map::map_allocate | ( | type(gt_dimmap), dimension(:), pointer | map, |
| integer, intent(in) | ndims ) |
Allocate and initialize dimension map entries
| [out] | map | Pointer to allocated map array |
| [in] | ndims | Number of entries to allocate |
Definition at line 655 of file gtdata_internal_map.f90.
| subroutine gtdata_internal_map::map_apply | ( | type(gt_variable), intent(inout) | var, |
| type(gt_dimmap), dimension(:), pointer | map ) |
Apply map table to variable
| [in,out] | var | Variable handle |
| [in,out] | map | Dimension map to apply (deallocated and replaced) |
Definition at line 687 of file gtdata_internal_map.f90.
| subroutine, public gtdata_internal_map::map_create | ( | type(gt_variable), intent(out) | var, |
| integer, intent(in) | class, | ||
| integer, intent(in) | cid, | ||
| integer, intent(in) | ndims, | ||
| integer, dimension(:), intent(in) | allcount, | ||
| integer, intent(out) | stat ) |
Create a variable with specified properties
Creates variable var with internal class, internal cid, apparent number of dimensions ndims, and apparent dimension lengths allcount(:). Initialization is performed assuming zero offset.
| [out] | var | Created variable handle |
| [in] | class | Internal class (VTB_CLASS_NETCDF, etc.) |
| [in] | cid | Internal identifier |
| [in] | ndims | Number of dimensions |
| [in] | allcount | Array of dimension lengths |
| [out] | stat | Status code |
Definition at line 246 of file gtdata_internal_map.f90.
References dc_error::dc_noerr, dc_error::gt_enomoredims, map_allocate(), maptabadd(), gtdata_internal_vartable::ndims(), and gtdata_internal_vartable::vartableadd().
| subroutine gtdata_internal_map::map_dup | ( | type(gt_variable), intent(out) | var, |
| type(gt_variable), intent(in) | source_var ) |
Duplicate a variable
| [out] | var | Duplicated variable handle |
| [in] | source_var | Source variable handle to copy |
Definition at line 184 of file gtdata_internal_map.f90.
References dc_trace::dbgmessage(), map_lookup(), maptabadd(), gtdata_internal_vartable::vartableadd(), and gtdata_internal_vartable::vartablelookup().
| subroutine, public gtdata_internal_map::map_lookup | ( | type(gt_variable), intent(in) | var, |
| integer, intent(out), optional | vid, | ||
| type(gt_dimmap), dimension(:), intent(out), optional | map, | ||
| integer, intent(out), optional | ndims ) |
Look up map table entry
| [in] | var | Variable handle |
| [out] | vid | Variable table entry ID (optional) |
| [out] | map | Dimension map array (optional) |
| [out] | ndims | Number of dimensions (optional) |
Definition at line 412 of file gtdata_internal_map.f90.
| subroutine gtdata_internal_map::map_resize | ( | type(gt_variable), intent(in) | var, |
| integer, intent(in) | ndims ) |
Resize dimension table of variable
| [in] | var | Variable handle |
| [in] | ndims | New size of dimension table |
Definition at line 728 of file gtdata_internal_map.f90.
References map_allocate().
| subroutine gtdata_internal_map::map_set | ( | type(gt_variable), intent(in) | var, |
| type(gt_dimmap), dimension(:), intent(in) | map, | ||
| integer, intent(out) | stat ) |
Set map table values
| [in] | var | Variable handle |
| [in] | map | Dimension map array to set |
| [out] | stat | Status code |
Definition at line 449 of file gtdata_internal_map.f90.
References dc_error::dc_noerr, and dc_error::gt_enomoredims.
| subroutine gtdata_internal_map::map_set_ndims | ( | type(gt_variable), intent(in) | var, |
| integer, intent(in) | ndims, | ||
| integer, intent(out) | stat ) |
Change number of dimensions of variable
| [in] | var | Variable handle |
| [in] | ndims | New number of dimensions |
| [out] | stat | Status code |
Definition at line 509 of file gtdata_internal_map.f90.
References dc_error::dc_noerr, dc_error::gt_enomoredims, and map_lookup().
| subroutine gtdata_internal_map::map_set_rank | ( | type(gt_variable), intent(in) | var, |
| integer, intent(in) | rank, | ||
| integer, intent(out) | stat ) |
Reduce variable rank to specified value
Reduces the rank (number of non-degenerate dimensions) of variable var to rank by setting count values to 1. Does not increase rank or manipulate apparent dimension count.
| [in] | var | Variable handle |
| [in] | rank | Target rank |
| [out] | stat | Status code |
Definition at line 560 of file gtdata_internal_map.f90.
References dc_error::dc_noerr, dc_error::gt_enomoredims, and map_lookup().
| subroutine, public gtdata_internal_map::map_to_internal_specs | ( | type(gt_variable), intent(in) | var, |
| integer, dimension(:, :), pointer | specs, | ||
| integer, intent(out), optional | ndims ) |
Convert map table to netCDF internal specifications
Creates start, count, stride, imap suitable for netCDF arguments from the map table. Note that negative stride is not handled (temporarily handled by gdncvarget/gdncvarput).
| [in] | var | Variable handle |
| [out] | specs | Pointer to specs array (allocated internally) |
| [out] | ndims | Number of internal dimensions (optional) |
Definition at line 609 of file gtdata_internal_map.f90.
References map_lookup(), and gtdata_internal_vartable::ndims().
| subroutine, public gtdata_internal_map::maptabadd | ( | integer, intent(out) | mapid, |
| integer, intent(in) | vid ) |
Add entry to map table
Adds an entry to the map table with the specified vid (which should already be added to the entity table).
| [out] | mapid | Map table entry ID |
| [in] | vid | Variable table entry ID |
Definition at line 317 of file gtdata_internal_map.f90.
| subroutine, public gtdata_internal_map::maptabdelete | ( | type(gt_variable), intent(in) | var, |
| logical, intent(out), optional | err ) |
Delete variable from map table
Removes variable var from the map table. Does not touch the entity table.
| [in] | var | Variable handle to delete |
| [out] | err | Error flag (optional) |
Definition at line 374 of file gtdata_internal_map.f90.
References dc_trace::dbgmessage(), dc_error::dc_noerr, and dc_error::storeerror().
| subroutine, public gtdata_internal_map::var_class | ( | type(gt_variable), intent(in) | var, |
| integer, intent(out), optional | class, | ||
| integer, intent(out), optional | cid ) |
Get internal class and identifier of variable
| [in] | var | Variable handle |
| [out] | class | Internal class (optional) |
| [out] | cid | Internal identifier (optional) |
Definition at line 484 of file gtdata_internal_map.f90.
References map_lookup(), and gtdata_internal_vartable::vartablelookup().