From fa070c83497debb2c34e310f7f6cdb767d282a80 Mon Sep 17 00:00:00 2001 From: tanyasmirnova <38667904+tanyasmirnova@users.noreply.github.com> Date: Tue, 19 Jan 2021 11:28:37 -0700 Subject: [PATCH] Stochastic land perturbations: add roughness length over land to the perturbed variables (#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 --- ccpp/physics | 2 +- gfsphysics/GFS_layer/GFS_typedefs.F90 | 13 ++++--------- stochastic_physics/stochastic_physics_wrapper.F90 | 8 +++++++- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ccpp/physics b/ccpp/physics index acf281a01..1fd346fc6 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit acf281a01e19b840a1f0e0fb947d9672c6d10c05 +Subproject commit 1fd346fc6eabc6d26f6dfca6056323baf478a082 diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90 index 1a63d5bc8..8868ae0b8 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -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) @@ -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 @@ -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 @@ -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 ! diff --git a/stochastic_physics/stochastic_physics_wrapper.F90 b/stochastic_physics/stochastic_physics_wrapper.F90 index 44c82ecbd..479270a9f 100644 --- a/stochastic_physics/stochastic_physics_wrapper.F90 +++ b/stochastic_physics/stochastic_physics_wrapper.F90 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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