diff --git a/CHANGELOG.md b/CHANGELOG.md index f0a17d9feea5..96cfc44e83ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update `Findudunits.cmake` to link with libdl and look for the `udunits2.xml` file (as some MAPL tests require it) - Modified `ESMF_GridComp` creation in `GenericGridComp` to use `ESMF_CONTEXT_PARENT_VM` by default. - Changed `get_fptr_shape` in `FieldCondensedArray*.F90` +- Change name of ExtensionAction%run to ExtensionAction%update in the abstract type and derived types. +- Add invalid method to ExtensionAction with a no-op implementation in the abstract type ### Fixed @@ -63,11 +65,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added + - Allow update offsets of ±timestep in ExtData2G ### Changed - Update ESMF version for Baselibs to match that of Spack for consistency +- Update `components.yaml` + - ESMA_env v4.32.0 + - Baselibs 7.27.0 + - ESMF 8.7.0 + - curl 8.10.1 + - NCO 5.2.8 + - CDO 2.4.4 + - GSL 2.8 + - jpeg 9f + - Various build fixes + - ESMA_cmake v3.52.0 + - Fixes for using MAPL as a library in spack builds of GEOSgcm + - Various backports from v4 ### Fixed @@ -77,6 +93,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated +## [2.50.1] - 2024-10-18 + +### Fixed + +- Fixed unitialized variable bug in ExtData exposed by gfortran + ## [2.50.0] - 2024-10-10 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index 918dd9799e79..3e6fd5e8bce3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ endif () project ( MAPL - VERSION 2.50.0 + VERSION 2.50.1 LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF # Set the possible values of build type for cmake-gui diff --git a/components.yaml b/components.yaml index 4360ab32a56f..271f302b4f9d 100644 --- a/components.yaml +++ b/components.yaml @@ -5,13 +5,13 @@ MAPL: ESMA_env: local: ./ESMA_env remote: ../ESMA_env.git - tag: v4.30.1 + tag: v4.31.0 develop: main ESMA_cmake: local: ./ESMA_cmake remote: ../ESMA_cmake.git - tag: v3.51.0 + tag: v3.52.0 develop: develop ecbuild: diff --git a/generic3g/actions/ConvertUnitsAction.F90 b/generic3g/actions/ConvertUnitsAction.F90 index f32b19fd8517..ea29214441ef 100644 --- a/generic3g/actions/ConvertUnitsAction.F90 +++ b/generic3g/actions/ConvertUnitsAction.F90 @@ -19,7 +19,7 @@ module mapl3g_ConvertUnitsAction character(:), allocatable :: src_units, dst_units contains procedure :: initialize - procedure :: run + procedure :: update end type ConvertUnitsAction @@ -59,7 +59,7 @@ subroutine initialize(this, importState, exportState, clock, rc) end subroutine initialize - subroutine run(this, importState, exportState, clock, rc) + subroutine update(this, importState, exportState, clock, rc) use esmf class(ConvertUnitsAction), intent(inout) :: this type(ESMF_State) :: importState @@ -95,6 +95,6 @@ subroutine run(this, importState, exportState, clock, rc) _FAIL('unsupported typekind') _UNUSED_DUMMY(clock) - end subroutine run + end subroutine update end module mapl3g_ConvertUnitsAction diff --git a/generic3g/actions/CopyAction.F90 b/generic3g/actions/CopyAction.F90 index f84befae6cac..a498bab13cbd 100644 --- a/generic3g/actions/CopyAction.F90 +++ b/generic3g/actions/CopyAction.F90 @@ -16,7 +16,7 @@ module mapl3g_CopyAction type(ESMF_Field) :: f_in, f_out contains procedure :: initialize - procedure :: run + procedure :: update end type CopyAction interface CopyAction @@ -65,7 +65,7 @@ subroutine initialize(this, importState, exportState, clock, rc) _UNUSED_DUMMY(clock) end subroutine initialize - subroutine run(this, importState, exportState, clock, rc) + subroutine update(this, importState, exportState, clock, rc) use esmf class(CopyAction), intent(inout) :: this type(ESMF_State) :: importState @@ -82,7 +82,7 @@ subroutine run(this, importState, exportState, clock, rc) call FieldCopy(f_in, f_out, _RC) _RETURN(_SUCCESS) - end subroutine run + end subroutine update end module mapl3g_CopyAction diff --git a/generic3g/actions/ExtensionAction.F90 b/generic3g/actions/ExtensionAction.F90 index b2a7ed6cda4c..3c52fa3d4d76 100644 --- a/generic3g/actions/ExtensionAction.F90 +++ b/generic3g/actions/ExtensionAction.F90 @@ -10,7 +10,8 @@ module mapl3g_ExtensionAction type, abstract :: ExtensionAction contains procedure(I_run), deferred :: initialize - procedure(I_run), deferred :: run + procedure(I_run), deferred :: update + procedure :: invalidate end type ExtensionAction @@ -26,4 +27,22 @@ subroutine I_run(this, importState, exportState, clock, rc) end subroutine I_run end interface +contains + + ! This is a default no-op implementation of invalidate. + ! Types derived from ExtensionAction should overload it + ! as needed. + subroutine invalidate(this, importState, exportState, clock, rc) + use ESMF + class(ExtensionAction), intent(inout) :: this + type(ESMF_State) :: importState + type(ESMF_State) :: exportState + type(ESMF_Clock) :: clock + integer, optional, intent(out) :: rc + _UNUSED_DUMMY(this) + _UNUSED_DUMMY(importState) + _UNUSED_DUMMY(exportState) + _UNUSED_DUMMY(clock) + end subroutine invalidate + end module mapl3g_ExtensionAction diff --git a/generic3g/actions/NullAction.F90 b/generic3g/actions/NullAction.F90 index 5eb975e75fba..8ddd5de55eb8 100644 --- a/generic3g/actions/NullAction.F90 +++ b/generic3g/actions/NullAction.F90 @@ -15,7 +15,7 @@ module mapl3g_NullAction type, extends(ExtensionAction) :: NullAction contains procedure :: initialize - procedure :: run + procedure :: update end type NullAction interface NullAction @@ -42,7 +42,7 @@ subroutine initialize(this, importState, exportState, clock, rc) _UNUSED_DUMMY(clock) end subroutine initialize - subroutine run(this, importState, exportState, clock, rc) + subroutine update(this, importState, exportState, clock, rc) use esmf class(NullAction), intent(inout) :: this type(ESMF_State) :: importState @@ -54,6 +54,6 @@ subroutine run(this, importState, exportState, clock, rc) _UNUSED_DUMMY(importState) _UNUSED_DUMMY(exportState) _UNUSED_DUMMY(clock) - end subroutine run + end subroutine update end module mapl3g_NullAction diff --git a/generic3g/actions/RegridAction.F90 b/generic3g/actions/RegridAction.F90 index 031f5bf0bb2b..5eb024455345 100644 --- a/generic3g/actions/RegridAction.F90 +++ b/generic3g/actions/RegridAction.F90 @@ -20,7 +20,7 @@ module mapl3g_RegridAction class(Regridder), pointer :: regrdr contains procedure :: initialize - procedure :: run + procedure :: update end type ScalarRegridAction interface RegridAction @@ -67,7 +67,7 @@ subroutine initialize(this, importState, exportState, clock, rc) end subroutine initialize - subroutine run(this, importState, exportState, clock, rc) + subroutine update(this, importState, exportState, clock, rc) class(ScalarRegridAction), intent(inout) :: this type(ESMF_State) :: importState type(ESMF_State) :: exportState @@ -84,6 +84,6 @@ subroutine run(this, importState, exportState, clock, rc) _RETURN(_SUCCESS) _UNUSED_DUMMY(clock) - end subroutine run + end subroutine update end module mapl3g_RegridAction diff --git a/generic3g/actions/TimeInterpolateAction.F90 b/generic3g/actions/TimeInterpolateAction.F90 index fd9685f69ed1..c34222ca5fe4 100644 --- a/generic3g/actions/TimeInterpolateAction.F90 +++ b/generic3g/actions/TimeInterpolateAction.F90 @@ -17,7 +17,7 @@ module mapl3g_TimeInterpolateAction type, extends(ExtensionAction) :: TimeInterpolateAction contains procedure :: initialize - procedure :: run + procedure :: update end type TimeInterpolateAction interface TimeInterpolateAction @@ -42,7 +42,7 @@ subroutine initialize(this, importState, exportState, clock, rc) _RETURN(_SUCCESS) end subroutine initialize - subroutine run(this, importState, exportState, clock, rc) + subroutine update(this, importState, exportState, clock, rc) class(TimeInterpolateAction), intent(inout) :: this type(ESMF_State) :: importState type(ESMF_State) :: exportState @@ -80,7 +80,7 @@ subroutine run(this, importState, exportState, clock, rc) _RETURN(_SUCCESS) _UNUSED_DUMMY(clock) - end subroutine run + end subroutine update subroutine run_r4(bundle_in, field_out, rc) diff --git a/generic3g/actions/VerticalRegridAction.F90 b/generic3g/actions/VerticalRegridAction.F90 index 3eb1ed880444..ff8dcf2d5149 100644 --- a/generic3g/actions/VerticalRegridAction.F90 +++ b/generic3g/actions/VerticalRegridAction.F90 @@ -25,7 +25,7 @@ module mapl3g_VerticalRegridAction type(VerticalRegridMethod) :: method = VERTICAL_REGRID_UNKNOWN contains procedure :: initialize - procedure :: run + procedure :: update end type VerticalRegridAction interface VerticalRegridAction @@ -72,7 +72,7 @@ subroutine initialize(this, importState, exportState, clock, rc) _RETURN(_SUCCESS) end subroutine initialize - subroutine run(this, importState, exportState, clock, rc) + subroutine update(this, importState, exportState, clock, rc) use esmf class(VerticalRegridAction), intent(inout) :: this type(ESMF_State) :: importState @@ -117,6 +117,6 @@ subroutine run(this, importState, exportState, clock, rc) end do _RETURN(_SUCCESS) - end subroutine run + end subroutine update end module mapl3g_VerticalRegridAction diff --git a/generic3g/couplers/CouplerMetaComponent.F90 b/generic3g/couplers/CouplerMetaComponent.F90 index 9ba3cd657710..2d4c6c812670 100644 --- a/generic3g/couplers/CouplerMetaComponent.F90 +++ b/generic3g/couplers/CouplerMetaComponent.F90 @@ -136,7 +136,7 @@ recursive subroutine update(this, importState, exportState, clock, rc) !# call this%propagate_attributes(_RC) call this%update_sources(_RC) - call this%action%run(importState, exportState, clock, _RC) + call this%action%update(importState, exportState, clock, _RC) call this%set_up_to_date() _RETURN(_SUCCESS) diff --git a/generic3g/tests/MockItemSpec.F90 b/generic3g/tests/MockItemSpec.F90 index b3d865591023..381ddc6229bd 100644 --- a/generic3g/tests/MockItemSpec.F90 +++ b/generic3g/tests/MockItemSpec.F90 @@ -41,7 +41,7 @@ module MockItemSpecMod character(:), allocatable :: details contains procedure :: initialize - procedure :: run + procedure :: update end type MockAction interface MockItemSpec @@ -215,7 +215,7 @@ subroutine initialize(this, importState, exportState, clock, rc) _FAIL('This procedure should not be called.') end subroutine initialize - subroutine run(this, importState, exportState, clock, rc) + subroutine update(this, importState, exportState, clock, rc) use esmf class(MockAction), intent(inout) :: this type(ESMF_State) :: importState @@ -223,7 +223,7 @@ subroutine run(this, importState, exportState, clock, rc) type(ESMF_Clock) :: clock integer, optional, intent(out) :: rc _FAIL('This procedure should not be called.') - end subroutine run + end subroutine update function make_adapters(this, goal_spec, rc) result(adapters) type(StateItemAdapterWrapper), allocatable :: adapters(:) diff --git a/generic3g/tests/Test_TimeInterpolateAction.pf b/generic3g/tests/Test_TimeInterpolateAction.pf index 99f34ab702d2..ab703e5faceb 100644 --- a/generic3g/tests/Test_TimeInterpolateAction.pf +++ b/generic3g/tests/Test_TimeInterpolateAction.pf @@ -42,7 +42,7 @@ contains call ESMF_FieldEmptyComplete(f, typekind=ESMF_TYPEKIND_R4, _RC) call ESMF_StateAdd(exportState, [f], _RC) - call action%run(importState, exportState, clock, _RC) + call action%update(importState, exportState, clock, _RC) call assign_fptr(f, x, _RC) @assert_that(x, every_item(is(equal_to(7.)))) @@ -96,7 +96,7 @@ contains call ESMF_FieldEmptyComplete(f, typekind=ESMF_TYPEKIND_R4, _RC) call ESMF_StateAdd(exportState, [f], _RC) - call action%run(importState, exportState, clock, _RC) + call action%update(importState, exportState, clock, _RC) call assign_fptr(f, x, _RC) @assert_that(x, every_item(is(equal_to(4.)))) @@ -155,7 +155,7 @@ contains call ESMF_FieldEmptyComplete(f, typekind=ESMF_TYPEKIND_R4, _RC) call ESMF_StateAdd(exportState, [f], _RC) - call action%run(importState, exportState, clock, _RC) + call action%update(importState, exportState, clock, _RC) call assign_fptr(f, x, _RC) @assert_that(x(1), is(equal_to(4.))) diff --git a/gridcomps/ExtData2G/ExtDataBracket.F90 b/gridcomps/ExtData2G/ExtDataBracket.F90 index 09ad0b08b2d5..c3d0a1023571 100644 --- a/gridcomps/ExtData2G/ExtDataBracket.F90 +++ b/gridcomps/ExtData2G/ExtDataBracket.F90 @@ -21,8 +21,8 @@ module MAPL_ExtDataBracket real :: offset = 0.0 logical :: disable_interpolation = .false. logical :: intermittent_disable = .false. - logical :: new_file_right - logical :: new_file_left + logical :: new_file_right = .false. + logical :: new_file_left = .false. logical :: exact = .false. contains procedure :: interpolate_to_time diff --git a/gridcomps/ExtData2G/ExtDataOldTypesCreator.F90 b/gridcomps/ExtData2G/ExtDataOldTypesCreator.F90 index 0cff22ab1ce7..196ae280e03d 100644 --- a/gridcomps/ExtData2G/ExtDataOldTypesCreator.F90 +++ b/gridcomps/ExtData2G/ExtDataOldTypesCreator.F90 @@ -116,6 +116,7 @@ subroutine fillin_primary(this,item_name,base_name,primary_item,time,clock,unusa primary_item%cycling=.true. else if (trim(time_sample%extrap_outside) == "persist_closest") then primary_item%persist_closest=.true. + primary_item%cycling=.false. else if (trim(time_sample%extrap_outside) == "none") then primary_item%cycling=.false. primary_item%persist_closest=.false. diff --git a/gridcomps/ExtData2G/ExtDataSample.F90 b/gridcomps/ExtData2G/ExtDataSample.F90 index e7d9c6ce168f..ef5f075cab20 100644 --- a/gridcomps/ExtData2G/ExtDataSample.F90 +++ b/gridcomps/ExtData2G/ExtDataSample.F90 @@ -38,14 +38,14 @@ function new_ExtDataTimeSample(config,unusable,rc) result(TimeSample) call TimeSample%set_defaults() + TimeSample%extrap_outside = "none" if (ESMF_HConfigIsDefined(config,keyString="extrapolation")) then TimeSample%extrap_outside=ESMF_HConfigAsString(config,keyString="extrapolation",_RC) end if + TimeSample%time_interpolation = .true. if (ESMF_HConfigIsDefined(config,keyString="time_interpolation")) then TimeSample%time_interpolation = ESMF_HConfigAsLogical(config,keyString="time_interpolation",_RC) - else - TimeSample%time_interpolation = .true. end if if (ESMF_HConfigIsDefined(config,keyString="exact")) then