From 59cb4066a4ddefc84126fd32d9155cafa70643ee Mon Sep 17 00:00:00 2001 From: dougiesquire Date: Thu, 29 Feb 2024 16:26:44 +1100 Subject: [PATCH] use GREGORIAN calendar when getting walltime in CMEPS --- .gitignore | 3 ++- CMEPS/CMakeLists.txt | 2 +- .../patches/med_phases_profile_mod.F90.patch | 21 +++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 CMEPS/patches/med_phases_profile_mod.F90.patch diff --git a/.gitignore b/.gitignore index 1c66c69..a2ca3b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build/* -bin/* +Debug/* +Release/* CMakeUserPresets.json diff --git a/CMEPS/CMakeLists.txt b/CMEPS/CMakeLists.txt index 24dc8a9..4ee8a70 100644 --- a/CMEPS/CMakeLists.txt +++ b/CMEPS/CMakeLists.txt @@ -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 @@ -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) diff --git a/CMEPS/patches/med_phases_profile_mod.F90.patch b/CMEPS/patches/med_phases_profile_mod.F90.patch new file mode 100644 index 0000000..364903b --- /dev/null +++ b/CMEPS/patches/med_phases_profile_mod.F90.patch @@ -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