Skip to content

Commit

Permalink
Improve documentation of nextsw_cday_calc and iradsw
Browse files Browse the repository at this point in the history
  • Loading branch information
billsacks committed Oct 31, 2024
1 parent 11d937e commit 1f317a3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
17 changes: 8 additions & 9 deletions datm/atm_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -885,15 +885,14 @@ end subroutine datm_comp_run
real(R8) function getNextRadCDay( julday, tod, stepno, dtime, iradsw )

! Return the calendar day of the next radiation time-step.
! General Usage: nextswday = getNextRadCDay(curr_date) iradsw is
! the frequency to update the next shortwave. in number of steps
! (or hours if negative) Julian date.
! -- values greater than 1 set
! the next radiation to the present time plus 2 timesteps every iradsw
! -- values less than 0 turn set the next radiation to the present time
! plus two timesteps every -iradsw hours.
! -- if iradsw is zero, the next radiation time is the
! present time plus 1 timestep.
! General Usage: nextswday = getNextRadCDay(curr_date). iradsw is
! the frequency to update the next shortwave in number of steps
! (or hours if negative).
! -- values greater than 1 set the next radiation to the present time plus either 1 or
! 2 timesteps (depending on the value of nextsw_cday_calc_cam7) every iradsw timesteps.
! -- values less than 0 set the next radiation to the present time plus either 1 or 2
! timesteps (depending on the value of nextsw_cday_calc_cam7) every -iradsw hours.
! -- if iradsw is either 0 or 1, the next radiation time is the present time plus 1 timestep.

! input/output variables
real(r8) , intent(in) :: julday
Expand Down
35 changes: 21 additions & 14 deletions datm/cime_config/namelist_definition_datm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,15 @@
<category>datm</category>
<group>datm_nml</group>
<desc>
Frequency to update radiation in number of steps (or hours if negative)
irdasw is the radiation setting used to compute the next shortwave
Julian date. values greater than 1 set the next radiation to the
present time plus 2 timesteps every iradsw. values less than 0 turn
set the next radiation to the present time plus two timesteps every
-iradsw hours. if iradsw is zero, the next radiation time is the
present time plus 1 timestep. (default=0.)
Frequency to update radiation in number of steps (or hours if negative).

irdasw is the radiation setting used to compute the next shortwave Julian date.
Values greater than 1 set the next radiation to the present time plus either 1 or 2
timesteps (depending on the value of nextsw_cday_calc) every iradsw timesteps.
Values less than 0 set the next radiation to the present time plus either 1 or 2
timesteps (depending on the value of nextsw_cday_calc) every -iradsw hours. If
iradsw is either 0 or 1, the next radiation time is the present time plus 1
timestep. (default=1 for non-CPLHIST cases, and -1 for CPLHIST cases.)
</desc>
<values>
<value>1</value>
Expand All @@ -352,13 +354,18 @@
<group>datm_nml</group>
<valid_values>cam6,cam7</valid_values>
<desc>
Logic to use for calculating nextsw_cday. For CPLHIST cases, this should agree with
the version of CAM (or other atmosphere model) used to generate the CPLHIST
forcings; the valid values for this variable are based on this: 'cam6' is
appropriate for cases generated with the driver ordering in CAM6 and earlier, and
'cam7' is appropriate for cases generated with the driver ordering in CAM7 and
later. This variable also applies for non-CPLHIST cases, but we currently assume (by
default) that non-CPLHIST cases follow the logic that was used in CAM6 and earlier.
Logic to use for calculating nextsw_cday. This variable has no effect when iradsw is
0 or 1, so by default this only applies in CPLHIST cases.

For CPLHIST cases, this should agree with the version of CAM (or other atmosphere
model) used to generate the CPLHIST forcings; the valid values for this variable are
based on this: 'cam6' is appropriate for cases generated with the driver ordering in
CAM6 and earlier, and 'cam7' is appropriate for cases generated with the driver
ordering in CAM7 and later.

For 'cam6', the next radiation timestep is set to the present time plus 2 timesteps
when mod(tod+dtime,delta_radsw)==0. For 'cam7', the next radiation timestep is set
to the present time plus 1 timestep when mod(tod,delta_radsw)==0.
</desc>
<values>
<value>cam6</value>
Expand Down

0 comments on commit 1f317a3

Please sign in to comment.