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

just add some comments regarding the DVD surface boundary condition #647

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
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
11 changes: 10 additions & 1 deletion src/gen_modules_diag.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3124,11 +3124,20 @@ subroutine dvd_add_difflux_sbc(do_SDdvd, tr_num, dvd_tot, tr, trstar, partit, me

!_______________________________________________________________________
! apply apply surface boundarie condition
! SBC_dvd = -2*T_k*Qflx - 2*T_k*T_w * W * kron_1k + T_k^2 * W *kron_1k
! = -2*T_k*Qflx + ((T_k - T_w)^2 - T_w^2) *W * kron_1k
!
! temp: T_w=T_k, ((T_k - T_w)^2 - T_w^2) = -T_k^2
! -->SBC_dvd = -2*T_k (Qflx + 0.5*T_k*W)
!
! salt: T_w=0 , ((T_k - T_w)^2 - T_w^2) = T_k^2
! -->SBC_dvd = -2*T_k (Qflx - 0.5*T_k*W)
!
nz = nu1
if (tr_num==1) then
sbc = -(heat_flux(node)/vcpw + tr(nz, node)*water_flux(node)*is_nonlinfs*0.5_WP)
elseif (tr_num==2) then
sbc = (virtual_salt(node) + relax_salt(node) - (real_salt_flux(node) - tr(nz, node)*water_flux(node)*0.5_WP)*is_nonlinfs)
sbc = (virtual_salt(node) + relax_salt(node) - (real_salt_flux(node) - tr(nz, node)*water_flux(node)*0.5_WP)*is_nonlinfs)
end if
Dflx(nz) = Dflx(nz) + sbc*area(nz, node)

Expand Down
Loading