84 integer,
intent(in):: dimord
85 logical,
intent(in),
optional:: count_compact
86 logical,
intent(in),
optional:: inherit_slice
87 logical,
intent(out),
optional:: err
88 integer:: sclass, scid, ld, sndims, stat, udimord, idimord, cause_i
92 logical:: cnt_compact, keep_slice
93 character(STRING) :: endsub_msg
94 character(len = *),
parameter:: subname =
"GTVarOpen-By-Dimord"
95 character(len = *),
parameter:: version = &
97 &
'$Id: gtvaropenbydimord.f90,v 1.5 2009-07-04 04:58:06 morikawa Exp $'
99 call beginsub(subname,
'var.mapid=%d dimord=%d ', &
100 & i=(/source_var%mapid, dimord/), version=version)
106 if (dimord == 0)
then
108 if (
present(err)) err = .false.
116 if (sndims <= 0 .or. dimord > sndims)
then
120 allocate(map_src(sndims))
122 cnt_compact = .false.
126 cnt_compact = .false.
132 call dbgmessage(
'count_compact=%y', l=(/cnt_compact/))
134 if (cnt_compact)
then
139 if (udimord <= 0 .or. udimord >
size(map_src))
then
144 idimord = map_src(udimord)%dimno
145 if (idimord < 1)
then
146 call gt_open(var, map_src(udimord)%url, err=err)
154 if (sclass == vtb_class_netcdf)
then
157 call map_create(var, vtb_class_netcdf, gdnc%id, 1, (/ld/), stat)
163 map_result(1)%offset = map_src(udimord)%offset
164 map_result(1)%step = map_src(udimord)%step
165 map_result(1)%allcount = map_src(udimord)%allcount
167 map_result(1)%start = map_src(udimord)%start
168 map_result(1)%count = map_src(udimord)%count
169 map_result(1)%stride = map_src(udimord)%stride
171 map_result(1)%start = 1
172 map_result(1)%count = map_src(udimord)%allcount
173 map_result(1)%stride = 1
175 call map_set(var, map=map_result, stat=stat)
181 endsub_msg =
cprintf(
'result_var=%d', i=(/var%mapid/))
183 call storeerror(stat, subname, cause_i=cause_i, err=err)
184 call endsub(subname,
'%c', c1=trim(endsub_msg))
subroutine gtvaropenbydimord(var, source_var, dimord, count_compact, inherit_slice, err)
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public gt_efake
正のエラー番号は libc システムエラーメッセージのために あけてある。システム依存性が大きく、非常に大きな数値も 用いられるので空き領域を確保するのは困難である。
integer, parameter, public dc_noerr
エラー等を保持
integer, parameter, public gt_enomoredims
-101 以下: データ構造のエラー
logical function, public present_and_false(arg)
logical function, public present_and_true(arg)
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)
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
subroutine, public map_lookup(var, vid, map, ndims)
subroutine map_set(var, map, stat)
integer function dimord_skip_compact(dimord, map)
subroutine, public var_class(var, class, cid)
subroutine, public map_create(var, class, cid, ndims, allcount, stat)
subroutine map_dup(var, source_var)