Skip to content

Commit

Permalink
Merge branch 'develop' into feature/mathomp4/mpich-workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 authored Oct 4, 2023
2 parents 5689512 + f7dbc4a commit 941f54e
Show file tree
Hide file tree
Showing 20 changed files with 1,888 additions and 756 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
OMPI_MCA_btl_vader_single_copy_mechanism: none
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
- name: Checkout
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
#password: ${{ secrets.DOCKERHUB_TOKEN }}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
- name: Checkout
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Non-support for `ierror` keyword arguments with `use mpi` ((MPICH Issue #6693)[https://github.com/pmodels/mpich/issues/6693])

### Changed

- Modified fpp macro `_UNUSED_DUMMY(x) to use ASSOCIATE instead of PRINT. With this change it can be used in PURE procedures.
- Make error handling in Plain_netCDF_Time consistent with MAPL standard error handling
- Updated handling of NetCDF time values

### Fixed

Expand Down Expand Up @@ -158,6 +158,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Suppress some common warnings with Intel Debug
- Make the GEOSadas CI build separate as it often fails due to race conditions in GSI
- Update CI to use BCs v11.1.0 and Baselibs 7.14.0
- Update MAPL_NetCDF public subroutine returns and support for real time
- Updates to support building MAPL with spack instead of Baselibs
- Add `FindESMF.cmake` file to `cmake` directory (as it can't easily be found via spack)
- Move `CMAKE_MODULE_PATH` append statement up to find `FindESMF.cmake` before we `find_package(ESMF)`
Expand Down
1 change: 1 addition & 0 deletions base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ set (srcs
MAPL_Resource.F90
MAPL_XYGridFactory.F90
MAPL_NetCDF.F90 Plain_netCDF_Time.F90
MAPL_DateTime_Parsing_ESMF.F90
# Orphaned program: should not be in this library.
# tstqsat.F90
)
Expand Down
75 changes: 75 additions & 0 deletions base/MAPL_DateTime_Parsing_ESMF.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#include "MAPL_Exceptions.h"
#include "MAPL_ErrLog.h"
module MAPL_DateTime_Parsing_ESMF
use MAPL_KeywordEnforcerMod
use MAPL_ExceptionHandling
use MAPL_DateTime_Parsing
use ESMF

implicit none

public :: set_ESMF_TimeInterval, set_ESMF_Time_from_ISO8601

interface set_ESMF_TimeInterval
module procedure :: set_ESMF_TimeInterval_from_datetime_duration
end interface set_ESMF_TimeInterval

contains

subroutine set_ESMF_TimeInterval_from_datetime_duration(interval, duration, rc)
type(ESMF_TimeInterval), intent(inout) :: interval
class(datetime_duration), intent(in) :: duration
integer, optional, intent(out) :: rc
integer :: status

! Get duration(s) from datetime_duration

! Set ESMF_TimeInterval

if(duration % year_is_set()) then
call ESMF_TimeIntervalSet(interval, yy = duration % year, _RC)
end if

if(duration % month_is_set()) then
call ESMF_TimeIntervalSet(interval, yy = duration % month, _RC)
end if

if(duration % day_is_set()) then
call ESMF_TimeIntervalSet(interval, yy = duration % day, _RC)
end if

if(duration % hour_is_real()) then
call ESMF_TimeIntervalSet(interval, h_r8 = duration % hour_real, _RC)
else if(duration % hour_is_set()) then
call ESMF_TimeIntervalSet(interval, h = duration % hour, _RC)
end if

if(duration % minute_is_real()) then
call ESMF_TimeIntervalSet(interval, m_r8 = duration % minute_real, _RC)
else if(duration % minute_is_set()) then
call ESMF_TimeIntervalSet(interval, m = duration % minute, _RC)
end if

if(duration % second_is_real()) then
call ESMF_TimeIntervalSet(interval, s_r8 = duration % second_real, _RC)
else if(duration % second_is_set()) then
call ESMF_TimeIntervalSet(interval, s = duration % second, _RC)
end if

_RETURN(_SUCCESS)

end subroutine set_ESMF_TimeInterval_from_datetime_duration

subroutine set_ESMF_Time_from_ISO8601(time, isostring, rc)
type(ESMF_Time), intent(inout) :: time
character(len=*), intent(in) :: isostring
integer, optional, intent(out) :: rc
integer :: status

call ESMF_TimeSet(time, isostring, _RC)

_RETURN(_SUCCESS)

end subroutine set_ESMF_Time_from_ISO8601

end module MAPL_DateTime_Parsing_ESMF
1 change: 1 addition & 0 deletions base/MAPL_ISO8601_DateTime_ESMF.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module MAPL_ISO8601_DateTime_ESMF
use MAPL_KeywordEnforcerMod
use MAPL_ExceptionHandling
use MAPL_ISO8601_DateTime
use MAPL_DateTime_Parsing
use ESMF
implicit none

Expand Down
Loading

0 comments on commit 941f54e

Please sign in to comment.