31 & varname, attrname, value, history, err)
61 character(*),
intent(in):: varname
70 character(*),
intent(in):: attrname
86 character(*),
intent(in):: value
89 type(
gt_history),
intent(inout),
target,
optional:: history
97 logical,
intent(out),
optional:: err
114 logical:: err_not_found
116 character(STRING):: cause_c
117 character(len = *),
parameter:: subname =
"HistoryAddAttrChar0"
120 &
'varname=<%c> attrname=<%c>, value=<%c>', &
121 & c1=trim(varname), c2=trim(attrname), c3=trim(
value))
125 if (
present(history))
then
130 if ( hst % mpi_gather .and. &
131 & .not. hst % mpi_fileinfo % already_output )
then
133 &
'Specify data of axes in whole area by "HistoryPutAxisMPI" explicitly ' // &
134 &
'before "call HistoryAddAttr".' )
139 if ( .not. hst % mpi_gather &
140 & .or. ( hst % mpi_gather .and. hst % mpi_myrank == 0 ) )
then
141 if (varname ==
"")
then
143 do, v_ord = 1,
size(hst % vars)
148 if ( .not. err_not_found )
then
152 cause_c =
'varname="' // trim(varname) //
'" is not found'
158 call storeerror(stat, subname, err, cause_c=cause_c)
162 & varname, attrname, value, history, err)
176 character(*),
intent(in):: varname
177 character(*),
intent(in):: attrname
178 logical,
intent(in):: value
179 type(
gt_history),
intent(inout),
target,
optional:: history
180 logical,
intent(out),
optional:: err
184 logical:: err_not_found
186 character(STRING):: cause_c
187 character(len = *),
parameter:: subname =
"HistoryAddAttrLogical0"
190 &
'varname=<%c> attrname=<%c>, value=<%c>', &
191 & c1=trim(varname), c2=trim(attrname), c3=trim(
tochar(
value)))
195 if (
present(history))
then
200 if ( hst % mpi_gather .and. &
201 & .not. hst % mpi_fileinfo % already_output )
then
203 &
'Specify data of axes in whole area by "HistoryPutAxisMPI" explicitly ' // &
204 &
'before "call HistoryAddAttr".' )
209 if ( .not. hst % mpi_gather &
210 & .or. ( hst % mpi_gather .and. hst % mpi_myrank == 0 ) )
then
211 if (varname ==
"")
then
213 do, v_ord = 1,
size(hst % vars)
218 if ( .not. err_not_found )
then
222 cause_c =
'varname="' // trim(varname) //
'" is not found'
228 call storeerror(stat, subname, err, cause_c=cause_c)
232 & varname, attrname, value, history, err)
246 character(*),
intent(in):: varname
247 character(*),
intent(in):: attrname
248 integer,
intent(in):: value
249 type(
gt_history),
intent(inout),
target,
optional:: history
250 logical,
intent(out),
optional:: err
254 logical:: err_not_found
256 character(STRING):: cause_c
257 character(len = *),
parameter:: subname =
"HistoryAddAttrInt0"
260 &
'varname=<%c> attrname=<%c>, value=<%c>', &
261 & c1=trim(varname), c2=trim(attrname), c3=trim(
tochar(
value)))
265 if (
present(history))
then
270 if ( hst % mpi_gather .and. &
271 & .not. hst % mpi_fileinfo % already_output )
then
273 &
'Specify data of axes in whole area by "HistoryPutAxisMPI" explicitly ' // &
274 &
'before "call HistoryAddAttr".' )
279 if ( .not. hst % mpi_gather &
280 & .or. ( hst % mpi_gather .and. hst % mpi_myrank == 0 ) )
then
281 if (varname ==
"")
then
283 do, v_ord = 1,
size(hst % vars)
288 if ( .not. err_not_found )
then
289 call put_attr(var, attrname, (/
value/))
292 cause_c =
'varname="' // trim(varname) //
'" is not found'
298 call storeerror(stat, subname, err, cause_c=cause_c)
302 & varname, attrname, value, history, err)
316 character(*),
intent(in):: varname
317 character(*),
intent(in):: attrname
318 integer,
intent(in)::
value(:)
319 type(
gt_history),
intent(inout),
target,
optional:: history
320 logical,
intent(out),
optional:: err
324 logical:: err_not_found
326 character(STRING):: cause_c
327 character(len = *),
parameter:: subname =
"HistoryAddAttrInt1"
330 &
'varname=<%c> attrname=<%c>, value=<%c>', &
331 & c1=trim(varname), c2=trim(attrname), c3=trim(
tochar(
value)))
335 if (
present(history))
then
340 if ( hst % mpi_gather .and. &
341 & .not. hst % mpi_fileinfo % already_output )
then
343 &
'Specify data of axes in whole area by "HistoryPutAxisMPI" explicitly ' // &
344 &
'before "call HistoryAddAttr".' )
349 if ( .not. hst % mpi_gather &
350 & .or. ( hst % mpi_gather .and. hst % mpi_myrank == 0 ) )
then
351 if (varname ==
"")
then
353 do, v_ord = 1,
size(hst % vars)
358 if ( .not. err_not_found )
then
359 call put_attr(var, attrname, (/
value/))
362 cause_c =
'varname="' // trim(varname) //
'" is not found'
368 call storeerror(stat, subname, err, cause_c=cause_c)
372 & varname, attrname, value, history, err)
386 character(*),
intent(in):: varname
387 character(*),
intent(in):: attrname
388 real,
intent(in):: value
389 type(
gt_history),
intent(inout),
target,
optional:: history
390 logical,
intent(out),
optional:: err
394 logical:: err_not_found
396 character(STRING):: cause_c
397 character(len = *),
parameter:: subname =
"HistoryAddAttrReal0"
400 &
'varname=<%c> attrname=<%c>, value=<%c>', &
401 & c1=trim(varname), c2=trim(attrname), c3=trim(
tochar(
value)))
405 if (
present(history))
then
410 if ( hst % mpi_gather .and. &
411 & .not. hst % mpi_fileinfo % already_output )
then
413 &
'Specify data of axes in whole area by "HistoryPutAxisMPI" explicitly ' // &
414 &
'before "call HistoryAddAttr".' )
419 if ( .not. hst % mpi_gather &
420 & .or. ( hst % mpi_gather .and. hst % mpi_myrank == 0 ) )
then
421 if (varname ==
"")
then
423 do, v_ord = 1,
size(hst % vars)
428 if ( .not. err_not_found )
then
429 call put_attr(var, attrname, (/
value/))
432 cause_c =
'varname="' // trim(varname) //
'" is not found'
438 call storeerror(stat, subname, err, cause_c=cause_c)
442 & varname, attrname, value, history, err)
456 character(*),
intent(in):: varname
457 character(*),
intent(in):: attrname
458 real,
intent(in)::
value(:)
459 type(
gt_history),
intent(inout),
target,
optional:: history
460 logical,
intent(out),
optional:: err
464 logical:: err_not_found
466 character(STRING):: cause_c
467 character(len = *),
parameter:: subname =
"HistoryAddAttrReal1"
470 &
'varname=<%c> attrname=<%c>, value=<%c>', &
471 & c1=trim(varname), c2=trim(attrname), c3=trim(
tochar(
value)))
475 if (
present(history))
then
480 if ( hst % mpi_gather .and. &
481 & .not. hst % mpi_fileinfo % already_output )
then
483 &
'Specify data of axes in whole area by "HistoryPutAxisMPI" explicitly ' // &
484 &
'before "call HistoryAddAttr".' )
489 if ( .not. hst % mpi_gather &
490 & .or. ( hst % mpi_gather .and. hst % mpi_myrank == 0 ) )
then
491 if (varname ==
"")
then
493 do, v_ord = 1,
size(hst % vars)
498 if ( .not. err_not_found )
then
499 call put_attr(var, attrname, (/
value/))
502 cause_c =
'varname="' // trim(varname) //
'" is not found'
508 call storeerror(stat, subname, err, cause_c=cause_c)
512 & varname, attrname, value, history, err)
526 character(*),
intent(in):: varname
527 character(*),
intent(in):: attrname
528 real(DP),
intent(in):: value
529 type(
gt_history),
intent(inout),
target,
optional:: history
530 logical,
intent(out),
optional:: err
534 logical:: err_not_found
536 character(STRING):: cause_c
537 character(len = *),
parameter:: subname =
"HistoryAddAttrDouble0"
540 &
'varname=<%c> attrname=<%c>, value=<%c>', &
541 & c1=trim(varname), c2=trim(attrname), c3=trim(
tochar(
value)))
545 if (
present(history))
then
550 if ( hst % mpi_gather .and. &
551 & .not. hst % mpi_fileinfo % already_output )
then
553 &
'Specify data of axes in whole area by "HistoryPutAxisMPI" explicitly ' // &
554 &
'before "call HistoryAddAttr".' )
559 if ( .not. hst % mpi_gather &
560 & .or. ( hst % mpi_gather .and. hst % mpi_myrank == 0 ) )
then
561 if (varname ==
"")
then
563 do, v_ord = 1,
size(hst % vars)
568 if ( .not. err_not_found )
then
569 call put_attr(var, attrname, (/
value/))
572 cause_c =
'varname="' // trim(varname) //
'" is not found'
578 call storeerror(stat, subname, err, cause_c=cause_c)
582 & varname, attrname, value, history, err)
596 character(*),
intent(in):: varname
597 character(*),
intent(in):: attrname
598 real(DP),
intent(in)::
value(:)
599 type(
gt_history),
intent(inout),
target,
optional:: history
600 logical,
intent(out),
optional:: err
604 logical:: err_not_found
606 character(STRING):: cause_c
607 character(len = *),
parameter:: subname =
"HistoryAddAttrDouble1"
610 &
'varname=<%c> attrname=<%c>, value=<%c>', &
611 & c1=trim(varname), c2=trim(attrname), c3=trim(
tochar(
value)))
615 if (
present(history))
then
620 if ( hst % mpi_gather .and. &
621 & .not. hst % mpi_fileinfo % already_output )
then
623 &
'Specify data of axes in whole area by "HistoryPutAxisMPI" explicitly ' // &
624 &
'before "call HistoryAddAttr".' )
629 if ( .not. hst % mpi_gather &
630 & .or. ( hst % mpi_gather .and. hst % mpi_myrank == 0 ) )
then
631 if (varname ==
"")
then
633 do, v_ord = 1,
size(hst % vars)
638 if ( .not. err_not_found )
then
639 call put_attr(var, attrname, (/
value/))
642 cause_c =
'varname="' // trim(varname) //
'" is not found'
648 call storeerror(stat, subname, err, cause_c=cause_c)
subroutine historyaddattrreal0(varname, attrname, value, history, err)
subroutine historyaddattrdouble1(varname, attrname, value, history, err)
subroutine historyaddattrlogical0(varname, attrname, value, history, err)
subroutine historyaddattrchar0(varname, attrname, value, history, err)
gtool4 データ内の変数への属性付加
subroutine historyaddattrint0(varname, attrname, value, history, err)
subroutine historyaddattrdouble0(varname, attrname, value, history, err)
subroutine historyaddattrreal1(varname, attrname, value, history, err)
subroutine historyaddattrint1(varname, attrname, value, history, err)
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_noerr
エラー等を保持
integer, parameter, public hst_empinoaxisdata
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 dp
倍精度実数型変数
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
character, parameter, public gt_plus
type(gt_history), target, save, public default