diff --git a/cime_config/machines/config_machines.xml b/cime_config/machines/config_machines.xml
index 249cfdfc5a88..140b733f83db 100644
--- a/cime_config/machines/config_machines.xml
+++ b/cime_config/machines/config_machines.xml
@@ -3044,6 +3044,7 @@ commented out until "*** No rule to make target '.../libadios2pio-nm-lib.a'" iss
/lcrc/group/e3sm/soft/improv/pnetcdf/1.12.3/gcc-12.3.0/openmpi-4.1.6
/lcrc/group/e3sm/soft/improv/pnetcdf/1.12.3/gcc-12.3.0/openmpi-4.1.6/bin:/lcrc/group/e3sm/soft/improv/netcdf-fortran/4.6.1b/gcc-12.3.0/openmpi-4.1.6/bin:/lcrc/group/e3sm/soft/improv/netcdf-c/4.9.2b/gcc-12.3.0/openmpi-4.1.6/bin:/lcrc/group/e3sm/soft/improv/openmpi/4.1.6/gcc-12.3.0/bin:/lcrc/group/e3sm/soft/perl/improv/bin:$ENV{PATH}
$SHELL{lp=/lcrc/group/e3sm/soft/improv/netlib-lapack/3.12.0/gcc-12.3.0:/lcrc/group/e3sm/soft/improv/pnetcdf/1.12.3/gcc-12.3.0/openmpi-4.1.6/lib:/lcrc/group/e3sm/soft/improv/netcdf-fortran/4.6.1b/gcc-12.3.0/openmpi-4.1.6/lib:/lcrc/group/e3sm/soft/improv/netcdf-c/4.9.2b/gcc-12.3.0/openmpi-4.1.6/lib:/opt/pbs/lib:/lcrc/group/e3sm/soft/improv/openmpi/4.1.6/gcc-12.3.0/lib; if [ -z "$LD_LIBRARY_PATH" ]; then echo $lp; else echo "$lp:$LD_LIBRARY_PATH"; fi}
+ $SHELL{if [ -z "$MOAB_ROOT" ]; then echo /lcrc/soft/climate/moab/improv/gnu; else echo "$MOAB_ROOT"; fi}
^lockedfile
diff --git a/driver-moab/main/cime_comp_mod.F90 b/driver-moab/main/cime_comp_mod.F90
index 265f8e11338e..59fa2daf4080 100644
--- a/driver-moab/main/cime_comp_mod.F90
+++ b/driver-moab/main/cime_comp_mod.F90
@@ -2896,10 +2896,12 @@ subroutine cime_run()
num_moab_exports = num_moab_exports + 1! this is moab clock used for debugging
call seq_timemgr_clockAdvance( seq_SyncClock, force_stop, force_stop_ymd, force_stop_tod)
call seq_timemgr_EClockGetData(EClock_d, stepno=cur_step_no)
+#ifdef MOABDEBUG
if (iamroot_CPLID) then
write(logunit,*) ' num_moab_exports , cur_step_no ',num_moab_exports, cur_step_no
call shr_sys_flush(logunit)
endif
+#endif
call seq_timemgr_EClockGetData( EClock_d, curr_ymd=ymd, curr_tod=tod)
call shr_cal_date2ymd(ymd,year,month,day)
stop_alarm = seq_timemgr_alarmIsOn(EClock_d,seq_timemgr_alarm_stop)