From e2b7700657cda3d8b087ba67cf2d22471d8f85f2 Mon Sep 17 00:00:00 2001 From: Gautam Bisht Date: Tue, 16 Jan 2024 11:31:46 -0800 Subject: [PATCH] Revert "Revert "Merge branch 'peterdschwartz/lnd/remove-initializations' into next (PR #6058)"" This reverts commit dccaffe35de7237387b207be1507f9b7ce916493. --- .../elm/src/biogeochem/AllocationMod.F90 | 2 +- components/elm/src/biogeochem/FireMod.F90 | 3 + .../elm/src/biogeochem/GapMortalityMod.F90 | 9 + .../elm/src/biogeochem/SoilLittDecompMod.F90 | 30 +- .../elm/src/data_types/ColumnDataType.F90 | 413 +++++++----------- .../elm/src/data_types/VegetationDataType.F90 | 329 +++----------- 6 files changed, 263 insertions(+), 523 deletions(-) diff --git a/components/elm/src/biogeochem/AllocationMod.F90 b/components/elm/src/biogeochem/AllocationMod.F90 index 20815fee2189..2795fd42c8ed 100644 --- a/components/elm/src/biogeochem/AllocationMod.F90 +++ b/components/elm/src/biogeochem/AllocationMod.F90 @@ -1387,7 +1387,7 @@ subroutine Allocation2_ResolveNPLimit (bounds, num_soilc, filter_soilc , & ! deficit for NO3 to meet allocation needs, is only added to the NH4 pool. ! Thus, the NH4 fluxes are increased, for itself and as a surrogate to meet the ! NO3 flux demands. - + supplement_to_sminn_vr(c,j) = 0._r8 if (carbon_only .or. carbonphosphorus_only) then if ( fpi_no3_vr(j) + fpi_nh4_vr(j) < 1._r8 ) then diff --git a/components/elm/src/biogeochem/FireMod.F90 b/components/elm/src/biogeochem/FireMod.F90 index cc9aa078215c..0dec0c08a50b 100644 --- a/components/elm/src/biogeochem/FireMod.F90 +++ b/components/elm/src/biogeochem/FireMod.F90 @@ -1368,6 +1368,7 @@ subroutine FireFluxes (num_soilc, filter_soilc, num_soilp, filter_soilp, & do j = 1, nlevdecomp ! carbon fluxes do l = 1, ndecomp_pools + m_decomp_cpools_to_fire_vr(c,j,l) = 0._r8 if ( is_litter(l) ) then m_decomp_cpools_to_fire_vr(c,j,l) = decomp_cpools_vr(c,j,l) * f * 0.5_r8 end if @@ -1386,6 +1387,7 @@ subroutine FireFluxes (num_soilc, filter_soilc, num_soilp, filter_soilp, & ! nitrogen fluxes do l = 1, ndecomp_pools + m_decomp_npools_to_fire_vr(c,j,l) = 0.0_r8 if ( is_litter(l) ) then m_decomp_npools_to_fire_vr(c,j,l) = decomp_npools_vr(c,j,l) * f * 0.5_r8 end if @@ -1403,6 +1405,7 @@ subroutine FireFluxes (num_soilc, filter_soilc, num_soilp, filter_soilp, & ! phosphorus fluxes - loss due to fire do l = 1, ndecomp_pools + m_decomp_ppools_to_fire_vr(c,j,l) = 0._r8 if ( is_litter(l) ) then m_decomp_ppools_to_fire_vr(c,j,l) = decomp_ppools_vr(c,j,l) * f * 0.5_r8 end if diff --git a/components/elm/src/biogeochem/GapMortalityMod.F90 b/components/elm/src/biogeochem/GapMortalityMod.F90 index 59d44b9b8294..495c46ed0dfc 100644 --- a/components/elm/src/biogeochem/GapMortalityMod.F90 +++ b/components/elm/src/biogeochem/GapMortalityMod.F90 @@ -141,6 +141,8 @@ subroutine GapMortality (num_soilc, filter_soilc, num_soilp, filter_soilp, & !------------------------------------------------------ ! displayed pools + veg_cf%m_leafc_to_litter(p) = 0._r8 + veg_cf%m_livestemc_to_litter(p) = 0._r8 if(ivt(p) < npcropmin .or. (ivt(p) >= npcropmin .and. croplive(p))) then veg_cf%m_leafc_to_litter(p) = veg_cs%leafc(p) * m veg_cf%m_livestemc_to_litter(p) = veg_cs%livestemc(p) * m @@ -178,6 +180,8 @@ subroutine GapMortality (num_soilc, filter_soilc, num_soilp, filter_soilp, & !------------------------------------------------------ ! displayed pools + veg_nf%m_leafn_to_litter(p) = 0._r8 + veg_nf%m_livestemn_to_litter(p) = 0._r8 if(ivt(p) < npcropmin .or. (ivt(p) >= npcropmin .and. croplive(p))) then veg_nf%m_leafn_to_litter(p) = veg_ns%leafn(p) * m veg_nf%m_livestemn_to_litter(p) = veg_ns%livestemn(p) * m @@ -186,6 +190,7 @@ subroutine GapMortality (num_soilc, filter_soilc, num_soilp, filter_soilp, & veg_nf%m_deadstemn_to_litter(p) = veg_ns%deadstemn(p) * m veg_nf%m_livecrootn_to_litter(p) = veg_ns%livecrootn(p) * m veg_nf%m_deadcrootn_to_litter(p) = veg_ns%deadcrootn(p) * m + veg_nf%m_retransn_to_litter(p) = 0._r8 if (ivt(p) < npcropmin) then veg_nf%m_retransn_to_litter(p) = veg_ns%retransn(p) * m end if @@ -219,6 +224,8 @@ subroutine GapMortality (num_soilc, filter_soilc, num_soilp, filter_soilp, & !------------------------------------------------------ ! displayed pools + veg_pf%m_leafp_to_litter(p) = 0._r8 + veg_pf%m_livestemp_to_litter(p) = 0._r8 if(ivt(p) < npcropmin .or. (ivt(p) >= npcropmin .and. croplive(p))) then veg_pf%m_leafp_to_litter(p) = veg_ps%leafp(p) * m veg_pf%m_livestemp_to_litter(p) = veg_ps%livestemp(p) * m @@ -227,6 +234,8 @@ subroutine GapMortality (num_soilc, filter_soilc, num_soilp, filter_soilp, & veg_pf%m_deadstemp_to_litter(p) = veg_ps%deadstemp(p) * m veg_pf%m_livecrootp_to_litter(p) = veg_ps%livecrootp(p) * m veg_pf%m_deadcrootp_to_litter(p) = veg_ps%deadcrootp(p) * m + + veg_pf%m_retransp_to_litter(p) = 0._r8 if (ivt(p) < npcropmin) then veg_pf%m_retransp_to_litter(p) = veg_ps%retransp(p) * m end if diff --git a/components/elm/src/biogeochem/SoilLittDecompMod.F90 b/components/elm/src/biogeochem/SoilLittDecompMod.F90 index 0586868c8222..d69ecd538678 100644 --- a/components/elm/src/biogeochem/SoilLittDecompMod.F90 +++ b/components/elm/src/biogeochem/SoilLittDecompMod.F90 @@ -308,7 +308,9 @@ subroutine SoilLittDecompAlloc (bounds, num_soilc, filter_soilc, & / cp_decomp_pools_new(c,j,cascade_receiver_pool(k)) ) else ! 100% respiration - pmpf_decomp_cascade(c,j,k) = - p_decomp_cpool_loss(c,j,k) / cp_decomp_pools(c,j,cascade_donor_pool(k)) + if(decomp_ppools_vr(c,j,cascade_donor_pool(k)) > 0._r8) then + pmpf_decomp_cascade(c,j,k) = - p_decomp_cpool_loss(c,j,k) / cp_decomp_pools(c,j,cascade_donor_pool(k)) + end if endif else ! CWD -> litter @@ -414,7 +416,12 @@ subroutine SoilLittDecompAlloc (bounds, num_soilc, filter_soilc, & do j = 1,nlevdecomp do fc = 1,num_soilc c = filter_soilc(fc) - + decomp_cascade_hr_vr(c,j,k) = 0._r8 + decomp_cascade_ctransfer_vr(c,j,k) = 0._r8 + decomp_cascade_ptransfer_vr(c,j,k) = 0._r8 + decomp_cascade_ntransfer_vr(c,j,k) = 0._r8 + decomp_cascade_sminn_flux_vr(c,j,k) = 0._r8 + decomp_cascade_sminp_flux_vr(c,j,k) = 0._r8 if (decomp_cpools_vr(c,j,cascade_donor_pool(k)) > 0._r8) then if ( pmnf_decomp_cascade(c,j,k) > 0._r8 .and. pmpf_decomp_cascade(c,j,k) > 0._r8 ) then ! N and P co-limitation p_decomp_cpool_loss(c,j,k) = p_decomp_cpool_loss(c,j,k) * min( fpi_vr(c,j),fpi_p_vr(c,j) ) @@ -553,18 +560,6 @@ subroutine SoilLittDecompAlloc (bounds, num_soilc, filter_soilc, & end do end if - ! vertically integrate net and gross mineralization fluxes for diagnostic output - ! moved to SoilLittDecompAlloc2 -! do j = 1,nlevdecomp -! do fc = 1,num_soilc -! c = filter_soilc(fc) -! net_nmin(c) = net_nmin(c) + net_nmin_vr(c,j) * dzsoi_decomp(j) -! gross_nmin(c) = gross_nmin(c) + gross_nmin_vr(c,j) * dzsoi_decomp(j) -! net_pmin(c) = net_pmin(c) + net_pmin_vr(c,j) * dzsoi_decomp(j) -! gross_pmin(c) = gross_pmin(c) + gross_pmin_vr(c,j) * dzsoi_decomp(j) -! end do -! end do - end associate end subroutine SoilLittDecompAlloc @@ -821,7 +816,6 @@ subroutine CNvariables_nan4pf (bounds, num_soilc, filter_soilc, num_soilp, filte ! if not properly set. ! !USES: - !$acc routine seq use elm_varctl , only: carbon_only, carbonnitrogen_only use elm_varpar , only: nlevdecomp, ndecomp_cascade_transitions ! @@ -863,13 +857,11 @@ subroutine CNvariables_nan4pf (bounds, num_soilc, filter_soilc, num_soilp, filte call veg_ps%SetValues(num_patch=num_soilp, filter_patch=filter_soilp, value_patch=0._r8) call col_ps%SetValues(num_column=num_soilc, filter_column=filter_soilc, value_column=0._r8) - call veg_pf%setvalues( num_patch=num_soilp, filter_patch=filter_soilp, value_patch=0._r8) - call col_pf%setvalues( num_column=num_soilc, filter_column=filter_soilc, value_column=0._r8) + call veg_pf%SetValues( num_patch=num_soilp, filter_patch=filter_soilp, value_patch=0._r8) + call col_pf%SetValues( num_column=num_soilc, filter_column=filter_soilc, value_column=0._r8) end if end associate end subroutine CNvariables_nan4pf - !------------------------------------------------------------------------------------------------- - end module SoilLittDecompMod diff --git a/components/elm/src/data_types/ColumnDataType.F90 b/components/elm/src/data_types/ColumnDataType.F90 index 9f27e0abb63e..5e76c3f0ca90 100644 --- a/components/elm/src/data_types/ColumnDataType.F90 +++ b/components/elm/src/data_types/ColumnDataType.F90 @@ -21,7 +21,7 @@ module ColumnDataType use elm_varcon , only : watmin, bdsno, zsoi, zisoi, dzsoi_decomp use elm_varcon , only : c13ratio, c14ratio, secspday use elm_varctl , only : use_fates, use_fates_planthydro, create_glacier_mec_landunit - use elm_varctl , only : use_hydrstress + use elm_varctl , only : use_hydrstress, use_crop use elm_varctl , only : bound_h2osoi, use_cn, iulog, use_vertsoilc, spinup_state use elm_varctl , only : ero_ccycle use elm_varctl , only : use_elm_interface, use_pflotran, pf_cmode @@ -33,7 +33,7 @@ module ColumnDataType use pftvarcon , only : VMAX_MINSURF_P_vr, KM_MINSURF_P_vr, pinit_beta1, pinit_beta2 use soilorder_varcon, only : smax, ks_sorption use elm_time_manager, only : is_restart, get_nstep - use elm_time_manager, only : is_first_step, get_step_size + use elm_time_manager, only : is_first_step, get_step_size, is_first_restart_step use landunit_varcon , only : istice, istwet, istsoil, istdlak, istcrop, istice_mec use column_varcon , only : icol_road_perv, icol_road_imperv, icol_roof, icol_sunwall, icol_shadewall use histFileMod , only : hist_addfld1d, hist_addfld2d, no_snow_normal @@ -47,6 +47,7 @@ module ColumnDataType use CNDecompCascadeConType , only : decomp_cascade_con use ColumnType , only : col_pp use LandunitType , only : lun_pp + use timeInfoMod , only : nstep_mod ! ! !PUBLIC TYPES: implicit none @@ -7232,15 +7233,13 @@ subroutine col_cf_summary(this, bounds, num_soilc, filter_soilc, isotope) do j = 1,nlev do fc = 1,num_soilc c = filter_soilc(fc) - - this%decomp_cascade_ctransfer(c,k) = & + this%decomp_cascade_ctransfer(c,k) = & this%decomp_cascade_ctransfer(c,k) + & this%decomp_cascade_ctransfer_vr(c,j,k) * dzsoi_decomp(j) end do end do end do - ! total heterotrophic respiration (HR) do fc = 1,num_soilc c = filter_soilc(fc) @@ -7249,7 +7248,6 @@ subroutine col_cf_summary(this, bounds, num_soilc, filter_soilc, isotope) this%somhr(c) end do - elseif (is_active_betr_bgc) then do fc = 1, num_soilc @@ -7668,7 +7666,7 @@ subroutine col_cf_setvalues ( this, num_column, filter_column, value_column) ! Set column-level carbon fluxes ! ! !ARGUMENTS: - class (column_carbon_flux) :: this + class(column_carbon_flux) :: this integer , intent(in) :: num_column integer , intent(in) :: filter_column(:) real(r8), intent(in) :: value_column @@ -7676,7 +7674,6 @@ subroutine col_cf_setvalues ( this, num_column, filter_column, value_column) ! !LOCAL VARIABLES: integer :: fi,i,j,k,l ! loop index !------------------------------------------------------------------------ - do j = 1, nlevdecomp_full do fi = 1,num_column i = filter_column(fi) @@ -7703,49 +7700,51 @@ subroutine col_cf_setvalues ( this, num_column, filter_column, value_column) this%hr_vr(i,j) = value_column end do end do - - do k = 1, ndecomp_pools - do j = 1, nlevdecomp_full - do fi = 1,num_column - i = filter_column(fi) - this%m_decomp_cpools_to_fire_vr(i,j,k) = value_column - this%decomp_cpools_transport_tendency(i,j,k) = value_column - this%decomp_cpools_yield_vr(i,j,k) = value_column - end do - end do - end do - do l = 1, ndecomp_cascade_transitions do fi = 1,num_column i = filter_column(fi) - this%decomp_cascade_hr(i,l) = value_column this%decomp_cascade_ctransfer(i,l) = value_column end do end do - - do l = 1, ndecomp_cascade_transitions + do j = 1, nlevdecomp_full + do fi = 1,num_column + i = filter_column(fi) + this%f_co2_soil_vr(i,j) = value_column + end do + end do + + do k = 1, ndecomp_pools do j = 1, nlevdecomp_full do fi = 1,num_column i = filter_column(fi) - this%decomp_cascade_hr_vr(i,j,l) = value_column - this%decomp_cascade_ctransfer_vr(i,j,l) = value_column - this%decomp_k(i,j,l) = value_column + this%decomp_cpools_sourcesink(i,j,k) = value_column end do end do end do + ! pflotran + if(nstep_mod == 0 .or. is_first_restart_step()) then + do k = 1, ndecomp_pools + do j = 1, nlevdecomp_full + do fi = 1,num_column + i = filter_column(fi) + this%externalc_to_decomp_cpools(i,j,k) = value_column + end do + end do + end do + do fi = 1,num_column + i = filter_column(fi) + this%f_co2_soil(i) = value_column + this%externalc_to_decomp_delta(i) = value_column + end do + end if do k = 1, ndecomp_pools do fi = 1,num_column i = filter_column(fi) - this%decomp_cpools_leached(i,k) = value_column - this%decomp_cpools_erode(i,k) = value_column - this%decomp_cpools_deposit(i,k) = value_column - this%decomp_cpools_yield(i,k) = value_column + this%decomp_cpools_yield(i,k) = value_column !if ero_ccycle this%m_decomp_cpools_to_fire(i,k) = value_column - this%bgc_cpool_ext_inputs_vr(i,:, k) = value_column - this%bgc_cpool_ext_loss_vr(i,:, k) = value_column end do - end do + end do do fi = 1,num_column i = filter_column(fi) @@ -7753,32 +7752,16 @@ subroutine col_cf_setvalues ( this, num_column, filter_column, value_column) this%hrv_deadstemc_to_prod10c(i) = value_column this%hrv_deadstemc_to_prod100c(i) = value_column this%hrv_cropc_to_prod1c(i) = value_column - this%somc_fire(i) = value_column this%prod1c_loss(i) = value_column this%prod10c_loss(i) = value_column this%prod100c_loss(i) = value_column - this%product_closs(i) = value_column - this%somhr(i) = value_column - this%lithr(i) = value_column + this%somhr(i) = value_column ! REVISIT + this%lithr(i) = value_column ! REVISIT this%hr(i) = value_column - this%sr(i) = value_column - this%er(i) = value_column - this%litfire(i) = value_column - this%somfire(i) = value_column - this%totfire(i) = value_column - this%nep(i) = value_column - this%nbp(i) = value_column - this%nee(i) = value_column this%cinputs(i) = value_column this%coutputs(i) = value_column - this%fire_closs(i) = value_column this%cwdc_hr(i) = value_column - this%cwdc_loss(i) = value_column this%litterc_loss(i) = value_column - this%som_c_leached(i) = value_column - this%somc_erode(i) = value_column - this%somc_deposit(i) = value_column - this%somc_yield(i) = value_column ! Zero p2c column fluxes this%rr(i) = value_column @@ -7791,44 +7774,44 @@ subroutine col_cf_setvalues ( this, num_column, filter_column, value_column) this%wood_harvestc(i) = value_column this%hrv_xsmrpool_to_atm(i) = value_column end do - - do k = 1, ndecomp_pools - do j = 1, nlevdecomp_full - do fi = 1,num_column - i = filter_column(fi) - this%decomp_cpools_sourcesink(i,j,k) = value_column - end do - end do - end do - - ! pflotran - do k = 1, ndecomp_pools - do j = 1, nlevdecomp_full - do fi = 1,num_column - i = filter_column(fi) - ! only initializing in the first time-step - if ( this%externalc_to_decomp_cpools(i,j,k) == spval ) then - this%externalc_to_decomp_cpools(i,j,k) = value_column - end if - end do - end do - end do - - do fi = 1,num_column - i = filter_column(fi) - this%f_co2_soil(i) = value_column - ! only initializing in the first time-step - if ( this%externalc_to_decomp_delta(i) == spval ) then - this%externalc_to_decomp_delta(i) = value_column - end if - end do - - do j = 1, nlevdecomp_full - do fi = 1,num_column - i = filter_column(fi) - this%f_co2_soil_vr(i,j) = value_column - end do - end do + + if(use_crop) then + do fi = 1,num_column + i = filter_column(fi) + this%somc_fire(i) = value_column + this%product_closs(i) = value_column + this%sr(i) = value_column + this%er(i) = value_column + this%litfire(i) = value_column + this%somfire(i) = value_column + this%totfire(i) = value_column + this%nep(i) = value_column + this%nbp(i) = value_column + this%nee(i) = value_column + this%fire_closs(i) = value_column + this%cwdc_loss(i) = value_column + this%som_c_leached(i) = value_column + this%somc_erode(i) = value_column + this%somc_deposit(i) = value_column + this%somc_yield(i) = value_column + enddo + end if + do k = 1, ndecomp_pools + do fi = 1,num_column + i = filter_column(fi) + this%decomp_cpools_leached(i,k) = value_column + this%decomp_cpools_erode(i,k) = value_column + this%decomp_cpools_deposit(i,k) = value_column + end do + end do + do k = 1, ndecomp_pools + do j = 1, nlevdecomp_full + do fi = 1,num_column + i = filter_column(fi) + this%decomp_cpools_transport_tendency(i,j,k) = value_column + end do + end do + end do end subroutine col_cf_setvalues @@ -9297,7 +9280,7 @@ subroutine col_nf_setvalues ( this, num_column, filter_column, value_column) ! Set column-level nitrogen fluxes ! ! !ARGUMENTS: - class (column_nitrogen_flux) :: this + class(column_nitrogen_flux) :: this integer , intent(in) :: num_column integer , intent(in) :: filter_column(:) real(r8), intent(in) :: value_column @@ -9332,59 +9315,28 @@ subroutine col_nf_setvalues ( this, num_column, filter_column, value_column) this%harvest_n_to_litr_lig_n(i,j) = value_column this%harvest_n_to_cwdn(i,j) = value_column - this%f_nit_vr(i,j) = value_column - this%f_denit_vr(i,j) = value_column - this%smin_no3_leached_vr(i,j) = value_column - this%smin_no3_runoff_vr(i,j) = value_column - this%n2_n2o_ratio_denit_vr(i,j) = value_column - this%pot_f_nit_vr(i,j) = value_column - this%pot_f_denit_vr(i,j) = value_column - this%actual_immob_no3_vr(i,j) = value_column - this%actual_immob_nh4_vr(i,j) = value_column - this%smin_no3_to_plant_vr(i,j) = value_column - this%smin_nh4_to_plant_vr(i,j) = value_column - this%f_n2o_denit_vr(i,j) = value_column - this%f_n2o_nit_vr(i,j) = value_column - - this%smin_no3_massdens_vr(i,j) = value_column - this%k_nitr_t_vr(i,j) = value_column - this%k_nitr_ph_vr(i,j) = value_column - this%k_nitr_h2o_vr(i,j) = value_column - this%k_nitr_vr(i,j) = value_column - this%wfps_vr(i,j) = value_column - this%fmax_denit_carbonsubstrate_vr(i,j) = value_column - this%fmax_denit_nitrate_vr(i,j) = value_column - this%f_denit_base_vr(i,j) = value_column - - this%diffus(i,j) = value_column - this%ratio_k1(i,j) = value_column - this%ratio_no3_co2(i,j) = value_column - this%soil_co2_prod(i,j) = value_column - this%fr_WFPS(i,j) = value_column - this%soil_bulkdensity(i,j) = value_column - - this%r_psi(i,j) = value_column - this%anaerobic_frac(i,j) = value_column - - ! pflotran - this%plant_ndemand_vr(i,j) = value_column - this%f_ngas_decomp_vr(i,j) = value_column - this%f_ngas_nitri_vr(i,j) = value_column - this%f_ngas_denit_vr(i,j) = value_column - this%f_n2o_soil_vr(i,j) = value_column - this%f_n2_soil_vr(i,j) = value_column - - this%potential_immob_vr(i,j) = value_column - this%actual_immob_vr(i,j) = value_column - this%sminn_to_plant_vr(i,j) = value_column - this%supplement_to_sminn_vr(i,j) = value_column - this%gross_nmin_vr(i,j) = value_column this%net_nmin_vr(i,j) = value_column - this%sminn_nh4_input_vr(i,j) = value_column - this%sminn_no3_input_vr(i,j) = value_column + this%sminn_nh4_input_vr(i,j) = value_column !not used anywhere? + this%sminn_no3_input_vr(i,j) = value_column !not used anywhere? end do end do + if( use_pflotran .and. pf_cmode) then + + do j = 1, nlevdecomp_full + do fi = 1,num_column + i = filter_column(fi) + ! pflotran + this%plant_ndemand_vr(i,j) = value_column !use_elm_interface.and.use_pflotran .and. pf_cmode + this%f_ngas_decomp_vr(i,j) = value_column ! "" + this%f_ngas_nitri_vr(i,j) = value_column ! "" + this%f_ngas_denit_vr(i,j) = value_column + this%f_n2o_soil_vr(i,j) = value_column + this%f_n2_soil_vr(i,j) = value_column + end do + end do + end if + do fi = 1,num_column i = filter_column(fi) @@ -9393,6 +9345,13 @@ subroutine col_nf_setvalues ( this, num_column, filter_column, value_column) this%nfix_to_ecosysn(i) = value_column this%fert_to_sminn(i) = value_column this%soyfixn_to_sminn(i) = value_column + this%supplement_to_sminn(i) = value_column + this%denit(i) = value_column + this%smin_nh4_to_plant(i) = value_column + this%smin_no3_to_plant(i) = value_column + this%fire_nloss(i) = value_column + this%som_n_leached(i) = value_column + this%hrv_deadstemn_to_prod10n(i) = value_column this%hrv_deadstemn_to_prod100n(i) = value_column this%hrv_cropn_to_prod1n(i) = value_column @@ -9403,10 +9362,8 @@ subroutine col_nf_setvalues ( this, num_column, filter_column, value_column) this%potential_immob(i) = value_column this%actual_immob(i) = value_column this%sminn_to_plant(i) = value_column - this%supplement_to_sminn(i) = value_column this%gross_nmin(i) = value_column this%net_nmin(i) = value_column - this%denit(i) = value_column this%f_nit(i) = value_column this%pot_f_nit(i) = value_column @@ -9423,19 +9380,12 @@ subroutine col_nf_setvalues ( this, num_column, filter_column, value_column) this%f_n2o_soil(i) = value_column this%f_n2_soil(i) = value_column - this%smin_nh4_to_plant(i) = value_column - this%smin_no3_to_plant(i) = value_column this%ninputs(i) = value_column this%noutputs(i) = value_column - this%fire_nloss(i) = value_column - this%som_n_leached(i) = value_column this%sminn_input(i) = value_column this%sminn_nh4_input(i) = value_column this%sminn_no3_input(i) = value_column - this%somn_erode(i) = value_column - this%somn_deposit(i) = value_column - this%somn_yield(i) = value_column ! Zero p2c column fluxes this%fire_nloss(i) = value_column this%wood_harvestn(i) = value_column @@ -9474,31 +9424,18 @@ subroutine col_nf_setvalues ( this, num_column, filter_column, value_column) end if end do - do k = 1, ndecomp_pools do fi = 1,num_column i = filter_column(fi) - this%decomp_npools_leached(i,k) = value_column - this%decomp_npools_erode(i,k) = value_column - this%decomp_npools_deposit(i,k) = value_column - this%decomp_npools_yield(i,k) = value_column + this%decomp_npools_yield(i,k) = value_column !ero_ccyle this%m_decomp_npools_to_fire(i,k) = value_column - this%bgc_npool_ext_inputs_vr(i,:,k) = value_column - this%bgc_npool_ext_loss_vr(i,:,k) = value_column - this%bgc_npool_inputs(i,k) = value_column + !NOTE: when are these used? + !this%bgc_npool_ext_inputs_vr(i,:,k) = value_column + !this%bgc_npool_ext_loss_vr(i,:,k) = value_column + !this%bgc_npool_inputs(i,k) = value_column end do end do - do k = 1, ndecomp_pools - do j = 1, nlevdecomp_full - do fi = 1,num_column - i = filter_column(fi) - this%m_decomp_npools_to_fire_vr(i,j,k) = value_column - this%decomp_npools_transport_tendency(i,j,k) = value_column - this%decomp_npools_yield_vr(i,j,k) = value_column - end do - end do - end do do l = 1, ndecomp_cascade_transitions do fi = 1,num_column @@ -9508,16 +9445,6 @@ subroutine col_nf_setvalues ( this, num_column, filter_column, value_column) end do end do - do l = 1, ndecomp_cascade_transitions - do j = 1, nlevdecomp_full - do fi = 1,num_column - i = filter_column(fi) - this%decomp_cascade_ntransfer_vr(i,j,l) = value_column - this%decomp_cascade_sminn_flux_vr(i,j,l) = value_column - end do - end do - end do - do k = 1, ndecomp_pools do j = 1, nlevdecomp_full do fi = 1,num_column @@ -9529,39 +9456,51 @@ subroutine col_nf_setvalues ( this, num_column, filter_column, value_column) ! pflotran !------------------------------------------------------------------------ + if(nstep_mod == 0 .or. is_first_restart_step()) then + do k = 1, ndecomp_pools + do j = 1, nlevdecomp_full + do fi = 1,num_column + i = filter_column(fi) + this%m_decomp_npools_to_fire_vr(i,j,k) = value_column + ! only initializing in the first time-step + this%externaln_to_decomp_npools(i,j,k) = value_column + end do + end do + end do + do k = 1, ndecomp_pools do j = 1, nlevdecomp_full do fi = 1,num_column i = filter_column(fi) - ! only initializing in the first time-step - if ( this%externaln_to_decomp_npools(i,j,k) == spval ) then - this%externaln_to_decomp_npools(i,j,k) = value_column - end if + this%decomp_npools_transport_tendency(i,j,k) = value_column end do end do end do + do j = 1, nlevdecomp_full + do fi = 1,num_column + i = filter_column(fi) + ! only initializing in the first time-step + this%no3_net_transport_vr(i,j) = value_column + this%nh4_net_transport_vr(i,j) = value_column + end do + end do + + do fi = 1,num_column + i = filter_column(fi) + ! only initializing in the first time-step + this%externaln_to_decomp_delta(i) = value_column + end do + end if - do j = 1, nlevdecomp_full + if(use_crop) then + do j = 1, nlevdecomp_full do fi = 1,num_column - i = filter_column(fi) - ! only initializing in the first time-step - if ( this%no3_net_transport_vr(i,j) == spval ) then - this%no3_net_transport_vr(i,j) = value_column - end if - if ( this%nh4_net_transport_vr(i,j) == spval ) then - this%nh4_net_transport_vr(i,j) = value_column - end if + i = filter_column(fi) + this%f_nit_vr(i,j) = value_column + this%f_denit_vr(i,j) = value_column end do - end do - - do fi = 1,num_column - i = filter_column(fi) - ! only initializing in the first time-step - if ( this%externaln_to_decomp_delta(i) == spval ) then - this%externaln_to_decomp_delta(i) = value_column - end if - end do - + end do + end if end subroutine col_nf_setvalues !----------------------------------------------------------------------- @@ -9625,6 +9564,7 @@ subroutine col_nf_zero_forfates_veg(this, bounds, num_soilc, filter_soilc) end do + end subroutine col_nf_zero_forfates_veg !----------------------------------------------------------------------- @@ -9722,7 +9662,6 @@ subroutine col_nf_summary(this, bounds, num_soilc, filter_soilc) end do end if - ! vertically integrate column-level fire N losses do k = 1, ndecomp_pools do j = 1, nlev @@ -10894,7 +10833,6 @@ subroutine col_pf_setvalues ( this, num_column, filter_column, value_column) ! ! !DESCRIPTION: ! Set phosphorus flux variables - !$acc routine seq ! !ARGUMENTS: class (column_phosphorus_flux) :: this integer , intent(in) :: num_column @@ -10956,6 +10894,7 @@ subroutine col_pf_setvalues ( this, num_column, filter_column, value_column) this%plant_pdemand_vr(i,j) = value_column this%adsorb_to_labilep_vr(i,j) = value_column this%desorb_to_solutionp_vr(i,j) = value_column + end do end do @@ -11011,7 +10950,6 @@ subroutine col_pf_setvalues ( this, num_column, filter_column, value_column) ! bgc-interface this%plant_pdemand(i) = value_column - this%fire_ploss(i) = value_column this%wood_harvestp(i) = value_column this%adsorb_to_labilep(i) = value_column @@ -11030,17 +10968,6 @@ subroutine col_pf_setvalues ( this, num_column, filter_column, value_column) end do end do - do k = 1, ndecomp_pools - do j = 1, nlevdecomp_full - do fi = 1,num_column - i = filter_column(fi) - this%m_decomp_ppools_to_fire_vr(i,j,k) = value_column - this%decomp_ppools_transport_tendency(i,j,k) = value_column - this%decomp_ppools_yield_vr(i,j,k) = value_column - end do - end do - end do - do l = 1, ndecomp_cascade_transitions do fi = 1,num_column i = filter_column(fi) @@ -11049,16 +10976,6 @@ subroutine col_pf_setvalues ( this, num_column, filter_column, value_column) end do end do - do l = 1, ndecomp_cascade_transitions - do j = 1, nlevdecomp_full - do fi = 1,num_column - i = filter_column(fi) - this%decomp_cascade_ptransfer_vr(i,j,l) = value_column - this%decomp_cascade_sminp_flux_vr(i,j,l) = value_column - end do - end do - end do - do k = 1, ndecomp_pools do j = 1, nlevdecomp_full do fi = 1,num_column @@ -11068,40 +10985,42 @@ subroutine col_pf_setvalues ( this, num_column, filter_column, value_column) end do end do end do + + do k = 1, ndecomp_pools + do j = 1, nlevdecomp_full + do fi = 1,num_column + i = filter_column(fi) + this%m_decomp_ppools_to_fire_vr(i,j,k) = value_column + this%decomp_ppools_transport_tendency(i,j,k) = value_column + this%decomp_ppools_yield_vr(i,j,k) = value_column + end do + end do + end do ! pflotran - do k = 1, ndecomp_pools - do j = 1, nlevdecomp_full - do fi = 1,num_column - i = filter_column(fi) - ! only initializing in the first time-step - if ( this%externalp_to_decomp_ppools(i,j,k) == spval ) then - this%externalp_to_decomp_ppools(i,j,k) = value_column - end if - end do - end do - end do + if(nstep_mod == 0 .or. is_first_restart_step() ) then + do k = 1, ndecomp_pools + do j = 1, nlevdecomp_full + do fi = 1,num_column + i = filter_column(fi) + this%externalp_to_decomp_ppools(i,j,k) = value_column + end do + end do + end do do j = 1, nlevdecomp_full do fi = 1,num_column i = filter_column(fi) - ! only initializing in the first time-step - if ( this%sminp_net_transport_vr(i,j) == spval ) then - this%sminp_net_transport_vr(i,j) = value_column - end if + this%sminp_net_transport_vr(i,j) = value_column end do end do do fi = 1,num_column i = filter_column(fi) - ! only initializing in the first time-step - if ( this%externalp_to_decomp_delta(i) == spval ) then - this%externalp_to_decomp_delta(i) = value_column - end if - if ( this%sminp_net_transport_delta(i) == spval ) then - this%sminp_net_transport_delta(i) = value_column - end if - end do + this%externalp_to_decomp_delta(i) = value_column + this%sminp_net_transport_delta(i) = value_column + end do + end if end subroutine col_pf_setvalues @@ -11282,6 +11201,7 @@ subroutine col_pf_summary(this, bounds, num_soilc, filter_soilc) end if ! vertically integrate column-level fire P losses + if(.not. use_fates) then do k = 1, ndecomp_pools do j = 1, nlevdecomp do fc = 1,num_soilc @@ -11292,6 +11212,7 @@ subroutine col_pf_summary(this, bounds, num_soilc, filter_soilc) end do end do end do + end if ! vertically integrate column-level P erosion flux if (ero_ccycle) then diff --git a/components/elm/src/data_types/VegetationDataType.F90 b/components/elm/src/data_types/VegetationDataType.F90 index 9202c05ee4c2..7a3164a75b07 100644 --- a/components/elm/src/data_types/VegetationDataType.F90 +++ b/components/elm/src/data_types/VegetationDataType.F90 @@ -11,7 +11,7 @@ module VegetationDataType use shr_log_mod , only : errMsg => shr_log_errMsg use spmdMod , only : masterproc use abortutils , only : endrun - use elm_time_manager, only : is_restart, get_nstep + use elm_time_manager, only : is_restart, get_nstep, is_first_restart_step use elm_varpar , only : nlevsno, nlevgrnd, nlevlak, nlevurb, nlevcan, crop_prog use elm_varpar , only : nlevdecomp, nlevdecomp_full use elm_varcon , only : spval, ispval, sb @@ -36,6 +36,8 @@ module VegetationDataType use ColumnDataType , only : column_carbon_state, column_carbon_flux use ColumnDataType , only : column_nitrogen_state, column_nitrogen_flux use ColumnDataType , only : column_phosphorus_state, column_phosphorus_flux + use timeInfoMod , only : nstep_mod + use dynSubgridControlMod, only : get_do_harvest ! ! !PUBLIC TYPES: implicit none @@ -3591,7 +3593,7 @@ subroutine veg_cs_summary(this, bounds, num_soilc, filter_soilc, num_soilp, filt this%totvegc(p) + & this%xsmrpool(p) + & this%ctrunc(p) - + ! (WOODC) - wood C this%woodc(p) = & this%deadstemc(p) + & @@ -8291,28 +8293,30 @@ subroutine veg_cf_summary(this, bounds, num_soilp, filter_soilp, num_soilc, filt this%m_deadcrootc_storage_to_litter_fire(p) + & this%m_deadcrootc_xfer_to_litter_fire(p) + & this%m_gresp_storage_to_litter_fire(p) + & - this%m_gresp_xfer_to_litter_fire(p) + & - this%hrv_leafc_to_litter(p) + & - this%hrv_leafc_storage_to_litter(p) + & - this%hrv_leafc_xfer_to_litter(p) + & - this%hrv_frootc_to_litter(p) + & - this%hrv_frootc_storage_to_litter(p) + & - this%hrv_frootc_xfer_to_litter(p) + & - this%hrv_livestemc_to_litter(p) + & - this%hrv_livestemc_storage_to_litter(p) + & - this%hrv_livestemc_xfer_to_litter(p) + & - this%hrv_deadstemc_storage_to_litter(p) + & - this%hrv_deadstemc_xfer_to_litter(p) + & - this%hrv_livecrootc_to_litter(p) + & - this%hrv_livecrootc_storage_to_litter(p) + & - this%hrv_livecrootc_xfer_to_litter(p) + & - this%hrv_deadcrootc_to_litter(p) + & - this%hrv_deadcrootc_storage_to_litter(p) + & - this%hrv_deadcrootc_xfer_to_litter(p) + & - this%hrv_gresp_storage_to_litter(p) + & - this%hrv_gresp_xfer_to_litter(p) + & - this%hrv_cpool_to_litter(p) - + this%m_gresp_xfer_to_litter_fire(p) + + this%litfall(p) = this%litfall(p) + & + this%hrv_leafc_to_litter(p) + & + this%hrv_leafc_storage_to_litter(p) + & + this%hrv_leafc_xfer_to_litter(p) + & + this%hrv_frootc_to_litter(p) + & + this%hrv_frootc_storage_to_litter(p) + & + this%hrv_frootc_xfer_to_litter(p) + & + this%hrv_livestemc_to_litter(p) + & + this%hrv_livestemc_storage_to_litter(p) + & + this%hrv_livestemc_xfer_to_litter(p) + & + this%hrv_deadstemc_storage_to_litter(p) + & + this%hrv_deadstemc_xfer_to_litter(p) + & + this%hrv_livecrootc_to_litter(p) + & + this%hrv_livecrootc_storage_to_litter(p) + & + this%hrv_livecrootc_xfer_to_litter(p) + & + this%hrv_deadcrootc_to_litter(p) + & + this%hrv_deadcrootc_storage_to_litter(p) + & + this%hrv_deadcrootc_xfer_to_litter(p) + & + this%hrv_gresp_storage_to_litter(p) + & + this%hrv_gresp_xfer_to_litter(p) + & + this%hrv_cpool_to_litter(p) + ! patch-level fire losses (VEGFIRE) this%vegfire(p) = 0._r8 @@ -8320,6 +8324,7 @@ subroutine veg_cf_summary(this, bounds, num_soilp, filter_soilp, num_soilc, filt this%wood_harvestc(p) = & this%hrv_deadstemc_to_prod10c(p) + & this%hrv_deadstemc_to_prod100c(p) + if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then this%wood_harvestc(p) = & this%wood_harvestc(p) + & @@ -8369,9 +8374,11 @@ subroutine veg_cf_summary(this, bounds, num_soilp, filter_soilp, num_soilc, filt this%m_frootc_to_litter(p) + & this%m_frootc_to_fire(p) + & this%m_frootc_to_litter_fire(p) + & - this%hrv_frootc_to_litter(p) + & this%frootc_to_litter(p) - + ! if(use_crop) then + this%frootc_loss(p) = this%frootc_loss(p) + & + this%hrv_frootc_to_litter(p) + ! endif ! (LEAFC_ALLOC) - leaf C allocation this%leafc_alloc(p) = & this%leafc_xfer_to_leafc(p) + & @@ -8382,8 +8389,10 @@ subroutine veg_cf_summary(this, bounds, num_soilp, filter_soilp, num_soilc, filt this%m_leafc_to_litter(p) + & this%m_leafc_to_fire(p) + & this%m_leafc_to_litter_fire(p) + & - this%hrv_leafc_to_litter(p) + & this%leafc_to_litter(p) + + this%leafc_loss(p) = this%leafc_loss(p) + & + this%hrv_leafc_to_litter(p) if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then this%leafc_loss(p) = & @@ -8412,7 +8421,9 @@ subroutine veg_cf_summary(this, bounds, num_soilp, filter_soilp, num_soilc, filt this%m_livestemc_to_fire(p) + & this%m_deadstemc_to_fire(p) + & this%m_livecrootc_to_fire(p) + & - this%m_deadcrootc_to_fire(p) + & + this%m_deadcrootc_to_fire(p) + + this%woodc_loss(p) = this%woodc_loss(p) + & this%hrv_livestemc_to_litter(p) + & this%hrv_livestemc_storage_to_litter(p) + & this%hrv_livestemc_xfer_to_litter(p) + & @@ -8601,101 +8612,6 @@ subroutine veg_cf_setvalues ( this, num_patch, filter_patch, value_patch) do fi = 1,num_patch i = filter_patch(fi) - this%m_leafc_to_litter(i) = value_patch - this%m_frootc_to_litter(i) = value_patch - this%m_leafc_storage_to_litter(i) = value_patch - this%m_frootc_storage_to_litter(i) = value_patch - this%m_livestemc_storage_to_litter(i) = value_patch - this%m_deadstemc_storage_to_litter(i) = value_patch - this%m_livecrootc_storage_to_litter(i) = value_patch - this%m_deadcrootc_storage_to_litter(i) = value_patch - this%m_leafc_xfer_to_litter(i) = value_patch - this%m_frootc_xfer_to_litter(i) = value_patch - this%m_livestemc_xfer_to_litter(i) = value_patch - this%m_deadstemc_xfer_to_litter(i) = value_patch - this%m_livecrootc_xfer_to_litter(i) = value_patch - this%m_deadcrootc_xfer_to_litter(i) = value_patch - this%m_livestemc_to_litter(i) = value_patch - this%m_deadstemc_to_litter(i) = value_patch - this%m_livecrootc_to_litter(i) = value_patch - this%m_deadcrootc_to_litter(i) = value_patch - this%m_gresp_storage_to_litter(i) = value_patch - this%m_gresp_xfer_to_litter(i) = value_patch - this%m_cpool_to_litter(i) = value_patch - this%hrv_leafc_to_litter(i) = value_patch - this%hrv_leafc_storage_to_litter(i) = value_patch - this%hrv_leafc_xfer_to_litter(i) = value_patch - this%hrv_frootc_to_litter(i) = value_patch - this%hrv_frootc_storage_to_litter(i) = value_patch - this%hrv_frootc_xfer_to_litter(i) = value_patch - this%hrv_livestemc_to_litter(i) = value_patch - this%hrv_livestemc_storage_to_litter(i) = value_patch - this%hrv_livestemc_xfer_to_litter(i) = value_patch - this%hrv_deadstemc_to_prod10c(i) = value_patch - this%hrv_deadstemc_to_prod100c(i) = value_patch - this%hrv_leafc_to_prod1c(i) = value_patch - this%hrv_livestemc_to_prod1c(i) = value_patch - this%hrv_grainc_to_prod1c(i) = value_patch - this%hrv_cropc_to_prod1c(i) = value_patch - this%hrv_deadstemc_storage_to_litter(i) = value_patch - this%hrv_deadstemc_xfer_to_litter(i) = value_patch - this%hrv_livecrootc_to_litter(i) = value_patch - this%hrv_livecrootc_storage_to_litter(i) = value_patch - this%hrv_livecrootc_xfer_to_litter(i) = value_patch - this%hrv_deadcrootc_to_litter(i) = value_patch - this%hrv_deadcrootc_storage_to_litter(i) = value_patch - this%hrv_deadcrootc_xfer_to_litter(i) = value_patch - this%hrv_gresp_storage_to_litter(i) = value_patch - this%hrv_gresp_xfer_to_litter(i) = value_patch - this%hrv_xsmrpool_to_atm(i) = value_patch - this%hrv_cpool_to_litter(i) = value_patch - - this%m_leafc_to_fire(i) = value_patch - this%m_leafc_storage_to_fire(i) = value_patch - this%m_leafc_xfer_to_fire(i) = value_patch - this%m_livestemc_to_fire(i) = value_patch - this%m_livestemc_storage_to_fire(i) = value_patch - this%m_livestemc_xfer_to_fire(i) = value_patch - this%m_deadstemc_to_fire(i) = value_patch - this%m_deadstemc_storage_to_fire(i) = value_patch - this%m_deadstemc_xfer_to_fire(i) = value_patch - this%m_frootc_to_fire(i) = value_patch - this%m_frootc_storage_to_fire(i) = value_patch - this%m_frootc_xfer_to_fire(i) = value_patch - this%m_livecrootc_to_fire(i) = value_patch - this%m_livecrootc_storage_to_fire(i) = value_patch - this%m_livecrootc_xfer_to_fire(i) = value_patch - this%m_deadcrootc_to_fire(i) = value_patch - this%m_deadcrootc_storage_to_fire(i) = value_patch - this%m_deadcrootc_xfer_to_fire(i) = value_patch - this%m_gresp_storage_to_fire(i) = value_patch - this%m_gresp_xfer_to_fire(i) = value_patch - this%m_cpool_to_fire(i) = value_patch - - this%m_leafc_to_litter_fire(i) = value_patch - this%m_leafc_storage_to_litter_fire(i) = value_patch - this%m_leafc_xfer_to_litter_fire(i) = value_patch - this%m_livestemc_to_litter_fire(i) = value_patch - this%m_livestemc_storage_to_litter_fire(i) = value_patch - this%m_livestemc_xfer_to_litter_fire(i) = value_patch - this%m_livestemc_to_deadstemc_fire(i) = value_patch - this%m_deadstemc_to_litter_fire(i) = value_patch - this%m_deadstemc_storage_to_litter_fire(i) = value_patch - this%m_deadstemc_xfer_to_litter_fire(i) = value_patch - this%m_frootc_to_litter_fire(i) = value_patch - this%m_frootc_storage_to_litter_fire(i) = value_patch - this%m_frootc_xfer_to_litter_fire(i) = value_patch - this%m_livecrootc_to_litter_fire(i) = value_patch - this%m_livecrootc_storage_to_litter_fire(i) = value_patch - this%m_livecrootc_xfer_to_litter_fire(i) = value_patch - this%m_livecrootc_to_deadcrootc_fire(i) = value_patch - this%m_deadcrootc_to_litter_fire(i) = value_patch - this%m_deadcrootc_storage_to_litter_fire(i) = value_patch - this%m_deadcrootc_xfer_to_litter_fire(i) = value_patch - this%m_gresp_storage_to_litter_fire(i) = value_patch - this%m_gresp_xfer_to_litter_fire(i) = value_patch - this%m_cpool_to_litter_fire(i) = value_patch - this%leafc_xfer_to_leafc(i) = value_patch this%frootc_xfer_to_frootc(i) = value_patch this%livestemc_xfer_to_livestemc(i) = value_patch @@ -8736,12 +8652,7 @@ subroutine veg_cf_setvalues ( this, num_patch, filter_patch, value_patch) this%cpool_to_deadcrootc(i) = value_patch this%cpool_to_deadcrootc_storage(i) = value_patch this%cpool_to_gresp_storage(i) = value_patch - this%cpool_leaf_gr(i) = value_patch - this%cpool_leaf_storage_gr(i) = value_patch - this%transfer_leaf_gr(i) = value_patch - this%cpool_froot_gr(i) = value_patch - this%cpool_froot_storage_gr(i) = value_patch - this%transfer_froot_gr(i) = value_patch + this%cpool_livestem_gr(i) = value_patch this%cpool_livestem_storage_gr(i) = value_patch this%transfer_livestem_gr(i) = value_patch @@ -8754,6 +8665,7 @@ subroutine veg_cf_setvalues ( this, num_patch, filter_patch, value_patch) this%cpool_deadcroot_gr(i) = value_patch this%cpool_deadcroot_storage_gr(i) = value_patch this%transfer_deadcroot_gr(i) = value_patch + this%leafc_storage_to_xfer(i) = value_patch this%frootc_storage_to_xfer(i) = value_patch this%livestemc_storage_to_xfer(i) = value_patch @@ -8775,7 +8687,7 @@ subroutine veg_cf_setvalues ( this, num_patch, filter_patch, value_patch) this%npp(i) = value_patch this%agnpp(i) = value_patch this%bgnpp(i) = value_patch - this%agwdnpp(i) = value_patch + this%agwdnpp(i) = value_patch this%litfall(i) = value_patch this%vegfire(i) = value_patch this%wood_harvestc(i) = value_patch @@ -8809,6 +8721,36 @@ subroutine veg_cf_setvalues ( this, num_patch, filter_patch, value_patch) end do end if + do fi = 1,num_patch + i = filter_patch(fi) + this%hrv_leafc_to_litter(i) = value_patch + this%hrv_leafc_storage_to_litter(i) = value_patch + this%hrv_leafc_xfer_to_litter(i) = value_patch + this%hrv_frootc_to_litter(i) = value_patch + this%hrv_frootc_storage_to_litter(i) = value_patch + this%hrv_frootc_xfer_to_litter(i) = value_patch + this%hrv_livestemc_to_litter(i) = value_patch + this%hrv_livestemc_storage_to_litter(i) = value_patch + this%hrv_livestemc_xfer_to_litter(i) = value_patch + this%hrv_deadstemc_to_prod10c(i) = value_patch + this%hrv_deadstemc_to_prod100c(i) = value_patch + this%hrv_leafc_to_prod1c(i) = value_patch + this%hrv_livestemc_to_prod1c(i) = value_patch + this%hrv_grainc_to_prod1c(i) = value_patch + this%hrv_cropc_to_prod1c(i) = value_patch + this%hrv_deadstemc_storage_to_litter(i) = value_patch + this%hrv_deadstemc_xfer_to_litter(i) = value_patch + this%hrv_livecrootc_to_litter(i) = value_patch + this%hrv_livecrootc_storage_to_litter(i) = value_patch + this%hrv_livecrootc_xfer_to_litter(i) = value_patch + this%hrv_deadcrootc_to_litter(i) = value_patch + this%hrv_deadcrootc_storage_to_litter(i) = value_patch + this%hrv_deadcrootc_xfer_to_litter(i) = value_patch + this%hrv_gresp_storage_to_litter(i) = value_patch + this%hrv_gresp_xfer_to_litter(i) = value_patch + this%hrv_xsmrpool_to_atm(i) = value_patch + this%hrv_cpool_to_litter(i) = value_patch + end do end subroutine veg_cf_setvalues !------------------------------------------------------------------------ @@ -9652,26 +9594,6 @@ subroutine veg_nf_setvalues ( this, num_patch, filter_patch, value_patch) do fi = 1,num_patch i=filter_patch(fi) - this%m_leafn_to_litter(i) = value_patch - this%m_frootn_to_litter(i) = value_patch - this%m_leafn_storage_to_litter(i) = value_patch - this%m_frootn_storage_to_litter(i) = value_patch - this%m_livestemn_storage_to_litter(i) = value_patch - this%m_deadstemn_storage_to_litter(i) = value_patch - this%m_livecrootn_storage_to_litter(i) = value_patch - this%m_deadcrootn_storage_to_litter(i) = value_patch - this%m_leafn_xfer_to_litter(i) = value_patch - this%m_frootn_xfer_to_litter(i) = value_patch - this%m_livestemn_xfer_to_litter(i) = value_patch - this%m_deadstemn_xfer_to_litter(i) = value_patch - this%m_livecrootn_xfer_to_litter(i) = value_patch - this%m_deadcrootn_xfer_to_litter(i) = value_patch - this%m_livestemn_to_litter(i) = value_patch - this%m_deadstemn_to_litter(i) = value_patch - this%m_livecrootn_to_litter(i) = value_patch - this%m_deadcrootn_to_litter(i) = value_patch - this%m_retransn_to_litter(i) = value_patch - this%m_npool_to_litter(i) = value_patch this%hrv_leafn_to_litter(i) = value_patch this%hrv_frootn_to_litter(i) = value_patch this%hrv_leafn_storage_to_litter(i) = value_patch @@ -9699,49 +9621,6 @@ subroutine veg_nf_setvalues ( this, num_patch, filter_patch, value_patch) this%hrv_retransn_to_litter(i) = value_patch this%hrv_npool_to_litter(i) = value_patch - this%m_leafn_to_fire(i) = value_patch - this%m_leafn_storage_to_fire(i) = value_patch - this%m_leafn_xfer_to_fire(i) = value_patch - this%m_livestemn_to_fire(i) = value_patch - this%m_livestemn_storage_to_fire(i) = value_patch - this%m_livestemn_xfer_to_fire(i) = value_patch - this%m_deadstemn_to_fire(i) = value_patch - this%m_deadstemn_storage_to_fire(i) = value_patch - this%m_deadstemn_xfer_to_fire(i) = value_patch - this%m_frootn_to_fire(i) = value_patch - this%m_frootn_storage_to_fire(i) = value_patch - this%m_frootn_xfer_to_fire(i) = value_patch - this%m_livecrootn_to_fire(i) = value_patch - this%m_livecrootn_storage_to_fire(i) = value_patch - this%m_livecrootn_xfer_to_fire(i) = value_patch - this%m_deadcrootn_to_fire(i) = value_patch - this%m_deadcrootn_storage_to_fire(i) = value_patch - this%m_deadcrootn_xfer_to_fire(i) = value_patch - this%m_retransn_to_fire(i) = value_patch - this%m_npool_to_fire(i) = value_patch - - this%m_leafn_to_litter_fire(i) = value_patch - this%m_leafn_storage_to_litter_fire(i) = value_patch - this%m_leafn_xfer_to_litter_fire(i) = value_patch - this%m_livestemn_to_litter_fire(i) = value_patch - this%m_livestemn_storage_to_litter_fire(i) = value_patch - this%m_livestemn_xfer_to_litter_fire(i) = value_patch - this%m_livestemn_to_deadstemn_fire(i) = value_patch - this%m_deadstemn_to_litter_fire(i) = value_patch - this%m_deadstemn_storage_to_litter_fire(i) = value_patch - this%m_deadstemn_xfer_to_litter_fire(i) = value_patch - this%m_frootn_to_litter_fire(i) = value_patch - this%m_frootn_storage_to_litter_fire(i) = value_patch - this%m_frootn_xfer_to_litter_fire(i) = value_patch - this%m_livecrootn_to_litter_fire(i) = value_patch - this%m_livecrootn_storage_to_litter_fire(i) = value_patch - this%m_livecrootn_xfer_to_litter_fire(i) = value_patch - this%m_livecrootn_to_deadcrootn_fire(i) = value_patch - this%m_deadcrootn_to_litter_fire(i) = value_patch - this%m_deadcrootn_storage_to_litter_fire(i) = value_patch - this%m_deadcrootn_xfer_to_litter_fire(i) = value_patch - this%m_retransn_to_litter_fire(i) = value_patch - this%m_npool_to_litter_fire(i) = value_patch this%leafn_xfer_to_leafn(i) = value_patch this%frootn_xfer_to_frootn(i) = value_patch @@ -10780,26 +10659,6 @@ subroutine veg_pf_setvalues ( this, num_patch, filter_patch, value_patch) do fi = 1,num_patch i=filter_patch(fi) - this%m_leafp_to_litter(i) = value_patch - this%m_frootp_to_litter(i) = value_patch - this%m_leafp_storage_to_litter(i) = value_patch - this%m_frootp_storage_to_litter(i) = value_patch - this%m_livestemp_storage_to_litter(i) = value_patch - this%m_deadstemp_storage_to_litter(i) = value_patch - this%m_livecrootp_storage_to_litter(i) = value_patch - this%m_deadcrootp_storage_to_litter(i) = value_patch - this%m_leafp_xfer_to_litter(i) = value_patch - this%m_frootp_xfer_to_litter(i) = value_patch - this%m_livestemp_xfer_to_litter(i) = value_patch - this%m_deadstemp_xfer_to_litter(i) = value_patch - this%m_livecrootp_xfer_to_litter(i) = value_patch - this%m_deadcrootp_xfer_to_litter(i) = value_patch - this%m_livestemp_to_litter(i) = value_patch - this%m_deadstemp_to_litter(i) = value_patch - this%m_livecrootp_to_litter(i) = value_patch - this%m_deadcrootp_to_litter(i) = value_patch - this%m_retransp_to_litter(i) = value_patch - this%m_ppool_to_litter(i) = value_patch this%hrv_leafp_to_litter(i) = value_patch this%hrv_frootp_to_litter(i) = value_patch this%hrv_leafp_storage_to_litter(i) = value_patch @@ -10826,50 +10685,6 @@ subroutine veg_pf_setvalues ( this, num_patch, filter_patch, value_patch) this%hrv_retransp_to_litter(i) = value_patch this%hrv_ppool_to_litter(i) = value_patch - this%m_leafp_to_fire(i) = value_patch - this%m_leafp_storage_to_fire(i) = value_patch - this%m_leafp_xfer_to_fire(i) = value_patch - this%m_livestemp_to_fire(i) = value_patch - this%m_livestemp_storage_to_fire(i) = value_patch - this%m_livestemp_xfer_to_fire(i) = value_patch - this%m_deadstemp_to_fire(i) = value_patch - this%m_deadstemp_storage_to_fire(i) = value_patch - this%m_deadstemp_xfer_to_fire(i) = value_patch - this%m_frootp_to_fire(i) = value_patch - this%m_frootp_storage_to_fire(i) = value_patch - this%m_frootp_xfer_to_fire(i) = value_patch - this%m_livecrootp_to_fire(i) = value_patch - this%m_livecrootp_storage_to_fire(i) = value_patch - this%m_livecrootp_xfer_to_fire(i) = value_patch - this%m_deadcrootp_to_fire(i) = value_patch - this%m_deadcrootp_storage_to_fire(i) = value_patch - this%m_deadcrootp_xfer_to_fire(i) = value_patch - this%m_retransp_to_fire(i) = value_patch - this%m_ppool_to_fire(i) = value_patch - - this%m_leafp_to_litter_fire(i) = value_patch - this%m_leafp_storage_to_litter_fire(i) = value_patch - this%m_leafp_xfer_to_litter_fire(i) = value_patch - this%m_livestemp_to_litter_fire(i) = value_patch - this%m_livestemp_storage_to_litter_fire(i) = value_patch - this%m_livestemp_xfer_to_litter_fire(i) = value_patch - this%m_livestemp_to_deadstemp_fire(i) = value_patch - this%m_deadstemp_to_litter_fire(i) = value_patch - this%m_deadstemp_storage_to_litter_fire(i) = value_patch - this%m_deadstemp_xfer_to_litter_fire(i) = value_patch - this%m_frootp_to_litter_fire(i) = value_patch - this%m_frootp_storage_to_litter_fire(i) = value_patch - this%m_frootp_xfer_to_litter_fire(i) = value_patch - this%m_livecrootp_to_litter_fire(i) = value_patch - this%m_livecrootp_storage_to_litter_fire(i) = value_patch - this%m_livecrootp_xfer_to_litter_fire(i) = value_patch - this%m_livecrootp_to_deadcrootp_fire(i) = value_patch - this%m_deadcrootp_to_litter_fire(i) = value_patch - this%m_deadcrootp_storage_to_litter_fire(i) = value_patch - this%m_deadcrootp_xfer_to_litter_fire(i) = value_patch - this%m_retransp_to_litter_fire(i) = value_patch - this%m_ppool_to_litter_fire(i) = value_patch - this%leafp_xfer_to_leafp(i) = value_patch this%frootp_xfer_to_frootp(i) = value_patch this%livestemp_xfer_to_livestemp(i) = value_patch