diff --git a/README.md b/README.md index 04c3e856..a3e663f3 100644 --- a/README.md +++ b/README.md @@ -254,6 +254,10 @@ You can also [generate global inputs using Python (see python/global_data_proces | `ifcanbio` | logical canopy biogenic emissions option (default: `.FALSE.`) | | `bio_cce` | user-set real value of MEGAN biogenic emissions "canopy environment coefficient" used to tune emissions to model inputs/calculations (default: `0.21`, based on Silva et al. 2020) | | `biovert_opt` | user set biogenic vertical summing option (`0`: no sum, full leaf-level biogenic emissions, units=kg/m3/s; `1`: MEGANv3-like summing of LAD weighted activity coefficients using the canopy-app plant distributions, caution-- units=kg m-2 s-1 and puts the total emissions in the topmost canopy-app model layer only; `2`: Same as in option 1, but instead uses Gaussian/normally weighted activity coefficients acoss all sub-canopy layers -- also units of kg m-2 s-1 in topmost model layer; `3`: Same as in option 1, but instead uses evenly weighted activity coefficients acoss all sub-canopy layers -- also units of kg m-2 s-1 in topmost model layer | +| `loss_opt` | user set option to apply a canopy loss factor when the vertical summing option is used (`biovert_opt >= 1`) to facilitate comparison of top-of-canopy BVOC emissions with ground flux observations. (`0`: no loss factor applied, `1`: loss factor calculated based on Eq. 21 of [Guenther et al. (2006)](www.atmos-chem-phys.net/6/3181/2006/) based on the formulation and empirical parameters for isoprene, `2`: constant user set factor applied with `loss_set` below, Note: The loss factor can be applied to all or any single biogenic species (using `loss_ind` below), and caution must be used for other BVOC species besides isoprene. User may adjust the variable chemical lifetime (`lifetime`, default = 3600 s taken for approximate isoprene lifetime) below and re-run to target other specific BVOC species flux observation comparisons. | +| `loss_set` | Set default value for constant canopy loss factor applied used when `loss_opt=2` (Default = 0.96 based on Guenther et al. (2006) | +| `loss_ind` | Set default integer for applying canopy loss factor to all species (=0) or only specific biogenics species specific indice (> 0) based on Table 1 above (e.g., 1 = Isoprene, 2 = Myrcene, etc.) | +| `lifetime` | user-set real value of chemical lifetime (in seconds) used when `loss_opt=1`. Default = 3600 s based on approximate above canopy isoprene lifeftime of 1 hour. | | `co2_opt` | user-set options for applying a CO2 inhibition factor for biogenic isoprene-only emissions using either the [Possell & Hewitt (2011)](https://doi.org/10.1111/j.1365-2486.2010.02306.x) (= `0`, default) or [Wilkinson et al. (2009)](https://doi.org/10.1111/j.1365-2486.2008.01803.x) method (= `1`). Use of option = `1` (Possell & Hewitt 2011) is especially recommended for sub-ambient CO2 concentrations. To turn off co2 inhibition factor set `co2_opt=2` | | `co2_set` | user-set real value of atmospheric co2 concentration (ppmv) (only used if `co2_opt=0` or `co2_opt=1`) | | `leafage_opt` | user-set options for applying leaf-age response to biogenic VOC emissions based on [Guenther et al. 2006](https://doi.org/10.5194/acp-6-3181-2006) (default is off i.e., `leafage_opt=1`, the corresponding $\gamma$ is set to 1). If turned on (`leafage_opt=0`), leafage $\gamma$ is calculated and the lai_tstep option needs to be set to ensure correct interpolation in this leafage_opt calculation. | diff --git a/input/namelist.canopy b/input/namelist.canopy index 8217c1bc..4533074b 100755 --- a/input/namelist.canopy +++ b/input/namelist.canopy @@ -69,6 +69,10 @@ ifcanbio = .TRUE. bio_cce = 0.21 biovert_opt = 0 + loss_opt = 0 + loss_set = 0.96 + loss_ind = 0 + lifetime = 3600.0 co2_opt = 0 co2_set = 400.0 lai_tstep = 86400 diff --git a/src/canopy_alloc.F90 b/src/canopy_alloc.F90 index bc5fa785..240dea7e 100644 --- a/src/canopy_alloc.F90 +++ b/src/canopy_alloc.F90 @@ -46,16 +46,16 @@ SUBROUTINE canopy_alloc if(.not.allocated(lad)) allocate(lad(nlat*nlon,modlays)) if(.not.allocated(lad_3d)) allocate(lad_3d(nlon,nlat,modlays)) - if(.not.allocated(tleaf_sun24_tmp)) allocate(tleaf_sun24_tmp(nlat*nlon,modlays)) - if(.not.allocated(tleaf_shade24_tmp)) allocate(tleaf_shade24_tmp(nlat*nlon,modlays)) - if(.not.allocated(tleaf_ave24_tmp)) allocate(tleaf_ave24_tmp(nlat*nlon,modlays)) - if(.not.allocated(ppfd_sun24_tmp)) allocate(ppfd_sun24_tmp(nlat*nlon,modlays)) - if(.not.allocated(ppfd_shade24_tmp)) allocate(ppfd_shade24_tmp(nlat*nlon,modlays)) - if(.not.allocated(tleaf_sun240_tmp)) allocate(tleaf_sun240_tmp(nlat*nlon,modlays)) - if(.not.allocated(tleaf_shade240_tmp)) allocate(tleaf_shade240_tmp(nlat*nlon,modlays)) - if(.not.allocated(tleaf_ave240_tmp)) allocate(tleaf_ave240_tmp(nlat*nlon,modlays)) - if(.not.allocated(ppfd_sun240_tmp)) allocate(ppfd_sun240_tmp(nlat*nlon,modlays)) - if(.not.allocated(ppfd_shade240_tmp)) allocate(ppfd_shade240_tmp(nlat*nlon,modlays)) + if(.not.allocated(tleaf_sun24_tmp)) allocate(tleaf_sun24_tmp(ntime,nlat*nlon,modlays)) + if(.not.allocated(tleaf_shade24_tmp)) allocate(tleaf_shade24_tmp(ntime,nlat*nlon,modlays)) + if(.not.allocated(tleaf_ave24_tmp)) allocate(tleaf_ave24_tmp(ntime,nlat*nlon,modlays)) + if(.not.allocated(ppfd_sun24_tmp)) allocate(ppfd_sun24_tmp(ntime,nlat*nlon,modlays)) + if(.not.allocated(ppfd_shade24_tmp)) allocate(ppfd_shade24_tmp(ntime,nlat*nlon,modlays)) + if(.not.allocated(tleaf_sun240_tmp)) allocate(tleaf_sun240_tmp(ntime,nlat*nlon,modlays)) + if(.not.allocated(tleaf_shade240_tmp)) allocate(tleaf_shade240_tmp(ntime,nlat*nlon,modlays)) + if(.not.allocated(tleaf_ave240_tmp)) allocate(tleaf_ave240_tmp(ntime,nlat*nlon,modlays)) + if(.not.allocated(ppfd_sun240_tmp)) allocate(ppfd_sun240_tmp(ntime,nlat*nlon,modlays)) + if(.not.allocated(ppfd_shade240_tmp)) allocate(ppfd_shade240_tmp(ntime,nlat*nlon,modlays)) if(.not.allocated(tleaf_sun24)) allocate(tleaf_sun24(nlat*nlon,modlays)) if(.not.allocated(tleaf_shade24)) allocate(tleaf_shade24(nlat*nlon,modlays)) if(.not.allocated(tleaf_ave24)) allocate(tleaf_ave24(nlat*nlon,modlays)) diff --git a/src/canopy_bioemi_mod.F90 b/src/canopy_bioemi_mod.F90 index 0ee442a0..241123be 100644 --- a/src/canopy_bioemi_mod.F90 +++ b/src/canopy_bioemi_mod.F90 @@ -12,6 +12,7 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, & TLEAF240_AVE, TEMP2, LU_OPT, & VTYPE, MODRES, CCE, VERT, CO2OPT, CO2SET, & LEAFAGEOPT, PASTLAI, CURRENTLAI, TSTEPLAI, & + LOSSOPT, LOSSSET, LOSSIND, LIFETIME, USTAR, & SOIMOPT, SOIM1, SOIM2, SOIM3, SOIM4, SOID1, SOID2, SOID3, & SOID4, WILT, & MODLAYS, EMI_IND, EMI_OUT) @@ -46,7 +47,7 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, & use canopy_const_mod, ONLY: rk,rgasuniv !constants for canopy models use canopy_utils_mod, ONLY: interp_linear1_internal, & GET_GAMMA_CO2,GET_GAMMA_LEAFAGE, & - GET_GAMMA_SOIM + GET_GAMMA_SOIM, GET_CANLOSS_BIO use canopy_bioparm_mod use canopy_tleaf_mod @@ -94,6 +95,12 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, & REAL(RK), INTENT( IN ) :: TSTEPLAI !Number of days between the past and current LAI INTEGER, INTENT( IN ) :: MODLAYS ! Input total model layers + INTEGER, INTENT( IN ) :: LOSSOPT ! Option for canopy loss factor when summing top of canopy emissions + REAL(RK), INTENT( IN ) :: LIFETIME ! Above canopy chemical lifetime of VOC (s) + REAL(RK), INTENT( IN ) :: LOSSSET ! Input value for constant canopy loss factor applied used with loss_opt=2 (Default = 0.96) + INTEGER, INTENT( IN ) :: LOSSIND ! Input integer for applying canopy loss factor to all species (=0) or only specific biogenics specie indices (> 0) + + REAL(RK), INTENT( IN ) :: USTAR ! Above canopy friction velocity (m/s) 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) @@ -138,7 +145,7 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, & REAL(RK) :: GAMMACO2 ! CO2 inhibition factor (isoprene only) REAL(RK) :: GAMMALEAFAGE !(SIZE(ZK)) ! LEAF AGE factor - + REAL(RK) :: CANLOSS_FAC !Canopy loss factor for summing option integer i, LAYERS ! Constant Canopy Parameters @@ -192,11 +199,34 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, & ROOTA,ROOTB) ! Get LEAF AGE factor + TABOVECANOPY = TEMP2 !TEMP2 (above air temp) for TABOVECANOPY !do i=1, SIZE(ZK) GAMMALEAFAGE = GET_GAMMA_LEAFAGE(LEAFAGEOPT, PASTLAI, CURRENTLAI, TSTEPLAI, TABOVECANOPY, ANEW, AGRO, AMAT, AOLD) !end do +! Get canopy loss factor (only used in vertical summing options and empirical formulation and parameters based on isoprene) +! Note: Allowed for other BVOCs but use caution when applying to compare with above canopy flux observations + + CANLOSS_FAC = 1.0_rk !Initialize + ! All species + if (LOSSIND .eq. 0) then + if (LOSSOPT .eq. 2) then !User set value from NL + CANLOSS_FAC = LOSSSET + else !Try and calculate if turned on + CANLOSS_FAC = GET_CANLOSS_BIO(LOSSOPT,LIFETIME,USTAR,FCH) + end if + end if + + !Only for a specific biogenic species/indice + if (LOSSIND .eq. EMI_IND) then + if (LOSSOPT .eq. 2) then !User set value from NL + CANLOSS_FAC = LOSSSET + else !Try and calculate if turned on + CANLOSS_FAC = GET_CANLOSS_BIO(LOSSOPT,LIFETIME,USTAR,FCH) + end if + end if + ! 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 @@ -234,7 +264,7 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, & end if end do EMI_OUT(SIZE(ZK)) = LAI * EF * SUM(GammaTLEAF_AVE(1:LAYERS) * GammaPPFD_AVE(1:LAYERS) * & - VPGWT(1:LAYERS)) * GAMMACO2 * CCE * GAMMALEAFAGE * GAMMASOIM !put into top model layer (ug m-2 hr-1) + VPGWT(1:LAYERS)) * GAMMACO2 * CCE * GAMMALEAFAGE * GAMMASOIM * CANLOSS_FAC !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 @@ -266,7 +296,7 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, & 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 * GAMMALEAFAGE * GAMMASOIM !put into top model layer (ug m-2 hr-1) + VPGWT(1:LAYERS)) * GAMMACO2 * CCE * GAMMALEAFAGE * GAMMASOIM * CANLOSS_FAC !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 @@ -277,7 +307,7 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, & 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 * GAMMALEAFAGE * GAMMASOIM !put into top model layer (ug m-2 hr-1) + VPGWT(1:LAYERS)) * GAMMACO2 * CCE * GAMMALEAFAGE * GAMMASOIM * CANLOSS_FAC !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' diff --git a/src/canopy_calcs.F90 b/src/canopy_calcs.F90 index 8920e8a5..7504433b 100644 --- a/src/canopy_calcs.F90 +++ b/src/canopy_calcs.F90 @@ -313,18 +313,6 @@ SUBROUTINE canopy_calcs(nn) doldfrac = 1.0_rk - dnewfrac hnewfrac = time_intvl / ( tau_hours * 3600.0_rk ) holdfrac = 1.0_rk - hnewfrac - !Track sum for initial 24 hour average -! ppfd_sun24_tmp_3d(i,j,:) = ppfd_sun24_tmp_3d(i,j,:) + ppfd_sun -! ppfd_shade24_tmp_3d(i,j,:) = ppfd_shade24_tmp_3d(i,j,:) + ppfd_shade -! tleaf_sun24_tmp_3d(i,j,:) = tleaf_sun24_tmp_3d(i,j,:) + tleaf_sun -! tleaf_shade24_tmp_3d(i,j,:) = tleaf_shade24_tmp_3d(i,j,:) + tleaf_shade -! tleaf_ave24_tmp_3d(i,j,:) = tleaf_ave24_tmp_3d(i,j,:) + tleaf_ave -! ppfd_sun240_tmp_3d(i,j,:) = ppfd_sun240_tmp_3d(i,j,:) + ppfd_sun -! ppfd_shade240_tmp_3d(i,j,:) = ppfd_shade240_tmp_3d(i,j,:) + ppfd_shade -! tleaf_sun240_tmp_3d(i,j,:) = tleaf_sun240_tmp_3d(i,j,:) + tleaf_sun -! tleaf_shade240_tmp_3d(i,j,:) = tleaf_shade240_tmp_3d(i,j,:) + tleaf_shade -! tleaf_ave240_tmp_3d(i,j,:) = tleaf_ave240_tmp_3d(i,j,:) + tleaf_ave - !Track times for moving time window (running) average below ppfd_sun24_tmp_3d(nn,i,j,:) = ppfd_sun ppfd_shade24_tmp_3d(nn,i,j,:) = ppfd_shade @@ -336,9 +324,8 @@ SUBROUTINE canopy_calcs(nn) tleaf_sun240_tmp_3d(nn,i,j,:) = tleaf_sun tleaf_shade240_tmp_3d(nn,i,j,:) = tleaf_shade tleaf_ave240_tmp_3d(nn,i,j,:) = tleaf_ave - if (nn .le. 24) then !TODO: Restart capability needed to get past leaf temp and PAR if avaialble - !For now, if =< 24 hours then only option is to use current instantaneous values + !For now, if <= 24 hours then only option is to use current instantaneous values ppfd_sun24_3d(i,j,:) = ppfd_sun ppfd_shade24_3d(i,j,:) = ppfd_shade tleaf_sun24_3d(i,j,:) = tleaf_sun @@ -349,50 +336,6 @@ SUBROUTINE canopy_calcs(nn) tleaf_sun240_3d(i,j,:) = tleaf_sun tleaf_shade240_3d(i,j,:) = tleaf_shade tleaf_ave240_3d(i,j,:) = tleaf_ave -! else if (nn .eq. 24) then !Take initial 24-hr average and assume 240-hr = 24-hr -! ppfd_sun24_3d(i,j,:) = ppfd_sun24_tmp_3d(i,j,:)/24.0_rk -! ppfd_shade24_3d(i,j,:) = ppfd_shade24_tmp_3d(i,j,:)/24.0_rk -! tleaf_sun24_3d(i,j,:) = tleaf_sun24_tmp_3d(i,j,:)/24.0_rk -! tleaf_shade24_3d(i,j,:) = tleaf_shade24_tmp_3d(i,j,:)/24.0_rk -! tleaf_ave24_3d(i,j,:) = tleaf_ave24_tmp_3d(i,j,:)/24.0_rk -! ppfd_sun240_3d(i,j,:) = ppfd_sun240_tmp_3d(i,j,:)/24.0_rk -! ppfd_shade240_3d(i,j,:) = ppfd_shade240_tmp_3d(i,j,:)/24.0_rk -! tleaf_sun240_3d(i,j,:) = tleaf_sun240_tmp_3d(i,j,:)/24.0_rk -! tleaf_shade240_3d(i,j,:) = tleaf_shade240_tmp_3d(i,j,:)/24.0_rk -! tleaf_ave240_3d(i,j,:) = tleaf_ave240_tmp_3d(i,j,:)/24.0_rk -! ppfd_sun24_3d(i,j,:) = 0.0_rk -! ppfd_shade24_3d(i,j,:) = 0.0_rk -! tleaf_sun24_3d(i,j,:) = 0.0_rk -! tleaf_shade24_3d(i,j,:) = 0.0_rk -! tleaf_ave24_3d(i,j,:) = 0.0_rk -! ppfd_sun240_3d(i,j,:) = 0.0_rk -! ppfd_shade240_3d(i,j,:) = 0.0_rk -! tleaf_sun240_3d(i,j,:) = 0.0_rk -! tleaf_shade240_3d(i,j,:) = 0.0_rk -! tleaf_ave240_3d(i,j,:) = 0.0_rk -! do t = 1, nn !sum 24 hours -! ppfd_sun24_3d(i,j,:) = ppfd_sun24_tmp_3d(t,i,j,:) + ppfd_sun24_3d(i,j,:) -! ppfd_shade24_3d(i,j,:) = ppfd_shade24_tmp_3d(t,i,j,:) + ppfd_shade24_3d(i,j,:) -! tleaf_sun24_3d(i,j,:) = tleaf_sun24_tmp_3d(t,i,j,:) + tleaf_sun24_3d(i,j,:) -! tleaf_shade24_3d(i,j,:) = tleaf_shade24_tmp_3d(t,i,j,:) + tleaf_shade24_3d(i,j,:) -! tleaf_ave24_3d(i,j,:) = tleaf_ave24_tmp_3d(t,i,j,:) + tleaf_ave24_3d(i,j,:) -! ppfd_sun240_3d(i,j,:) = ppfd_sun240_tmp_3d(t,i,j,:) + ppfd_sun240_3d(i,j,:) -! ppfd_shade240_3d(i,j,:) = ppfd_shade240_tmp_3d(t,i,j,:) + ppfd_shade240_3d(i,j,:) -! tleaf_sun240_3d(i,j,:) = tleaf_sun240_tmp_3d(t,i,j,:) + tleaf_sun240_3d(i,j,:) -! tleaf_shade240_3d(i,j,:) = tleaf_shade240_tmp_3d(t,i,j,:) + tleaf_sun240_3d(i,j,:) -! tleaf_ave240_3d(i,j,:) = tleaf_ave240_tmp_3d(t,i,j,:) + tleaf_ave240_3d(i,j,:) -! end do -! !average hours -! ppfd_sun24_3d(i,j,:) = ppfd_sun24_3d(i,j,:)/24.0_rk -! ppfd_shade24_3d(i,j,:) = ppfd_shade24_3d(i,j,:)/24.0_rk -! tleaf_sun24_3d(i,j,:) = tleaf_sun24_3d(i,j,:)/24.0_rk -! tleaf_shade24_3d(i,j,:) = tleaf_shade24_3d(i,j,:)/24.0_rk -! tleaf_ave24_3d(i,j,:) = tleaf_ave24_3d(i,j,:)/24.0_rk -! ppfd_sun240_3d(i,j,:) = ppfd_sun240_3d(i,j,:)/24.0_rk -! ppfd_shade240_3d(i,j,:) = ppfd_shade240_3d(i,j,:)/24.0_rk -! tleaf_sun240_3d(i,j,:) = tleaf_sun240_3d(i,j,:)/24.0_rk -! tleaf_shade240_3d(i,j,:) = tleaf_shade240_3d(i,j,:)/24.0_rk -! tleaf_ave240_3d(i,j,:) = tleaf_ave240_3d(i,j,:)/24.0_rk else !Updated running 24 hour (hourly, short term) and 240 hour (daily, long-term) averages ppfd_sun24_3d(i,j,:) = 0.0_rk ppfd_shade24_3d(i,j,:) = 0.0_rk @@ -455,6 +398,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 1, emi_isop_3d(i,j,:)) @@ -466,6 +410,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 2, emi_myrc_3d(i,j,:)) @@ -477,6 +422,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 3, emi_sabi_3d(i,j,:)) @@ -488,6 +434,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 4, emi_limo_3d(i,j,:)) @@ -499,6 +446,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 5, emi_care_3d(i,j,:)) @@ -510,6 +458,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 6, emi_ocim_3d(i,j,:)) @@ -521,6 +470,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 7, emi_bpin_3d(i,j,:)) @@ -532,6 +482,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 8, emi_apin_3d(i,j,:)) @@ -543,6 +494,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 9, emi_mono_3d(i,j,:)) @@ -554,6 +506,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 10, emi_farn_3d(i,j,:)) @@ -565,6 +518,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 11, emi_cary_3d(i,j,:)) @@ -576,6 +530,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 12, emi_sesq_3d(i,j,:)) @@ -587,6 +542,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 13, emi_mbol_3d(i,j,:)) @@ -598,6 +554,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 14, emi_meth_3d(i,j,:)) @@ -609,6 +566,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 15, emi_acet_3d(i,j,:)) @@ -620,6 +578,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 16, emi_co_3d(i,j,:)) @@ -631,6 +590,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 17, emi_bvoc_3d(i,j,:)) @@ -642,6 +602,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 18, emi_svoc_3d(i,j,:)) @@ -653,6 +614,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240_3d(i,j,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 19, emi_ovoc_3d(i,j,:)) @@ -970,20 +932,19 @@ SUBROUTINE canopy_calcs(nn) doldfrac = 1.0_rk - dnewfrac hnewfrac = time_intvl / ( tau_hours * 3600.0_rk ) holdfrac = 1.0_rk - hnewfrac - !Track sum for initial 24 hour average - ppfd_sun24_tmp(loc,:) = ppfd_sun24_tmp(loc,:) + ppfd_sun - ppfd_shade24_tmp(loc,:) = ppfd_shade24_tmp(loc,:) + ppfd_shade - tleaf_sun24_tmp(loc,:) = tleaf_sun24_tmp(loc,:) + tleaf_sun - tleaf_shade24_tmp(loc,:) = tleaf_shade24_tmp(loc,:) + tleaf_shade - tleaf_ave24_tmp(loc,:) = tleaf_ave24_tmp(loc,:) + tleaf_ave - ppfd_sun240_tmp(loc,:) = ppfd_sun240_tmp(loc,:) + ppfd_sun - ppfd_shade240_tmp(loc,:) = ppfd_shade240_tmp(loc,:) + ppfd_shade - tleaf_sun240_tmp(loc,:) = tleaf_sun240_tmp(loc,:) + tleaf_sun - tleaf_shade240_tmp(loc,:) = tleaf_shade240_tmp(loc,:) + tleaf_shade - tleaf_ave240_tmp(loc,:) = tleaf_ave240_tmp(loc,:) + tleaf_ave - print*,tleaf_sun24_tmp(loc,:) - if (nn .ge. 1 .and. nn .lt. 24) then !TODO: Restart capability needed to get past leaf temp and PAR if avaialble - !For now, if < 24 hours then use current instantaneous + !Track times for moving time window (running) average below + ppfd_sun24_tmp(nn,loc,:) = ppfd_sun + ppfd_shade24_tmp(nn,loc,:) = ppfd_shade + tleaf_sun24_tmp(nn,loc,:) = tleaf_sun + tleaf_shade24_tmp(nn,loc,:) = tleaf_shade + tleaf_ave24_tmp(nn,loc,:) = tleaf_ave + ppfd_sun240_tmp(nn,loc,:) = ppfd_sun + ppfd_shade240_tmp(nn,loc,:) = ppfd_shade + tleaf_sun240_tmp(nn,loc,:) = tleaf_sun + tleaf_shade240_tmp(nn,loc,:) = tleaf_shade + tleaf_ave240_tmp(nn,loc,:) = tleaf_ave + if (nn .le. 24) then !TODO: Restart capability needed to get past leaf temp and PAR if avaialble + !For now, if <= 24 hours then use current instantaneous ppfd_sun24(loc,:) = ppfd_sun ppfd_shade24(loc,:) = ppfd_shade tleaf_sun24(loc,:) = tleaf_sun @@ -994,18 +955,41 @@ SUBROUTINE canopy_calcs(nn) tleaf_sun240(loc,:) = tleaf_sun tleaf_shade240(loc,:) = tleaf_shade tleaf_ave240(loc,:) = tleaf_ave - else if (nn .eq. 24) then !Take initial 24-hr average and assume 240-hr = 24-hr - ppfd_sun24(loc,:) = ppfd_sun24_tmp(loc,:)/24.0_rk - ppfd_shade24(loc,:) = ppfd_shade24_tmp(loc,:)/24.0_rk - tleaf_sun24(loc,:) = tleaf_sun24_tmp(loc,:)/24.0_rk - tleaf_shade24(loc,:) = tleaf_shade24_tmp(loc,:)/24.0_rk - tleaf_ave24(loc,:) = tleaf_ave24_tmp(loc,:)/24.0_rk - ppfd_sun240(loc,:) = ppfd_sun240_tmp(loc,:)/24.0_rk - ppfd_shade240(loc,:) = ppfd_shade240_tmp(loc,:)/24.0_rk - tleaf_sun240(loc,:) = tleaf_sun240_tmp(loc,:)/24.0_rk - tleaf_shade240(loc,:) = tleaf_shade240_tmp(loc,:)/24.0_rk - tleaf_ave240(loc,:) = tleaf_ave240_tmp(loc,:)/24.0_rk - else !Updated rolling 24 hour (hourly, short term) and 240 hour (daily, long-term) averages + else + ppfd_sun24(loc,:) = 0.0_rk + ppfd_shade24(loc,:) = 0.0_rk + tleaf_sun24(loc,:) = 0.0_rk + tleaf_shade24(loc,:) = 0.0_rk + tleaf_ave24(loc,:) = 0.0_rk + ppfd_sun240(loc,:) = 0.0_rk + ppfd_shade240(loc,:) = 0.0_rk + tleaf_sun240(loc,:) = 0.0_rk + tleaf_shade240(loc,:) = 0.0_rk + tleaf_ave240(loc,:) = 0.0_rk + do t = nn-24, nn-1 !>24 hours sum previous 24 hour moving time window (i.e., running) + ppfd_sun24(loc,:) = ppfd_sun24_tmp(t,loc,:) + ppfd_sun24(loc,:) + ppfd_shade24(loc,:) = ppfd_shade24_tmp(t,loc,:) + ppfd_shade24(loc,:) + tleaf_sun24(loc,:) = tleaf_sun24_tmp(t,loc,:) + tleaf_sun24(loc,:) + tleaf_shade24(loc,:) = tleaf_shade24_tmp(t,loc,:) + tleaf_shade24(loc,:) + tleaf_ave24(loc,:) = tleaf_ave24_tmp(t,loc,:) + tleaf_ave24(loc,:) + ppfd_sun240(loc,:) = ppfd_sun240_tmp(t,loc,:) + ppfd_sun240(loc,:) + ppfd_shade240(loc,:) = ppfd_shade240_tmp(t,loc,:) + ppfd_shade240(loc,:) + tleaf_sun240(loc,:) = tleaf_sun240_tmp(t,loc,:) + tleaf_sun240(loc,:) + tleaf_shade240(loc,:) = tleaf_shade240_tmp(t,loc,:) + tleaf_sun240(loc,:) + tleaf_ave240(loc,:) = tleaf_ave240_tmp(t,loc,:) + tleaf_ave240(loc,:) + end do + !average hours + ppfd_sun24(loc,:) = ppfd_sun24(loc,:)/24.0_rk + ppfd_shade24(loc,:) = ppfd_shade24(loc,:)/24.0_rk + tleaf_sun24(loc,:) = tleaf_sun24(loc,:)/24.0_rk + tleaf_shade24(loc,:) = tleaf_shade24(loc,:)/24.0_rk + tleaf_ave24(loc,:) = tleaf_ave24(loc,:)/24.0_rk + ppfd_sun240(loc,:) = ppfd_sun240(loc,:)/24.0_rk + ppfd_shade240(loc,:) = ppfd_shade240(loc,:)/24.0_rk + tleaf_sun240(loc,:) = tleaf_sun240(loc,:)/24.0_rk + tleaf_shade240(loc,:) = tleaf_shade240(loc,:)/24.0_rk + tleaf_ave240(loc,:) = tleaf_ave240(loc,:)/24.0_rk + !Updated rolling 24 hour (hourly, short term) and 240 hour (daily, long-term) averages ppfd_sun24(loc,:) = ( holdfrac * ppfd_sun24(loc,:) ) + ( hnewfrac * ppfd_sun ) ppfd_shade24(loc,:) = ( holdfrac * ppfd_shade24(loc,:) ) + ( hnewfrac * ppfd_shade ) tleaf_sun24(loc,:) = ( holdfrac * tleaf_sun24(loc,:) ) + ( hnewfrac * tleaf_sun ) @@ -1033,6 +1017,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 1, emi_isop(loc,:)) @@ -1044,6 +1029,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 2, emi_myrc(loc,:)) @@ -1055,6 +1041,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 3, emi_sabi(loc,:)) @@ -1066,6 +1053,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 4, emi_limo(loc,:)) @@ -1077,6 +1065,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 5, emi_care(loc,:)) @@ -1088,6 +1077,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 6, emi_ocim(loc,:)) @@ -1099,6 +1089,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 7, emi_bpin(loc,:)) @@ -1110,6 +1101,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 8, emi_apin(loc,:)) @@ -1121,6 +1113,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 9, emi_mono(loc,:)) @@ -1132,6 +1125,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 10, emi_farn(loc,:)) @@ -1143,6 +1137,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 11, emi_cary(loc,:)) @@ -1154,6 +1149,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 12, emi_sesq(loc,:)) @@ -1165,6 +1161,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 13, emi_mbol(loc,:)) @@ -1176,6 +1173,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 14, emi_meth(loc,:)) @@ -1187,6 +1185,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 15, emi_acet(loc,:)) @@ -1198,6 +1197,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 16, emi_co(loc,:)) @@ -1209,6 +1209,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 17, emi_bvoc(loc,:)) @@ -1220,6 +1221,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 18, emi_svoc(loc,:)) @@ -1231,6 +1233,7 @@ SUBROUTINE canopy_calcs(nn) tleaf_ave240(loc,:), tmp2mref, & lu_opt, vtyperef, modres, bio_cce, biovert_opt, co2_opt, co2_set, & leafage_opt, pastlai, currentlai, tsteplai, & + loss_opt, loss_set, loss_ind, lifetime, ustref, & soim_opt, soilw1ref, soilw2ref, soilw3ref, soilw4ref, & soild1, soild2, soild3, soild4, wiltref, & modlays, 19, emi_ovoc(loc,:)) diff --git a/src/canopy_canopts_mod.F90 b/src/canopy_canopts_mod.F90 index 208f4d5f..8580ee85 100644 --- a/src/canopy_canopts_mod.F90 +++ b/src/canopy_canopts_mod.F90 @@ -47,6 +47,10 @@ MODULE canopy_canopts_mod real(rk) :: co2_set !Set default value for atmospheric co2 concentration for co2_opt (m) (Default = 400.0 ppmv) integer :: leafage_opt !Set default = 1 for Leaf Age factor option for BVOCs, =1 give GAMMA_LEAFGAE =1 integer :: lai_tstep !Set default = 24*3600 seconds (Daily timestep for LAI input, = 30*24*3600 for say Monthly time ste or other user-defined in seconds) + integer :: loss_opt !Set default integer for turning on canopy loss ratios for adjusting top of canopy net emissions (default = 0; Off) + real(rk) :: lifetime !Set default value for above-canopy BVOC lifetime (s) used with loss_opt=1 (Default = 3600 s) + real(rk) :: loss_set !Set default value for constant canopy loss factor applied used with loss_opt=2 (Default = 0.96) + integer :: loss_ind !Set default integer for applying canopy loss factor to all species (=0) or only specific biogenics specie indices (> 0) integer :: hist_opt !Set default integer for using historically averaged leaf temp and PAR for biogenic emissions (default=0; Off) integer :: soim_opt !Set default = 1 for Soil Moisture factor option for BVOCs, =1 give GAMMA_SOIM =1 real(rk) :: soild1 !User set real value of depth of soil layer 1 (default = 5 cm @ centerpoint, based on Noah/Noah-MP) diff --git a/src/canopy_canvars_mod.F90 b/src/canopy_canvars_mod.F90 index 05215dc8..7009beed 100644 --- a/src/canopy_canvars_mod.F90 +++ b/src/canopy_canvars_mod.F90 @@ -40,16 +40,16 @@ MODULE canopy_canvars_mod real(rk), allocatable :: ppfd_sun ( : ) ! PPFD for sunlit leaves (umol phot/m2 s) real(rk), allocatable :: ppfd_shade ( : ) ! PPFD for shaded leaves (umol phot/m2 s) real(rk), allocatable :: ppfd_ave ( : ) ! Average PPFD for sunlit and shaded leaves (umol phot/m2 s) - real(rk), allocatable :: tleaf_sun24_tmp ( : , : ) ! Leaf temp for sunlit leaves (K) - real(rk), allocatable :: tleaf_shade24_tmp ( : , : ) ! Leaf temp for shaded leaves (K) - real(rk), allocatable :: tleaf_ave24_tmp ( : , : ) ! Average Leaf temp for sunlit and shaded leaves (K) - real(rk), allocatable :: ppfd_sun24_tmp ( : , : ) ! PPFD for sunlit leaves (umol phot/m2 s) - real(rk), allocatable :: ppfd_shade24_tmp ( : , : ) ! PPFD for shaded leaves (umol phot/m2 s) - real(rk), allocatable :: tleaf_sun240_tmp ( : , : ) ! Leaf temp for sunlit leaves (K) - real(rk), allocatable :: tleaf_shade240_tmp ( : , : ) ! Leaf temp for shaded leaves (K) - real(rk), allocatable :: tleaf_ave240_tmp ( : , : ) ! Average Leaf temp for sunlit and shaded leaves (K) - real(rk), allocatable :: ppfd_sun240_tmp ( : , : ) ! PPFD for sunlit leaves (umol phot/m2 s) - real(rk), allocatable :: ppfd_shade240_tmp ( : , : ) ! PPFD for shaded leaves (umol phot/m2 s) + real(rk), allocatable :: tleaf_sun24_tmp ( : , :, : ) ! Leaf temp for sunlit leaves (K) + real(rk), allocatable :: tleaf_shade24_tmp ( : , :, : ) ! Leaf temp for shaded leaves (K) + real(rk), allocatable :: tleaf_ave24_tmp ( : , :, : ) ! Average Leaf temp for sunlit and shaded leaves (K) + real(rk), allocatable :: ppfd_sun24_tmp ( : , :, : ) ! PPFD for sunlit leaves (umol phot/m2 s) + real(rk), allocatable :: ppfd_shade24_tmp ( : , :, : ) ! PPFD for shaded leaves (umol phot/m2 s) + real(rk), allocatable :: tleaf_sun240_tmp ( : , :, : ) ! Leaf temp for sunlit leaves (K) + real(rk), allocatable :: tleaf_shade240_tmp ( : , :, : ) ! Leaf temp for shaded leaves (K) + real(rk), allocatable :: tleaf_ave240_tmp ( : , :, : ) ! Average Leaf temp for sunlit and shaded leaves (K) + real(rk), allocatable :: ppfd_sun240_tmp ( : , :, : ) ! PPFD for sunlit leaves (umol phot/m2 s) + real(rk), allocatable :: ppfd_shade240_tmp ( : , :, : ) ! PPFD for shaded leaves (umol phot/m2 s) real(rk), allocatable :: tleaf_sun24 ( : , : ) ! Leaf temp for sunlit leaves (K) real(rk), allocatable :: tleaf_shade24 ( : , : ) ! Leaf temp for shaded leaves (K) real(rk), allocatable :: tleaf_ave24 ( : , : ) ! Average Leaf temp for sunlit and shaded leaves (K) diff --git a/src/canopy_init.F90 b/src/canopy_init.F90 index 0fd49aeb..ec39ff17 100644 --- a/src/canopy_init.F90 +++ b/src/canopy_init.F90 @@ -31,16 +31,16 @@ SUBROUTINE canopy_init if(allocated(lad)) lad(:,:) = fillreal if(allocated(lad_3d)) lad_3d(:,:,:) = fillreal - if(allocated(tleaf_sun24_tmp)) tleaf_sun24_tmp(:,:) = 0.0_rk - if(allocated(tleaf_shade24_tmp)) tleaf_shade24_tmp(:,:) = 0.0_rk - if(allocated(tleaf_ave24_tmp)) tleaf_ave24_tmp(:,:) = 0.0_rk - if(allocated(ppfd_sun24_tmp)) ppfd_sun24_tmp(:,:) = 0.0_rk - if(allocated(ppfd_shade24_tmp)) ppfd_shade24_tmp(:,:) = 0.0_rk - if(allocated(tleaf_sun240_tmp)) tleaf_sun240_tmp(:,:) = 0.0_rk - if(allocated(tleaf_shade240_tmp)) tleaf_shade240_tmp(:,:) = 0.0_rk - if(allocated(tleaf_ave240_tmp)) tleaf_ave240_tmp(:,:) = 0.0_rk - if(allocated(ppfd_sun240_tmp)) ppfd_sun240_tmp(:,:) = 0.0_rk - if(allocated(ppfd_shade240_tmp)) ppfd_shade240_tmp(:,:) = 0.0_rk + if(allocated(tleaf_sun24_tmp)) tleaf_sun24_tmp(:,:,:) = 0.0_rk + if(allocated(tleaf_shade24_tmp)) tleaf_shade24_tmp(:,:,:) = 0.0_rk + if(allocated(tleaf_ave24_tmp)) tleaf_ave24_tmp(:,:,:) = 0.0_rk + if(allocated(ppfd_sun24_tmp)) ppfd_sun24_tmp(:,:,:) = 0.0_rk + if(allocated(ppfd_shade24_tmp)) ppfd_shade24_tmp(:,:,:) = 0.0_rk + if(allocated(tleaf_sun240_tmp)) tleaf_sun240_tmp(:,:,:) = 0.0_rk + if(allocated(tleaf_shade240_tmp)) tleaf_shade240_tmp(:,:,:) = 0.0_rk + if(allocated(tleaf_ave240_tmp)) tleaf_ave240_tmp(:,:,:) = 0.0_rk + if(allocated(ppfd_sun240_tmp)) ppfd_sun240_tmp(:,:,:) = 0.0_rk + if(allocated(ppfd_shade240_tmp)) ppfd_shade240_tmp(:,:,:) = 0.0_rk if(allocated(tleaf_sun24)) tleaf_sun24(:,:) = fillreal if(allocated(tleaf_shade24)) tleaf_shade24(:,:) = fillreal if(allocated(tleaf_ave24)) tleaf_ave24(:,:) = fillreal diff --git a/src/canopy_readnml.F90 b/src/canopy_readnml.F90 index cef10da7..7ce4ebbc 100644 --- a/src/canopy_readnml.F90 +++ b/src/canopy_readnml.F90 @@ -27,7 +27,8 @@ SUBROUTINE canopy_readnml ifcanwaf, ifcaneddy, ifcanphot, ifcanbio, pai_opt, pai_set, lu_opt, z0_opt, & dx_opt, dx_set, lai_thresh, cf_thresh, ch_thresh, rsl_opt, bio_cce, & biovert_opt, ssg_opt, ssg_set, crop_opt, crop_set, co2_opt, co2_set, & - leafage_opt, lai_tstep, soim_opt, soild1, soild2, soild3, soild4, hist_opt + leafage_opt, lai_tstep, soim_opt, soild1, soild2, soild3, soild4, hist_opt, & + loss_opt, loss_set, loss_ind, lifetime !------------------------------------------------------------------------------- @@ -288,6 +289,25 @@ SUBROUTINE canopy_readnml !------------------------------------------------------------------------------- !------------------------------------------------------------------------------- +! Set default integer for turning on canopy loss ratios calculation or constant value for +! adjusting top of canopy net emissions (default = 0; Off) + loss_opt = 0 +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! Set default real value for constant loss factor (used only when loss_opt=2) + loss_set = 0.96_rk +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! Set default value for above-canopy BVOC lifetime (s) used only with loss_opt=1 (Default = 3600 s) + lifetime = 3600.0_rk +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! Set default integer for applying loss factor to all species (default = 0) or specific biogenic indices only (> 0 ) + loss_ind = 0 + ! Set default integer for using historically averaged leaf temp and PAR for biogenic emissions (default=0; Off) hist_opt = 0 !------------------------------------------------------------------------------- diff --git a/src/canopy_utils_mod.F90 b/src/canopy_utils_mod.F90 index 0db711d6..b459712d 100644 --- a/src/canopy_utils_mod.F90 +++ b/src/canopy_utils_mod.F90 @@ -7,7 +7,7 @@ module canopy_utils_mod private public IntegrateTrapezoid,interp_linear1_internal,CalcPAI, & CalcDX,CalcFlameH,GET_GAMMA_CO2,GET_GAMMA_LEAFAGE, & - GET_GAMMA_SOIM + GET_GAMMA_SOIM,GET_CANLOSS_BIO contains @@ -716,6 +716,52 @@ function GET_GAMMA_LEAFAGE(leafage_opt,LAIpast,LAIcurrent,tsteplai,TABOVE,Anew,A end function GET_GAMMA_LEAFAGE + function GET_CANLOSS_BIO(loss_opt,lifetime,ustar,ch) result( CANLOSS_BIO ) + ! ROUTINE: CANLOSS_BIO + ! + ! !DESCRIPTION: Function to calculate BVOC canopy loss ratio due to approximate chemistry and dep loss + ! Useful for comparing individual BVOC primary emissions to above canopy flux measurements + ! + ! Based on Guenther et al. (2006) www.atmos-chem-phys.net/6/3181/2006/ + ! Note: Formulation and emprical parameters based on isoprene oxidation chemistry Only -- Exercise caution applying to other BVOCs + ! + ! Revision: Feb 2024 Patrick C. Campbell GMU/NOAA-ARL + !---------------------------------------------------------------- + ! + ! LOSS RATIO = 1 - D/(lambda*ustar*tau+D) + ! where D = Canopy Depth (Assumed 1/3 the canopy height) (m) + ! lambda = 0.3 (Assumed and usually PFT dependent) + ! ustar = above canopy friction velocity (m/s) + ! tau = above canopy chemical lifetime (default = 3600 s, isoprene) (s) + !------------------------------------------------------------------------------ + ! !INTERFACE: + + ! !INPUT PARAMETERS: + INTEGER, INTENT(IN) :: loss_opt ! Option for canopy loss function + ! 0 = Calculation Off; CANLOSS_BIO = 1 + ! 1 = Calculation On i.e. CANLOSS_BIO < 1 + + REAl(rk), INTENT(IN) :: lifetime ! Above canopy BVOC chemical lifetime [s] + REAL(rk), INTENT(IN) :: ustar ! Above canopy friction velocity [m/s] + REAL(rk), INTENT(IN) :: ch ! Canopy Height [m] + ! + ! !RETURN VALUE: + REAL(rk) :: CANLOSS_BIO ! Canopy loss factor [unitless] + ! + ! !LOCAL VARIABLES: + REAL(rk) :: lambda = 0.3_rk ! Assumed value for empirical parameter (Guenther et al., 2006) + + IF (loss_opt .eq. 0) THEN ! Off + CANLOSS_BIO = 1.0_rk + ELSE IF (loss_opt .eq. 1) THEN + CANLOSS_BIO = 1.0_rk - ((ch*0.3333_rk)/(lambda*ustar*lifetime+(ch*0.3333_rk))) + ELSE + write(*,*) 'Wrong LOSS_OPT choice of ', loss_opt, 'in namelist...exiting' + call exit(2) + END IF + + end function GET_CANLOSS_BIO + function GET_GAMMA_SOIM(soim_opt,soim1,soim2,soim3,soim4, & soid1,soid2,soid3,soid4,wilt,roota,rootb) result( GAMMA_SOIM ) ! ROUTINE: GET_GAMMA_SOIM