-
Notifications
You must be signed in to change notification settings - Fork 19
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 #2116 from GEOS-ESM/develop
GitFlow: Merge Develop into Main for release
- Loading branch information
Showing
35 changed files
with
2,279 additions
and
88 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,52 @@ | ||
! This module allows pFlogger to access the current simulation time in | ||
! MAPL and thereby annotate log entries with the current simulation | ||
! time. To accomplish this, the module hold a (shallow) copy | ||
! of the clock in CapGridComp. | ||
|
||
module mapl_SimulationTime | ||
use pflogger, only: StringUnlimitedMap | ||
use ESMF | ||
implicit none | ||
private | ||
|
||
public :: set_reference_clock | ||
public :: fill_time_dict | ||
|
||
type(ESMF_Clock), save :: reference_clock | ||
|
||
contains | ||
|
||
subroutine set_reference_clock(clock) | ||
type(ESMF_Clock), intent(in) :: clock | ||
reference_clock = clock | ||
end subroutine set_reference_clock | ||
|
||
subroutine fill_time_dict(dict) | ||
type (StringUnlimitedmap), intent(out) :: dict | ||
|
||
integer :: status | ||
type(ESMF_Time) :: time | ||
|
||
integer :: yy, mm, dd, h, m, s | ||
|
||
call ESMF_ClockValidate(reference_clock, rc=status) | ||
if (status /= 0) error stop "Must pass reference via set_reference_clock() before use." | ||
|
||
call ESMF_ClockGet(reference_clock, currTime=time, rc=status) | ||
if (status /= 0) error stop "could not get current time in SimulationTime.F90" | ||
|
||
call ESMF_TimeGet(time, yy=yy, mm=mm, dd=dd, h=h, m=m, s=s, rc=status) | ||
if (status /= 0) error stop "Failed to get data from ESMF_TimeGet()." | ||
|
||
call dict%insert('Y',yy) | ||
call dict%insert('M',mm) | ||
call dict%insert('D',dd) | ||
call dict%insert('HH',h) | ||
call dict%insert('MM',m) | ||
call dict%insert('SS',s) | ||
call dict%insert('MS',0) | ||
|
||
end subroutine Fill_Time_Dict | ||
|
||
end module mapl_SimulationTime | ||
|
Oops, something went wrong.