From 6fe3c7b94f86d78389b4fb3f4d6e4b3d6fd08e61 Mon Sep 17 00:00:00 2001 From: Darian Boggs Date: Fri, 6 Dec 2024 13:27:44 -0500 Subject: [PATCH 1/8] Add run_dt to VariableSpec and FieldSpec --- generic3g/specs/FieldSpec.F90 | 6 +++++- generic3g/specs/VariableSpec.F90 | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/generic3g/specs/FieldSpec.F90 b/generic3g/specs/FieldSpec.F90 index d388480a8cf6..23e47d50b11b 100644 --- a/generic3g/specs/FieldSpec.F90 +++ b/generic3g/specs/FieldSpec.F90 @@ -97,6 +97,7 @@ module mapl3g_FieldSpec !# type(VariableSpec) :: variable_spec logical :: is_created = .false. + type(ESMF_TimeInterval), allocatable :: run_dt contains @@ -192,7 +193,7 @@ module mapl3g_FieldSpec function new_FieldSpec_geom(unusable, geom, vertical_grid, vertical_dim_spec, typekind, ungridded_dims, & standard_name, long_name, units, & - attributes, regrid_param, default_value, accumulation_type) result(field_spec) + attributes, regrid_param, default_value, accumulation_type, run_dt) result(field_spec) type(FieldSpec) :: field_spec class(KeywordEnforcer), optional, intent(in) :: unusable @@ -210,6 +211,7 @@ function new_FieldSpec_geom(unusable, geom, vertical_grid, vertical_dim_spec, ty ! optional args last real, optional, intent(in) :: default_value character(*), optional, intent(in) :: accumulation_type + type(ESMF_TimeInterval), optional, intent(in) :: run_dt integer :: status @@ -231,6 +233,7 @@ function new_FieldSpec_geom(unusable, geom, vertical_grid, vertical_dim_spec, ty if (present(default_value)) field_spec%default_value = default_value field_spec%accumulation_type = NO_ACCUMULATION if (present(accumulation_type)) field_spec%accumulation_type = trim(accumulation_type) + if (present(run_dt)) field_spec%run_dt = run_dt end function new_FieldSpec_geom function new_FieldSpec_varspec(variable_spec) result(field_spec) @@ -251,6 +254,7 @@ function new_FieldSpec_varspec(variable_spec) result(field_spec) field_spec%long_name = 'unknown' field_spec%accumulation_type = NO_ACCUMULATION _SET_ALLOCATED_FIELD(field_spec, variable_spec, accumulation_type) + _SET_ALLOCATED_FIELD(field_spec, variable_spec, run_dt) end function new_FieldSpec_varspec diff --git a/generic3g/specs/VariableSpec.F90 b/generic3g/specs/VariableSpec.F90 index 6c732db00cb1..ba01546772e6 100644 --- a/generic3g/specs/VariableSpec.F90 +++ b/generic3g/specs/VariableSpec.F90 @@ -45,6 +45,7 @@ module mapl3g_VariableSpec type(StringVector) :: attributes integer, allocatable :: bracket_size character(len=:), allocatable :: accumulation_type + type(ESMF_TimeInterval), allocatable :: run_dt ! Geometry type(ESMF_Geom), allocatable :: geom @@ -71,7 +72,7 @@ function new_VariableSpec( & service_items, attributes, & bracket_size, & dependencies, regrid_param, & - accumulation_type) result(var_spec) + accumulation_type, run_dt) result(var_spec) type(VariableSpec) :: var_spec type(ESMF_StateIntent_Flag), intent(in) :: state_intent @@ -93,6 +94,7 @@ function new_VariableSpec( & type(StringVector), optional, intent(in) :: dependencies type(EsmfRegridderParam), optional, intent(in) :: regrid_param character(len=*), optional, intent(in) :: accumulation_type + type(ESMF_TimeInterval), optional, intent(in) :: run_dt type(ESMF_RegridMethod_Flag), allocatable :: regrid_method integer :: status @@ -119,6 +121,7 @@ function new_VariableSpec( & _SET_OPTIONAL(bracket_size) _SET_OPTIONAL(dependencies) _SET_OPTIONAL(accumulation_type) + _SET_OPTIONAL(run_dt) call var_spec%set_regrid_param_(regrid_param) From 332e3c6e874d3f93556a0488532f68bbbca71862 Mon Sep 17 00:00:00 2001 From: Darian Boggs Date: Fri, 6 Dec 2024 15:02:53 -0500 Subject: [PATCH 2/8] add run_dt: ComponentSpec, VariableSpec, FieldSpec --- generic3g/specs/ComponentSpec.F90 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/generic3g/specs/ComponentSpec.F90 b/generic3g/specs/ComponentSpec.F90 index 79f5780ad82e..ff1896b1a852 100644 --- a/generic3g/specs/ComponentSpec.F90 +++ b/generic3g/specs/ComponentSpec.F90 @@ -43,6 +43,15 @@ function new_ComponentSpec(var_specs, connections, run_dt) result(spec) if (present(var_specs)) spec%var_specs = var_specs if (present(connections)) spec%connections = connections if (present(run_dt)) spec%run_dt = run_dt + ! wdb deleteme: + ! If spec%run_dt is set (allocated) and run_dt is set (allocated) + ! for some of the spec%var_specs, should they be validated against + ! spec%run_dt, should they be set to spec%run_dt, or should they + ! be set only if they are already set? If so, those actions can occur here + ! and this subroutine should be called after spec%var_specs are set. + ! These questions also arise if a VariableSpec is later added. + ! end deleteme + end function new_ComponentSpec logical function has_geom_hconfig(this) @@ -63,8 +72,5 @@ subroutine add_connection(this, conn) call this%connections%push_back(conn) end subroutine add_connection - - - end module mapl3g_ComponentSpec From 3937be6cf9002c128b44c0cf59aed57ad951db82 Mon Sep 17 00:00:00 2001 From: Darian Boggs Date: Tue, 10 Dec 2024 13:37:05 -0500 Subject: [PATCH 3/8] Remove run_dt from VariableSpec --- generic3g/specs/ComponentSpec.F90 | 8 -------- generic3g/specs/FieldSpec.F90 | 5 ++--- generic3g/specs/VariableSpec.F90 | 6 +----- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/generic3g/specs/ComponentSpec.F90 b/generic3g/specs/ComponentSpec.F90 index ff1896b1a852..91a6a5d2c4e3 100644 --- a/generic3g/specs/ComponentSpec.F90 +++ b/generic3g/specs/ComponentSpec.F90 @@ -43,14 +43,6 @@ function new_ComponentSpec(var_specs, connections, run_dt) result(spec) if (present(var_specs)) spec%var_specs = var_specs if (present(connections)) spec%connections = connections if (present(run_dt)) spec%run_dt = run_dt - ! wdb deleteme: - ! If spec%run_dt is set (allocated) and run_dt is set (allocated) - ! for some of the spec%var_specs, should they be validated against - ! spec%run_dt, should they be set to spec%run_dt, or should they - ! be set only if they are already set? If so, those actions can occur here - ! and this subroutine should be called after spec%var_specs are set. - ! These questions also arise if a VariableSpec is later added. - ! end deleteme end function new_ComponentSpec diff --git a/generic3g/specs/FieldSpec.F90 b/generic3g/specs/FieldSpec.F90 index 7e3b05e19a03..8eb2f70b9a17 100644 --- a/generic3g/specs/FieldSpec.F90 +++ b/generic3g/specs/FieldSpec.F90 @@ -242,6 +242,7 @@ function new_FieldSpec_varspec(variable_spec) result(field_spec) type(ESMF_RegridMethod_Flag), allocatable :: regrid_method + field_spec%accumulation_type = NO_ACCUMULATION _SET_FIELD(field_spec, variable_spec, vertical_dim_spec) _SET_FIELD(field_spec, variable_spec, typekind) _SET_FIELD(field_spec, variable_spec, ungridded_dims) @@ -250,11 +251,9 @@ function new_FieldSpec_varspec(variable_spec) result(field_spec) _SET_ALLOCATED_FIELD(field_spec, variable_spec, standard_name) _SET_ALLOCATED_FIELD(field_spec, variable_spec, units) _SET_ALLOCATED_FIELD(field_spec, variable_spec, default_value) + _SET_ALLOCATED_FIELD(field_spec, variable_spec, accumulation_type) field_spec%long_name = 'unknown' - field_spec%accumulation_type = NO_ACCUMULATION - _SET_ALLOCATED_FIELD(field_spec, variable_spec, accumulation_type) - _SET_ALLOCATED_FIELD(field_spec, variable_spec, run_dt) end function new_FieldSpec_varspec diff --git a/generic3g/specs/VariableSpec.F90 b/generic3g/specs/VariableSpec.F90 index ba01546772e6..ba9f419d6343 100644 --- a/generic3g/specs/VariableSpec.F90 +++ b/generic3g/specs/VariableSpec.F90 @@ -45,7 +45,6 @@ module mapl3g_VariableSpec type(StringVector) :: attributes integer, allocatable :: bracket_size character(len=:), allocatable :: accumulation_type - type(ESMF_TimeInterval), allocatable :: run_dt ! Geometry type(ESMF_Geom), allocatable :: geom @@ -71,8 +70,7 @@ function new_VariableSpec( & units, substate, itemtype, typekind, vertical_dim_spec, ungridded_dims, default_value, & service_items, attributes, & bracket_size, & - dependencies, regrid_param, & - accumulation_type, run_dt) result(var_spec) + dependencies, regrid_param, accumulation_type) result(var_spec) type(VariableSpec) :: var_spec type(ESMF_StateIntent_Flag), intent(in) :: state_intent @@ -94,7 +92,6 @@ function new_VariableSpec( & type(StringVector), optional, intent(in) :: dependencies type(EsmfRegridderParam), optional, intent(in) :: regrid_param character(len=*), optional, intent(in) :: accumulation_type - type(ESMF_TimeInterval), optional, intent(in) :: run_dt type(ESMF_RegridMethod_Flag), allocatable :: regrid_method integer :: status @@ -121,7 +118,6 @@ function new_VariableSpec( & _SET_OPTIONAL(bracket_size) _SET_OPTIONAL(dependencies) _SET_OPTIONAL(accumulation_type) - _SET_OPTIONAL(run_dt) call var_spec%set_regrid_param_(regrid_param) From 115f1720c4d35175081d6329e6e48f6b0018a78f Mon Sep 17 00:00:00 2001 From: Darian Boggs Date: Tue, 10 Dec 2024 14:58:14 -0500 Subject: [PATCH 4/8] Rm unnecessary change to VariableSpec --- generic3g/specs/VariableSpec.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generic3g/specs/VariableSpec.F90 b/generic3g/specs/VariableSpec.F90 index ba9f419d6343..6c732db00cb1 100644 --- a/generic3g/specs/VariableSpec.F90 +++ b/generic3g/specs/VariableSpec.F90 @@ -70,7 +70,8 @@ function new_VariableSpec( & units, substate, itemtype, typekind, vertical_dim_spec, ungridded_dims, default_value, & service_items, attributes, & bracket_size, & - dependencies, regrid_param, accumulation_type) result(var_spec) + dependencies, regrid_param, & + accumulation_type) result(var_spec) type(VariableSpec) :: var_spec type(ESMF_StateIntent_Flag), intent(in) :: state_intent From 7c1ed9ea856e35989a2c87f7d7be4128e35a8a75 Mon Sep 17 00:00:00 2001 From: Darian Boggs Date: Tue, 10 Dec 2024 15:47:02 -0500 Subject: [PATCH 5/8] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e7c79972b44..5de87316955a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,7 +41,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add tests for time accumulation - Add variable to FieldSpec for accumulation type - Add accumulation type variable to VariableSpec and ComponentSpecParser -_ Add run_dt to ComponentSpec and ComponentSpecParser +- Add run_dt to ComponentSpec and ComponentSpecParser +- Add run_dt to FieldSpec ### Changed From f9eae91b22e2882d3af0f569833248cac2fc9b20 Mon Sep 17 00:00:00 2001 From: Darian Boggs Date: Wed, 11 Dec 2024 11:45:09 -0500 Subject: [PATCH 6/8] Add run_dt to make_itemSpec --- generic3g/OuterMetaComponent/initialize_advertise.F90 | 7 ++++--- generic3g/specs/make_itemSpec.F90 | 11 +++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/generic3g/OuterMetaComponent/initialize_advertise.F90 b/generic3g/OuterMetaComponent/initialize_advertise.F90 index d93acb970e79..50d07f39c992 100644 --- a/generic3g/OuterMetaComponent/initialize_advertise.F90 +++ b/generic3g/OuterMetaComponent/initialize_advertise.F90 @@ -83,7 +83,7 @@ subroutine self_advertise(this, unusable, rc) iter = this%component_spec%var_specs%begin() do while (iter /= e) var_spec => iter%of() - call advertise_variable (var_spec, this%registry, _RC) + call advertise_variable (var_spec, this%registry, run_dt=this%component_spec%run_dt, _RC) call iter%next() end do end associate @@ -93,10 +93,11 @@ subroutine self_advertise(this, unusable, rc) end subroutine self_advertise - subroutine advertise_variable(var_spec, registry, unusable, rc) + subroutine advertise_variable(var_spec, registry, unusable, run_dt, rc) type(VariableSpec), intent(in) :: var_spec type(StateRegistry), target, intent(inout) :: registry class(KE), optional, intent(in) :: unusable + type(ESMF_TimeInterval), optional, intent(in) :: run_dt integer, optional, intent(out) :: rc integer :: status @@ -105,7 +106,7 @@ subroutine advertise_variable(var_spec, registry, unusable, rc) _ASSERT(var_spec%itemtype /= MAPL_STATEITEM_UNKNOWN, 'Invalid type id in variable spec <'//var_spec%short_name//'>.') - allocate(item_spec, source=make_ItemSpec(var_spec, registry, rc=status)) + allocate(item_spec, source=make_ItemSpec(var_spec, registry, run_dt, rc=status)) _VERIFY(status) call item_spec%create(_RC) diff --git a/generic3g/specs/make_itemSpec.F90 b/generic3g/specs/make_itemSpec.F90 index ab3724890f45..bc5a676a44a2 100644 --- a/generic3g/specs/make_itemSpec.F90 +++ b/generic3g/specs/make_itemSpec.F90 @@ -11,19 +11,20 @@ module mapl3g_make_itemSpec use mapl3g_InvalidSpec, only: InvalidSpec use mapl3g_StateRegistry, only: StateRegistry use mapl_ErrorHandling - use esmf, only: ESMF_STATEINTENT_INTERNAL, operator(==) + use esmf, only: ESMF_STATEINTENT_INTERNAL, operator(==), ESMF_TimeInterval implicit none private public :: make_ItemSpec contains - function make_itemSpec(variable_spec, registry, rc) result(item_spec) + function make_itemSpec(variable_spec, registry, run_dt, rc) result(item_spec) use mapl3g_VariableSpec, only: VariableSpec use mapl3g_ActualPtVector, only: ActualPtVector class(StateItemSpec), allocatable :: item_spec class(VariableSpec), intent(in) :: variable_spec type(StateRegistry), pointer, intent(in) :: registry + type(ESMF_TimeInterval), optional, intent(in) :: run_dt integer, optional, intent(out) :: rc integer :: status @@ -34,6 +35,12 @@ function make_itemSpec(variable_spec, registry, rc) result(item_spec) case (MAPL_STATEITEM_FIELD%ot) allocate(FieldSpec :: item_spec) item_spec = FieldSpec(variable_spec) + if(present(run_dt)) then + select type(item_spec) + type is (FieldSpec) + item_spec%run_dt = run_dt + end select + end if case (MAPL_STATEITEM_SERVICE%ot) allocate(ServiceSpec :: item_spec) item_spec = ServiceSpec(variable_spec, registry) From 550811574e62e1c7ed69c0f183c03a5a17ba44af Mon Sep 17 00:00:00 2001 From: Darian Boggs Date: Wed, 11 Dec 2024 15:37:26 -0500 Subject: [PATCH 7/8] Add run_dt to set_blanket_geom --- .../OuterMetaComponent/initialize_modify_advertised.F90 | 2 +- generic3g/registry/StateRegistry.F90 | 5 +++-- generic3g/specs/BracketSpec.F90 | 4 +++- generic3g/specs/FieldSpec.F90 | 4 +++- generic3g/specs/InvalidSpec.F90 | 4 +++- generic3g/specs/ServiceSpec.F90 | 3 ++- generic3g/specs/StateItemSpec.F90 | 1 + generic3g/specs/StateSpec.F90 | 4 +++- generic3g/specs/WildcardSpec.F90 | 5 +++-- generic3g/tests/MockItemSpec.F90 | 3 ++- 10 files changed, 24 insertions(+), 11 deletions(-) diff --git a/generic3g/OuterMetaComponent/initialize_modify_advertised.F90 b/generic3g/OuterMetaComponent/initialize_modify_advertised.F90 index 1440f68bc8ec..1fe97602927e 100644 --- a/generic3g/OuterMetaComponent/initialize_modify_advertised.F90 +++ b/generic3g/OuterMetaComponent/initialize_modify_advertised.F90 @@ -66,7 +66,7 @@ subroutine self_advertise(this, unusable, rc) integer :: status - call this%registry%set_blanket_geometry(this%geom, this%vertical_grid, _RC) + call this%registry%set_blanket_geometry(this%geom, this%vertical_grid, this%component_spec%run_dt, _RC) _RETURN(_SUCCESS) _UNUSED_DUMMY(unusable) diff --git a/generic3g/registry/StateRegistry.F90 b/generic3g/registry/StateRegistry.F90 index a8276cae664b..cb24d04ce1d0 100644 --- a/generic3g/registry/StateRegistry.F90 +++ b/generic3g/registry/StateRegistry.F90 @@ -627,10 +627,11 @@ subroutine allocate(this, rc) _RETURN(_SUCCESS) end subroutine allocate - subroutine set_blanket_geometry(this, geom, vertical_grid, rc) + subroutine set_blanket_geometry(this, geom, vertical_grid, run_dt, rc) class(StateRegistry), target, intent(inout) :: this type(ESMF_Geom), optional, intent(in) :: geom class(VerticalGrid), optional, intent(in) :: vertical_grid + type(ESMF_TimeInterval), optional, intent(in) :: run_dt integer, optional, intent(out) :: rc integer :: status @@ -645,7 +646,7 @@ subroutine set_blanket_geometry(this, geom, vertical_grid, rc) extension => iter%of() spec => extension%get_spec() if (spec%is_active()) then - call spec%set_geometry(geom, vertical_grid, _RC) + call spec%set_geometry(geom, vertical_grid, run_dt, _RC) end if end do end associate diff --git a/generic3g/specs/BracketSpec.F90 b/generic3g/specs/BracketSpec.F90 index d7e50d015a49..fccdd1836958 100644 --- a/generic3g/specs/BracketSpec.F90 +++ b/generic3g/specs/BracketSpec.F90 @@ -255,10 +255,11 @@ subroutine add_to_bundle(this, bundle, rc) _UNUSED_DUMMY(bundle) end subroutine add_to_bundle - subroutine set_geometry(this, geom, vertical_grid, rc) + subroutine set_geometry(this, geom, vertical_grid, run_dt, rc) class(BracketSpec), intent(inout) :: this type(ESMF_Geom), optional, intent(in) :: geom class(VerticalGrid), optional, intent(in) :: vertical_grid + type(ESMF_TimeInterval), optional, intent(in) :: run_dt integer, optional, intent(out) :: rc _FAIL('unimplemented') @@ -266,6 +267,7 @@ subroutine set_geometry(this, geom, vertical_grid, rc) _UNUSED_DUMMY(this) _UNUSED_DUMMY(geom) _UNUSED_DUMMY(vertical_grid) + _UNUSED_DUMMY(run_dt) end subroutine set_geometry subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg) diff --git a/generic3g/specs/FieldSpec.F90 b/generic3g/specs/FieldSpec.F90 index 8eb2f70b9a17..351588540fd2 100644 --- a/generic3g/specs/FieldSpec.F90 +++ b/generic3g/specs/FieldSpec.F90 @@ -257,16 +257,18 @@ function new_FieldSpec_varspec(variable_spec) result(field_spec) end function new_FieldSpec_varspec - subroutine set_geometry(this, geom, vertical_grid, rc) + subroutine set_geometry(this, geom, vertical_grid, run_dt, rc) class(FieldSpec), intent(inout) :: this type(ESMF_Geom), optional, intent(in) :: geom class(VerticalGrid), optional, intent(in) :: vertical_grid + type(ESMF_TimeInterval), optional, intent(in) :: run_dt integer, optional, intent(out) :: rc integer :: status type(ESMF_RegridMethod_Flag), allocatable :: regrid_method if (present(geom)) this%geom = geom if (present(vertical_grid)) this%vertical_grid = vertical_grid + if (present(run_dt)) this%run_dt = run_dt _RETURN(_SUCCESS) end subroutine set_geometry diff --git a/generic3g/specs/InvalidSpec.F90 b/generic3g/specs/InvalidSpec.F90 index b0daeb9c3ca5..72df4445546a 100644 --- a/generic3g/specs/InvalidSpec.F90 +++ b/generic3g/specs/InvalidSpec.F90 @@ -132,16 +132,18 @@ subroutine add_to_bundle(this, bundle, rc) _UNUSED_DUMMY(bundle) end subroutine add_to_bundle - subroutine set_geometry(this, geom, vertical_grid, rc) + subroutine set_geometry(this, geom, vertical_grid, run_dt, rc) class(InvalidSpec), intent(inout) :: this type(ESMF_Geom), optional, intent(in) :: geom class(VerticalGrid), optional, intent(in) :: vertical_grid + type(ESMF_TimeInterval), optional, intent(in) :: run_dt integer, optional, intent(out) :: rc _FAIL('Attempt to initialize item of type InvalidSpec') _UNUSED_DUMMY(this) _UNUSED_DUMMY(geom) _UNUSED_DUMMY(vertical_grid) + _UNUSED_DUMMY(run_dt) end subroutine set_geometry subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg) diff --git a/generic3g/specs/ServiceSpec.F90 b/generic3g/specs/ServiceSpec.F90 index 3fa46a513c37..32f9fddb58cf 100644 --- a/generic3g/specs/ServiceSpec.F90 +++ b/generic3g/specs/ServiceSpec.F90 @@ -184,10 +184,11 @@ subroutine destroy(this, rc) _RETURN(ESMF_SUCCESS) end subroutine destroy - subroutine set_geometry(this, geom, vertical_grid, rc) + subroutine set_geometry(this, geom, vertical_grid, run_dt, rc) class(ServiceSpec), intent(inout) :: this type(ESMF_Geom), optional, intent(in) :: geom class(VerticalGrid), optional, intent(in) :: vertical_grid + type(ESMF_TimeInterval), optional, intent(in) :: run_dt integer, optional, intent(out) :: rc integer :: status diff --git a/generic3g/specs/StateItemSpec.F90 b/generic3g/specs/StateItemSpec.F90 index 09f1e48b0796..ba64d4665143 100644 --- a/generic3g/specs/StateItemSpec.F90 +++ b/generic3g/specs/StateItemSpec.F90 @@ -157,6 +157,7 @@ subroutine I_set_geometry(this, geom, vertical_grid, rc) class(StateItemSpec), intent(inout) :: this type(ESMF_Geom), optional, intent(in) :: geom class(VerticalGrid), optional, intent(in) :: vertical_grid + type(ESMF_TimeInterval), optional, intent(in) :: run_dt integer, optional, intent(out) :: rc end subroutine I_set_geometry diff --git a/generic3g/specs/StateSpec.F90 b/generic3g/specs/StateSpec.F90 index 94e39c156635..f156d4810640 100644 --- a/generic3g/specs/StateSpec.F90 +++ b/generic3g/specs/StateSpec.F90 @@ -46,10 +46,11 @@ module mapl3g_StateSpec contains ! Nothing defined at this time. - subroutine set_geometry(this, geom, vertical_grid, rc) + subroutine set_geometry(this, geom, vertical_grid, run_dt, rc) class(StateSpec), intent(inout) :: this type(ESMF_Geom), optional, intent(in) :: geom class(VerticalGrid), optional, intent(in) :: vertical_grid + type(ESMF_TimeInterval), optional, intent(in) :: run_dt integer, optional, intent(out) :: rc _RETURN(_SUCCESS) @@ -57,6 +58,7 @@ subroutine set_geometry(this, geom, vertical_grid, rc) _UNUSED_DUMMY(this) _UNUSED_DUMMY(geom) _UNUSED_DUMMY(vertical_grid) + _UNUSED_DUMMY(run_dt) end subroutine set_geometry subroutine add_item(this, name, item) diff --git a/generic3g/specs/WildcardSpec.F90 b/generic3g/specs/WildcardSpec.F90 index d5183bd9eb7c..887c2448daf0 100644 --- a/generic3g/specs/WildcardSpec.F90 +++ b/generic3g/specs/WildcardSpec.F90 @@ -199,15 +199,16 @@ subroutine add_to_bundle(this, bundle, rc) _RETURN(_SUCCESS) end subroutine add_to_bundle - subroutine set_geometry(this, geom, vertical_grid, rc) + subroutine set_geometry(this, geom, vertical_grid, run_dt, rc) class(WildcardSpec), intent(inout) :: this type(ESMF_Geom), optional, intent(in) :: geom class(VerticalGrid), optional, intent(in) :: vertical_grid + type(ESMF_TimeInterval), optional, intent(in) :: run_dt integer, optional, intent(out) :: rc integer :: status - call this%reference_spec%set_geometry(geom, vertical_grid, _RC) + call this%reference_spec%set_geometry(geom, vertical_grid, run_dt, _RC) _RETURN(_SUCCESS) end subroutine set_geometry diff --git a/generic3g/tests/MockItemSpec.F90 b/generic3g/tests/MockItemSpec.F90 index 24024bdfef74..169e7debb85d 100644 --- a/generic3g/tests/MockItemSpec.F90 +++ b/generic3g/tests/MockItemSpec.F90 @@ -92,10 +92,11 @@ function new_MockItemSpec(name, subtype, adapter_type) result(spec) end function new_MockItemSpec - subroutine set_geometry(this, geom, vertical_grid, rc) + subroutine set_geometry(this, geom, vertical_grid, run_dt, rc) class(MockItemSpec), intent(inout) :: this type(ESMF_Geom), optional, intent(in) :: geom class(VerticalGrid), optional, intent(in) :: vertical_grid + type(ESMF_TimeInterval), optional, intent(in) :: run_dt integer, optional, intent(out) :: rc _RETURN(_SUCCESS) From 4cfa4668dd17d1aa0d1e4ebdc8e2e413914ccdac Mon Sep 17 00:00:00 2001 From: Darian Boggs Date: Wed, 11 Dec 2024 15:53:21 -0500 Subject: [PATCH 8/8] Add use statements for ESMF --- generic3g/registry/StateRegistry.F90 | 2 +- generic3g/specs/InvalidSpec.F90 | 1 + generic3g/specs/StateItemSpec.F90 | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/generic3g/registry/StateRegistry.F90 b/generic3g/registry/StateRegistry.F90 index cb24d04ce1d0..13c94a370175 100644 --- a/generic3g/registry/StateRegistry.F90 +++ b/generic3g/registry/StateRegistry.F90 @@ -21,7 +21,7 @@ module mapl3g_StateRegistry use mapl3g_GriddedComponentDriver use mapl3g_VerticalGrid use mapl_ErrorHandling - use esmf, only: ESMF_Geom + use esmf, only: ESMF_Geom, ESMF_TimeInterval implicit none private diff --git a/generic3g/specs/InvalidSpec.F90 b/generic3g/specs/InvalidSpec.F90 index 72df4445546a..171139c91d60 100644 --- a/generic3g/specs/InvalidSpec.F90 +++ b/generic3g/specs/InvalidSpec.F90 @@ -17,6 +17,7 @@ module mapl3g_InvalidSpec use esmf, only: ESMF_Geom use esmf, only: ESMF_State use esmf, only: ESMF_SUCCESS + use esmf, only: ESMF_TimeInterval implicit none private diff --git a/generic3g/specs/StateItemSpec.F90 b/generic3g/specs/StateItemSpec.F90 index ba64d4665143..e9dcc13d2c5c 100644 --- a/generic3g/specs/StateItemSpec.F90 +++ b/generic3g/specs/StateItemSpec.F90 @@ -150,8 +150,8 @@ subroutine I_add_to_bundle(this, bundle, rc) integer, optional, intent(out) :: rc end subroutine I_add_to_bundle - subroutine I_set_geometry(this, geom, vertical_grid, rc) - use esmf, only: ESMF_Geom + subroutine I_set_geometry(this, geom, vertical_grid, run_dt, rc) + use esmf, only: ESMF_Geom, ESMF_TimeInterval use mapl3g_VerticalGrid, only: VerticalGrid import StateItemSpec class(StateItemSpec), intent(inout) :: this