Skip to content

Commit 74dea15

Browse files
fmyuanthorntonpe
authored andcommitted
crop and perenial crop pft flag, 'iscft', is added so that crop pft indexing may be not in need anymore.
1 parent 52910a3 commit 74dea15

37 files changed

+221
-259
lines changed

components/elm/src/biogeochem/AllocationMod.F90

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
386386
use elm_varctl , only : carbonphosphorus_only!
387387
use pftvarcon , only: npcropmin, declfact, bfact, aleaff, arootf, astemf, noveg
388388
use pftvarcon , only: arooti, fleafi, allconsl, allconss, grperc, grpnow, nsoybean
389-
use pftvarcon , only: percrop
389+
use pftvarcon , only: iscft, percrop
390390
use elm_varpar , only: nlevdecomp
391391
use elm_varcon , only: nitrif_n2o_loss_frac, secspday
392392
!
@@ -585,7 +585,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
585585
mr = leaf_mr(p) + froot_mr(p)
586586
if (woody(ivt(p)) >= 1.0_r8) then
587587
mr = mr + livestem_mr(p) + livecroot_mr(p)
588-
else if (ivt(p) >= npcropmin) then
588+
else if (iscft(ivt(p)) >= 1) then
589589
if (croplive(p)) mr = mr + livestem_mr(p) + grain_mr(p)
590590
end if
591591

@@ -672,7 +672,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
672672

673673
f5 = 0._r8 ! continued intializations from above
674674

675-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
675+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
676676

677677
if (croplive(p) .and. percrop(ivt(p)) == 0.0_r8 ) then
678678
! same phases appear in subroutine CropPhenology
@@ -822,7 +822,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
822822
p_allometry(p) = 1._r8/cpl + f1/cpfr + (f3*f4*(1._r8+f2))/cplw + &
823823
(f3*(1._r8-f4)*(1._r8+f2))/cpdw
824824

825-
else if (ivt(p) >= npcropmin) then ! skip generic crops
825+
else if (iscft(ivt(p)) >= 1) then ! skip generic crops
826826
cng = graincn(ivt(p))
827827
cpg = graincp(ivt(p))
828828
c_allometry(p) = (1._r8+g1)*(1._r8+f1+f5+f3*(1._r8+f2))
@@ -852,10 +852,10 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
852852
! retransn pool has N from leaves, stems, and roots for
853853
! retranslocation
854854

855-
if (ivt(p) >= npcropmin .and. grain_flag(p) == 1._r8) then
855+
if (iscft(ivt(p)) >= 1 .and. grain_flag(p) == 1._r8) then
856856
avail_retransn(p) = plant_ndemand(p)
857857
avail_retransp(p) = plant_pdemand(p)
858-
else if (ivt(p) < npcropmin .and. annsum_potential_gpp(p) > 0._r8) then
858+
else if (iscft(ivt(p)) < 1 .and. annsum_potential_gpp(p) > 0._r8) then
859859
avail_retransn(p) = (annmax_retransn(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
860860
avail_retransp(p) = (annmax_retransp(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
861861
else
@@ -1859,7 +1859,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
18591859
!$acc routine seq
18601860
use elm_varctl , only: iulog
18611861
use pftvarcon , only: noveg
1862-
use pftvarcon , only: npcropmin, grperc, grpnow
1862+
use pftvarcon , only: iscft, grperc, grpnow
18631863
use elm_varpar , only: nlevdecomp
18641864
use elm_varcon , only: nitrif_n2o_loss_frac, secspday
18651865
!
@@ -2142,7 +2142,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
21422142

21432143
fcur = fcur2(ivt(p))
21442144

2145-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
2145+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
21462146
if (croplive(p)) then
21472147
f1 = aroot(p) / aleaf(p)
21482148
f3 = astem(p) / aleaf(p)
@@ -2328,7 +2328,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
23282328

23292329
fcur = fcur2(ivt(p))
23302330

2331-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
2331+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
23322332
if (croplive(p)) then
23332333
f1 = aroot(p) / aleaf(p)
23342334
f3 = astem(p) / aleaf(p)
@@ -2345,10 +2345,10 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
23452345
sminn_to_npool(p) = sminn_to_plant_patch(p)
23462346
sminp_to_ppool(p) = sminp_to_plant_patch(p)
23472347

2348-
if (ivt(p) >= npcropmin .and. grain_flag(p) == 1._r8) then
2348+
if (iscft(ivt(p)) >= 1 .and. grain_flag(p) == 1._r8) then
23492349
avail_retransn(p) = retransn(p)/dt
23502350
avail_retransp(p) = retransp(p)/dt
2351-
else if (ivt(p) < npcropmin .and. annsum_potential_gpp(p) > 0._r8) then
2351+
else if (iscft(ivt(p)) < 1 .and. annsum_potential_gpp(p) > 0._r8) then
23522352
avail_retransn(p) = (annmax_retransn(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
23532353
avail_retransp(p) = (annmax_retransp(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
23542354
else
@@ -2374,7 +2374,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
23742374
mr = leaf_mr(p) + froot_mr(p)
23752375
if (woody(ivt(p)) >= 1.0_r8) then
23762376
mr = mr + livestem_mr(p) + livecroot_mr(p)
2377-
else if (ivt(p) >= npcropmin) then
2377+
else if (iscft(ivt(p)) >= 1) then
23782378
if (croplive(p)) mr = mr + livestem_mr(p) + grain_mr(p)
23792379
end if
23802380

@@ -2473,7 +2473,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
24732473
p_allometry(p) = 1._r8/cpl + f1/cpfr + (f3*f4*(1._r8+f2))/cplw + &
24742474
(f3*(1._r8-f4)*(1._r8+f2))/cpdw
24752475

2476-
else if (ivt(p) >= npcropmin) then ! skip generic crops
2476+
else if (iscft(ivt(p)) >= 1) then ! skip generic crops
24772477
cng = graincn(ivt(p))
24782478
cpg = graincp(ivt(p))
24792479
c_allometry(p) = (1._r8+g1)*(1._r8+f1+f5+f3*(1._r8+f2))
@@ -2559,7 +2559,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
25592559
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f2 * f3 * (1._r8 - f4) * fcur * (1 + g1)
25602560
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f2 * f3 * (1._r8 - f4) * (1._r8 - fcur) * (1 + g1)
25612561
end if
2562-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
2562+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
25632563
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * f4 * fcur * (1 + g1)
25642564
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * f4 * (1._r8 - fcur) * (1 + g1)
25652565
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * (1._r8 - f4) * fcur * (1 + g1)
@@ -2590,7 +2590,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
25902590
cpool_to_deadcrootc(p) = nlc * f2 * f3 * (1._r8 - f4) * fcur
25912591
cpool_to_deadcrootc_storage(p) = nlc * f2 * f3 * (1._r8 - f4) * (1._r8 - fcur)
25922592
end if
2593-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
2593+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
25942594
cpool_to_livestemc(p) = nlc * f3 * f4 * fcur
25952595
cpool_to_livestemc_storage(p) = nlc * f3 * f4 * (1._r8 - fcur)
25962596
cpool_to_deadstemc(p) = nlc * f3 * (1._r8 - f4) * fcur
@@ -2643,7 +2643,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
26432643
npool_to_deadcrootn(p) = (nlc * f2 * f3 * (1._r8 - f4) / cndw) * fcur
26442644
npool_to_deadcrootn_storage(p) = (nlc * f2 * f3 * (1._r8 - f4) / cndw) * (1._r8 - fcur)
26452645
end if
2646-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
2646+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
26472647
cng = graincn(ivt(p))
26482648
npool_to_livestemn(p) = (nlc * f3 * f4 / cnlw) * fcur
26492649
npool_to_livestemn_storage(p) = (nlc * f3 * f4 / cnlw) * (1._r8 - fcur)
@@ -2687,7 +2687,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
26872687
ppool_to_deadcrootp(p) = (nlc * f2 * f3 * (1._r8 - f4) / cpdw)* fcur
26882688
ppool_to_deadcrootp_storage(p) = (nlc * f2 * f3 * (1._r8 - f4) / cpdw)* (1._r8 - fcur)
26892689
end if
2690-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
2690+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
26912691
cpg = graincp(ivt(p))
26922692
ppool_to_livestemp(p) = (nlc * f3 * f4 / cplw) * fcur
26932693
ppool_to_livestemp_storage(p) = (nlc * f3 * f4 / cplw) * (1._r8 -fcur)
@@ -2717,7 +2717,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
27172717
gresp_storage = gresp_storage + cpool_to_livecrootc_storage(p)
27182718
gresp_storage = gresp_storage + cpool_to_deadcrootc_storage(p)
27192719
end if
2720-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
2720+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
27212721
gresp_storage = gresp_storage + cpool_to_livestemc_storage(p)
27222722
gresp_storage = gresp_storage + cpool_to_grainc_storage(p)
27232723
end if
@@ -2771,7 +2771,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
27712771
npool_to_deadcrootn(p) = cpool_to_deadcrootc(p) / cndw
27722772
npool_to_deadcrootn_storage(p) = cpool_to_deadcrootc_storage(p) / cndw
27732773
end if
2774-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
2774+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
27752775
cng = graincn(ivt(p))
27762776
supplement_to_plantn(p) = supplement_to_plantn(p) + cpool_to_livestemc(p) / cnlw - npool_to_livestemn(p)
27772777
supplement_to_plantn(p) = supplement_to_plantn(p) + cpool_to_livestemc_storage(p) / cnlw &
@@ -2843,7 +2843,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
28432843
ppool_to_deadcrootp(p) = cpool_to_deadcrootc(p) / cpdw
28442844
ppool_to_deadcrootp_storage(p) = cpool_to_deadcrootc_storage(p) / cpdw
28452845
end if
2846-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
2846+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
28472847
cpg = graincp(ivt(p))
28482848
supplement_to_plantp(p) = supplement_to_plantp(p) + max(cpool_to_livestemc(p) / cplw &
28492849
- ppool_to_livestemp(p),0._r8)

components/elm/src/biogeochem/CNAllocationBetrMod.F90

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
246246
use shr_sys_mod , only: shr_sys_flush
247247
use elm_varctl , only: iulog,cnallocate_carbon_only,cnallocate_carbonnitrogen_only,&
248248
cnallocate_carbonphosphorus_only
249-
use pftvarcon , only: npcropmin, declfact, bfact, aleaff, arootf, astemf, noveg
249+
use pftvarcon , only: iscft, declfact, bfact, aleaff, arootf, astemf, noveg
250250
use pftvarcon , only: arooti, fleafi, allconsl, allconss, grperc, grpnow, nsoybean
251251
use elm_varpar , only: nlevdecomp
252252
use elm_varcon , only: nitrif_n2o_loss_frac, secspday
@@ -645,7 +645,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
645645
mr = leaf_mr(p) + froot_mr(p)
646646
if (woody(ivt(p)) >= 1.0_r8) then
647647
mr = mr + livestem_mr(p) + livecroot_mr(p)
648-
else if (ivt(p) >= npcropmin) then
648+
else if (iscft(ivt(p)) >= 1) then
649649
if (croplive(p)) mr = mr + livestem_mr(p) + grain_mr(p)
650650
end if
651651

@@ -726,7 +726,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
726726

727727
f5 = 0._r8 ! continued intializations from above
728728

729-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
729+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
730730

731731
if (croplive(p)) then
732732
! same phases appear in subroutine CropPhenology
@@ -859,7 +859,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
859859
p_allometry(p) = 1._r8/cpl + f1/cpfr + (f3*f4*(1._r8+f2))/cplw + &
860860
(f3*(1._r8-f4)*(1._r8+f2))/cpdw
861861

862-
else if (ivt(p) >= npcropmin) then ! skip generic crops
862+
else if (iscft(ivt(p)) >= 1) then ! skip generic crops
863863
cng = graincn(ivt(p))
864864
cpg = graincp(ivt(p))
865865
c_allometry(p) = (1._r8+g1)*(1._r8+f1+f5+f3*(1._r8+f2))
@@ -889,10 +889,10 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
889889
! retransn pool has N from leaves, stems, and roots for
890890
! retranslocation
891891

892-
if (ivt(p) >= npcropmin .and. grain_flag(p) == 1._r8) then
892+
if (iscft(ivt(p)) >= 1 .and. grain_flag(p) == 1._r8) then
893893
avail_retransn(p) = plant_ndemand(p)
894894
avail_retransp(p) = plant_pdemand(p)
895-
else if (ivt(p) < npcropmin .and. annsum_potential_gpp(p) > 0._r8) then
895+
else if (iscft(ivt(p)) < 1 .and. annsum_potential_gpp(p) > 0._r8) then
896896
avail_retransn(p) = (annmax_retransn(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
897897
avail_retransp(p) = (annmax_retransp(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
898898
else
@@ -1105,10 +1105,10 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
11051105
use shr_sys_mod , only: shr_sys_flush
11061106
use elm_varctl , only: iulog,cnallocate_carbon_only,cnallocate_carbonnitrogen_only,&
11071107
cnallocate_carbonphosphorus_only
1108-
! use pftvarcon , only: npcropmin, declfact, bfact, aleaff, arootf, astemf
1108+
! use pftvarcon , only: iscft, declfact, bfact, aleaff, arootf, astemf
11091109
! use pftvarcon , only: arooti, fleafi, allconsl, allconss, grperc, grpnow, nsoybean
11101110
use pftvarcon , only: noveg
1111-
use pftvarcon , only: npcropmin, grperc, grpnow
1111+
use pftvarcon , only: iscft, grperc, grpnow
11121112
use elm_varpar , only: nlevdecomp !!nlevsoi,
11131113
use elm_varcon , only: nitrif_n2o_loss_frac, secspday
11141114
! use landunit_varcon , only: istsoil, istcrop
@@ -1393,7 +1393,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
13931393

13941394
fcur = fcur2(ivt(p))
13951395

1396-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
1396+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
13971397
if (croplive(p)) then
13981398
f1 = aroot(p) / aleaf(p)
13991399
f3 = astem(p) / aleaf(p)
@@ -1412,10 +1412,10 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
14121412
plant_n_buffer_patch(p) = plant_n_buffer_patch(p) * (1._r8-dt/taun)
14131413
plant_p_buffer_patch(p) = plant_p_buffer_patch(p) * (1._r8-dt/taun)
14141414

1415-
if (ivt(p) >= npcropmin .and. grain_flag(p) == 1._r8) then
1415+
if (iscft(ivt(p)) >= 1 .and. grain_flag(p) == 1._r8) then
14161416
avail_retransn(p) = retransn(p)/dt
14171417
avail_retransp(p) = retransp(p)/dt
1418-
else if (ivt(p) < npcropmin .and. annsum_potential_gpp(p) > 0._r8) then
1418+
else if (iscft(ivt(p)) < 1 .and. annsum_potential_gpp(p) > 0._r8) then
14191419
avail_retransn(p) = (annmax_retransn(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
14201420
avail_retransp(p) = (annmax_retransp(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
14211421
else
@@ -1436,7 +1436,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
14361436
mr = leaf_mr(p) + froot_mr(p)
14371437
if (woody(ivt(p)) >= 1.0_r8) then
14381438
mr = mr + livestem_mr(p) + livecroot_mr(p)
1439-
else if (ivt(p) >= npcropmin) then
1439+
else if (iscft(ivt(p)) >= 1) then
14401440
if (croplive(p)) mr = mr + livestem_mr(p) + grain_mr(p)
14411441
end if
14421442
! try to take mr from xsmr storage pool first
@@ -1530,7 +1530,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
15301530
p_allometry(p) = 1._r8/cpl + f1/cpfr + (f3*f4*(1._r8+f2))/cplw + &
15311531
(f3*(1._r8-f4)*(1._r8+f2))/cpdw
15321532

1533-
else if (ivt(p) >= npcropmin) then ! skip generic crops
1533+
else if (iscft(ivt(p)) >= 1) then ! skip generic crops
15341534
cng = graincn(ivt(p))
15351535
cpg = graincp(ivt(p))
15361536
c_allometry(p) = (1._r8+g1)*(1._r8+f1+f5+f3*(1._r8+f2))
@@ -1614,7 +1614,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
16141614
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f2 * f3 * (1._r8 - f4) * fcur * (1 + g1)
16151615
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f2 * f3 * (1._r8 - f4) * (1._r8 - fcur) * (1 + g1)
16161616
end if
1617-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
1617+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
16181618
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * f4 * fcur * (1 + g1)
16191619
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * f4 * (1._r8 - fcur) * (1 + g1)
16201620
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * (1._r8 - f4) * fcur * (1 + g1)
@@ -1645,7 +1645,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
16451645
cpool_to_deadcrootc(p) = nlc * f2 * f3 * (1._r8 - f4) * fcur
16461646
cpool_to_deadcrootc_storage(p) = nlc * f2 * f3 * (1._r8 - f4) * (1._r8 - fcur)
16471647
end if
1648-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
1648+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
16491649
cpool_to_livestemc(p) = nlc * f3 * f4 * fcur
16501650
cpool_to_livestemc_storage(p) = nlc * f3 * f4 * (1._r8 - fcur)
16511651
cpool_to_deadstemc(p) = nlc * f3 * (1._r8 - f4) * fcur
@@ -1698,7 +1698,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
16981698
npool_to_deadcrootn(p) = (nlc * f2 * f3 * (1._r8 - f4) / cndw) * fcur
16991699
npool_to_deadcrootn_storage(p) = (nlc * f2 * f3 * (1._r8 - f4) / cndw) * (1._r8 - fcur)
17001700
end if
1701-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
1701+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
17021702
cng = graincn(ivt(p))
17031703
npool_to_livestemn(p) = (nlc * f3 * f4 / cnlw) * fcur
17041704
npool_to_livestemn_storage(p) = (nlc * f3 * f4 / cnlw) * (1._r8 - fcur)
@@ -1742,7 +1742,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
17421742
ppool_to_deadcrootp(p) = (nlc * f2 * f3 * (1._r8 - f4) / cpdw)* fcur
17431743
ppool_to_deadcrootp_storage(p) = (nlc * f2 * f3 * (1._r8 - f4) / cpdw)* (1._r8 - fcur)
17441744
end if
1745-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
1745+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
17461746
cpg = graincp(ivt(p))
17471747
ppool_to_livestemp(p) = (nlc * f3 * f4 / cplw) * fcur
17481748
ppool_to_livestemp_storage(p) = (nlc * f3 * f4 / cplw) * (1._r8 -fcur)
@@ -1772,7 +1772,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
17721772
gresp_storage = gresp_storage + cpool_to_livecrootc_storage(p)
17731773
gresp_storage = gresp_storage + cpool_to_deadcrootc_storage(p)
17741774
end if
1775-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
1775+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
17761776
gresp_storage = gresp_storage + cpool_to_livestemc_storage(p)
17771777
gresp_storage = gresp_storage + cpool_to_grainc_storage(p)
17781778
end if
@@ -1820,7 +1820,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
18201820
npool_to_deadcrootn(p) = cpool_to_deadcrootc(p) / cndw
18211821
npool_to_deadcrootn_storage(p) = cpool_to_deadcrootc_storage(p) / cndw
18221822
end if
1823-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
1823+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
18241824
cng = graincn(ivt(p))
18251825
supplement_to_sminn_vr(c,1) = supplement_to_sminn_vr(c,1) + cpool_to_livestemc(p) / cnlw - npool_to_livestemn(p)
18261826
supplement_to_sminn_vr(c,1) = supplement_to_sminn_vr(c,1) + cpool_to_livestemc_storage(p) / cnlw &
@@ -1891,7 +1891,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
18911891
ppool_to_deadcrootp(p) = cpool_to_deadcrootc(p) / cpdw
18921892
ppool_to_deadcrootp_storage(p) = cpool_to_deadcrootc_storage(p) / cpdw
18931893
end if
1894-
if (ivt(p) >= npcropmin) then ! skip 2 generic crops
1894+
if (iscft(ivt(p)) >= 1) then ! skip 2 generic crops
18951895
cpg = graincp(ivt(p))
18961896
supplement_to_sminp_vr(c,1) = supplement_to_sminp_vr(c,1) + max(cpool_to_livestemc(p) / cplw &
18971897
- ppool_to_livestemp(p),0._r8)

0 commit comments

Comments
 (0)