This subroutine performs following acts.
If HistoryAutoAddVariable is called after this subroutine is called, an error is occurred.
46 use dc_date,
only:
operator(*),
operator(+)
49
50 implicit none
51 logical:: allvar_invalid
52
53
54
55 integer, parameter:: names_limit = 100
56 character(names_limit):: names_invalid
57
58
59
60 character(STRING):: name, units, longname, var_info_str
61 character(TOKEN), pointer:: dims(:) =>null()
62 integer:: msnot_rank
63 integer:: stat, i
64 character(STRING):: cause_c
65 character(*), parameter:: subname = "HistoryAutoAllVarFix"
66 continue
69 cause_c = ""
70
71
72
73
76 cause_c = 'gtool_historyauto'
77 goto 999
78 end if
79
80
81
82
84
85
86
87
88
91 & invalid = allvar_invalid, names = names_invalid )
92
93 if ( len_trim(names_invalid) > (names_limit - 5) ) then
94 names_invalid = names_invalid(1:names_limit - 5) // ' ....'
95 end if
96
97 if ( allvar_invalid ) then
99 cause_c = names_invalid
101 & 'names "%c" from NAMELIST "gtool_historyauto_nml" are invalid.', &
102 & c1 = trim(names_invalid) )
103 goto 999
104 end if
105
106
107
108
109 msnot_rank = -1
111 call messagenotify(
'M',
sub_sname,
'-------------------------------------------', rank_mpi = msnot_rank )
112 call messagenotify(
'M',
sub_sname,
'----- Registered variables for output -----', rank_mpi = msnot_rank )
113 call messagenotify(
'M',
sub_sname,
'-------------------------------------------', rank_mpi = msnot_rank )
114
116 call historyvarinfoinquire( &
118 & name = name, &
119 & dims = dims, &
120 & longname = longname, &
121 & units = units )
122
123 var_info_str = trim( longname ) // ' [' // &
124 & trim( units ) // '] {' // &
125 & trim(
joinchar( dims,
',' ) ) //
'}'
126 deallocate( dims )
127
129 & c1 = trim(name), c2 = trim(var_info_str), rank_mpi = msnot_rank )
130
131 end do
133
134
135
136
138
139999 continue
140 call storeerror(stat, subname, cause_c = cause_c)
141 call endsub(subname,
'stat=%d', i = (/stat/) )
Date and time manipulation module.
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_noerr
Error storage variables
integer, parameter, public hst_ebadvarname
integer, parameter, public dc_enotinit
-400 or less: DC utilities errors
Handling character types.
character(string) function, public joinchar(carray, expr)
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 string
Character length for string
type(gthst_nmlinfo), save, public gthstnml
logical, save, public save_mpi_gather
type(gt_history_varinfo), dimension(1:max_vars), save, public gthst_vars
character(*), parameter, public sub_sname
logical, save, public flag_allvarfixed
logical, save, public initialized
integer, save, public numvars