From 0b6518d0c5d0942a2daa0476f16808110670c1c7 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 21 Aug 2024 07:22:23 -0600 Subject: [PATCH] cleanup work --- cesm/driver/esm_time_mod.F90 | 5 +---- cime_config/buildnml | 2 -- mediator/med_phases_restart_mod.F90 | 17 +---------------- 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/cesm/driver/esm_time_mod.F90 b/cesm/driver/esm_time_mod.F90 index d4d0e81c..a1a39a78 100644 --- a/cesm/driver/esm_time_mod.F90 +++ b/cesm/driver/esm_time_mod.F90 @@ -25,15 +25,12 @@ module esm_time_mod public :: esm_time_clockInit ! initialize driver clock (assumes default calendar) -! private :: esm_time_timeInit -! private :: esm_time_alarmInit private :: esm_time_date2ymd ! Clock and alarm options character(len=*), private, parameter :: & optNONE = "none" , & optNever = "never" , & - optNSteps = "nstep" , & optNSeconds = "nsecond" , & optNMinutes = "nminute" , & optNHours = "nhour" , & @@ -254,7 +251,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, maintas ! Create the clock clock = ESMF_ClockCreate(TimeStep, StartTime, refTime=RefTime, name='ESMF Driver Clock', rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - + ! Advance the clock to the current time (in case of a restart) call ESMF_ClockGet(clock, currTime=clocktime, rc=rc ) if (ChkErr(rc,__LINE__,u_FILE_u)) return diff --git a/cime_config/buildnml b/cime_config/buildnml index e02ca307..44116d98 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -190,8 +190,6 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files): # determine coupling intervals comps = case.get_values("COMP_CLASSES") mindt = basedt - - coupling_times = {} for comp in comps: ncpl = case.get_value(comp.upper() + "_NCPL") diff --git a/mediator/med_phases_restart_mod.F90 b/mediator/med_phases_restart_mod.F90 index eeaf50e1..887aab8d 100644 --- a/mediator/med_phases_restart_mod.F90 +++ b/mediator/med_phases_restart_mod.F90 @@ -5,7 +5,7 @@ module med_phases_restart_mod !----------------------------------------------------------------------------- use med_kind_mod , only : CX=>SHR_KIND_CX, CS=>SHR_KIND_CS, CL=>SHR_KIND_CL, R8=>SHR_KIND_R8 -! use med_constants_mod , only : dbug_flag => med_constants_dbug_flag + use med_constants_mod , only : dbug_flag => med_constants_dbug_flag use med_utils_mod , only : chkerr => med_utils_ChkErr use med_internalstate_mod , only : maintask, logunit, InternalState use med_internalstate_mod , only : ncomps, compname, compocn, complnd, compwav @@ -25,7 +25,6 @@ module med_phases_restart_mod logical :: write_restart_at_endofrun = .false. logical :: whead(2) = (/.true. , .false./) logical :: wdata(2) = (/.false., .true. /) - integer, parameter:: dbug_flag = 2 character(*), parameter :: u_FILE_u = & __FILE__ @@ -302,7 +301,6 @@ subroutine med_phases_restart_write(gcomp, rc) trim(nexttimestr),'.nc' if (maintask) then -! restart_pfile = "rpointer.cpl"//trim(cpl_inst_tag)//'.'//trim(nexttimestr) restart_pfile = "rpointer.cpl"//trim(cpl_inst_tag) call ESMF_LogWrite(trim(subname)//" write rpointer file = "//trim(restart_pfile), ESMF_LOGMSG_INFO) open(newunit=unitn, file=restart_pfile, form='FORMATTED') @@ -548,23 +546,10 @@ subroutine med_phases_restart_read(gcomp, rc) endif ! Get the restart file name from the pointer file -! restart_pfile = "rpointer.cpl"//trim(cpl_inst_tag)//'.'//trim(currtimestr) restart_pfile = "rpointer.cpl"//trim(cpl_inst_tag) if (maintask) then call ESMF_LogWrite(trim(subname)//" read rpointer file = "//trim(restart_pfile), ESMF_LOGMSG_INFO) open(newunit=unitn, file=restart_pfile, form='FORMATTED', status='old', iostat=ierr) - - if (ierr < 0) then - ! try without currtimestr - restart_pfile = "rpointer.cpl"//trim(cpl_inst_tag) - call ESMF_LogWrite(trim(subname)//" read rpointer file = "//trim(restart_pfile), ESMF_LOGMSG_INFO) - open(newunit=unitn, file=restart_pfile, form='FORMATTED', status='old', iostat=ierr) - if(ierr < 0) then - call ESMF_LogWrite(trim(subname)//' rpointer file open returns error', ESMF_LOGMSG_INFO) - rc=ESMF_Failure - return - end if - end if read (unitn,'(a)', iostat=ierr) restart_file if (ierr < 0) then call ESMF_LogWrite(trim(subname)//' rpointer file read returns error', ESMF_LOGMSG_INFO)