Go to the source code of this file.
|
subroutine | gtvarexchdim (var, dimord1, dimord2, count_compact, err) |
|
◆ gtvarexchdim()
subroutine gtvarexchdim |
( |
type(gt_variable), intent(in) |
var, |
|
|
integer, intent(in) |
dimord1, |
|
|
integer, intent(in) |
dimord2, |
|
|
logical, intent(in), optional |
count_compact, |
|
|
logical, intent(out) |
err |
|
) |
| |
Definition at line 14 of file gtvarexchdim.f90.
References gtdata_internal_map::dimord_skip_compact(), gtdata_internal_map::map_lookup(), gtdata_internal_map::map_set(), and gtdata_internal_map::map_set_ndims().
30 use dc_trace
, only: beginsub, endsub, dbgmessage
32 type(gt_variable),
intent(in):: var
33 integer,
intent(in):: dimord1, dimord2
34 logical,
intent(in),
optional:: count_compact
35 logical,
intent(out):: err
38 integer:: ndimsp, stat, idim1, idim2
40 character(*),
parameter:: subname =
'GTVarExchDim' 44 if (
present(count_compact))
then 45 direct_mode = count_compact
47 call beginsub(subname)
48 if (dimord1 < 1 .or. dimord2 < 1)
then 49 call endsub(subname,
"negative dimord=%d %d invalid", i=(/dimord1, dimord2/))
54 call endsub(subname,
"variable invalid")
56 else if (dimord1 > ndimsp .or. dimord2 > ndimsp)
then 57 call endsub(subname,
"dimord=%d %d not exist", i=(/dimord1, dimord2/))
64 if (.not. direct_mode)
then 67 if (idim1 < 0 .or. idim2 < 0)
then 68 call endsub(subname,
"dimord=%d %d not found after compaction", &
69 & i=(/dimord1, dimord2/))
79 map(idim1) = map(idim2)
integer function dimord_skip_compact(dimord, map)
subroutine map_set(var, map, stat)
subroutine map_set_ndims(var, ndims, stat)
subroutine, public map_lookup(var, vid, map, ndims)