Skip to content

Commit

Permalink
Changes shr_file to shr_log. (CICE-Consortium#960)
Browse files Browse the repository at this point in the history
* replace shr_file with shr_log

* Change names for stub routines

---------

Co-authored-by: Jim Edwards <[email protected]>
  • Loading branch information
2 people authored and NickSzapiro-NOAA committed Sep 25, 2024
1 parent 1cc92d7 commit 546ba0f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions cicecore/drivers/nuopc/cmeps/cice_wrapper_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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, &
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cicecore/drivers/nuopc/cmeps/ice_shr_methods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 546ba0f

Please sign in to comment.