69 & dim, weight, & ! (in)
74 use gtool_history,
only: historyaxisinquire, historyaxisaddattr, &
75 & historyvarinfocreate
82 character(*),
intent(in):: dim
94 real,
intent(in):: weight(:)
111 character(*),
intent(in),
optional:: units
120 character(*),
intent(in),
optional:: xtype
130 character(STRING):: name, longname
131 character(TOKEN):: dim_units, dim_xtype
134 character(STRING):: cause_c
135 character(*),
parameter:: subname =
"HistoryAutoAddWeightReal"
137 call beginsub(subname,
'dim=<%c>', c1=trim(dim) )
146 cause_c =
'gtool_historyauto'
151 call historyaxisinquire( &
155 & longname = longname, &
156 & units = dim_units, &
157 & xtype = dim_xtype )
158 if ( trim(dim) == trim(name) )
then
159 if ( dim_size /=
size(weight) )
then
163 if (
present(units) ) dim_units = units
164 if (
present(xtype) ) dim_xtype = xtype
165 call historyvarinfocreate( &
167 & name = trim(dim) //
wgtsuf, dims = (/ dim /), &
168 & longname =
'weight for integration or average in ' // &
170 & units = dim_units, xtype = dim_xtype )
172 call historyaxisaddattr( &
174 & attrname =
'gt_calc_weight', &
175 &
value = trim(dim) //
wgtsuf )
189 call storeerror(stat, subname, cause_c = cause_c)
232 & dim, weight, & ! (in)
237 use gtool_history,
only: historyaxisinquire, historyaxisaddattr, &
238 & historyvarinfocreate
245 character(*),
intent(in):: dim
257 real(DP),
intent(in):: weight(:)
274 character(*),
intent(in),
optional:: units
283 character(*),
intent(in),
optional:: xtype
293 character(STRING):: name, longname
294 character(TOKEN):: dim_units, dim_xtype
297 character(STRING):: cause_c
298 character(*),
parameter:: subname =
"HistoryAutoAddWeightDouble"
300 call beginsub(subname,
'dim=<%c>', c1=trim(dim) )
309 cause_c =
'gtool_historyauto'
314 call historyaxisinquire( &
318 & longname = longname, &
319 & units = dim_units, &
320 & xtype = dim_xtype )
321 if ( trim(dim) == trim(name) )
then
322 if ( dim_size /=
size(weight) )
then
326 if (
present(units) ) dim_units = units
327 if (
present(xtype) ) dim_xtype = xtype
328 call historyvarinfocreate( &
330 & name = trim(dim) //
wgtsuf, dims = (/ dim /), &
331 & longname =
'weight for integration or average in ' // &
333 & units = dim_units, xtype = dim_xtype )
335 call historyaxisaddattr( &
337 & attrname =
'gt_calc_weight', &
338 &
value = trim(dim) //
wgtsuf )
352 call storeerror(stat, subname, cause_c = cause_c)
395 & dim, weight, & ! (in)
400 use gtool_history,
only: historyaxisinquire, historyaxisaddattr, &
401 & historyvarinfocreate
408 character(*),
intent(in):: dim
420 integer,
intent(in):: weight(:)
437 character(*),
intent(in),
optional:: units
446 character(*),
intent(in),
optional:: xtype
456 character(STRING):: name, longname
457 character(TOKEN):: dim_units, dim_xtype
460 character(STRING):: cause_c
461 character(*),
parameter:: subname =
"HistoryAutoAddWeightInt"
463 call beginsub(subname,
'dim=<%c>', c1=trim(dim) )
472 cause_c =
'gtool_historyauto'
477 call historyaxisinquire( &
481 & longname = longname, &
482 & units = dim_units, &
483 & xtype = dim_xtype )
484 if ( trim(dim) == trim(name) )
then
485 if ( dim_size /=
size(weight) )
then
489 if (
present(units) ) dim_units = units
490 if (
present(xtype) ) dim_xtype = xtype
491 call historyvarinfocreate( &
493 & name = trim(dim) //
wgtsuf, dims = (/ dim /), &
494 & longname =
'weight for integration or average in ' // &
496 & units = dim_units, xtype = dim_xtype )
498 call historyaxisaddattr( &
500 & attrname =
'gt_calc_weight', &
501 &
value = trim(dim) //
wgtsuf )
515 call storeerror(stat, subname, cause_c = cause_c)
subroutine historyautoaddweightdouble(dim, weight, units, xtype)
subroutine historyautoaddweightreal(dim, weight, units, xtype)
subroutine historyautoaddweightint(dim, weight, units, xtype)
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_noerr
Error storage variables
integer, parameter, public dc_enotinit
-400 or less: DC utilities errors
integer, parameter, public hst_enoaxisname
integer, parameter, public gt_eargsizemismatch
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)
Provides kind type parameter values.
integer, parameter, public token
Character length for word, token
integer, parameter, public dp
Double Precision Real number
integer, parameter, public string
Character length for string
integer, save, public numdims
character(*), parameter, public wgtsuf
type(gt_history_axis_data), dimension(1:nf90_max_dims), target, save, public data_weights
type(gt_history_varinfo), dimension(1:nf90_max_dims), save, public gthst_weights
integer, save, public numwgts
type(gt_history_axis), dimension(1:nf90_max_dims), target, save, public gthst_axes
logical, save, public initialized