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

Change nextsw_cday calculation for cam_dev (CAM7) in cplhist mode #229

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
14 changes: 11 additions & 3 deletions datm/atm_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -872,10 +872,18 @@ real(R8) function getNextRadCDay( julday, tod, stepno, dtime, iradsw )

if (liradsw > 1) then
delta_radsw = liradsw * dtime
if (mod(tod+dtime,delta_radsw) == 0 .and. stepno > 0) then
nextsw_cday = julday + 2*dtime/shr_const_cday
if (trim(cplhist_nextsw_cday_calc) == 'cam7' ) then
if (mod(tod,delta_radsw) == 0 .and. stepno > 0) then
nextsw_cday = julday + 1*dtime/shr_const_cday
else
nextsw_cday = -1._r8
end if
else
nextsw_cday = -1._r8
if (mod(tod+dtime,delta_radsw) == 0 .and. stepno > 0) then
nextsw_cday = julday + 2*dtime/shr_const_cday
else
nextsw_cday = -1._r8
end if
end if
else
nextsw_cday = julday + dtime/shr_const_cday
Expand Down