-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2429 from GEOS-ESM/develop
GitFlow: Merge develop into main for 2.42.0 release
- Loading branch information
Showing
61 changed files
with
3,497 additions
and
1,102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.