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

Stochastic land perturbations: add roughness length over land to the perturbed variables #70

Merged
merged 7 commits into from
Jan 19, 2021
2 changes: 1 addition & 1 deletion ccpp/physics
13 changes: 4 additions & 9 deletions gfsphysics/GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,6 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: upd_mf (:,:) => null() !< instantaneous convective updraft mass flux
real (kind=kind_phys), pointer :: dwn_mf (:,:) => null() !< instantaneous convective downdraft mass flux
real (kind=kind_phys), pointer :: det_mf (:,:) => null() !< instantaneous convective detrainment mass flux
real (kind=kind_phys), pointer :: cldcov (:,:) => null() !< instantaneous 3D cloud fraction
!--- F-A MP scheme
#ifdef CCPP
real (kind=kind_phys), pointer :: TRAIN (:,:) => null() !< accumulated stratiform T tendency (K s-1)
Expand Down Expand Up @@ -5892,7 +5891,6 @@ subroutine diag_create (Diag, IM, Model)
! allocate (Diag%upd_mf (IM,Model%levs))
! allocate (Diag%dwn_mf (IM,Model%levs))
! allocate (Diag%det_mf (IM,Model%levs))
! allocate (Diag%cldcov (IM,Model%levs))
endif

!vay-2018
Expand Down Expand Up @@ -6089,9 +6087,6 @@ subroutine diag_rad_zero(Diag, Model)
Diag%topfsw%upfx0 = zero
Diag%topflw%upfxc = zero
Diag%topflw%upfx0 = zero
if (Model%ldiag3d) then
Diag%cldcov = zero
endif

end subroutine diag_rad_zero

Expand Down Expand Up @@ -6241,11 +6236,11 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%dv3dt = zero
Diag%dt3dt = zero
if (Model%qdiag3d) then
Diag%dq3dt = zero
Diag%dq3dt = zero
! Diag%upd_mf = zero
! Diag%dwn_mf = zero
! Diag%det_mf = zero
endif
! Diag%upd_mf = zero
! Diag%dwn_mf = zero
! Diag%det_mf = zero
endif

!
Expand Down
8 changes: 7 additions & 1 deletion stochastic_physics/stochastic_physics_wrapper.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ module stochastic_physics_wrapper_mod
real(kind=kind_phys), dimension(:,:), allocatable, save :: facwf
!emissivity
real(kind=kind_phys), dimension(:,:), allocatable, save :: semis
!roughness length for land
real(kind=kind_phys), dimension(:,:), allocatable, save :: zorll

real(kind=kind_phys), dimension(:,:), allocatable, save :: stype

Expand Down Expand Up @@ -138,6 +140,7 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr)
allocate(facsf(1:Atm_block%nblks,maxval(GFS_Control%blksz)))
allocate(facwf(1:Atm_block%nblks,maxval(GFS_Control%blksz)))
allocate(semis(1:Atm_block%nblks,maxval(GFS_Control%blksz)))
allocate(zorll(1:Atm_block%nblks,maxval(GFS_Control%blksz)))
endif

do nb=1,Atm_block%nblks
Expand Down Expand Up @@ -205,6 +208,7 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr)
facsf(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%facsf(:)
facwf(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%facwf(:)
semis(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Radtend%semis(:)
zorll(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%zorll(:)
end do

if (GFS_Control%lsm == GFS_Control%lsm_noah) then
Expand Down Expand Up @@ -234,7 +238,7 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr)
GFS_Control%dtf, GFS_Control%kdt, GFS_Control%lndp_each_step, &
GFS_Control%n_var_lndp, GFS_Control%lndp_var_list, GFS_Control%lndp_prt_list, &
sfc_wts, xlon, xlat, stype, GFS_Control%pores, GFS_Control%resid,param_update_flag, &
smc, slc, stc, vfrac, alvsf, alnsf, alvwf, alnwf, facsf, facwf, snoalb, semis, ierr)
smc, slc, stc, vfrac, alvsf, alnsf, alvwf, alnwf, facsf, facwf, snoalb, semis, zorll, ierr)
if (ierr/=0) then
write(6,*) 'call to GFS_apply_lndp failed'
return
Expand All @@ -250,6 +254,7 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr)
GFS_Data(nb)%Sfcprop%facsf(:) = facsf(nb,1:GFS_Control%blksz(nb))
GFS_Data(nb)%Sfcprop%facwf(:) = facwf(nb,1:GFS_Control%blksz(nb))
GFS_Data(nb)%Radtend%semis(:) = semis(nb,1:GFS_Control%blksz(nb))
GFS_Data(nb)%Sfcprop%zorll(:) = zorll(nb,1:GFS_Control%blksz(nb))
enddo

if (GFS_Control%lsm == GFS_Control%lsm_noah) then
Expand Down Expand Up @@ -400,6 +405,7 @@ subroutine stochastic_physics_wrapper_end (GFS_Control)
if (allocated(facsf)) deallocate(facsf)
if (allocated(facwf)) deallocate(facwf)
if (allocated(semis)) deallocate(semis)
if (allocated(zorll)) deallocate(zorll)
endif
call finalize_stochastic_physics()
endif
Expand Down