Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

part of cam6_3_86: reduce the number of times orb_param is printed to log #707

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/cpl/nuopc/atm_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,7 @@ subroutine cam_orbital_update(clock, logunit, mastertask, eccen, obliqr, lambm0
integer :: year ! model year at current time
integer :: orb_year ! orbital year for current orbital computation
character(len=CL) :: msgstr ! temporary
logical, save :: logprint = .true.
character(len=*) , parameter :: subname = "(cam_orbital_update)"
!-------------------------------------------

Expand All @@ -1499,10 +1500,14 @@ subroutine cam_orbital_update(clock, logunit, mastertask, eccen, obliqr, lambm0
else
orb_year = orb_iyear
end if

if(.not. (logprint .and. mastertask)) then
logprint = .false.
endif

eccen = orb_eccen
call shr_orb_params(orb_year, eccen, orb_obliq, orb_mvelp, obliqr, lambm0, mvelpp, mastertask)

call shr_orb_params(orb_year, eccen, orb_obliq, orb_mvelp, obliqr, lambm0, mvelpp, logprint)
logprint = .false.
if ( eccen == SHR_ORB_UNDEF_REAL .or. obliqr == SHR_ORB_UNDEF_REAL .or. &
mvelpp == SHR_ORB_UNDEF_REAL .or. lambm0 == SHR_ORB_UNDEF_REAL) then
write (msgstr, *) subname//' ERROR: orb params incorrect'
Expand Down