Skip to content

Commit

Permalink
add check for negative ci values
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdebolskiy committed Dec 13, 2024
1 parent 1d824b8 commit 5151719
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/biogeochem/VOCEmissionMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module VOCEmissionMod
use TemperatureType , only : temperature_type
use PatchType , only : patch
use EnergyFluxType , only : energyflux_type
use decompMod , only : subgrid_level_patch
!
implicit none
private
Expand Down Expand Up @@ -600,6 +601,10 @@ subroutine VOCEmission (bounds, num_soilp, filter_soilp, &
! Activity factor for CO2 (only for isoprene)
if (trim(meg_cmp%name) == 'isoprene') then
co2_ppmv = 1.e6_r8*forc_pco2(g)/forc_pbot(c)
if (cisha_z(p,1) < 0.0_r8 .or. cisun_z(p,1) < 0.0_r8) then
write(iulog,*) 'Invalid intercellular co2 pressure (patch itype, sunlit, shaded): ', patch%itype(p),cisun_z(p,1),cisha_z(p,1)
call endrun(subgrid_index=p, subgrid_level=subgrid_level_patch, msg=errMsg(sourcefile, __LINE__))
endif
gamma_c = get_gamma_C(cisun_z(p,1),cisha_z(p,1),forc_pbot(c),fsun(p), co2_ppmv)
else
gamma_c = 1._r8
Expand Down

0 comments on commit 5151719

Please sign in to comment.