Skip to content

Commit

Permalink
Add TODO notes for future changes once ML code is implemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
jatkinson1000 committed Aug 19, 2024
1 parent c8b16b2 commit 1c06bf3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/physics/cam/gw_drag.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ subroutine gw_tend(state, pbuf, dt, ptend, cam_in, flx_heat)
end if

! Solve for the drag profile with Beres source spectrum.
! Placeholder for ML scheme
! Placeholder to be replaced with the ML scheme
call gw_drag_prof(ncol, band_mid, p, src_level, tend_level, dt, &
t, vramp, &
piln, rhoi, nm, ni, ubm, ubi, xv, yv, &
Expand All @@ -1532,6 +1532,7 @@ subroutine gw_tend(state, pbuf, dt, ptend, cam_in, flx_heat)

if (gw_convect_dp_ml) then
! Save the results to apply to ptend for simulation updates
! TODO: Check how to handle tendencies not output by ML scheme
qtgw = qtgw_temp ! in the ml scheme there is no qtgw so use qtgw = 0.0
ttgw = ttgw_temp ! in the ml scheme there is no ttgw so use ttgw = 0.0
utgw = utgw_temp
Expand All @@ -1544,11 +1545,13 @@ subroutine gw_tend(state, pbuf, dt, ptend, cam_in, flx_heat)
taucd = calc_taucd(ncol, band_mid%ngwv, tend_level, tau, c, xv, yv, ubi)

! add the diffusion coefficients
! TODO: Check how to handle egwdffi not output by ML scheme
do k = 1, pver+1
egwdffi_tot(:,k) = egwdffi_tot(:,k) + egwdffi(:,k)
end do

! Store constituents tendencies
! TODO: Check how to handle qtgw not output by ML scheme
do m=1, pcnst
do k = 1, pver
ptend%q(:ncol,k,m) = ptend%q(:ncol,k,m) + qtgw(:,k,m)
Expand All @@ -1568,6 +1571,7 @@ subroutine gw_tend(state, pbuf, dt, ptend, cam_in, flx_heat)

! Find energy change in the current state, and use fixer to apply
! the difference in lower levels.
! TODO: Check how to handle ttgw not output by ML scheme
call energy_change(dt, p, u, v, ptend%u(:ncol,:), &
ptend%v(:ncol,:), ptend%s(:ncol,:)+ttgw, de)
call energy_fixer(tend_level, p, de-flx_heat(:ncol), ttgw)
Expand Down

0 comments on commit 1c06bf3

Please sign in to comment.