Skip to content

Commit

Permalink
Including C_invrs_tau_wpxp_N2_thresh CLUBB parameter
Browse files Browse the repository at this point in the history
to namelist and clubb_intr.F90 for PPE.
  • Loading branch information
bstephens82 committed Oct 19, 2023
1 parent 5ddccd8 commit 816a8e2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -3374,6 +3374,7 @@ if ($clubb_sgs =~ /$TRUE/io) {
add_default($nl, 'clubb_tridiag_solve_method');
add_default($nl, 'clubb_up2_sfc_coef');
add_default($nl, 'clubb_wpxp_L_thresh');
add_default($nl, 'clubb_c_invrs_tau_wpxp_N2_thresh');

#CLUBB+MF options
add_default($nl, 'do_clubb_mf');
Expand Down
1 change: 1 addition & 0 deletions bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2047,6 +2047,7 @@
<clubb_C_invrs_tau_N2_wp2 > 0.2 </clubb_C_invrs_tau_N2_wp2>
<clubb_C_invrs_tau_N2_wpxp > 0.0 </clubb_C_invrs_tau_N2_wpxp>
<clubb_C_invrs_tau_N2_xp2 > 0.2 </clubb_C_invrs_tau_N2_xp2>
<clubb_c_invrs_tau_wpxp_N2_thresh > 3.3D-4 </clubb_c_invrs_tau_wpxp_N2_thresh>
<clubb_c_K1 > 0.75 </clubb_c_K1>
<clubb_c_K10 > 0.5 </clubb_c_K10>
<clubb_c_K10h > 0.3 </clubb_c_K10h>
Expand Down
5 changes: 5 additions & 0 deletions bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3874,6 +3874,11 @@ Coefficient of inverse tau term contributed by Brunt Vaisala frequency but for x
Coefficient of inverse tau term contributed by Brunt Vaisala frequency but for xp2_wpxp (units: none)
</entry>

<entry id="clubb_C_invrs_tau_wpxp_N2_thresh" type="real" category="pblrad"
group="clubb_params_nl" valid_values="" >
</entry>


<entry id="clubb_c_K1" type="real" category="pblrad"
group="clubb_params_nl" valid_values="" >
Coefficient of Kh_zm (diffusivity on momentum grid levels) in the wp2 (variance
Expand Down
11 changes: 9 additions & 2 deletions src/physics/cam/clubb_intr.F90
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ module clubb_intr
real(r8) :: clubb_C_invrs_tau_N2_wp2 = unset_r8
real(r8) :: clubb_C_invrs_tau_N2_xp2 = unset_r8
real(r8) :: clubb_C_invrs_tau_N2_wpxp = unset_r8
real(r8) :: clubb_C_invrs_tau_wpxp_N2_thresh = unset_r8
real(r8) :: clubb_C_invrs_tau_N2_clear_wp3 = unset_r8
real(r8) :: clubb_C_uu_shr = unset_r8
real(r8) :: clubb_C_uu_buoy = unset_r8
Expand Down Expand Up @@ -745,6 +746,7 @@ subroutine clubb_readnl(nlfile)
clubb_C_invrs_tau_N2_wp2, &
clubb_C_invrs_tau_N2_wpxp, &
clubb_C_invrs_tau_N2_xp2, &
clubb_C_invrs_tau_wpxp_N2_thresh, &
clubb_c_K1, &
clubb_c_K10, &
clubb_c_K10h, &
Expand Down Expand Up @@ -1031,7 +1033,9 @@ subroutine clubb_readnl(nlfile)
call mpi_bcast(clubb_C_invrs_tau_N2_wpxp, 1, mpi_real8, mstrid, mpicom, ierr)
if (ierr /= 0) call endrun(sub//": FATAL: mpi_bcast: clubb_C_invrs_tau_N2_wpxp")
call mpi_bcast(clubb_C_invrs_tau_N2_clear_wp3, 1, mpi_real8, mstrid, mpicom, ierr)
if (ierr /= 0) call endrun(sub//": FATAL: mpi_bcast: clubb_C_invrs_tau_N2_clear_wp3")
if (ierr /= 0) call endrun(sub//": FATAL: mpi_bcast: clubb_C_invrs_tau_N2_clear_wp3")
call mpi_bcast(clubb_C_invrs_tau_wpxp_N2_thresh, 1, mpi_real8, mstrid, mpicom, ierr)
if (ierr /= 0) call endrun(sub//": FATAL: mpi_bcast: clubb_C_invrs_tau_wpxp_N2_thresh")
call mpi_bcast(clubb_lmin_coef, 1, mpi_real8, mstrid, mpicom, ierr)
if (ierr /= 0) call endrun(sub//": FATAL: mpi_bcast: clubb_lmin_coef")
call mpi_bcast(clubb_skw_max_mag, 1, mpi_real8, mstrid, mpicom, ierr)
Expand Down Expand Up @@ -1177,6 +1181,7 @@ subroutine clubb_readnl(nlfile)
if(clubb_C_invrs_tau_N2_xp2 == unset_r8) call endrun(sub//": FATAL: clubb_C_invrs_tau_N2_xp2 is not set")
if(clubb_C_invrs_tau_N2_wpxp == unset_r8) call endrun(sub//": FATAL: clubb_C_invrs_tau_N2_wpxp is not set")
if(clubb_C_invrs_tau_N2_clear_wp3 == unset_r8) call endrun(sub//": FATAL: clubb_C_invrs_tau_N2_clear_wp3 is not set")
if(clubb_C_invrs_tau_wpxp_N2_thresh == unset_r8) call endrun(sub//": FATAL: clubb_c_invrs_tau_wpxp_N2_thresh is not set")
if(clubb_gamma_coef == unset_r8) call endrun(sub//": FATAL: clubb_gamma_coef is not set")
if(clubb_gamma_coefb == unset_r8) call endrun(sub//": FATAL: clubb_gamma_coefb is not set")
if(clubb_beta == unset_r8) call endrun(sub//": FATAL: clubb_beta is not set")
Expand Down Expand Up @@ -1290,7 +1295,8 @@ subroutine clubb_ini_cam(pbuf2d)
iC14, iC_wp3_pr_turb, igamma_coef, igamma_coefb, imult_coef, ilmin_coef, &
iSkw_denom_coef, ibeta, iskw_max_mag, &
iC_invrs_tau_bkgnd,iC_invrs_tau_sfc,iC_invrs_tau_shear,iC_invrs_tau_N2,iC_invrs_tau_N2_wp2, &
iC_invrs_tau_N2_xp2,iC_invrs_tau_N2_wpxp,iC_invrs_tau_N2_clear_wp3,iC_uu_shr,iC_uu_buoy, &
iC_invrs_tau_N2_xp2,iC_invrs_tau_N2_wpxp,iC_invrs_tau_N2_clear_wp3,iC_invrs_tau_wpxp_N2_thresh, &
iC_uu_shr,iC_uu_buoy, &
iC2rt, iC2thl, iC2rtthl, ic_K1, ic_K2, inu2, ic_K8, ic_K9, inu9, iC_wp2_splat, params_list

use clubb_api_module, only: &
Expand Down Expand Up @@ -1606,6 +1612,7 @@ subroutine clubb_ini_cam(pbuf2d)
clubb_params(iC_invrs_tau_N2_xp2) = clubb_C_invrs_tau_N2_xp2
clubb_params(iC_invrs_tau_N2_wpxp) = clubb_C_invrs_tau_N2_wpxp
clubb_params(iC_invrs_tau_N2_clear_wp3) = clubb_C_invrs_tau_N2_clear_wp3
clubb_params(iC_invrs_tau_wpxp_N2_thresh) = clubb_C_invrs_tau_wpxp_N2_thresh

! Set up CLUBB core. Note that some of these inputs are overwritten
! when clubb_tend_cam is called. The reason is that heights can change
Expand Down

0 comments on commit 816a8e2

Please sign in to comment.