From 3a9338f2b53abb73646897878ef92892f5cf6778 Mon Sep 17 00:00:00 2001 From: drnimbusrain Date: Tue, 19 Dec 2023 01:51:38 +0000 Subject: [PATCH] Fixed canopy height table and changed ffrac to frt. --- physics/satmedmfvdifq.F | 36 +++++++++++++++++++------------ physics/satmedmfvdifq.meta_canopy | 4 ++-- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/physics/satmedmfvdifq.F b/physics/satmedmfvdifq.F index 0c469828b..959b04170 100644 --- a/physics/satmedmfvdifq.F +++ b/physics/satmedmfvdifq.F @@ -9,7 +9,6 @@ module satmedmfvdifq use mfscuq_mod !PCC_CANOPY use canopy_utils_mod - use noahmp_tables, only : hvt_table contains @@ -89,8 +88,8 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, & & rlmx,elmx,sfc_rlm,tc_pbl, & & do_canopy, vegtype, lai, & !TODO -Canopy Inputs -! & rdcanopylai, rdcanopyfch, rdcanopyffrac, rdcanopyclu, & -! & canopylaixy, canopyfchxy, canopyffracxy, canopycluxy, & +! & rdcanopylai, rdcanopyfch, rdcanopyfrt, rdcanopyclu, & +! & canopylaixy, canopyfchxy, canopyfrtxy, canopycluxy, & & ntqv,dtend,dtidx,index_of_temperature,index_of_x_wind, & & index_of_y_wind,index_of_process_pbl,gen_tend,ldiag3d, & & errmsg,errflg) @@ -119,11 +118,11 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, & integer, intent(in) :: vegtype(:) real(kind=kind_phys), intent(in) :: lai(:) !TODO Canopy Inputs -! logical, intent(in) :: rdcanopylai, rdcanopyfch, rdcanopyffrac, & +! logical, intent(in) :: rdcanopylai, rdcanopyfch, rdcanopyfrt, & ! rdcanopyclu ! real(kind=kind_phys), intent(in) :: canopylaixy(:), & ! canopyfchxy(:), & -! canopyffracxy(:), & +! canopyfrtxy(:), & ! canopycluxy(:) !---------------------------------------------- real(kind=kind_phys), intent(inout) :: dv(:,:), du(:,:), & @@ -285,9 +284,10 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, & real(kind=kind_phys) FCH, MOL, HOL, TLCAN, & SIGMACAN, RRCAN, BBCAN, & AACAN, ZCAN, ZFL, BOTCAN, - & EDDYVEST1, EDDYVEST_INT, - & XCANOPYLAI, XCANOPYFCH, - & XCANOPYFFRAC, XCANOPYCLU + & EDDYVEST1, EDDYVEST_INT +!TODO Canopy Inputs +! & XCANOPYLAI, XCANOPYFCH, +! & XCANOPYFRT, XCANOPYCLU ! in canopy eddy diffusivity [ m**2/s ] real(kind=kind_phys), allocatable :: EDDYVESTX ( : ) @@ -295,7 +295,15 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, & real(kind=kind_phys), allocatable :: ZCANX ( : ) ! Declare local maximum canopy layers integer, parameter :: MAXCAN = 1000 - + integer, parameter :: mvt = 30 ! use 30 instead of 27 + !Based on MODIS IGBP 20 Category Dataset + real :: fch_table(mvt) !< top of canopy (m) + data ( fch_table(i),i=1,mvt) / + & 20.0, 20.0, 18.0, 16.0, 16.0, 1.10, + & 1.10, 13.0, 10.0, 1.00, 5.00, 2.00, + & 15.0, 1.50, 0.00, 0.00, 0.00, 4.00, + & 2.00, 0.50, 0.00, 0.00, 0.00, 0.00, + & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / !---------------------------------------------- !! @@ -1359,10 +1367,10 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, & ! else ! XCANOPYFCH = 0.0 ! endif -! if(rdcanopyffrac) then -! XCANOPYFFRAC = canopyffracxy(i) +! if(rdcanopyfrt) then +! XCANOPYFRT = canopyfrtxy(i) ! else -! XCANOPYFFRAC = 0.0 +! XCANOPYFRT = 0.0 ! endif ! if(rdcanopyclu) then ! XCANOPYCLU = canopycluxy(i) @@ -1370,7 +1378,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, & ! XCANOPYCLU = 0.0 ! endif ! FCH = XCANOPYFCH !top of canopy from input file - FCH = hvt_table(vegtype(i)) !top of canopy from table + FCH = fch_table(vegtype(i)) !top of canopy from table IF (k .EQ. 1) THEN !use model layer interfaces KCAN = 1 ELSE @@ -1387,7 +1395,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, & ! IF ( XCANOPYLAI .LT. 0.1 !from canopy inputs IF ( lai(i) .LT. 0.1 !from LSM & .OR. FCH .LT. 0.5 ) THEN -! & .OR. MAX(0.0, 1.0 - XCANOPYFFRAC) .GT. 0.5 +! & .OR. MAX(0.0, 1.0 - XCANOPYFRT) .GT. 0.5 ! & .OR. POPU .GT. 10000.0 ! & .OR. EXP(-0.5*XCANOPYLAI*XCANOPYCLU).GT. 0.45 ! & .AND. FCH .LT. 18.0 ) THEN diff --git a/physics/satmedmfvdifq.meta_canopy b/physics/satmedmfvdifq.meta_canopy index ebd21181a..c3b0af101 100644 --- a/physics/satmedmfvdifq.meta_canopy +++ b/physics/satmedmfvdifq.meta_canopy @@ -595,7 +595,7 @@ dimensions = () type = logical intent = in -[rdcanopyffrac] +[rdcanopyfrt] standard_name = flag_for_reading_canopy_forest_fraction_from_input long_name = flag for reading canopy forest fraction from initial conditions units = flag @@ -625,7 +625,7 @@ type = real kind = kind_phys intent = in -[canopyffracxy] +[canopyfrtxy] standard_name = canopy_forest_fraction long_name = canopy forest fraction units = none