Skip to content

Commit 1d07087

Browse files
odombrokvrigor
authored andcommitted
cleaned up some scripts, added some crop types to active CFTs
1 parent be24b93 commit 1d07087

5 files changed

Lines changed: 7 additions & 12 deletions

File tree

src/clm5/biogeochem/CNBalanceCheckMod.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ subroutine BeginCNBalance(this, bounds, num_soilc, filter_soilc, &
105105
c = filter_soilc(fc)
106106
col_begcb(c) = totcolc(c)
107107
col_begnb(c) = totcoln(c)
108+
108109
end do
109110

110111
end associate
@@ -161,10 +162,9 @@ subroutine CBalanceCheck(this, bounds, num_soilc, filter_soilc, &
161162

162163
! calculate the total column-level carbon storage, for mass conservation check
163164
col_endcb(c) = totcolc(c)
164-
165165
! calculate total column-level inputs
166166
col_cinputs = gpp(c)
167-
167+
168168
! calculate total column-level outputs
169169
! er = ar + hr, col_fire_closs includes patch-level fire losses
170170
col_coutputs = er(c) + col_fire_closs(c) + col_hrv_xsmrpool_to_atm(c) + &
@@ -181,7 +181,7 @@ subroutine CBalanceCheck(this, bounds, num_soilc, filter_soilc, &
181181

182182
! subtract leaching flux
183183
col_coutputs = col_coutputs - som_c_leached(c)
184-
184+
185185
! calculate the total column-level carbon balance error for this time step
186186
col_errcb(c) = (col_cinputs - col_coutputs)*dt - &
187187
(col_endcb(c) - col_begcb(c))

src/clm5/biogeochem/CNVegCarbonStateType.F90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2602,7 +2602,6 @@ subroutine Summary_carbonstate(this, bounds, num_allc, filter_allc, &
26022602
soilbiogeochem_totlitc_col(c) + &
26032603
soilbiogeochem_totsomc_col(c) + &
26042604
soilbiogeochem_ctrunc_col(c)
2605-
26062605
end do
26072606

26082607
end subroutine Summary_carbonstate

src/clm5/biogeochem/CropType.F90

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ subroutine CropUpdateAccVars(this, bounds, t_ref2m_patch, t_soisno_col)
533533
use shr_const_mod , only : SHR_CONST_CDAY, SHR_CONST_TKFRZ
534534
use clm_time_manager , only : get_step_size, get_nstep
535535
use clm_varpar , only : nlevsno, nlevgrnd
536-
use pftconMod , only : nswheat, nirrig_swheat, ncitrus, nirrig_citrus, ngrapes, nirrig_grapes, pftcon
536+
use pftconMod , only : nswheat, nirrig_swheat, ncitrus, nirrig_citrus, pftcon
537537
use pftconMod , only : nwwheat, nirrig_wwheat
538538
use pftconMod , only : nsugarcane, nirrig_sugarcane
539539
use ColumnType , only : col
@@ -589,7 +589,6 @@ subroutine CropUpdateAccVars(this, bounds, t_ref2m_patch, t_soisno_col)
589589
if ( (trim(this%baset_mapping) == baset_map_latvary) .and. &
590590
((ivt == nswheat) .or. (ivt == nirrig_swheat) .or. &
591591
(ivt == ncitrus) .or. (ivt == nirrig_citrus) .or. & ! added by Olga
592-
(ivt == ngrapes) .or. (ivt == nirrig_grapes) .or. & ! added by Olga
593592
(ivt == nsugarcane) .or. (ivt == nirrig_sugarcane)) ) then
594593
rbufslp(p) = max(0._r8, min(pftcon%mxtmp(ivt), &
595594
t_ref2m_patch(p)-(SHR_CONST_TKFRZ + this%latbaset_patch(p)))) &

src/clm5/biogeochem/NutrientCompetitionFlexibleCNMod.F90

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ subroutine calc_plant_nitrogen_demand(this, bounds, num_soilp, filter_soilp, &
13291329
use pftconMod , only : ntmp_soybean, nirrig_tmp_soybean
13301330
use pftconMod , only : ntrp_soybean, nirrig_trp_soybean
13311331
use clm_varcon , only : secspday, dzsoi_decomp
1332-
use clm_varctl , only : iulog, use_c13, use_c14
1332+
use clm_varctl , only : use_c13, use_c14
13331333
use clm_varctl , only : nscalar_opt, plant_ndemand_opt, substrate_term_opt, temp_scalar_opt
13341334
use clm_varpar , only : nlevdecomp
13351335
use clm_time_manager , only : get_step_size,get_curr_calday
@@ -1651,7 +1651,6 @@ subroutine calc_plant_nitrogen_demand(this, bounds, num_soilp, filter_soilp, &
16511651
! of amount allocated to roots over course of the growing season
16521652

16531653
if (peaklai(p) == 1) then ! lai at maximum allowed
1654-
write(iulog,*) 'hit peaklai, allocation to leaf is set to small value'
16551654
arepr(p) = 0._r8
16561655
aleaf(p) = 1.e-5_r8
16571656
astem(p) = astem(p)
@@ -1690,8 +1689,7 @@ subroutine calc_plant_nitrogen_demand(this, bounds, num_soilp, filter_soilp, &
16901689
(huigrain(p)-huileaf(p))),1._r8)**allconss(ivt(p)) )))
16911690
end if
16921691
! If crops have hit peaklai, then set leaf allocation to small value
1693-
if (peaklai(p) == 1) then
1694-
write(iulog,*) 'hit peaklai, allocation to leaf is set to small value'
1692+
if (peaklai(p) == 1) then
16951693
aleaf(p) = 1.e-5_r8
16961694
else if (aleafi(p) > aleaff(ivt(p))) then
16971695
fleaf = aleafi(p) * (exp(-bfact(ivt(p))) - &
@@ -1718,7 +1716,6 @@ subroutine calc_plant_nitrogen_demand(this, bounds, num_soilp, filter_soilp, &
17181716
! small value
17191717
if (peaklai(p) == 1) then
17201718
aleaf(p) = 1.e-5_r8
1721-
write(iulog,*) 'hit peaklai, allocation to leaf is set to small value'
17221719
else if (aleafi3(p) > aleaff(ivt(p))) then
17231720
fleaf = fleafi(ivt(p)) * (exp(-bfact(ivt(p))) - &
17241721
exp(-bfact(ivt(p))*(hui(p)-huileaf(p))/(huilfmat(p)-huileaf(p)))) / &

src/clm5/biogeochem/dynHarvestMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ subroutine CNHarvestPftToColumn (num_soilc, filter_soilc, &
499499
p = col%patchi(c) + pi - 1
500500

501501
if (patch%active(p)) then
502-
502+
503503
! leaf harvest mortality carbon fluxes
504504
harvest_c_to_litr_met_c(c,j) = harvest_c_to_litr_met_c(c,j) + &
505505
hrv_leafc_to_litter(p) * lf_flab(ivt(p)) * wtcol(p) * leaf_prof(p,j)

0 commit comments

Comments
 (0)