Skip to content

Commit

Permalink
further improvement to logunit setting
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Dec 13, 2022
1 parent cac67d1 commit 8bc69f6
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions config_src/drivers/nuopc_cap/mom_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module MOM_cap_mod
use MOM_cap_methods, only: ChkErr

#ifdef CESMCOUPLED
use shr_log_mod, only: shr_log_setLogUnit, shr_log_getLogUnit
use shr_log_mod, only: shr_log_setLogUnit
#endif
use time_utils_mod, only: esmf2fms_time

Expand Down Expand Up @@ -507,7 +507,10 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
stdout = output_unit
endif
call shr_log_setLogUnit(stdout)

call NUOPC_CompAttributeAdd(gcomp, (/"logunit"/), rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call NUOPC_CompAttributeSet(gcomp, "logunit", logunit, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call MOM_infra_init(mpi_comm_mom)

call constants_init
Expand Down Expand Up @@ -2256,12 +2259,6 @@ subroutine shr_log_setLogUnit(nunit)
! do nothing for this stub - its just here to replace
! having cppdefs in the main program
end subroutine shr_log_setLogUnit

subroutine shr_log_getLogUnit(nunit)
integer, intent(in) :: nunit
! do nothing for this stub - its just here to replace
! having cppdefs in the main program
end subroutine shr_log_getLogUnit
#endif

!>
Expand Down

0 comments on commit 8bc69f6

Please sign in to comment.