Skip to content
Snippets Groups Projects
Commit ee31c3de authored by Debolskiy Andrey's avatar Debolskiy Andrey :bicyclist_tone5:
Browse files

cntrgradient rework

parent 47f3b3a0
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ module pbl_dry_contrgradient
end subroutine allocate_cbl
subroutine deallocate_cbl(cbl)
type(pblContrGradDataType), intent(out):: cbl
type(pblContrGradDataType), intent(inout):: cbl
deallocate(cbl%entr)
deallocate(cbl%theta_up)
......@@ -49,7 +49,7 @@ module pbl_dry_contrgradient
deallocate(cbl%va_up)
deallocate(cbl%wu)
end subroutine deallocate_cbl
subroutine get_entrainment(cbl, turb, bl, fluid, grid)
subroutine get_entrainment(cbl, bl, fluid, grid)
use scm_state_data, only : stateBLDataType
use pbl_turb_data, only : turbBLDataType
use phys_fluid, only: fluidParamsDataType
......@@ -57,7 +57,6 @@ module pbl_dry_contrgradient
implicit none
type(pblContrGradDataType) :: cbl
type(stateBLDataType), intent(inout):: bl
type(turbBLDataType), intent(in):: turb
type(fluidParamsDataType), intent(in) :: fluid
type(pblgridDataType), intent(in) :: grid
......@@ -147,7 +146,9 @@ module pbl_dry_contrgradient
real wu, phys_beta, umod, ustr, rhs, a, b, dz
integer k, kmax
kmax = grid%kmax
cbl%wu = 0.0
cbl%wu(:) = 0.0
umod = sqrt(bl%u(kmax)*bl%u(kmax) + bl%v(kmax)*bl%v(kmax))
ustr = sqrt(bl%surf%cm2u /bl%rho(kmax) * umod)
phys_beta = 0.5 * fluid%g /(bl%theta_v(kmax) + bl%theta_v(kmax-1))
......@@ -181,7 +182,7 @@ module pbl_dry_contrgradient
use phys_fluid, only: fluidParamsDataType
use pbl_grid, only : pblgridDataType
implicit none
type(pblContrGradDataType) :: cbl
type(pblContrGradDataType), intent(inout) :: cbl
type(stateBLDataType), intent(inout):: bl
type(fluidParamsDataType), intent(in) :: fluid
type(pblgridDataType), intent(in) :: grid
......@@ -194,6 +195,11 @@ module pbl_dry_contrgradient
kmax = grid%kmax
kpbl = bl%kpbl
a0w0 = 0.15 * cbl%wu(kpbl)
call get_entrainment(cbl, bl, fluid, grid)
call get_up(cbl, bl, fluid, grid)
call get_wu(cbl, bl, fluid, grid)
!apply upwind
rhs_up(:) = 0
do k = kmax-1, 1, -1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment