Skip to content

Commit

Permalink
Merge pull request #136 from lrbison/calculate_soil_bugfix
Browse files Browse the repository at this point in the history
Prevent stale values of calculate_soil from leaking across threads
  • Loading branch information
cenlinhe authored Dec 14, 2024
2 parents 848f54a + c814175 commit 7333cf3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/wrf/module_sf_noahmpdrv.F
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,6 @@ SUBROUTINE noahmplsm(ITIMESTEP, YR, JULIAN, COSZIN,XLAT,XLONG, & ! IN
IPRINT = .false. ! debug printout
! for using soil update timestep difference from noahmp main timestep
calculate_soil = .false.
soil_update_steps = nint(soiltstep/DT) ! 3600 = 1 hour
soil_update_steps = max(soil_update_steps,1)
if ( soil_update_steps == 1 ) then
Expand Down Expand Up @@ -673,7 +672,7 @@ SUBROUTINE noahmplsm(ITIMESTEP, YR, JULIAN, COSZIN,XLAT,XLONG, & ! IN
end if
end if
if (mod(itimestep,soil_update_steps) == 0) calculate_soil = .true.
calculate_soil = mod(itimestep,soil_update_steps) == 0
! end soil timestep
YEARLEN = 365 ! find length of year for phenology (also S Hemisphere)
Expand Down

0 comments on commit 7333cf3

Please sign in to comment.