63 integer,
intent(in):: dimord1, dimord2
64 logical,
intent(in),
optional:: count_compact
65 logical,
intent(out):: err
68 integer:: ndimsp, stat, idim1, idim2
70 character(*),
parameter:: subname =
'GTVarExchDim'
74 if (
present(count_compact))
then
75 direct_mode = count_compact
78 if (dimord1 < 1 .or. dimord2 < 1)
then
79 call endsub(subname,
"negative dimord=%d %d invalid", i=(/dimord1, dimord2/))
84 call endsub(subname,
"variable invalid")
86 else if (dimord1 > ndimsp .or. dimord2 > ndimsp)
then
87 call endsub(subname,
"dimord=%d %d not exist", i=(/dimord1, dimord2/))
94 if (.not. direct_mode)
then
97 if (idim1 < 0 .or. idim2 < 0)
then
98 call endsub(subname,
"dimord=%d %d not found after compaction", &
99 & i=(/dimord1, dimord2/))
109 map(idim1) = map(idim2)
subroutine gtvarexchdim(var, dimord1, dimord2, count_compact, err)
subroutine, public dbgmessage(fmt, i, r, d, l, n, c1, c2, c3, ca)
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
subroutine, public map_lookup(var, vid, map, ndims)
subroutine map_set_ndims(var, ndims, stat)
subroutine map_set(var, map, stat)
integer function dimord_skip_compact(dimord, map)