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

Add new flake variables #20

Open
wants to merge 10 commits into
base: flake.accum
Choose a base branch
from
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
branch = main
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/HelinWei-NOAA/ccpp-physics
branch = flake.baseline
url = https://github.com/AnilKumar-NOAA/ccpp-physics
branch = new_flake_var
[submodule "upp"]
path = upp
url = https://github.com/NOAA-EMC/UPP
Expand Down
40 changes: 38 additions & 2 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,19 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: d_conv (:) => null() !< nst_fld%d_conv thickness of Free Convection Layer (FCL)
real (kind=kind_phys), pointer :: ifd (:) => null() !< nst_fld%ifd index to start DTM run or not
real (kind=kind_phys), pointer :: dt_cool(:) => null() !< nst_fld%dt_cool Sub layer cooling amount
real (kind=kind_phys), pointer :: qrain (:) => null() !< nst_fld%qrain sensible heat flux due to rainfall (watts)

real (kind=kind_phys), pointer :: qrain (:) => null() !< nst_fld%qrain sensible heat flux due to rainfall (watts)
! Flake model 10 variables
integer, pointer :: use_flake (:) => null()!Flag for flake
real (kind=kind_phys), pointer :: h_ML (:) => null() !< lkm%h_ML - depth of lake mixing layer (m)
real (kind=kind_phys), pointer :: t_ML (:) => null() !< lkm%t_ML - temperature of lake mixing layer(K)
real (kind=kind_phys), pointer :: t_mnw (:) => null() !< lkm%t_mnw - thee mean temperature of the water column(K)
real (kind=kind_phys), pointer :: h_talb (:) => null() !< lkm%h_talb - the depth of the thermally active layer of the bottom sediment(m)
real (kind=kind_phys), pointer :: t_talb (:) => null() !< lkm%t_talb - the temperature at the bottom of the sediment upper layer (K)
real (kind=kind_phys), pointer :: t_bot1 (:) => null() !< lkm%t_bot1 - the temperature at the water-bottom sediment interface (K)
real (kind=kind_phys), pointer :: t_bot2 (:) => null() !< lkm%t_bot2 - the temperature at the lake bottom layer water (K)
real (kind=kind_phys), pointer :: c_t (:) => null() !< lkm%c_t - the shape factor of water temperature vertical profile
real (kind=kind_phys), pointer :: T_snow (:) => null() !< lkm%T_snow - temperature of snow on a lake(K)
real (kind=kind_phys), pointer :: T_ice (:) => null() !< lkm%T_ice - temperature of ice on a lake(K)
! Soil properties for RUC LSM (number of levels different from NOAH 4-layer model)
real (kind=kind_phys), pointer :: wetness(:) => null() !< normalized soil wetness for lsm
real (kind=kind_phys), pointer :: sh2o(:,:) => null() !< volume fraction of unfrozen soil moisture for lsm
Expand Down Expand Up @@ -2283,6 +2294,31 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%dt_cool = zero
Sfcprop%qrain = zero
endif
! Flake parameter allocation
allocate (Sfcprop%use_flake(IM))
allocate (Sfcprop%h_ML (IM))
allocate (Sfcprop%t_ML (IM))
allocate (Sfcprop%t_mnw (IM))
allocate (Sfcprop%h_talb (IM))
allocate (Sfcprop%t_talb (IM))
allocate (Sfcprop%t_bot1 (IM))
allocate (Sfcprop%t_bot2 (IM))
allocate (Sfcprop%c_t (IM))
allocate (Sfcprop%T_snow (IM))
allocate (Sfcprop%T_ice (IM))

Sfcprop%use_flake = clear_val
Sfcprop%h_ML = clear_val
Sfcprop%t_ML = clear_val
Sfcprop%t_mnw = clear_val
Sfcprop%h_talb = clear_val
Sfcprop%t_talb = clear_val
Sfcprop%t_bot1 = clear_val
Sfcprop%t_bot2 = clear_val
Sfcprop%c_t = clear_val
Sfcprop%T_snow = clear_val
Sfcprop%T_ice = clear_val

if (Model%lsm == Model%lsm_noah) then
allocate (Sfcprop%xlaixy (IM))
allocate (Sfcprop%rca (IM))
Expand Down
Loading