Skip to content

Commit b70dff5

Browse files
bena-nasamathomp4
andauthored
fixes #4721 (#4722)
Co-authored-by: Matt Thompson <matthew.thompson@nasa.gov>
1 parent fec692e commit b70dff5

2 files changed

Lines changed: 6 additions & 12 deletions

File tree

gridcomps/History3G/HistoryGridComp_private.F90

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ subroutine add_stats_gc(gridcomp, child_name, child_hconfig, rc)
115115
end if
116116

117117
stats_list = ESMF_HConfigCreate(_RC)
118-
stats_mapl_section = create_stats_mapl_section(_RC)
119-
call ESMF_HConfigAdd(stats_hconfig, stats_mapl_section, addKeyString='mapl', _RC)
120118
frequency = ESMF_HConfigAsString(time_hconfig, keyString='frequency', _RC)
121119
var_list = ESMF_HConfigCreateAt(child_hconfig, keyString=VAR_LIST_KEY, _RC)
122120
iter_begin = ESMF_HConfigIterBegin(var_list,_RC)
@@ -137,16 +135,6 @@ subroutine add_stats_gc(gridcomp, child_name, child_hconfig, rc)
137135

138136
end subroutine add_stats_gc
139137

140-
function create_stats_mapl_section(rc) result(stats_mapl_section)
141-
type(ESMF_HConfig) :: stats_mapl_section
142-
integer, optional, intent(out) :: rc
143-
144-
integer :: status
145-
146-
stats_mapl_section = ESMF_HConfigCreate(content='{misc: {checkpoint: {import: False, internal: False}, restart: {bootstrap: True, import: False, internal: True}}}', _RC)
147-
_RETURN(_SUCCESS)
148-
end function create_stats_mapl_section
149-
150138
function create_stats_entry(name, action, period, ref_datetime, rc) result(stat_item)
151139
type(ESMF_HConfig) :: stat_item
152140
! Input arguments

gridcomps/StatisticsGridComp/StatisticsGridComp.F90

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module mapl3g_StatisticsGridComp
1818
use mapl_OS
1919
use mapl3g_Utilities, only: MAPL_GetCheckpointSubdir
2020
use mapl3g_SimpleAlarm, only: SimpleAlarm
21+
use mapl3g_ComponentSpec, only: ComponentSpec, CheckpointControls
2122

2223
implicit none(type,external)
2324
private
@@ -41,6 +42,7 @@ subroutine setServices(gridComp, rc)
4142
type(Statistics), pointer :: stats
4243
type(esmf_HConfig) :: hconfig, items_hconfig
4344
type(esmf_HConfigIter) :: iter, b, e
45+
type(CheckpointControls) :: restart_controls
4446

4547
call mapl_GridCompSetEntryPoint(gridComp, ESMF_METHOD_INITIALIZE, modify_advertise, phase_name='GENERIC::INIT_MODIFY_ADVERTISED', _RC)
4648
call mapl_GridCompSetEntryPoint(gridComp, ESMF_METHOD_INITIALIZE, realize, phase_name='GENERIC::INIT_REALIZE', _RC)
@@ -65,6 +67,10 @@ subroutine setServices(gridComp, rc)
6567

6668
call esmf_HConfigdestroy(items_hconfig, _RC)
6769

70+
restart_controls%bootstrap = .true.
71+
restart_controls%internal = .true.
72+
call MAPL_GridCompSet(gridcomp, restart_controls=restart_controls, _RC)
73+
6874
_RETURN(_SUCCESS)
6975
end subroutine setServices
7076

0 commit comments

Comments
 (0)