Skip to content

Commit f8dce5f

Browse files
committed
Updates identification of crop patches and columns
1 parent 09420fe commit f8dce5f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

components/elm/src/biogeochem/CropType.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ subroutine InitCold(this, bounds)
331331
t = veg_pp%topounit(p)
332332
topi = grc_pp%topi(g)
333333

334-
if (lun_pp%itype(l) == istcrop) then
334+
if (veg_pp%is_on_crop_col(p)) then
335335
ti = t - topi + 1
336336
m = veg_pp%itype(p)
337337
this%fertnitro_patch(p) = fert_cft(g,ti,m)

components/elm/src/biogeochem/FanUpdateMod.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ subroutine fan_eval(bounds, num_soilc, filter_soilc, &
319319

320320
! Find and average the atmospheric resistances Rb and Ra.
321321
!
322-
if (lun_pp%itype(l) == istcrop) then
322+
if (veg_pp%is_on_crop_col(p)) then
323323
! Crop column, only one patch
324324
p = col_pp%pfti(c)
325325
if (p /= col_pp%pftf(c)) call endrun(msg='Strange patch for crop')
@@ -901,7 +901,7 @@ subroutine update_summary(filter_soilc, num_soilc)
901901
total = total + col_ns%manure_n_stored(c)
902902
col_ns%fan_totn(c) = total
903903

904-
if (lun_pp%itype(l) == istcrop) then
904+
if (col_pp%is_crop(c)) then
905905
! no grazing, manure_n_appl is from the same column and not counted as input
906906
fluxin = col_nf%manure_n_mix(c) + col_nf%fert_n_appl(c)
907907
else

components/elm/src/dyn_subgrid/dyncropFileMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ subroutine dyncrop_interp(bounds,crop_vars)
194194
topi = grc_pp%topi(g)
195195
ti = t - topi + 1
196196

197-
if (lun_pp%itype(l) == istcrop) then
197+
if (veg_pp%is_on_crop_col(p)) then
198198
m = veg_pp%itype(p)
199199

200200
! The following assumes there is a single CFT on each crop column. The

components/elm/src/main/subgridWeightsMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ subroutine set_pct_pft_diagnostics(bounds)
961961
if (veg_pp%is_on_soil_col(p)) then
962962
ptype_1indexing = ptype + (1 - natpft_lb)
963963
subgrid_weights_diagnostics%pct_nat_pft(t, ptype_1indexing) = veg_pp%wtlunit(p) * 100._r8
964-
else if (lun_pp%itype(l) == istcrop) then
964+
else if (veg_pp%is_on_crop_col(p)) then
965965
ptype_1indexing = ptype + (1 - cft_lb)
966966
subgrid_weights_diagnostics%pct_cft(t, ptype_1indexing) = veg_pp%wtlunit(p) * 100._r8
967967
end if

0 commit comments

Comments
 (0)