Skip to content

Commit

Permalink
remove the radiation warning when run with fates and get rid of output
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdebolskiy committed Dec 20, 2024
1 parent 42b1033 commit baa66a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.

This file was deleted.

13 changes: 7 additions & 6 deletions src/biogeophys/BalanceCheckMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module BalanceCheckMod
use decompMod , only : subgrid_level_gridcell, subgrid_level_column, subgrid_level_patch
use abortutils , only : endrun
use clm_varctl , only : iulog
use clm_varctl , only : use_fates_planthydro
use clm_varctl , only : use_fates_planthydro, use_fates
use clm_varpar , only : nlevsoi
use atm2lndType , only : atm2lnd_type
use EnergyFluxType , only : energyflux_type
Expand Down Expand Up @@ -952,14 +952,15 @@ subroutine BalanceCheck( bounds, &

errsol_max_val = maxval( abs(errsol(bounds%begp:bounds%endp)), mask = (errsol(bounds%begp:bounds%endp) /= spval) )

if ((errsol_max_val > energy_warning_thresh) .and. (DAnstep > skip_steps)) then
if ((errsol_max_val > energy_warning_thresh) .and. (DAnstep > skip_steps) ) then

indexp = maxloc( abs(errsol(bounds%begp:bounds%endp)), 1 , mask = (errsol(bounds%begp:bounds%endp) /= spval) ) + bounds%begp -1
indexg = patch%gridcell(indexp)
write(iulog,*)'WARNING:: BalanceCheck, solar radiation balance error (W/m2)'
write(iulog,*)'nstep = ',nstep
write(iulog,*)'errsol = ',errsol(indexp)

if (.not. use_fates) then
write(iulog,*)'WARNING:: BalanceCheck, solar radiation balance error (W/m2)'
write(iulog,*)'nstep = ',nstep
write(iulog,*)'errsol = ',errsol(indexp)
endif
if (errsol_max_val > error_thresh) then
write(iulog,*)'CTSM is stopping because errsol > ', error_thresh, ' W/m2'
write(iulog,*)'fsa = ',fsa(indexp)
Expand Down

0 comments on commit baa66a3

Please sign in to comment.