31 type(
gt_history),
intent(inout),
optional,
target:: history
39 logical,
intent(in),
optional:: quiet
46 logical,
intent(out),
optional:: err
61 character(STRING):: url, file
64 character(STRING):: cause_c
65 character(len = *),
parameter:: subname =
"HistoryClose" 71 if (
present(history))
then 81 if ( .not. hst % initialized )
then 83 cause_c =
'GT_HISTORY' 97 call inquire( hst % dimvars(1), &
116 v_size =
size(hst % dimvars)
118 if (.not. hst % dim_value_written(i)) &
120 call close(hst % dimvars(i))
122 v_size =
size(hst % vars)
124 call close(hst % vars(i))
131 deallocate(hst % dimvars)
132 v_size =
size(hst % vars)
138 hst % unlimited_index = 0
139 hst % unlimited_units =
'' 141 if (
associated(hst % dim_value_written))
deallocate(hst % dim_value_written)
142 if (
associated(hst % vars))
deallocate(hst % vars)
143 if (
associated(hst % growable_indices))
deallocate(hst % growable_indices)
144 if (
associated(hst % count))
deallocate(hst % count)
145 if (
associated(hst % var_avr_count))
deallocate(hst % var_avr_count)
147 if (
associated(hst % var_avr_data(i) % a_DataAvr))
deallocate(hst % var_avr_data(i) % a_DataAvr)
149 if (
associated(hst % var_avr_data))
deallocate(hst % var_avr_data)
150 if (
associated(hst % var_avr_firstput))
deallocate(hst % var_avr_firstput)
151 if (
associated(hst % var_avr_coefsum))
deallocate(hst % var_avr_coefsum)
152 if (
associated(hst % var_avr_baseint))
deallocate(hst % var_avr_baseint)
153 if (
associated(hst % var_avr_prevtime))
deallocate(hst % var_avr_prevtime)
154 hst % time_bnds = 0.0_dp
155 hst % time_bnds_output_count = 0
156 hst % time_nv_index = 0
157 hst % origin_setting = .false.
171 &
'"%c" is closed', &
172 & c1 = trim( file ), rank_mpi = -1 )
181 hst % initialized = .false.
183 call storeerror( stat, subname, err, cause_c )
type(gt_history), target, save, public default
integer, parameter, public dc_enotinit
integer, parameter, public unit_symbol_err
logical function, public present_and_true(arg)
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_noerr
subroutine historyclose(history, quiet, err)
integer, parameter, public dp
Double Precision Real number.
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)
Provides kind type parameter values.
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
integer, parameter, public string
Character length for string.