Skip to content

Commit

Permalink
avoid printing in initialization as ice log is not yet ready
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Sep 27, 2024
1 parent 42b6426 commit 2119908
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
! Determine attributes - also needed in realize phase to get grid information
!----------------------------------------------------------------------------


! Get orbital values
! Note that these values are obtained in a call to init_orbit in ice_shortwave.F90
! if CESMCOUPLED is not defined
Expand Down Expand Up @@ -1520,11 +1521,14 @@ subroutine ice_orbital_init(gcomp, clock, logunit, mastertask, rc)
else
orb_year = orb_iyear
end if

if (orb_year .ne. prev_orb_year) then
lprint = mastertask
prev_orb_year = orb_year
! this prevents the orbital print happening before the log file is opened.
if (.not. first_time) prev_orb_year = orb_year
endif
eccen = orb_eccen

call shr_orb_params(orb_year, eccen, orb_obliq, orb_mvelp, obliqr, lambm0, mvelpp, lprint)

if ( eccen == SHR_ORB_UNDEF_REAL .or. obliqr == SHR_ORB_UNDEF_REAL .or. &
Expand Down

0 comments on commit 2119908

Please sign in to comment.