Skip to content

Commit

Permalink
Stochastic land perturbations: add roughness length over land to the …
Browse files Browse the repository at this point in the history
…perturbed variables (NOAA-EMC#70)

* Added roughness length over land to the perturbed variables.
* Bugfix in gfsphysics/GFS_layer/GFS_typedefs.F90: remove Diag%cldcov, in particular the reset call because the variable is not allocated

Co-authored-by: Dom Heinzeller <[email protected]>
  • Loading branch information
tanyasmirnova and climbfuji authored Jan 19, 2021
1 parent 6ecee94 commit fa070c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
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

0 comments on commit fa070c8

Please sign in to comment.