Skip to content

Commit

Permalink
use GREGORIAN calendar when getting walltime in CMEPS
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiesquire committed Feb 29, 2024
1 parent ac15b5f commit 59cb406
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build/*
bin/*
Debug/*
Release/*
CMakeUserPresets.json
2 changes: 1 addition & 1 deletion CMEPS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ target_sources(OM3_cmeps PRIVATE
CMEPS/mediator/med_phases_prep_ice_mod.F90
CMEPS/mediator/med_phases_prep_glc_mod.F90
CMEPS/mediator/med_internalstate_mod.F90
CMEPS/mediator/med_phases_profile_mod.F90
CMEPS/mediator/esmFldsExchange_hafs_mod.F90
CMEPS/mediator/med_phases_prep_rof_mod.F90
CMEPS/mediator/esmFldsExchange_cesm_mod.F90
Expand Down Expand Up @@ -49,6 +48,7 @@ target_sources(OM3_cmeps PRIVATE
)

add_patched_source(OM3_cmeps CMEPS/mediator/med_phases_history_mod.F90)
add_patched_source(OM3_cmeps CMEPS/mediator/med_phases_profile_mod.F90)

## NUOPC cap share
add_fortran_library(OM3_nuopc_cap_share mod/nuopc_cap_share STATIC)
Expand Down
21 changes: 21 additions & 0 deletions CMEPS/patches/med_phases_profile_mod.F90.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/../CMEPS/mediator/med_phases_profile_mod.F90 b/med_phases_profile_mod.F90
index dadfb98..35e720f 100644
--- a/../CMEPS/mediator/med_phases_profile_mod.F90
+++ b/med_phases_profile_mod.F90
@@ -42,6 +42,7 @@ contains
use ESMF , only : ESMF_ClockGetNextTime, ESMF_TimeGet, ESMF_ClockGet
use ESMF , only : ESMF_ClockAdvance, ESMF_ClockSet, ESMF_ClockIsStopTime
use ESMF , only : operator(-)
+ use ESMF , only : ESMF_CALKIND_GREGORIAN
use NUOPC , only : NUOPC_CompAttributeGet

! write profile output
@@ -170,7 +171,7 @@ contains
call ESMF_TimeGet(nexttime, timestring=nexttimestr, rc=rc)
if (med_utils_ChkErr(rc,__LINE__,u_FILE_u)) return
! get current wall clock time
- call ESMF_TimeSet(wallclocktime, rc=rc)
+ call ESMF_TimeSet(wallclocktime, calkindflag=ESMF_CALKIND_GREGORIAN, rc=rc)
if (med_utils_chkerr(rc,__LINE__,u_FILE_u)) return
call ESMF_TimeSyncToRealTime(wallclocktime, rc=rc)
if (med_utils_chkerr(rc,__LINE__,u_FILE_u)) return

0 comments on commit 59cb406

Please sign in to comment.