diff --git a/components/elm/bld/namelist_files/namelist_defaults.xml b/components/elm/bld/namelist_files/namelist_defaults.xml index baa597ce523b..692b1baee65f 100644 --- a/components/elm/bld/namelist_files/namelist_defaults.xml +++ b/components/elm/bld/namelist_files/namelist_defaults.xml @@ -125,7 +125,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). -lnd/clm2/paramdata/fates_params_api.24.0.0_12pft_c220719.nc +lnd/clm2/paramdata/fates_params_api.25.0.0_12pft_c221212.nc lnd/clm2/paramdata/CNP_parameters_c131108.nc diff --git a/components/elm/cime_config/testdefs/testmods_dirs/elm/fates/user_nl_elm b/components/elm/cime_config/testdefs/testmods_dirs/elm/fates/user_nl_elm index b5c6823554e6..c4fdcec8e7d6 100644 --- a/components/elm/cime_config/testdefs/testmods_dirs/elm/fates/user_nl_elm +++ b/components/elm/cime_config/testdefs/testmods_dirs/elm/fates/user_nl_elm @@ -16,7 +16,7 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS', 'FATES_FUEL_AMOUNT', 'FATES_LITTER_IN', 'FATES_LITTER_OUT', 'FATES_SEED_BANK', 'FATES_SEEDS_IN', 'FATES_STOREC', 'FATES_VEGC', 'FATES_SAPWOODC', 'FATES_LEAFC', 'FATES_FROOTC', 'FATES_REPROC', -'FATES_CEFFLUX', 'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND', +'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND', 'FATES_CANOPY_VEGC', 'FATES_USTORY_VEGC', 'FATES_PRIMARY_PATCHFUSION_ERR', 'FATES_DISTURBANCE_RATE_P2P', 'FATES_DISTURBANCE_RATE_P2S', 'FATES_DISTURBANCE_RATE_S2S', 'FATES_DISTURBANCE_RATE_FIRE', diff --git a/components/elm/cime_config/testdefs/testmods_dirs/elm/fates_eca/user_nl_elm b/components/elm/cime_config/testdefs/testmods_dirs/elm/fates_eca/user_nl_elm index 3380bd1b0f85..9c783ecccb36 100644 --- a/components/elm/cime_config/testdefs/testmods_dirs/elm/fates_eca/user_nl_elm +++ b/components/elm/cime_config/testdefs/testmods_dirs/elm/fates_eca/user_nl_elm @@ -18,7 +18,7 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS', 'FATES_FUEL_AMOUNT', 'FATES_LITTER_IN', 'FATES_LITTER_OUT', 'FATES_SEED_BANK', 'FATES_SEEDS_IN', 'FATES_STOREC', 'FATES_VEGC', 'FATES_SAPWOODC', 'FATES_LEAFC', 'FATES_FROOTC', 'FATES_REPROC', -'FATES_CEFFLUX', 'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND', +'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND', 'FATES_CANOPY_VEGC', 'FATES_USTORY_VEGC', 'FATES_PRIMARY_PATCHFUSION_ERR', 'FATES_DISTURBANCE_RATE_P2P', 'FATES_DISTURBANCE_RATE_P2S', 'FATES_DISTURBANCE_RATE_S2S', 'FATES_DISTURBANCE_RATE_FIRE', @@ -33,7 +33,16 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS', 'FATES_CBALANCE_ERROR', 'FATES_ERROR_EL', 'FATES_LEAF_ALLOC', 'FATES_SEED_ALLOC', 'FATES_STEM_ALLOC', 'FATES_FROOT_ALLOC', 'FATES_CROOT_ALLOC', 'FATES_STORE_ALLOC','FATES_LITTER_IN_EL','FATES_LITTER_OUT_EL', -'FATES_LEAFN','FATES_LEAFP','FATES_FROOTN','FATES_FROOTP','FATES_NH4UPTAKE', -'FATES_NO3UPTAKE','FATES_NEFFLUX','FATES_PUPTAKE','FATES_PEFFLUX', 'NET_NMIN','NET_PMIN','LITR1P_vr','LITR1C_vr','LITR1N_vr','SOLUTIONP', -'SMIN_NO3','SMIN_NH4','TOTSOMN','TOTSOMP' \ No newline at end of file +'SMIN_NO3','SMIN_NH4','TOTSOMN','TOTSOMP', +'FATES_L2FR','FATES_L2FR_CANOPY_REC_PF','FATES_L2FR_USTORY_REC_PF', +'FATES_NH4UPTAKE_SZPF','FATES_NO3UPTAKE_SZPF','FATES_NEFFLUX_SZPF' , +'FATES_NDEMAND_SZPF','FATES_NFIX_SYM_SZPF','FATES_NH4UPTAKE','FATES_NO3UPTAKE', +'FATES_NEFFLUX','FATES_NDEMAND','FATES_NFIX_SYM','FATES_STOREN','FATES_STOREN_TF', +'FATES_VEGN','FATES_SAPWOODN','FATES_LEAFN','FATES_FROOTN','FATES_REPRON','FATES_VEGN_SZPF', +'FATES_LEAFN_SZPF','FATES_FROOTN_SZPF','FATES_SAPWOODN_SZPF','FATES_STOREN_SZPF','FATES_STOREN_TF_CANOPY_SZPF', +'FATES_STOREN_TF_USTORY_SZPF','FATES_REPRON_SZPF','FATES_STOREP','FATES_STOREP_TF','FATES_VEGP','FATES_SAPWOODP', +'FATES_LEAFP','FATES_FROOTP','FATES_REPROP','FATES_PUPTAKE','FATES_PEFFLUX','FATES_PDEMAND', +'FATES_VEGP_SZPF','FATES_LEAFP_SZPF','FATES_FROOTP_SZPF','FATES_SAPWOODP_SZPF','FATES_STOREP_SZPF', +'FATES_STOREP_TF_CANOPY_SZPF','FATES_STOREP_TF_USTORY_SZPF','FATES_REPROP_SZPF','FATES_PUPTAKE_SZPF', +'FATES_PEFFLUX_SZPF','FATES_PDEMAND_SZPF' \ No newline at end of file diff --git a/components/elm/cime_config/testdefs/testmods_dirs/elm/fates_rd/user_nl_elm b/components/elm/cime_config/testdefs/testmods_dirs/elm/fates_rd/user_nl_elm index 3380bd1b0f85..9c783ecccb36 100644 --- a/components/elm/cime_config/testdefs/testmods_dirs/elm/fates_rd/user_nl_elm +++ b/components/elm/cime_config/testdefs/testmods_dirs/elm/fates_rd/user_nl_elm @@ -18,7 +18,7 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS', 'FATES_FUEL_AMOUNT', 'FATES_LITTER_IN', 'FATES_LITTER_OUT', 'FATES_SEED_BANK', 'FATES_SEEDS_IN', 'FATES_STOREC', 'FATES_VEGC', 'FATES_SAPWOODC', 'FATES_LEAFC', 'FATES_FROOTC', 'FATES_REPROC', -'FATES_CEFFLUX', 'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND', +'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND', 'FATES_CANOPY_VEGC', 'FATES_USTORY_VEGC', 'FATES_PRIMARY_PATCHFUSION_ERR', 'FATES_DISTURBANCE_RATE_P2P', 'FATES_DISTURBANCE_RATE_P2S', 'FATES_DISTURBANCE_RATE_S2S', 'FATES_DISTURBANCE_RATE_FIRE', @@ -33,7 +33,16 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS', 'FATES_CBALANCE_ERROR', 'FATES_ERROR_EL', 'FATES_LEAF_ALLOC', 'FATES_SEED_ALLOC', 'FATES_STEM_ALLOC', 'FATES_FROOT_ALLOC', 'FATES_CROOT_ALLOC', 'FATES_STORE_ALLOC','FATES_LITTER_IN_EL','FATES_LITTER_OUT_EL', -'FATES_LEAFN','FATES_LEAFP','FATES_FROOTN','FATES_FROOTP','FATES_NH4UPTAKE', -'FATES_NO3UPTAKE','FATES_NEFFLUX','FATES_PUPTAKE','FATES_PEFFLUX', 'NET_NMIN','NET_PMIN','LITR1P_vr','LITR1C_vr','LITR1N_vr','SOLUTIONP', -'SMIN_NO3','SMIN_NH4','TOTSOMN','TOTSOMP' \ No newline at end of file +'SMIN_NO3','SMIN_NH4','TOTSOMN','TOTSOMP', +'FATES_L2FR','FATES_L2FR_CANOPY_REC_PF','FATES_L2FR_USTORY_REC_PF', +'FATES_NH4UPTAKE_SZPF','FATES_NO3UPTAKE_SZPF','FATES_NEFFLUX_SZPF' , +'FATES_NDEMAND_SZPF','FATES_NFIX_SYM_SZPF','FATES_NH4UPTAKE','FATES_NO3UPTAKE', +'FATES_NEFFLUX','FATES_NDEMAND','FATES_NFIX_SYM','FATES_STOREN','FATES_STOREN_TF', +'FATES_VEGN','FATES_SAPWOODN','FATES_LEAFN','FATES_FROOTN','FATES_REPRON','FATES_VEGN_SZPF', +'FATES_LEAFN_SZPF','FATES_FROOTN_SZPF','FATES_SAPWOODN_SZPF','FATES_STOREN_SZPF','FATES_STOREN_TF_CANOPY_SZPF', +'FATES_STOREN_TF_USTORY_SZPF','FATES_REPRON_SZPF','FATES_STOREP','FATES_STOREP_TF','FATES_VEGP','FATES_SAPWOODP', +'FATES_LEAFP','FATES_FROOTP','FATES_REPROP','FATES_PUPTAKE','FATES_PEFFLUX','FATES_PDEMAND', +'FATES_VEGP_SZPF','FATES_LEAFP_SZPF','FATES_FROOTP_SZPF','FATES_SAPWOODP_SZPF','FATES_STOREP_SZPF', +'FATES_STOREP_TF_CANOPY_SZPF','FATES_STOREP_TF_USTORY_SZPF','FATES_REPROP_SZPF','FATES_PUPTAKE_SZPF', +'FATES_PEFFLUX_SZPF','FATES_PDEMAND_SZPF' \ No newline at end of file diff --git a/components/elm/src/biogeochem/AllocationMod.F90 b/components/elm/src/biogeochem/AllocationMod.F90 index f6665a0bca25..39a22a7b8553 100644 --- a/components/elm/src/biogeochem/AllocationMod.F90 +++ b/components/elm/src/biogeochem/AllocationMod.F90 @@ -908,7 +908,7 @@ subroutine Allocation2_ResolveNPLimit (bounds, num_soilc, filter_soilc , & real(r8) :: excess_immob_no3_vr(1:nlevdecomp) ! no3 excess flux, if soil microbes are more P limited real(r8) :: excess_immob_p_vr(1:nlevdecomp) ! P excess flux, if soil microbes are more N limited real(r8) :: decompmicc(1:nlevdecomp) ! column-level soil microbial decomposer biomass gC/m3 - + real(r8) :: ndemand, pdemand ! Column level N and P demand used for downscaling plant level uptake for FATES real(r8) :: fpi_no3_vr(1:nlevdecomp) ! fraction of potential immobilization supplied by no3(no units) real(r8) :: fpi_nh4_vr(1:nlevdecomp) ! fraction of potential immobilization supplied by nh4 (no units) @@ -918,8 +918,7 @@ subroutine Allocation2_ResolveNPLimit (bounds, num_soilc, filter_soilc , & integer :: fc ! lake filter column index integer :: f ! loop index for plant competitors integer :: ci, s ! used for FATES BC (clump index, site index) - integer :: j_f ! local index that maps a decomposition - ! layer onto a fates uptake layer + integer :: ft ! FATES PFT index ! Fractional uptake profiles, that are proportional to root density real(r8):: nuptake_prof(bounds%begc:bounds%endc,1:nlevdecomp) @@ -933,10 +932,8 @@ subroutine Allocation2_ResolveNPLimit (bounds, num_soilc, filter_soilc , & integer :: pci, pcf ! (I)nitial and (F)inal plant competitor index real(r8), pointer :: veg_rootc_ptr(:,:) ! points to either native ELM or FATES root carbon array integer, pointer :: ft_index_ptr(:) ! points to either native ELM or FATES PFT array - real(r8), pointer :: cn_scalar_ptr(:) ! points to either native ELM or FATES C:N scalar array - real(r8), pointer :: cn_scalar_runmean_ptr(:) ! points to either native ELM or FATES C:N scalar array - real(r8), pointer :: cp_scalar_ptr(:) ! points to either native ELM or FATES C:P scalar array - real(r8), pointer :: cp_scalar_runmean_ptr(:) ! points to either native ELM or FATES C:P scalar array + real(r8), pointer :: cn_scalar_runmean_ptr(:) + real(r8), pointer :: cp_scalar_runmean_ptr(:) real(r8), pointer :: plant_nh4demand_vr_ptr(:,:) real(r8), pointer :: plant_no3demand_vr_ptr(:,:) real(r8), pointer :: plant_pdemand_vr_ptr(:,:) @@ -1112,13 +1109,34 @@ subroutine Allocation2_ResolveNPLimit (bounds, num_soilc, filter_soilc , & ! Overwrite the column level demands, since fates plants are all sharing ! the same space, in units per the same square meter, we just add demand ! to scale up to column - plant_ndemand_col(c) = sum(elm_fates%fates(ci)%bc_out(s)%n_demand(1:n_pcomp)) - plant_pdemand_col(c) = sum(elm_fates%fates(ci)%bc_out(s)%p_demand(1:n_pcomp)) - + plant_ndemand_col(c) = 0._r8 + plant_pdemand_col(c) = 0._r8 + ! We fill the vertically resolved array to simplify some jointly used code do j = 1, nlevdecomp - col_plant_ndemand_vr(c,j) = plant_ndemand_col(c) * nuptake_prof(c,j) - col_plant_pdemand_vr(c,j) = plant_pdemand_col(c) * puptake_prof(c,j) + + col_plant_ndemand_vr(c,j) = 0._r8 + col_plant_pdemand_vr(c,j) = 0._r8 + + do f = 1,n_pcomp + ft = elm_fates%fates(ci)%bc_out(s)%ft_index(f) + + ! [gN/m3/s] = [gC/m3] * [gN/gC/s] + col_plant_ndemand_vr(c,j) = col_plant_ndemand_vr(c,j) + & + elm_fates%fates(ci)%bc_out(s)%veg_rootc(f,j) * & + (elm_fates%fates(ci)%bc_pconst%vmax_nh4(ft) + & + elm_fates%fates(ci)%bc_pconst%vmax_no3(ft)) + + col_plant_pdemand_vr(c,j) = col_plant_pdemand_vr(c,j) + & + elm_fates%fates(ci)%bc_out(s)%veg_rootc(f,j) * & + elm_fates%fates(ci)%bc_pconst%vmax_p(ft) + + end do + + ! [gN/m2/s] + plant_ndemand_col(c) = plant_ndemand_col(c) + col_plant_ndemand_vr(c,j)*dzsoi_decomp(j) + plant_pdemand_col(c) = plant_pdemand_col(c) + col_plant_pdemand_vr(c,j)*dzsoi_decomp(j) + end do else !(ECA) @@ -1131,19 +1149,17 @@ subroutine Allocation2_ResolveNPLimit (bounds, num_soilc, filter_soilc , & ft_index_ptr => elm_fates%fates(ci)%bc_out(s)%ft_index ! Should be decompmicc(:) = elm_fates%fates(ci)%bc_out(s)%decompmicc(:) ! Should be (nlevdecomp) - cn_scalar_ptr => elm_fates%fates(ci)%bc_out(s)%cn_scalar ! (i,j) - cn_scalar_runmean_ptr => elm_fates%fates(ci)%bc_out(s)%cn_scalar ! (i,j) + cn_scalar_runmean_ptr => elm_fates%fates(ci)%bc_out(s)%cn_scalar ! This is 1.0 plant_nh4demand_vr_ptr => plant_nh4demand_vr_fates km_nh4_ptr => elm_fates%fates(ci)%bc_pconst%eca_km_nh4 - vmax_nh4_ptr => elm_fates%fates(ci)%bc_pconst%eca_vmax_nh4 + vmax_nh4_ptr => elm_fates%fates(ci)%bc_pconst%vmax_nh4 plant_no3demand_vr_ptr => plant_no3demand_vr_fates km_no3_ptr => elm_fates%fates(ci)%bc_pconst%eca_km_no3 - vmax_no3_ptr => elm_fates%fates(ci)%bc_pconst%eca_vmax_no3 - cp_scalar_ptr => elm_fates%fates(ci)%bc_out(s)%cp_scalar - cp_scalar_runmean_ptr => elm_fates%fates(ci)%bc_out(s)%cp_scalar + vmax_no3_ptr => elm_fates%fates(ci)%bc_pconst%vmax_no3 + cp_scalar_runmean_ptr => elm_fates%fates(ci)%bc_out(s)%cp_scalar ! This is 1.0 plant_pdemand_vr_ptr => plant_pdemand_vr_fates km_p_ptr => elm_fates%fates(ci)%bc_pconst%eca_km_p - vmax_p_ptr => elm_fates%fates(ci)%bc_pconst%eca_vmax_p + vmax_p_ptr => elm_fates%fates(ci)%bc_pconst%vmax_p end if @@ -1201,7 +1217,6 @@ subroutine Allocation2_ResolveNPLimit (bounds, num_soilc, filter_soilc , & km_nh4_ptr => km_plant_nh4 vmax_nh4_ptr => vmax_plant_nh4 - cn_scalar_ptr => cn_scalar cn_scalar_runmean_ptr => cn_scalar_runmean km_no3_ptr => km_plant_no3 vmax_no3_ptr => vmax_plant_no3 @@ -1700,19 +1715,28 @@ subroutine Allocation2_ResolveNPLimit (bounds, num_soilc, filter_soilc , & if( plant_ndemand_col(c)>tiny(plant_ndemand_col(c)) ) then do f = 1,n_pcomp - do j = 1,nlevdecomp - j_f = elm_fates%fates(ci)%bc_pconst%j_uptake(j) + ft = elm_fates%fates(ci)%bc_out(s)%ft_index(f) - elm_fates%fates(ci)%bc_in(s)%plant_nh4_uptake_flux(f,j_f) = & - elm_fates%fates(ci)%bc_in(s)%plant_nh4_uptake_flux(f,j_f) + & + ! [gN/m2/s] + ndemand=0._r8 + do j = 1,nlevdecomp + ndemand = ndemand + elm_fates%fates(ci)%bc_out(s)%veg_rootc(f,j) * & + (elm_fates%fates(ci)%bc_pconst%vmax_nh4(ft)+elm_fates%fates(ci)%bc_pconst%vmax_no3(ft)) * & + dzsoi_decomp(j) + end do + + do j = 1,nlevdecomp + + elm_fates%fates(ci)%bc_in(s)%plant_nh4_uptake_flux(f,1) = & + elm_fates%fates(ci)%bc_in(s)%plant_nh4_uptake_flux(f,1) + & smin_nh4_to_plant_vr(c,j)*dt*dzsoi_decomp(j) * & - (elm_fates%fates(ci)%bc_out(s)%n_demand(f)/plant_ndemand_col(c)) + (ndemand/plant_ndemand_col(c)) - elm_fates%fates(ci)%bc_in(s)%plant_no3_uptake_flux(f,j_f) = & - elm_fates%fates(ci)%bc_in(s)%plant_no3_uptake_flux(f,j_f) + & + elm_fates%fates(ci)%bc_in(s)%plant_no3_uptake_flux(f,1) = & + elm_fates%fates(ci)%bc_in(s)%plant_no3_uptake_flux(f,1) + & smin_no3_to_plant_vr(c,j)*dt*dzsoi_decomp(j) * & - (elm_fates%fates(ci)%bc_out(s)%n_demand(f)/plant_ndemand_col(c)) + (ndemand/plant_ndemand_col(c)) end do end do @@ -1720,12 +1744,23 @@ subroutine Allocation2_ResolveNPLimit (bounds, num_soilc, filter_soilc , & if( plant_pdemand_col(c)>tiny(plant_pdemand_col(c)) ) then do f = 1,n_pcomp + + ft = elm_fates%fates(ci)%bc_out(s)%ft_index(f) + + pdemand=0._r8 do j = 1,nlevdecomp - j_f = elm_fates%fates(ci)%bc_pconst%j_uptake(j) - elm_fates%fates(ci)%bc_in(s)%plant_p_uptake_flux(f,j_f) = & - elm_fates%fates(ci)%bc_in(s)%plant_p_uptake_flux(f,j_f) + & + ! [gP/m2/s] + pdemand = pdemand+elm_fates%fates(ci)%bc_out(s)%veg_rootc(f,j) * & + elm_fates%fates(ci)%bc_pconst%vmax_p(ft) * & + dzsoi_decomp(j) + end do + + do j = 1,nlevdecomp + ! [gP/m2/step] + elm_fates%fates(ci)%bc_in(s)%plant_p_uptake_flux(f,1) = & + elm_fates%fates(ci)%bc_in(s)%plant_p_uptake_flux(f,1) + & sminp_to_plant_vr(c,j)*dt*dzsoi_decomp(j) * & - (elm_fates%fates(ci)%bc_out(s)%p_demand(f)/plant_pdemand_col(c)) + (pdemand/plant_pdemand_col(c)) end do end do @@ -1735,18 +1770,17 @@ subroutine Allocation2_ResolveNPLimit (bounds, num_soilc, filter_soilc , & do f = 1,n_pcomp do j = 1,nlevdecomp - j_f = elm_fates%fates(ci)%bc_pconst%j_uptake(j) - elm_fates%fates(ci)%bc_in(s)%plant_nh4_uptake_flux(f,j_f) = & - elm_fates%fates(ci)%bc_in(s)%plant_nh4_uptake_flux(f,j_f) + & + elm_fates%fates(ci)%bc_in(s)%plant_nh4_uptake_flux(f,1) = & + elm_fates%fates(ci)%bc_in(s)%plant_nh4_uptake_flux(f,1) + & plant_nh4demand_vr_fates(f,j) * fpg_nh4_vr(c,j) * dzsoi_decomp(j) * dt - elm_fates%fates(ci)%bc_in(s)%plant_no3_uptake_flux(f,j_f) = & - elm_fates%fates(ci)%bc_in(s)%plant_no3_uptake_flux(f,j_f) + & + elm_fates%fates(ci)%bc_in(s)%plant_no3_uptake_flux(f,1) = & + elm_fates%fates(ci)%bc_in(s)%plant_no3_uptake_flux(f,1) + & plant_no3demand_vr_fates(f,j) * fpg_no3_vr(c,j) * dzsoi_decomp(j) * dt - elm_fates%fates(ci)%bc_in(s)%plant_p_uptake_flux(f,j_f) = & - elm_fates%fates(ci)%bc_in(s)%plant_p_uptake_flux(f,j_f) + & + elm_fates%fates(ci)%bc_in(s)%plant_p_uptake_flux(f,1) = & + elm_fates%fates(ci)%bc_in(s)%plant_p_uptake_flux(f,1) + & (plant_pdemand_vr_fates(f,j) * fpg_p_vr(c,j)) * dzsoi_decomp(j) * dt end do @@ -3315,18 +3349,12 @@ subroutine PAllocationECAMIC(pci, & e_km_p = e_km_p + e_decomp_scalar*decompmicc(j)/km_decomp_p + & max(0._r8,vmax_minsurf_p_vr(j)-labilep_vr(j))/km_minsurf_p_vr(j) -! if(carbon_only .or. carbonnitrogen_only) then -! do i = 1, n_pcomp -! compet_plant(i) = 1._r8 -! end do -! else - do i = 1,n_pcomp - ip = filter_pcomp(i) - ft = ft_index(ip) - compet_plant(i) = solution_pconc / & - (km_plant_p(ft)*(1._r8 + solution_pconc/km_plant_p(ft) + e_km_p)) - end do -! end if + do i = 1,n_pcomp + ip = filter_pcomp(i) + ft = ft_index(ip) + compet_plant(i) = solution_pconc / & + (km_plant_p(ft)*(1._r8 + solution_pconc/km_plant_p(ft) + e_km_p)) + end do compet_decomp_p = solution_pconc / & (km_decomp_p * (1._r8 + solution_pconc/km_decomp_p + e_km_p)) diff --git a/components/elm/src/biogeochem/EcosystemDynMod.F90 b/components/elm/src/biogeochem/EcosystemDynMod.F90 index cd2dec3e933c..ac9da928672e 100644 --- a/components/elm/src/biogeochem/EcosystemDynMod.F90 +++ b/components/elm/src/biogeochem/EcosystemDynMod.F90 @@ -805,6 +805,13 @@ subroutine EcosystemDynNoLeaching2(bounds, & call t_stop_lnd(event) + else + call alm_fates%wrap_WoodProducts(bounds, num_soilc, filter_soilc) + + call WoodProducts(num_soilc, filter_soilc ) + + call CropHarvestPools(num_soilc, filter_soilc, dt) + end if if ( ero_ccycle ) then diff --git a/components/elm/src/biogeochem/PhosphorusDynamicsMod.F90 b/components/elm/src/biogeochem/PhosphorusDynamicsMod.F90 index c8a7c445c07a..ea3082803a5e 100644 --- a/components/elm/src/biogeochem/PhosphorusDynamicsMod.F90 +++ b/components/elm/src/biogeochem/PhosphorusDynamicsMod.F90 @@ -580,7 +580,6 @@ subroutine PhosphorusBiochemMin_balance(bounds,num_soilc, filter_soilc, & integer :: c,fc,p,j,l,s integer :: ci ! clump index of the bounds integer :: pft - integer :: j_f ! fates uptake index mapped from decomp index real(r8) :: lamda_up ! nitrogen cost of phosphorus uptake real(r8) :: sop_profile(1:ndecomp_pools) real(r8) :: biochem_pmin_to_ecosysp_vr_col_pot(bounds%begc:bounds%endc,1:nlevdecomp) @@ -638,7 +637,6 @@ subroutine PhosphorusBiochemMin_balance(bounds,num_soilc, filter_soilc, & if(use_fates) then do j = 1,nlevdecomp - j_f = alm_fates%fates(ci)%bc_pconst%j_uptake(j) do p = 1, alm_fates%fates(ci)%bc_out(s)%num_plant_comps lamda_up = alm_fates%fates(ci)%bc_out(s)%cp_scalar(p)/ & @@ -745,10 +743,9 @@ subroutine PhosphorusBiochemMin_balance(bounds,num_soilc, filter_soilc, & end if ! units: [g/m2] = [g/m3/s] * [s] [m] - j_f = alm_fates%fates(ci)%bc_pconst%j_uptake(j) do p = 1, alm_fates%fates(ci)%bc_out(s)%num_plant_comps - alm_fates%fates(ci)%bc_in(s)%plant_p_uptake_flux(p,j_f) = & - alm_fates%fates(ci)%bc_in(s)%plant_p_uptake_flux(p,j_f) + & + alm_fates%fates(ci)%bc_in(s)%plant_p_uptake_flux(p,1) = & + alm_fates%fates(ci)%bc_in(s)%plant_p_uptake_flux(p,1) + & biochem_pmin_to_plant_vr_patch(p,j)*dt*dzsoi_decomp(j) biochem_pmin_to_plant(c) = biochem_pmin_to_plant(c) + & diff --git a/components/elm/src/biogeochem/PhosphorusStateUpdate3Mod.F90 b/components/elm/src/biogeochem/PhosphorusStateUpdate3Mod.F90 index 44f826c24282..b054dd19fae5 100644 --- a/components/elm/src/biogeochem/PhosphorusStateUpdate3Mod.F90 +++ b/components/elm/src/biogeochem/PhosphorusStateUpdate3Mod.F90 @@ -182,17 +182,34 @@ subroutine PhosphorusStateUpdate3(bounds,num_soilc, filter_soilc, num_soilp, fil col_pf%sminp_leached_vr(c,j)*dt )) if (temp_solutionp(c,j) < 0.0_r8) then - col_pf%labilep_to_secondp_vr(c,j) = col_pf%labilep_to_secondp_vr(c,j)/ & + + if( abs(col_pf%labilep_to_secondp_vr(c,j)+col_pf%sminp_leached_vr(c,j)) >1.e-20_r8 )then + + col_pf%labilep_to_secondp_vr(c,j) = col_pf%labilep_to_secondp_vr(c,j)/ & (col_pf%labilep_to_secondp_vr(c,j)+col_pf%sminp_leached_vr(c,j))* & (temp_solutionp(c,j) + col_pf%labilep_to_secondp_vr(c,j)*dt + & col_pf%sminp_leached_vr(c,j)*dt) /dt - col_pf%sminp_leached_vr(c,j) = col_pf%sminp_leached_vr(c,j)/ & + + col_pf%sminp_leached_vr(c,j) = col_pf%sminp_leached_vr(c,j)/ & (col_pf%labilep_to_secondp_vr(c,j)+col_pf%sminp_leached_vr(c,j))* & (temp_solutionp(c,j) + col_pf%labilep_to_secondp_vr(c,j)*dt + & col_pf%sminp_leached_vr(c,j)*dt) /dt - temp_solutionp(c,j) = 0.0_r8 - col_ps%solutionp_vr(c,j) = 0.0_r8 - col_ps%labilep_vr(c,j) = 0.0_r8 + else + ! If there is nothing there to drive proportions, just split it + col_pf%labilep_to_secondp_vr(c,j) = 0.5_r8 * & + (temp_solutionp(c,j) + col_pf%labilep_to_secondp_vr(c,j)*dt + & + col_pf%sminp_leached_vr(c,j)*dt) /dt + + col_pf%sminp_leached_vr(c,j) = 0.5_r8 * & + (temp_solutionp(c,j) + col_pf%labilep_to_secondp_vr(c,j)*dt + & + col_pf%sminp_leached_vr(c,j)*dt) /dt + + end if + + + temp_solutionp(c,j) = 0.0_r8 + col_ps%solutionp_vr(c,j) = 0.0_r8 + col_ps%labilep_vr(c,j) = 0.0_r8 else ! sorbp = smax*solutionp/(ks+solutionp) ! sorbp + solutionp = smax*solutionp/(ks+solutionp) + solutionp = total p pool after competition diff --git a/components/elm/src/biogeophys/BalanceCheckMod.F90 b/components/elm/src/biogeophys/BalanceCheckMod.F90 index 6c04e2a68f7c..1280f7f94939 100755 --- a/components/elm/src/biogeophys/BalanceCheckMod.F90 +++ b/components/elm/src/biogeophys/BalanceCheckMod.F90 @@ -191,6 +191,7 @@ subroutine ColWaterBalanceCheck( bounds, num_do_smb_c, filter_do_smb_c, & integer :: indexp,indexc,indexl,indext,indexg ! index of first found in search loop real(r8) :: forc_rain_col(bounds%begc:bounds%endc) ! column level rain rate [mm/s] real(r8) :: forc_snow_col(bounds%begc:bounds%endc) ! column level snow rate [mm/s] + real(r8) :: sol_err_th ! solar radiation imbalance threshold !----------------------------------------------------------------------- associate( & @@ -616,7 +617,14 @@ subroutine ColWaterBalanceCheck( bounds, num_do_smb_c, filter_do_smb_c, & found = .false. do p = bounds%begp, bounds%endp if (veg_pp%active(p)) then - if ( (errsol(p) /= spval) .and. (abs(errsol(p)) > 1.e-7_r8) ) then + ! solar radiation balance error is high when running FATES + ! adjust the threshold to 5.e-7 + if (veg_pp%is_fates(p)) then + sol_err_th = 5.e-7_r8 + else + sol_err_th = 1.e-7_r8 + end if + if ( (errsol(p) /= spval) .and. (abs(errsol(p)) > sol_err_th) ) then found = .true. indexp = p indext = veg_pp%topounit(indexp) diff --git a/components/elm/src/data_types/ColumnDataType.F90 b/components/elm/src/data_types/ColumnDataType.F90 index 4035fda2ff72..6a5c0cac7e6b 100644 --- a/components/elm/src/data_types/ColumnDataType.F90 +++ b/components/elm/src/data_types/ColumnDataType.F90 @@ -2090,6 +2090,16 @@ subroutine col_cs_init(this, begc, endc, carbon_type, ratio, c12_carbonstate_var avgflag='A', long_name='total column carbon, incl veg and cpool but excl product pools', & ptr_col=this%totcolc) + this%prod10c(begc:endc) = spval + call hist_addfld1d (fname='PROD10C', units='gC/m^2', & + avgflag='A', long_name='10-yr wood product C', & + ptr_col=this%prod10c, default='inactive') + + this%prod100c(begc:endc) = spval + call hist_addfld1d (fname='PROD100C', units='gC/m^2', & + avgflag='A', long_name='100-yr wood product C', & + ptr_col=this%prod100c, default='inactive') + if(.not.use_fates)then this%seedc(begc:endc) = spval @@ -2097,16 +2107,6 @@ subroutine col_cs_init(this, begc, endc, carbon_type, ratio, c12_carbonstate_var avgflag='A', long_name='pool for seeding new Patches', & ptr_col=this%seedc, default='inactive') - this%prod10c(begc:endc) = spval - call hist_addfld1d (fname='PROD10C', units='gC/m^2', & - avgflag='A', long_name='10-yr wood product C', & - ptr_col=this%prod10c, default='inactive') - - this%prod100c(begc:endc) = spval - call hist_addfld1d (fname='PROD100C', units='gC/m^2', & - avgflag='A', long_name='100-yr wood product C', & - ptr_col=this%prod100c, default='inactive') - this%prod1c(begc:endc) = spval call hist_addfld1d (fname='PROD1C', units='gC/m^2', & avgflag='A', long_name='1-yr crop product C', & @@ -5763,6 +5763,33 @@ subroutine col_cf_init(this, begc, endc, carbon_type) call hist_addfld1d (fname='HR', units='gC/m^2/s', & avgflag='A', long_name='total heterotrophic respiration', & ptr_col=this%hr) + + this%hrv_deadstemc_to_prod10c(begc:endc) = spval + call hist_addfld1d (fname='HRV_DEADSTEMC_TO_PROD10C', units='gC/m^2/s', & + avgflag='A', long_name='flux into 10-yr wood product C', & + ptr_col=this%hrv_deadstemc_to_prod10c, default='inactive') + + this%hrv_deadstemc_to_prod100c(begc:endc) = spval + call hist_addfld1d (fname='HRV_DEADSTEMC_TO_PROD100C', units='gC/m^2/s', & + avgflag='A', long_name='flux into 100-yr wood product C', & + ptr_col=this%hrv_deadstemc_to_prod100c, default='inactive') + + this%nep(begc:endc) = spval + call hist_addfld1d (fname='NEP', units='gC/m^2/s', & + avgflag='A', long_name='net ecosystem production, excludes fire, landuse, and harvest flux, positive for sink', & + ptr_col=this%nep) + + this%nbp(begc:endc) = spval + call hist_addfld1d (fname='NBP', units='gC/m^2/s', & + avgflag='A', long_name='net biome production, includes fire, landuse, and harvest flux, positive for sink', & + ptr_col=this%nbp) + + this%nee(begc:endc) = spval + call hist_addfld1d (fname='NEE', units='gC/m^2/s', & + avgflag='A', long_name='net ecosystem exchange of carbon, includes fire, landuse,'& + //' harvest, and hrv_xsmrpool flux, positive for source', & + ptr_col=this%nee) + end if ! end of use_fates (C12) block diff --git a/components/elm/src/dyn_subgrid/dynHarvestMod.F90 b/components/elm/src/dyn_subgrid/dynHarvestMod.F90 index 050d123e71bc..9389efeda052 100644 --- a/components/elm/src/dyn_subgrid/dynHarvestMod.F90 +++ b/components/elm/src/dyn_subgrid/dynHarvestMod.F90 @@ -25,8 +25,7 @@ module dynHarvestMod use ColumnDataType , only : col_cf, col_nf, col_pf use VegetationType , only : veg_pp use VegetationDataType , only : veg_cs, veg_cf, veg_ns, veg_nf - use topounit_varcon , only : max_topounits - use VegetationDataType , only : veg_ps, veg_pf + use topounit_varcon , only : max_topounits use VegetationDataType , only : veg_ps, veg_pf use elm_varctl , only : use_cn, use_fates, iulog use FatesConstantsMod , only : hlm_harvest_area_fraction @@ -66,22 +65,23 @@ module dynHarvestMod ! for FATES: capacity for passing harvest data in units of carbon harvested per year (per grid cell) has been added ! but these data are not yet included in the input file ! the code here can be changed to wood_harvest_units = harvest_carbon to pass carbon data to FATES if: - ! the carbon data are in the same input variables as listed below - ! and the carbon units in the input file match that expected by FATES + ! the carbon data are in the same input variables as listed below + ! and the carbon units in the input file match that expected by FATES integer, public, parameter :: num_harvest_vars = 5 character(len=64), public, parameter :: harvest_varnames(num_harvest_vars) = & - [character(len=64) :: 'HARVEST_VH1', 'HARVEST_VH2', 'HARVEST_SH1', 'HARVEST_SH2', 'HARVEST_SH3'] + [character(len=64) :: 'HARVEST_VH1', 'HARVEST_VH2', 'HARVEST_SH1', 'HARVEST_SH2', 'HARVEST_SH3'] + + type(dyn_var_time_uninterp_type) :: harvest_vars(num_harvest_vars) ! value of each harvest variable + ! the units flag must match the units of harvest_varnames ! set this here because dynHarvest_init is called after alm_fates%init ! this flag is accessed only if namelist do_harvest is TRUE - integer, public :: wood_harvest_units = hlm_harvest_area_fraction - - type(dyn_var_time_uninterp_type) :: harvest_vars(num_harvest_vars) ! value of each harvest variable - real(r8) , allocatable, public :: harvest_rates(:,:) ! category harvest rates (d1) in each gridcell (d2) + integer, public, parameter :: wood_harvest_units = 2 ! 1 = area fraction, 2 = carbon + real(r8), allocatable, public :: harvest_rates(:,:) ! harvest rates + logical, private :: do_harvest ! whether we're in a period when we should do harvest - logical, private :: do_harvest ! whether we're in a period when we should do harvest !--------------------------------------------------------------------------- contains @@ -92,8 +92,9 @@ subroutine dynHarvest_init(bounds, harvest_filename) ! !DESCRIPTION: ! Initialize data structures for harvest information. ! This should be called once, during model initialization. - ! - use elm_varctl , only : use_cn + + ! !USES: + use elm_varctl , only : use_cn, use_fates use dynVarTimeUninterpMod , only : dyn_var_time_uninterp_type use dynTimeInfoMod , only : YEAR_POSITION_START_OF_TIMESTEP use dynTimeInfoMod , only : YEAR_POSITION_END_OF_TIMESTEP @@ -156,7 +157,7 @@ subroutine dynHarvest_interp_harvest_types(bounds) ! ! !USES: use dynTimeInfoMod , only : time_info_type - use elm_varctl , only : use_cn, use_fates + use elm_varctl , only : use_cn, use_fates ! ! !ARGUMENTS: type(bounds_type), intent(in) :: bounds ! proc-level bounds @@ -181,7 +182,8 @@ subroutine dynHarvest_interp_harvest_types(bounds) ! means that harvest rates will be maintained at the rate given in the last ! year of the file for all years past the end of this specified time series. do_harvest = .true. - allocate(this_data(bounds%begg:bounds%endg)) + ! Right now we don't account for the topounit in plant harvest + allocate(this_data(bounds%begg:bounds%endg)) do varnum = 1, num_harvest_vars call harvest_vars(varnum)%get_current_data(this_data) harvest_rates(varnum,bounds%begg:bounds%endg) = this_data(bounds%begg:bounds%endg) diff --git a/components/elm/src/external_models/fates b/components/elm/src/external_models/fates index def6b3e76f9f..77753581fb79 160000 --- a/components/elm/src/external_models/fates +++ b/components/elm/src/external_models/fates @@ -1 +1 @@ -Subproject commit def6b3e76f9ff3043150a777f403883b3e659374 +Subproject commit 77753581fb797131955278db8bb6f2cb8ef85f18 diff --git a/components/elm/src/main/elmfates_interfaceMod.F90 b/components/elm/src/main/elmfates_interfaceMod.F90 index 47766090e4b3..76109394c444 100644 --- a/components/elm/src/main/elmfates_interfaceMod.F90 +++ b/components/elm/src/main/elmfates_interfaceMod.F90 @@ -155,9 +155,8 @@ module ELMFatesInterfaceMod use FatesPlantHydraulicsMod, only : InitHydrSites use FatesPlantHydraulicsMod, only : RestartHydrStates - use dynHarvestMod , only : num_harvest_vars, harvest_varnames - use dynHarvestMod , only : harvest_rates ! these are dynamic in space and time use dynHarvestMod , only : num_harvest_vars, harvest_varnames, wood_harvest_units + use dynHarvestMod , only : harvest_rates ! these are dynamic in space and time use FatesConstantsMod , only : hlm_harvest_area_fraction use FatesConstantsMod , only : hlm_harvest_carbon @@ -214,6 +213,7 @@ module ELMFatesInterfaceMod procedure, public :: wrap_accumulatefluxes procedure, public :: prep_canopyfluxes procedure, public :: wrap_canopy_radiation + procedure, public :: wrap_WoodProducts procedure, public :: wrap_update_hifrq_hist procedure, public :: TransferZ0mDisp procedure, public :: UpdateLitterFluxes @@ -349,6 +349,7 @@ subroutine ELMFatesGlobals2() integer :: pass_num_lu_harvest_types integer :: pass_lu_harvest integer :: pass_tree_damage + ! ---------------------------------------------------------------------------------- ! FATES lightning definitions ! 1 : use a global constant lightning rate found in fates_params. @@ -366,11 +367,7 @@ subroutine ELMFatesGlobals2() integer, parameter :: external_lightning = 2 integer, parameter :: successful_ignitions = 3 integer, parameter :: anthro_ignitions= 4 - - ! We will use this switch temporarily, until we complete - ! the ELM-FATES harvest integration - logical, parameter :: do_elm_fates_harvest = .false. - + if (use_fates) then ! Send parameters individually @@ -464,7 +461,6 @@ subroutine ELMFatesGlobals2() pass_logging = 0 end if -! if(do_elm_fates_harvest) then if(get_do_harvest()) then pass_logging = 1 pass_num_lu_harvest_types = num_harvest_vars @@ -743,7 +739,6 @@ subroutine init(this, bounds_proc ) end do - ! Initialize site-level static quantities dictated by the HLM ! currently ground layering depth @@ -823,6 +818,7 @@ subroutine dynamics_driv(this, bounds_clump, top_as_inst, & top_af_inst, atm2lnd_inst, soilstate_inst, temperature_inst, & canopystate_inst, frictionvel_inst ) + use FatesConstantsMod , only : m2_per_km2 ! This wrapper is called daily from clm_driver ! This wrapper calls ed_driver, which is the daily dynamics component of FATES @@ -937,6 +933,7 @@ subroutine dynamics_driv(this, bounds_clump, top_as_inst, & this%fates(nc)%bc_in(s)%hlm_harvest_catnames = harvest_varnames this%fates(nc)%bc_in(s)%hlm_harvest_units = wood_harvest_units end if + this%fates(nc)%bc_in(s)%site_area=col_pp%wtgcell(c)*grc_pp%area(g)*m2_per_km2 end do @@ -951,6 +948,9 @@ subroutine dynamics_driv(this, bounds_clump, top_as_inst, & ! --------------------------------------------------------------------------------- call fates_hist%flush_hvars(nc,upfreq_in=1) + ! Frequency 5 is routine that processes FATES history + ! on the dynamics (daily) step, but before disturbance + call fates_hist%flush_hvars(nc,upfreq_in=5) ! --------------------------------------------------------------------------------- ! Part II: Call the FATES model now that input boundary conditions have been @@ -984,7 +984,8 @@ subroutine dynamics_driv(this, bounds_clump, top_as_inst, & ! --------------------------------------------------------------------------------- call fates_hist%update_history_dyn( nc, & this%fates(nc)%nsites, & - this%fates(nc)%sites) + this%fates(nc)%sites, & + this%fates(nc)%bc_in) if (masterproc) then write(iulog, *) 'FATES dynamics complete' @@ -1159,7 +1160,7 @@ subroutine wrap_update_hlmfates_dyn(this, nc, bounds_clump, & this%fates(nc)%sites, & this%fates(nc)%bc_in) - ! Canopy diagnostic outputs for HLM + ! Canopy diagnostic outputs for HLM, including LUC call update_hlm_dynamics(this%fates(nc)%nsites, & this%fates(nc)%sites, & this%f2hmap(nc)%fcolumn, & @@ -1231,7 +1232,6 @@ subroutine wrap_update_hlmfates_dyn(this, nc, bounds_clump, & ! initialize SP mode pft order index to 0. Below ground is the 0th patch veg_pp%sp_pftorder_index(col_pp%pfti(c)) = 0 - areacheck = veg_pp%wt_ed(col_pp%pfti(c)) do ifp = 1, this%fates(nc)%sites(s)%youngest_patch%patchno @@ -1621,7 +1621,8 @@ subroutine restart( this, bounds_proc, ncid, flag, & end do call fates_hist%update_history_dyn( nc, & this%fates(nc)%nsites, & - this%fates(nc)%sites) + this%fates(nc)%sites, & + this%fates(nc)%bc_in) end if @@ -1778,7 +1779,8 @@ subroutine init_coldstart(this, canopystate_inst, soilstate_inst, frictionvel_in end do call fates_hist%update_history_dyn( nc, & this%fates(nc)%nsites, & - this%fates(nc)%sites) + this%fates(nc)%sites, & + this%fates(nc)%bc_in) @@ -2264,6 +2266,48 @@ end subroutine wrap_accumulatefluxes ! ====================================================================================== + subroutine wrap_WoodProducts(this, bounds_clump, fc, filterc) + + use FatesConstantsMod , only : g_per_kg + + ! !ARGUMENTS: + class(hlm_fates_interface_type), intent(inout) :: this + type(bounds_type) , intent(in) :: bounds_clump + integer , intent(in) :: fc ! size of column filter + integer , intent(in) :: filterc(fc) ! column filter + + ! Locacs + integer :: s,c,icc + integer :: nc + + associate(& + gpp => col_cf%gpp , & + ar => col_cf%ar , & + hrv_deadstemc_to_prod10c => col_cf%hrv_deadstemc_to_prod10c , & + hrv_deadstemc_to_prod100c => col_cf%hrv_deadstemc_to_prod100c) + + nc = bounds_clump%clump_index + ! Loop over columns + do icc = 1,fc + c = filterc(icc) + s = this%f2hmap(nc)%hsites(c) + + ! Pass harvested wood products to ELM variable + hrv_deadstemc_to_prod10c(c) = this%fates(nc)%bc_out(s)%hrv_deadstemc_to_prod10c + hrv_deadstemc_to_prod100c(c) = this%fates(nc)%bc_out(s)%hrv_deadstemc_to_prod100c + + ! Pass LUC related C fluxes which are calculated in FATES [gC m-2 s-1] + gpp(c) = this%fates(nc)%bc_out(s)%gpp_site*g_per_kg + ar(c) = this%fates(nc)%bc_out(s)%ar_site*g_per_kg + + end do + + end associate + return + end subroutine wrap_WoodProducts + + ! ====================================================================================== + subroutine wrap_canopy_radiation(this, bounds_clump, & num_vegsol, filter_vegsol, coszen, surfalb_inst) diff --git a/components/elm/src/main/pftvarcon.F90 b/components/elm/src/main/pftvarcon.F90 index 15afd2ea62a4..4f7d411ea15f 100644 --- a/components/elm/src/main/pftvarcon.F90 +++ b/components/elm/src/main/pftvarcon.F90 @@ -854,7 +854,11 @@ subroutine pftconrd if ( .not. readv ) call endrun(msg=' ERROR: error in reading in KM_NIT'//errMsg(__FILE__, __LINE__)) call ncd_io('KM_DEN',KM_DEN, 'read', ncid, readvar=readv) if ( .not. readv ) call endrun(msg=' ERROR: error in reading in KM_DEN'//errMsg(__FILE__, __LINE__)) - + call ncd_io('pinit_beta1',pinit_beta1, 'read', ncid, readvar=readv) + if ( .not. readv ) pinit_beta1(:) = 0.5_r8 + call ncd_io('pinit_beta2',pinit_beta2, 'read', ncid, readvar=readv) + if ( .not. readv ) pinit_beta2(:) = 0.1_r8 + if(.not.use_fates) then call ncd_io('VMAX_PLANT_NH4',VMAX_PLANT_NH4, 'read', ncid, readvar=readv) @@ -901,10 +905,6 @@ subroutine pftconrd if ( .not. readv ) call endrun(msg=' ERROR: error in reading in s_vc'//errMsg(__FILE__, __LINE__)) call ncd_io('nsc_rtime',nsc_rtime, 'read', ncid, readvar=readv) if ( .not. readv ) nsc_rtime(:) = 1.0_r8 - call ncd_io('pinit_beta1',pinit_beta1, 'read', ncid, readvar=readv) - if ( .not. readv ) pinit_beta1(:) = 0.5_r8 - call ncd_io('pinit_beta2',pinit_beta2, 'read', ncid, readvar=readv) - if ( .not. readv ) pinit_beta2(:) = 0.1_r8 ! new stoichiometry call ncd_io('leafcn_obs',leafcn_obs, 'read', ncid, readvar=readv, posNOTonfile=.true.) if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(__FILE__, __LINE__))