From 217909aeaeeda322746e64c7734c5459c81ecd05 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 28 Jun 2024 10:36:06 -0600 Subject: [PATCH 1/2] replace shr_file with shr_log --- cicecore/drivers/nuopc/cmeps/cice_wrapper_mod.F90 | 2 +- cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 | 10 +++++----- cicecore/drivers/nuopc/cmeps/ice_shr_methods.F90 | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cicecore/drivers/nuopc/cmeps/cice_wrapper_mod.F90 b/cicecore/drivers/nuopc/cmeps/cice_wrapper_mod.F90 index d0aafbb43..f51cd1ba9 100644 --- a/cicecore/drivers/nuopc/cmeps/cice_wrapper_mod.F90 +++ b/cicecore/drivers/nuopc/cmeps/cice_wrapper_mod.F90 @@ -2,7 +2,7 @@ module cice_wrapper_mod #ifdef CESMCOUPLED use perf_mod , only : t_startf, t_stopf, t_barrierf - use shr_file_mod , only : shr_file_getlogunit, shr_file_setlogunit + use shr_log_mod , only : shr_log_getlogunit, shr_log_setlogunit use ice_kinds_mod , only : dbl_kind, int_kind, char_len, char_len_long diff --git a/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 b/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 index 3423fbf36..ea0191fa1 100644 --- a/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 +++ b/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 @@ -38,7 +38,7 @@ module ice_comp_nuopc use icepack_intfc , only : icepack_init_orbit, icepack_init_parameters, icepack_query_orbit use icepack_intfc , only : icepack_query_tracer_flags, icepack_query_parameters use cice_wrapper_mod , only : t_startf, t_stopf, t_barrierf - use cice_wrapper_mod , only : shr_file_getlogunit, shr_file_setlogunit + use cice_wrapper_mod , only : shr_log_getlogunit, shr_log_setlogunit use cice_wrapper_mod , only : ufs_settimer, ufs_logtimer, ufs_file_setlogunit, wtime #ifdef CESMCOUPLED use shr_const_mod @@ -497,7 +497,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) ! Note that sets the nu_diag module variable in ice_fileunits ! Set the nu_diag_set flag so it's not reset later - call shr_file_setLogUnit (shrlogunit) + call shr_log_setLogUnit (shrlogunit) call ufs_file_setLogUnit('./log.ice.timer',nu_timer,runtimelog) call NUOPC_CompAttributeGet(gcomp, name="diro", value=cvalue, & @@ -1067,8 +1067,8 @@ subroutine ModelAdvance(gcomp, rc) ! Reset shr logging to my log file !-------------------------------- - call shr_file_getLogUnit (shrlogunit) - call shr_file_setLogUnit (nu_diag) + call shr_log_getLogUnit (shrlogunit) + call shr_log_setLogUnit (nu_diag) !-------------------------------- ! Query the Component for its clock, importState and exportState @@ -1207,7 +1207,7 @@ subroutine ModelAdvance(gcomp, rc) end if ! reset shr logging to my original values - call shr_file_setLogUnit (shrlogunit) + call shr_log_setLogUnit (shrlogunit) !-------------------------------- ! stop timers and print timer info diff --git a/cicecore/drivers/nuopc/cmeps/ice_shr_methods.F90 b/cicecore/drivers/nuopc/cmeps/ice_shr_methods.F90 index 1144568b4..65596d822 100644 --- a/cicecore/drivers/nuopc/cmeps/ice_shr_methods.F90 +++ b/cicecore/drivers/nuopc/cmeps/ice_shr_methods.F90 @@ -23,7 +23,7 @@ module ice_shr_methods use ice_kinds_mod, only : r8 => dbl_kind, cl=>char_len_long, cs=>char_len use ice_exit , only : abort_ice #ifdef CESMCOUPLED - use shr_file_mod , only : shr_file_setlogunit, shr_file_getLogUnit + use shr_log_mod , only : shr_log_setlogunit #endif implicit none @@ -165,7 +165,7 @@ subroutine set_component_logging(gcomp, mastertask, logunit, shrlogunit, rc) endif #ifdef CESMCOUPLED - call shr_file_setLogUnit (logunit) + call shr_log_setLogUnit (logunit) #endif end subroutine set_component_logging From 2dd7ab70c61eaf245f9302ebfab6978ec4a32abd Mon Sep 17 00:00:00 2001 From: David Bailey Date: Mon, 1 Jul 2024 11:26:33 -0600 Subject: [PATCH 2/2] Change names for stub routines --- cicecore/drivers/nuopc/cmeps/cice_wrapper_mod.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cicecore/drivers/nuopc/cmeps/cice_wrapper_mod.F90 b/cicecore/drivers/nuopc/cmeps/cice_wrapper_mod.F90 index f51cd1ba9..7d94ae8c5 100644 --- a/cicecore/drivers/nuopc/cmeps/cice_wrapper_mod.F90 +++ b/cicecore/drivers/nuopc/cmeps/cice_wrapper_mod.F90 @@ -82,12 +82,12 @@ end subroutine ufs_logfhour ! Define stub routines that do nothing - they are just here to avoid ! having cppdefs in the main program - subroutine shr_file_setLogUnit(nunit) + subroutine shr_log_setLogUnit(nunit) integer, intent(in) :: nunit - end subroutine shr_file_setLogUnit - subroutine shr_file_getLogUnit(nunit) + end subroutine shr_log_setLogUnit + subroutine shr_log_getLogUnit(nunit) integer, intent(in) :: nunit - end subroutine shr_file_getLogUnit + end subroutine shr_log_getLogUnit subroutine t_startf(string) character(len=*) :: string end subroutine t_startf