13 subroutine gtvarexchdim(var, dimord1, dimord2, count_compact, err)
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
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 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 gtvarexchdim(var, dimord1, dimord2, count_compact, err)
subroutine, public map_lookup(var, vid, map, ndims)
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)