Skip to content

Commit

Permalink
Reinitialize fire btran2 to spval for all patches in each time step
Browse files Browse the repository at this point in the history
This, or something like it, is important so that the fire code isn't
trying to use btran2 from earlier time steps for patches that were in
the exposed veg filter at one point but no longer are. The fix here is
not the cleanest way to fix this issue, but represents a minimal set of
changes to fix the issue. In a later commit, I'll try to fix this in a
better way (which should be bit-for-bit with this fix).

Resolves #1153 (Fire btran2 is only computed for exposed veg
patches, but is used over all veg patches)
  • Loading branch information
billsacks committed Oct 2, 2020
1 parent ec8d075 commit b1cf8b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/biogeochem/CNFireBaseMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ subroutine CNFire_calc_fire_root_wetness( this, bounds, num_exposedvegp, filter_
!
! Calculate the root wetness term that will be used by the fire model
!
! FIXME(wjs, 2020-10-02) remove next line
use clm_varcon , only : spval
use pftconMod , only : pftcon
use clm_varpar , only : nlevgrnd
use PatchType , only : patch
Expand Down Expand Up @@ -232,6 +234,9 @@ subroutine CNFire_calc_fire_root_wetness( this, bounds, num_exposedvegp, filter_
h2osoi_vol => waterstatebulk_inst%h2osoi_vol_col & ! Input: [real(r8) (:,:) ] volumetric soil water (0<=h2osoi_vol<=watsat) [m3/m3] (porosity) (constant)
)

! FIXME(wjs, 2020-10-02) Remove next line
btran2(bounds%begp:bounds%endp) = spval

do f = 1, num_exposedvegp
p = filter_exposedvegp(f)
btran2(p) = btran0
Expand Down
5 changes: 5 additions & 0 deletions src/biogeochem/CNFireLi2021Mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,8 @@ subroutine CNFire_calc_fire_root_wetness( this, bounds, num_exposedvegp, filter_
!
! Calculate the root wetness term that will be used by the fire model
!
! FIXME(wjs, 2020-10-02) remove next line
use clm_varcon , only : spval
use pftconMod , only : pftcon
use PatchType , only : patch
class(cnfire_li2021_type) :: this
Expand All @@ -702,6 +704,9 @@ subroutine CNFire_calc_fire_root_wetness( this, bounds, num_exposedvegp, filter_
h2osoi_vol => waterstatebulk_inst%h2osoi_vol_col & ! Input: [real(r8) (:,:) ] volumetric soil water (0<=h2osoi_vol<=watsat) [m3/m3] (porosity) (constant)
)

! FIXME(wjs, 2020-10-02) Remove next line
btran2(bounds%begp:bounds%endp) = spval

do f = 1, num_exposedvegp
p = filter_exposedvegp(f)
btran2(p) = 0._r8
Expand Down

0 comments on commit b1cf8b9

Please sign in to comment.