Skip to content

Commit 24e8b48

Browse files
authored
Merge pull request #338 from mvdebolskiy/cam7-nextsw-0step
In DATM with cplhist mode, make 1st timestep same as cam7 when using the cam7 option ### Description of changes Make `nextsw_cday_calc_cam7` compute `nextsw_cday` same way cam7 does on the first timestep. ### Specific notes https://github.com/ESCOMP/CAM/blob/514ab5b9cdeed512bac884014e6c830e87bb0749/src/physics/rrtmgp/radiation.F90#L346C1-L378C1 In cam7 radiation.F90: ``` case ('sw') ! do a shortwave heating calc this timestep? radiation_do = nstep == 0 .or. iradsw == 1 & .or. (mod(nstep-1,iradsw) == 0 .and. nstep /= 1) & .or. nstep <= irad_always ``` However, in `atm_comp_nuopc.F90` https://github.com/ESCOMP/CDEPS/blob/9e57b278de18cf69351bc693fe1988143e859fa7/datm/atm_comp_nuopc.F90#L878C1-L880C15 ``` 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 ``` Contributors other than yourself, if any: CDEPS Issues Fixed (include github issue #): Resolves #333 Are there dependencies on other component PRs (if so list): No Are changes expected to change answers (bfb, different to roundoff, more substantial): No. (components handle the 0th timestep themselves), plus f.e. for CTSM, without `fates_radiation_model='twostream'` Any User Interface Changes (namelist or namelist defaults changes): No Testing performed (e.g. aux_cdeps, CESM prealpha, etc): `aux_clm_noresm`,`prealpha_noresm`,`aux_noresm_blom`. Testslits can be viewed at the [NorESM repos](https://github.com/NorESMhub) Hashes used for testing:
2 parents 9e57b27 + 69f9f3b commit 24e8b48

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

datm/atm_comp_nuopc.F90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,8 @@ real(R8) function getNextRadCDay( julday, tod, stepno, dtime, iradsw )
877877
! or later.
878878
if (mod(tod,delta_radsw) == 0 .and. stepno > 0) then
879879
nextsw_cday = julday + 1*dtime/shr_const_cday
880+
elseif (stepno == 0) then
881+
nextsw_cday = julday + (1+liradsw)*dtime/shr_const_cday
880882
else
881883
nextsw_cday = -1._r8
882884
end if

0 commit comments

Comments
 (0)