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

Leaf Age Response function for all Biogenic VOCs consistent with MEGAN #92

Merged
merged 29 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
71c80fc
Leaf Age Response function for all Biogenic VOCs consistent with MEGAN
quaz115 Sep 14, 2023
b483227
Compiles now with LEAFAGE specific changes, findent also resolved
quaz115 Sep 16, 2023
de2eedb
Update namelist.canopy (leafage_opt set to 0)
quaz115 Sep 18, 2023
06009ed
LEAFAGE uses TEMP2 for TABOVECANOPY (fixed)
quaz115 Sep 19, 2023
755c29b
Merge remote-tracking branch 'origin/develop' into develop
quaz115 Sep 19, 2023
4510db9
temp2 replaced with tmp2mref in canopy_calcs.F90 and Tt with TABOVE i…
quaz115 Sep 19, 2023
ef271bd
Naming conventions imprved and README description of leafage_opt added
quaz115 Sep 20, 2023
dc2aec5
README leafage_opt description updated
quaz115 Sep 20, 2023
e5fdd4f
Merge branch 'develop' into develop
quaz115 Sep 26, 2023
5a3f4dc
Resolved LAIpast=LAIcurrent Warning
quaz115 Sep 26, 2023
d7e4a6c
TABOVECANOPY removed as input parameter from canopy_bio
quaz115 Sep 26, 2023
9cfd2d0
LEAFAGE merged with TIMEFEATURE (LAI across tsteps print diagnostics …
quaz115 Sep 27, 2023
f6330d5
Add point example with leaf age opt to nb
zmoon Sep 28, 2023
326d400
Interpolation of Monthly/daily (user defined) LAI input to Model (ho…
quaz115 Oct 2, 2023
d054909
lai_tstep as variable name, A* factors removed from canopy_bio call a…
quaz115 Oct 4, 2023
22eebe0
Warning changed to error for non-daily/monthly LAI input for now
quaz115 Oct 4, 2023
6fe2a3b
No interpolation and daily LAI inputs used: SE US test done
quaz115 Nov 3, 2023
bd6ba89
Update input/namelist.canopy leaving leafage_opt =1 (OFF) as default …
quaz115 Nov 6, 2023
1099a08
Update src/canopy_calcs.F90 Remove print diagnostics
quaz115 Nov 6, 2023
680d1be
Update src/canopy_canopts_mod.F90 corrected description in canopy_can…
quaz115 Nov 6, 2023
73ee5b0
leaving leafage_opt =1 (OFF) as default
quaz115 Nov 6, 2023
c0f275d
leaving leafage_opt =1 (OFF) as default and tstep docstring descripti…
quaz115 Nov 6, 2023
11e6763
Pre-commit passed
quaz115 Nov 6, 2023
7dafd4e
Try again with latest updates
quaz115 Nov 6, 2023
f8fa249
namelist.canopy reverted to SE US options
quaz115 Nov 6, 2023
8a9f1e7
namelist.canopy clean up final
quaz115 Nov 6, 2023
2efa8b8
namelist.canopy input files rveerted to match develop
quaz115 Nov 6, 2023
8223dc8
Cleaned namelist.canopy input files to match develop
quaz115 Nov 6, 2023
126cb38
.txt commented input list added: Cleaned namelist.canopy input files …
quaz115 Nov 6, 2023
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
1 change: 1 addition & 0 deletions input/namelist.canopy
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
crop_set = 3.0
co2_opt = 0
co2_set = 400.0
leafage_opt = 1
quaz115 marked this conversation as resolved.
Show resolved Hide resolved
lai_thresh = 0.1
frt_thresh = 0.1
fch_thresh = 0.5
Expand Down
40 changes: 34 additions & 6 deletions src/canopy_bioemi_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ module canopy_bioemi_mod
SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, PPFD_SUN, &
PPFD_SHADE, TLEAF_SUN, TLEAF_SHADE, TLEAF_AVE, LU_OPT, &
VTYPE, MODRES, CCE, VERT, CO2OPT, CO2SET, &
LEAFAGEOPT, PLAI, CLAI, NDAYS, TABOVECANOPY, &
ANEW, AGRO, AMAT, AOLD, &
EMI_IND, EMI_OUT)

!-----------------------------------------------------------------------
Expand All @@ -33,10 +35,12 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, PPFD_SUN, &
! Feb 2023 P.C. Campbell: Modified for multiple biogenic species
! Jul 2023 P.C. Campbell: Restructured to use FSUN, TLEAF, and PPFD
! as inputs
! Sept 2023: QZ Rasool : Modifications for LeafAge Response for multiple
! BVOCs
!-----------------------------------------------------------------------
!-----------------------------------------------------------------------
use canopy_const_mod, ONLY: rk,rgasuniv !constants for canopy models
use canopy_utils_mod, ONLY: interp_linear1_internal, GET_GAMMA_CO2
use canopy_utils_mod, ONLY: interp_linear1_internal,GET_GAMMA_CO2,GET_GAMMA_LEAFAGE
use canopy_bioparm_mod

! Arguments:
Expand All @@ -59,6 +63,12 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, PPFD_SUN, &
INTEGER, INTENT( IN ) :: VERT ! MEGAN vertical integration option (default = 0/no integration)
INTEGER, INTENT( IN ) :: CO2OPT ! Option for co2 inhibition calculation
REAL(RK), INTENT( IN ) :: CO2SET ! User set atmospheric CO2 conc [ppmv]

INTEGER, INTENT( IN ) :: LEAFAGEOPT ! leafage_opt (0= ON, 1= off i.e. GAMMALEAFAGE =1, in canopy_readnml.F90)
REAL(RK), INTENT( IN ) :: PLAI ! Past LAI [cm2/cm2]
REAL(RK), INTENT( IN ) :: CLAI ! Current LAI [cm2/cm2]
REAL(RK), INTENT( IN ) :: NDAYS !Number of days between the past and current LAI
quaz115 marked this conversation as resolved.
Show resolved Hide resolved

INTEGER, INTENT( IN ) :: EMI_IND ! Input biogenic emissions index
REAL(RK), INTENT( OUT ) :: EMI_OUT(:) ! Output canopy layer volume emissions (kg m-3 s-1)

Expand Down Expand Up @@ -91,7 +101,19 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, PPFD_SUN, &
REAL(RK) :: CT1 ! Activation energy (kJ/mol)
REAL(RK) :: CEO ! Empirical coefficient
REAL(RK) :: EF ! Final Mapped Emission factor (EF) (ug/m2 hr)

REAL(RK) :: TABOVECANOPY(SIZE(ZK)) ! Above Canopy Temp (assigned = TLEAF_AVE for now)
quaz115 marked this conversation as resolved.
Show resolved Hide resolved
! Empirical coeff.'s for Leaf Age factor calculations (see
! canopy_bioparm_mod or call canopy_biop)
REAL(RK) :: ANEW
REAL(RK) :: AGRO
REAL(RK) :: AMAT
REAL(RK) :: AOLD

REAL(RK) :: GAMMACO2 ! CO2 inhibition factor (isoprene only)

REAL(RK) :: GAMMALEAFAGE(SIZE(ZK)) ! LEAF AGE factor
quaz115 marked this conversation as resolved.
Show resolved Hide resolved

integer i, LAYERS

! Constant Canopy Parameters
Expand All @@ -105,7 +127,7 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, PPFD_SUN, &
TLEAF_OPT = 313.0_rk + (0.6_rk * (TLEAF240_AVE-297.0_rk)) !Guenther et al. (2012)

! Calculate emission species/plant-dependent mapped emission factors
call canopy_biop(EMI_IND, LU_OPT, VTYPE, EF, CT1, CEO)
call canopy_biop(EMI_IND, LU_OPT, VTYPE, EF, CT1, CEO, ANEW, AGRO, AMAT, AOLD) !Update: Added leaf age empirical coeff's

E_OPT = CEO * EXP(0.05_rk * (TLEAF24_AVE-297.0_rk)) * EXP(0.05_rk * (TLEAF240_AVE-297.0_rk))

Expand Down Expand Up @@ -143,6 +165,12 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, PPFD_SUN, &
GAMMACO2 = 1.0_rk
end if

! Get LEAF AGE factor
TABOVECANOPY = TLEAF_AVE !Assume instantaneous TLEAF estimate for TABOVECANOPY
quaz115 marked this conversation as resolved.
Show resolved Hide resolved
do i=1, SIZE(ZK)
GAMMALEAFAGE(i) = GET_GAMMA_LEAFAGE(LEAFAGEOPT, PLAI, CLAI, NDAYS, TABOVECANOPY(i), ANEW, AGRO, AMAT, AOLD)
quaz115 marked this conversation as resolved.
Show resolved Hide resolved
end do

! Calculate emissions profile in the canopy
EMI_OUT = 0.0_rk ! set initial emissions profile to zero
FLAI = 0.0_rk ! set initial fractional FLAI (LAD) profile to zero
Expand All @@ -151,7 +179,7 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, PPFD_SUN, &
do i=1, SIZE(ZK)
if (ZK(i) .gt. 0.0 .and. ZK(i) .le. FCH) then ! above ground level and at/below canopy top
FLAI(i) = ((FCLAI(i+1) - FCLAI(i)) * LAI)/MODRES !fractional LAI in each layer converted to LAD (m2 m-3)
EMI_OUT(i) = FLAI(i) * EF * GammaTLEAF_AVE(i) * GammaPPFD_AVE(i) * GAMMACO2 * CCE ! (ug m-3 hr-1)
EMI_OUT(i) = FLAI(i) * EF * GammaTLEAF_AVE(i) * GammaPPFD_AVE(i) * GAMMACO2 * CCE * GAMMALEAFAGE(i) ! (ug m-3 hr-1)
EMI_OUT(i) = EMI_OUT(i) * 2.7777777777778E-13_rk !convert emissions output to (kg m-3 s-1)
end if
end do
Expand All @@ -169,7 +197,7 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, PPFD_SUN, &
end if
end do
EMI_OUT(SIZE(ZK)) = LAI * EF * SUM(GammaTLEAF_AVE(1:LAYERS) * GammaPPFD_AVE(1:LAYERS) * &
VPGWT(1:LAYERS)) * GAMMACO2 * CCE !put into top model layer (ug m-2 hr-1)
VPGWT(1:LAYERS)* GAMMALEAFAGE(1:LAYERS)) * GAMMACO2 * CCE !put into top model layer (ug m-2 hr-1)
EMI_OUT = EMI_OUT * 2.7777777777778E-13_rk !convert emissions output to (kg m-2 s-1)
else if (VERT .eq. 2) then !"MEGANv3-like": Add weighted sum of activity coefficients using normal distribution
!across canopy layers using 5 layer numbers directly from MEGANv3
Expand Down Expand Up @@ -201,7 +229,7 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, PPFD_SUN, &
VPGWT(i) = GAUSS(i)/sum(GAUSS(1:LAYERS))
end do
EMI_OUT(SIZE(ZK)) = LAI * EF * SUM(GammaTLEAF_AVE(1:LAYERS) * GammaPPFD_AVE(1:LAYERS) * &
VPGWT(1:LAYERS)) * GAMMACO2 * CCE !put into top model layer (ug m-2 hr-1)
VPGWT(1:LAYERS)* GAMMALEAFAGE(1:LAYERS)) * GAMMACO2 * CCE !put into top model layer (ug m-2 hr-1)
EMI_OUT = EMI_OUT * 2.7777777777778E-13_rk !convert emissions output to (kg m-2 s-1)
else if (VERT .eq. 3) then !"MEGANv3-like": Add weighted sum of activity coefficients equally
!across canopy layers
Expand All @@ -212,7 +240,7 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, PPFD_SUN, &
VPGWT(i) = 1.0_rk/LAYERS
end do
EMI_OUT(SIZE(ZK)) = LAI * EF * SUM(GammaTLEAF_AVE(1:LAYERS) * GammaPPFD_AVE(1:LAYERS) * &
VPGWT(1:LAYERS)) * GAMMACO2 * CCE !put into top model layer (ug m-2 hr-1)
VPGWT(1:LAYERS)* GAMMALEAFAGE(1:LAYERS)) * GAMMACO2 * CCE !put into top model layer (ug m-2 hr-1)
EMI_OUT = EMI_OUT * 2.7777777777778E-13_rk !convert emissions output to (kg m-2 s-1)
else
write(*,*) 'Wrong BIOVERT_OPT choice of ', VERT, ' in namelist...exiting'
Expand Down
Loading