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

cam6_3_006: initial implementation of CLUBB+MF #221

Merged
merged 27 commits into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ee058e4
removed scmlat,scmlon from usermods_dir/scam_xxx
adamrher Sep 16, 2020
06dbd54
incorporate clubb_mf
adamrher Sep 16, 2020
dd22a60
added clubb_mf namelist group
adamrher Sep 17, 2020
bf353b1
added ChangeLog entry & default to dry plumes (condensation off)
adamrher Sep 17, 2020
2e0c19b
removed initial from all code mods
adamrher Sep 17, 2020
31a0162
important bug fixes, code cleanup
adamrher Sep 24, 2020
28ec956
mods from mikael, use fluxes in edmf module for clubb solver
adamrher Sep 29, 2020
9fde824
comments clarifying meaning of lowest thermo level
adamrher Sep 29, 2020
c3b62a6
brought code up to date. addressed first code review
adamrher Oct 7, 2020
93bb386
minor update to changelog in hopes of resolving conflicts
adamrher Oct 7, 2020
4c91878
addressing first round of code review
adamrher Oct 21, 2020
9a910a2
Add CLUBB_MF test and fix minor NAG bug
cacraigucar Nov 5, 2020
be0aa09
added drydep_srf_file for ne5pg3, swapped dycores for edmf test
adamrher Nov 5, 2020
2b8664d
bug fix in microphys
adamrher Nov 8, 2020
5fe837b
1st attempt at addressing goldys review
adamrher Nov 18, 2020
704e610
Updates from review
cacraigucar Nov 20, 2020
fed4187
Add the testmod for clubbmf
cacraigucar Nov 20, 2020
80c4c0f
Renamed edmf_module to clubb_mf
cacraigucar Nov 20, 2020
cd9850b
thanksgivign break bug fixes, replace with kiss RNG
adamrher Nov 30, 2020
3288ec0
Merge to cam6_3_005
cacraigucar Nov 30, 2020
e832e3c
Remove file that shouldn't have been committed and added missing r8
cacraigucar Nov 30, 2020
7a0cd21
Remove one more file that should not have been committed
cacraigucar Nov 30, 2020
6612d0d
Add paths for r8 and TGIT tests
cacraigucar Dec 1, 2020
cf43c94
final updates including ChangeLog text - no testing reported yet:q
cacraigucar Dec 1, 2020
1b5ff17
Uncomment debug write in clubb_mf
cacraigucar Dec 2, 2020
68597ab
Changed TGIT to use CAM_ROOT so it operates correctly wherever it is …
cacraigucar Dec 2, 2020
4b73b13
Update ChangeLog
cacraigucar Dec 3, 2020
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
57 changes: 36 additions & 21 deletions src/physics/cam/clubb_intr.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,7 @@ subroutine clubb_tend_cam( &
s_awu_output, s_awv_output, &
mf_thlflx_output, mf_qtflx_output
! MF Plume
real(r8), dimension(pverp+1-top_lev) :: mf_dry_a, mf_moist_a, &
real(r8), dimension(pverp) :: mf_dry_a, mf_moist_a, &
mf_dry_w, mf_moist_w, &
mf_dry_qt, mf_moist_qt, &
mf_dry_thl, mf_moist_thl, &
Expand All @@ -1800,9 +1800,12 @@ subroutine clubb_tend_cam( &
s_awu, s_awv, &
mf_thlflx, mf_qtflx
! MF local vars
real(r8), dimension(pverp+1-top_lev) :: rtm_zm_in, thlm_zm_in, &
thvm_in, &
dzt, invrs_dzt
real(r8), dimension(pverp) :: rtm_zm_in, thlm_zm_in, & ! momentum grid
thvm_in, & ! thermodyanmic grid
dzt, invrs_dzt, & ! thermodynamic grid
kappa_zt, & ! thermodynamic grid
kappa_zm, p_in_Pa_zm, & ! momentum grid
invrs_exner_zm ! momentum grid
integer :: nup, nz
real(r8) :: ep, &
ep1, ep2
Expand Down Expand Up @@ -2389,7 +2392,7 @@ subroutine clubb_tend_cam( &
rcm_inout(k) = rcm(i,pverp-k+1)
cloud_frac_inout(k) = cloud_frac(i,pverp-k+1)
sclrpthvp_inout(k,:) = 0._r8

if (k .ne. 1) then
pre_in(k) = prer_evap(i,pverp-k+1)
endif
Expand Down Expand Up @@ -2417,8 +2420,20 @@ subroutine clubb_tend_cam( &
thlphmp_zt(k,:) = 0._r8

enddo

pre_in(1) = pre_in(2)

!+++ARH
do k=1,pver
kappa_zt(k+1) = (rairv(i,pver-k+1,lchnk)/cpairv(i,pver-k+1,lchnk))
enddo
kappa_zt(1) = kappa_zt(2)

kappa_zm = zt2zm_api(kappa_zt)
do k=1,pverp
p_in_Pa_zm(k) = state1%pint(i,pverp-k+1)
invrs_exner_zm(k) = 1._r8/((p_in_Pa_zm(k)/p0_clubb)**(kappa_zm(k)))
enddo
!---ARH

if (clubb_do_adv) then
if (macmic_it == 1) then
Expand Down Expand Up @@ -2495,21 +2510,21 @@ subroutine clubb_tend_cam( &
thvm_in = thlm_in + ep1 * thv_ds_zt * rtm_in &
+ ( latvap/(cpair*exner) - ep2 * thv_ds_zt ) * rcm_inout

call integrate_mf( nz, dzt, p_in_Pa, exner, nup, & ! input
um_in, vm_in, thlm_in, thlm_zm_in, thvm_in, & ! input
rtm_in, rtm_zm_in, wpthlp_sfc, wprtp_sfc, pblh(i), & ! input
mf_dry_a, mf_moist_a, & ! output - plume diagnostics
mf_dry_w, mf_moist_w, & ! output - plume diagnostics
mf_dry_qt, mf_moist_qt, & ! output - plume diagnostics
mf_dry_thl,mf_moist_thl, & ! output - plume diagnostics
mf_dry_u, mf_moist_u, & ! output - plume diagnostics
mf_dry_v, mf_moist_v, & ! output - plume diagnostics
mf_moist_qc, & ! output - plume diagnostics
s_ae, s_aw, & ! output - plume diagnostics
s_awthl, s_awqt, & ! output - plume diagnostics
s_awql, s_awqi, & ! output - plume diagnostics
s_awu, s_awv, & ! output - plume diagnostics
mf_thlflx, mf_qtflx ) ! output - variables needed for solver
call integrate_mf( nz, nup, dzt, p_in_Pa_zm, invrs_exner_zm, & ! input
um_in, vm_in, thlm_in, thlm_zm_in, thvm_in, & ! input
rtm_in, rtm_zm_in, wpthlp_sfc, wprtp_sfc, pblh(i), & ! input
mf_dry_a, mf_moist_a, & ! output - plume diagnostics
mf_dry_w, mf_moist_w, & ! output - plume diagnostics
mf_dry_qt, mf_moist_qt, & ! output - plume diagnostics
mf_dry_thl,mf_moist_thl, & ! output - plume diagnostics
mf_dry_u, mf_moist_u, & ! output - plume diagnostics
mf_dry_v, mf_moist_v, & ! output - plume diagnostics
mf_moist_qc, & ! output - plume diagnostics
s_ae, s_aw, & ! output - plume diagnostics
s_awthl, s_awqt, & ! output - plume diagnostics
s_awql, s_awqi, & ! output - plume diagnostics
s_awu, s_awv, & ! output - plume diagnostics
mf_thlflx, mf_qtflx ) ! output - variables needed for solver

! pass MF turbulent advection term as CLUBB explicit forcing term
do k=2,nz
Expand Down
Loading