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

Adding Integrated Canopy Effects to CCPP/PBL Scheme #253

Open
wants to merge 53 commits into
base: ufs/dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
67b693e
Testing hedmf change.
drnimbusrain Sep 28, 2022
e2c7f47
Rolled back hedmf test change.
drnimbusrain Sep 29, 2022
1fb9060
Merge branch 'ufs-community:ufs/dev' into feature/aqm_canopy
drnimbusrain Dec 5, 2022
d825523
First draft commit of canopy turbulence effects in hedmf.f
drnimbusrain Dec 5, 2022
574ad4e
Fixed non-ascii character
drnimbusrain Dec 5, 2022
1665715
Changed from canopy in hedmf to satmedmvdifq for GFSv16.
drnimbusrain Dec 6, 2022
1c587a3
Added more arguments for canopy varibles.
drnimbusrain Dec 6, 2022
fe808c6
Fixed non-ascii character.
drnimbusrain Dec 6, 2022
634ebb1
Added canopy height grid cell conidtion.
drnimbusrain Dec 12, 2022
08dd5a6
Updated to modify TKE instead of K for canopy.
drnimbusrain Feb 7, 2023
22d3fd7
Rolled back to modifying K directly for canopy effects.
drnimbusrain Feb 7, 2023
936a28e
Updated Meta data
drnimbusrain Feb 7, 2023
989ed53
Added lai and vegtype to the meta
drnimbusrain Feb 9, 2023
99ba757
Fixed bugs.
drnimbusrain Feb 9, 2023
de1c0b4
Added canopy_utils_mod and noahmp_tables to satmedmfvdifq meta depend…
drnimbusrain Feb 10, 2023
90762fb
Changed some comments.
drnimbusrain Feb 10, 2023
07bafc0
Fixed IF statement bug in canopy conditions.
drnimbusrain Feb 10, 2023
6b686e5
Fixed bug in canopy variable inputs.
drnimbusrain Feb 10, 2023
ea79a91
Merge remote-tracking branch 'origin/develop' into feature/aqm_canopy
drnimbusrain Feb 11, 2023
be76560
Merge branch 'ufs-community:ufs/dev' into feature/aqm_canopy
drnimbusrain Feb 11, 2023
8122173
Updated bugs.
drnimbusrain Feb 12, 2023
f99c2bb
Fixed bugs (again...).
drnimbusrain Feb 12, 2023
e68de59
Merge branch 'ufs-community:ufs/dev' into feature/aqm_canopy
drnimbusrain Mar 3, 2023
92e33b2
Added "do_canopy" flag for eddy effects in TKE-EDMF
drnimbusrain Mar 8, 2023
d9d6465
Fixed bug in syntax
drnimbusrain Mar 8, 2023
da70f9b
Added canopy effects for multiple model layers...if necessary
drnimbusrain Mar 23, 2023
3f5a1d5
Merge branch 'ufs-community:ufs/dev' into feature/aqm_canopy
drnimbusrain Mar 23, 2023
03cbe6f
Updated canopy effect to use interface levels, zi.
drnimbusrain Mar 24, 2023
b8c61a3
Merge branch 'feature/aqm_canopy' of https://github.com/noaa-oar-arl/…
drnimbusrain Mar 24, 2023
b0465a5
Merge branch 'ufs-community:ufs/dev' into feature/aqm_canopy
drnimbusrain Mar 25, 2023
a962bdc
Merge branch 'ufs-community:ufs/dev' into feature/aqm_canopy
drnimbusrain Mar 28, 2023
9490726
Merge branch 'ufs-community:ufs/dev' into feature/aqm_canopy
drnimbusrain May 31, 2023
97d0417
Merge branch 'ufs-community:ufs/dev' into feature/aqm_canopy
drnimbusrain Jun 30, 2023
df68b5c
Merge branch 'ufs-community:ufs/dev' into feature/aqm_canopy
drnimbusrain Jul 17, 2023
29033e2
Merge branch 'ufs-community:ufs/dev' into feature/aqm_canopy
drnimbusrain Nov 16, 2023
911e4f9
Added TODO comments for input canopy variables and draft meta.
drnimbusrain Nov 16, 2023
7aa45c4
Merge branch 'feature/aqm_canopy' of https://github.com/noaa-oar-arl/…
drnimbusrain Nov 16, 2023
3a9338f
Fixed canopy height table and changed ffrac to frt.
drnimbusrain Dec 19, 2023
1e28ccd
Removed noah_mp_table dependency for aqm_canopy
drnimbusrain Dec 19, 2023
b0706c2
Pass via interface 5 AQM canopy inputs and build-in diagnostic arrays…
iri01 Feb 28, 2024
7726000
Corrected canopy arrays meta names and dimensions for consistency wit…
iri01 Feb 28, 2024
4d171ce
Remove unnecessary definitions of canopy arrays
iri01 Feb 28, 2024
caee56d
Merge pull request #1 from noaa-oar-arl/feature/aqm_canopy_new
iri01 Feb 28, 2024
7a0e1e2
Fix to canopy arrays definitions: add intent
iri01 Mar 1, 2024
336447d
Merge pull request #2 from noaa-oar-arl/feature/aqm_canopy_new_fix
iri01 Mar 1, 2024
fc1fb3f
Fixed cfch and cpopu units in the canopy meta variables.
drnimbusrain Mar 3, 2024
cbcb544
Fixed standard_name for naux2d and naux3d in meta file.
drnimbusrain Mar 3, 2024
8b82cf9
Bug fix to remove FCH and divide by ZFL.
drnimbusrain Apr 4, 2024
d3d17e9
Merge branch 'feature/aqm_canopy' into feature/aqm_canopy2
drnimbusrain Feb 6, 2025
eb85a48
Removed Files.
drnimbusrain Feb 6, 2025
4065eb7
Commenting out aux arrays.
drnimbusrain Feb 10, 2025
5016165
Fixed units of cpopu for canopy work.
drnimbusrain Feb 10, 2025
d98a4d7
Removed old lai/vegtype from canopy satmedmfvdifq
drnimbusrain Feb 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 19 additions & 22 deletions physics/PBL/SATMEDMF/satmedmfvdifq.F
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,17 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
& dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl,dkt,dku, &
& kinver,xkzm_m,xkzm_h,xkzm_s,dspfac,bl_upfr,bl_dnfr, &
& rlmx,elmx,sfc_rlm,tc_pbl, &
& do_canopy, vegtype, lai, &
!IVAI: canopy inputs
& claie, cfch, cfrt, cclu, cpopu,
!IVAI: canopy inputs from AQM
& do_canopy, claie, cfch, cfrt, cclu, cpopu, &
!IVAI
!TODO -Canopy Inputs
!TODO -Canopy Inputs from UFS
! & 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, &
& errmsg,errflg)
!IVAI: aux arrays

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These aux arrays are purely for diagnosing the implemention, correct? I believe they need to be commented out or removed before merging this into ufs/dev

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your comments here. Yes, indeed the aux arrays were for diagnosing the implementation. We can comment out for now if that's acceptable path forward.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please, thanks.

& naux2d,naux3d,aux2d,aux3d)
! & naux2d,naux3d,aux2d,aux3d)

!
use machine , only : kind_phys
Expand All @@ -119,10 +118,8 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
real(kind=kind_phys), intent(in) :: delt, xkzm_m, xkzm_h, xkzm_s
real(kind=kind_phys), intent(in) :: dspfac, bl_upfr, bl_dnfr
real(kind=kind_phys), intent(in) :: rlmx, elmx
!PCC_CANOPY------------------------------------
!PCC CANOPY------------------------------------
logical, intent(in) :: do_canopy
integer, intent(in) :: vegtype(:)
real(kind=kind_phys), intent(in) :: lai(:)
!IVAI: canopy inputs
real(kind=kind_phys), intent(in) :: claie(:), cfch(:), cfrt(:),
& cclu(:), cpopu(:)
Expand Down Expand Up @@ -321,9 +318,9 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
!----------------------------------------------

!IVAI
integer, intent(in) :: naux2d,naux3d
real(kind_phys), intent(inout) :: aux2d(:,:)
real(kind_phys), intent(inout) :: aux3d(:,:,:)
! integer, intent(in) :: naux2d,naux3d
! real(kind_phys), intent(inout) :: aux2d(:,:)
! real(kind_phys), intent(inout) :: aux3d(:,:,:)
!IVAI

!!
Expand Down Expand Up @@ -1383,14 +1380,14 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
! print*, 'SATMEDMFVDIFQ_RUN: CCLU = ' , cclu (:)
! print*, 'SATMEDMFVDIFQ_RUN: CPOPU= ' , cpopu(:)
! 2D aux arrays: canopy data in diffusion
aux2d(:,1) = cfch (:)
aux2d(:,2) = claie(:)
aux2d(:,3) = cfrt(:)
! aux2d(:,1) = cfch (:)
! aux2d(:,2) = claie(:)
! aux2d(:,3) = cfrt(:)

! 3D aux arrays: before canopy correction
aux3d(:,:,1) = dkq(:,:)
aux3d(:,:,2) = dkt(:,:)
aux3d(:,:,3) = dku(:,:)
! aux3d(:,:,1) = dkq(:,:)
! aux3d(:,:,2) = dkt(:,:)
! aux3d(:,:,3) = dku(:,:)
!IVAI
do k = 1, km1-1
do i = 1, im
Expand Down Expand Up @@ -1464,7 +1461,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
ELSE ! There is a contiguous forest canopy, apply correction over canopy layers

! Output contiguous canopy mask
if (kount .EQ. 0 ) aux2d(i,5) = aux2d(i,5) + 1
! if (kount .EQ. 0 ) aux2d(i,5) = aux2d(i,5) + 1

!Raupauch M. R. A Practical Lagrangian method for relating scalar
!concentrations to
Expand Down Expand Up @@ -1552,9 +1549,9 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
dku(i,k)= (dku(i,k)/EDDYVEST1) * EDDYVEST_INT !Scale dku to resolved eddy diffusivity

!IVAI: Output contiguos canopy correction bottom layer and 3D
if ( kount .EQ. 0)
& aux2d(i,4) = 1./EDDYVEST1 * EDDYVEST_INT
aux3d(i,k,4) = 1./EDDYVEST1 * EDDYVEST_INT
! if ( kount .EQ. 0)
! & aux2d(i,4) = 1./EDDYVEST1 * EDDYVEST_INT
! aux3d(i,k,4) = 1./EDDYVEST1 * EDDYVEST_INT
!IVAI

END IF ! contigous canopy conditions
Expand Down
81 changes: 31 additions & 50 deletions physics/PBL/SATMEDMF/satmedmfvdifq.meta
Original file line number Diff line number Diff line change
Expand Up @@ -604,22 +604,6 @@
dimensions = ()
type = logical
intent = in
[vegtype]
standard_name = vegetation_type_classification
long_name = vegetation type at each grid cell
units = index
dimensions = (horizontal_loop_extent)
type = integer
intent = in
[lai]
standard_name = leaf_area_index
long_name = leaf area index
units = none
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
#IVAI
[claie]
standard_name = canopy_leaf_area_index
long_name = canopy leaf area index
Expand Down Expand Up @@ -655,12 +639,11 @@
[cpopu]
standard_name = canopy_population_density
long_name = population density used for canopy correction
units = 10000people 10km-2
units = people km-2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkavulich @grantfirl Are we ok with these units? People is just a counter, should it have no units (dimensionless)?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I'm OK with this, although alternatives could be count km-2 or just km-2. For conversion purposes, if this were to ever be converted using the CCPP framework, I can see that we should probably prefer km-2. @mkavulich Do you have any preference?

dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
#IVAI
[sfc_rlm]
standard_name = choice_of_near_surface_mixing_length_in_boundary_layer_mass_flux_scheme
long_name = choice of near surface mixing length in boundary layer mass flux scheme
Expand Down Expand Up @@ -755,35 +738,33 @@
dimensions = ()
type = integer
intent = out
#IVAI
[naux2d]
standard_name = number_of_xy_dimensioned_auxiliary_arrays
long_name = number of 2d auxiliary arrays to output (for debugging)
units = count
dimensions = ()
type = integer
intent = out
[naux3d]
standard_name = number_of_xyz_dimensioned_auxiliary_arrays
long_name = number of 3d auxiliary arrays to output (for debugging)
units = count
dimensions = ()
type = integer
intent = out
[aux2d]
standard_name = auxiliary_2d_arrays
long_name = auxiliary 2d arrays to output (for debugging)
units = none
dimensions = (horizontal_loop_extent,number_of_3d_auxiliary_arrays)
type = real
kind = kind_phys
intent = out
[aux3d]
standard_name = auxiliary_3d_arrays
long_name = auxiliary 3d arrays to output (for debugging)
units = none
dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_3d_auxiliary_arrays)
type = real
kind = kind_phys
intent = out
#IVAI
#[naux2d]
# standard_name = number_of_xy_dimensioned_auxiliary_arrays
# long_name = number of 2d auxiliary arrays to output (for debugging)
# units = count
# dimensions = ()
# type = integer
# intent = out
#[naux3d]
# standard_name = number_of_xyz_dimensioned_auxiliary_arrays
# long_name = number of 3d auxiliary arrays to output (for debugging)
# units = count
# dimensions = ()
# type = integer
# intent = out
#[aux2d]
# standard_name = auxiliary_2d_arrays
# long_name = auxiliary 2d arrays to output (for debugging)
# units = none
# dimensions = (horizontal_loop_extent,number_of_3d_auxiliary_arrays)
# type = real
# kind = kind_phys
# intent = out
#[aux3d]
# standard_name = auxiliary_3d_arrays
# long_name = auxiliary 3d arrays to output (for debugging)
# units = none
# dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_3d_auxiliary_arrays)
# type = real
# kind = kind_phys
# intent = out