Skip to content

Commit 941f54e

Browse files
authored
Merge branch 'develop' into feature/mathomp4/mpich-workarounds
2 parents 5689512 + f7dbc4a commit 941f54e

20 files changed

+1888
-756
lines changed

.github/workflows/workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
OMPI_MCA_btl_vader_single_copy_mechanism: none
3131
steps:
3232
- name: Cancel Previous Runs
33-
uses: styfle/cancel-workflow-action@0.11.0
33+
uses: styfle/cancel-workflow-action@0.12.0
3434
with:
3535
access_token: ${{ github.token }}
3636
- name: Checkout
@@ -86,7 +86,7 @@ jobs:
8686
#password: ${{ secrets.DOCKERHUB_TOKEN }}
8787
steps:
8888
- name: Cancel Previous Runs
89-
uses: styfle/cancel-workflow-action@0.11.0
89+
uses: styfle/cancel-workflow-action@0.12.0
9090
with:
9191
access_token: ${{ github.token }}
9292
- name: Checkout

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
- Non-support for `ierror` keyword arguments with `use mpi` ((MPICH Issue #6693)[https://github.com/pmodels/mpich/issues/6693])
1515

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

2121
### Fixed
2222

@@ -158,6 +158,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
158158
- Suppress some common warnings with Intel Debug
159159
- Make the GEOSadas CI build separate as it often fails due to race conditions in GSI
160160
- Update CI to use BCs v11.1.0 and Baselibs 7.14.0
161+
- Update MAPL_NetCDF public subroutine returns and support for real time
161162
- Updates to support building MAPL with spack instead of Baselibs
162163
- Add `FindESMF.cmake` file to `cmake` directory (as it can't easily be found via spack)
163164
- Move `CMAKE_MODULE_PATH` append statement up to find `FindESMF.cmake` before we `find_package(ESMF)`

base/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ set (srcs
5555
MAPL_Resource.F90
5656
MAPL_XYGridFactory.F90
5757
MAPL_NetCDF.F90 Plain_netCDF_Time.F90
58+
MAPL_DateTime_Parsing_ESMF.F90
5859
# Orphaned program: should not be in this library.
5960
# tstqsat.F90
6061
)

base/MAPL_DateTime_Parsing_ESMF.F90

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#include "MAPL_Exceptions.h"
2+
#include "MAPL_ErrLog.h"
3+
module MAPL_DateTime_Parsing_ESMF
4+
use MAPL_KeywordEnforcerMod
5+
use MAPL_ExceptionHandling
6+
use MAPL_DateTime_Parsing
7+
use ESMF
8+
9+
implicit none
10+
11+
public :: set_ESMF_TimeInterval, set_ESMF_Time_from_ISO8601
12+
13+
interface set_ESMF_TimeInterval
14+
module procedure :: set_ESMF_TimeInterval_from_datetime_duration
15+
end interface set_ESMF_TimeInterval
16+
17+
contains
18+
19+
subroutine set_ESMF_TimeInterval_from_datetime_duration(interval, duration, rc)
20+
type(ESMF_TimeInterval), intent(inout) :: interval
21+
class(datetime_duration), intent(in) :: duration
22+
integer, optional, intent(out) :: rc
23+
integer :: status
24+
25+
! Get duration(s) from datetime_duration
26+
27+
! Set ESMF_TimeInterval
28+
29+
if(duration % year_is_set()) then
30+
call ESMF_TimeIntervalSet(interval, yy = duration % year, _RC)
31+
end if
32+
33+
if(duration % month_is_set()) then
34+
call ESMF_TimeIntervalSet(interval, yy = duration % month, _RC)
35+
end if
36+
37+
if(duration % day_is_set()) then
38+
call ESMF_TimeIntervalSet(interval, yy = duration % day, _RC)
39+
end if
40+
41+
if(duration % hour_is_real()) then
42+
call ESMF_TimeIntervalSet(interval, h_r8 = duration % hour_real, _RC)
43+
else if(duration % hour_is_set()) then
44+
call ESMF_TimeIntervalSet(interval, h = duration % hour, _RC)
45+
end if
46+
47+
if(duration % minute_is_real()) then
48+
call ESMF_TimeIntervalSet(interval, m_r8 = duration % minute_real, _RC)
49+
else if(duration % minute_is_set()) then
50+
call ESMF_TimeIntervalSet(interval, m = duration % minute, _RC)
51+
end if
52+
53+
if(duration % second_is_real()) then
54+
call ESMF_TimeIntervalSet(interval, s_r8 = duration % second_real, _RC)
55+
else if(duration % second_is_set()) then
56+
call ESMF_TimeIntervalSet(interval, s = duration % second, _RC)
57+
end if
58+
59+
_RETURN(_SUCCESS)
60+
61+
end subroutine set_ESMF_TimeInterval_from_datetime_duration
62+
63+
subroutine set_ESMF_Time_from_ISO8601(time, isostring, rc)
64+
type(ESMF_Time), intent(inout) :: time
65+
character(len=*), intent(in) :: isostring
66+
integer, optional, intent(out) :: rc
67+
integer :: status
68+
69+
call ESMF_TimeSet(time, isostring, _RC)
70+
71+
_RETURN(_SUCCESS)
72+
73+
end subroutine set_ESMF_Time_from_ISO8601
74+
75+
end module MAPL_DateTime_Parsing_ESMF

base/MAPL_ISO8601_DateTime_ESMF.F90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module MAPL_ISO8601_DateTime_ESMF
77
use MAPL_KeywordEnforcerMod
88
use MAPL_ExceptionHandling
99
use MAPL_ISO8601_DateTime
10+
use MAPL_DateTime_Parsing
1011
use ESMF
1112
implicit none
1213

0 commit comments

Comments
 (0)