Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions src/clm5/biogeophys/BalanceCheckMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ subroutine BalanceCheck( bounds, &
end do

found = .false.
#ifndef COUP_OAS_PFL
do c = bounds%begc, bounds%endc
if (abs(errh2o(c)) > 1.e-9_r8) then
found = .true.
Expand Down Expand Up @@ -402,13 +403,8 @@ subroutine BalanceCheck( bounds, &
write(iulog,*)'deltawb/dtime = ',(endwb(indexc)-begwb(indexc))/dtime
write(iulog,*)'deltaflux = ',forc_rain_col(indexc)+forc_snow_col(indexc) - (qflx_evap_tot(indexc) + &
qflx_surf(indexc)+qflx_h2osfc_surf(indexc)+qflx_drain(indexc))
#ifdef COUP_OAS_PFL
! TODO: Balance errors must be fixed for fully coupled model (ICON-eCLM-ParFlow)
write(iulog,*)'Ignoring water balance error...'
#else
write(iulog,*)'clm model is stopping'
call endrun(decomp_index=indexc, clmlevel=namec, msg=errmsg(sourcefile, __LINE__))
#endif
else if (abs(errh2o(indexc)) > 1.e-5_r8 .and. (DAnstep > skip_steps) ) then

write(iulog,*)'clm model is stopping - error is greater than 1e-5 (mm)'
Expand Down Expand Up @@ -437,15 +433,11 @@ subroutine BalanceCheck( bounds, &
write(iulog,*)'qflx_drain_perched = ',qflx_drain_perched(indexc)*dtime
write(iulog,*)'qflx_glcice_dyn_water_flux = ',qflx_glcice_dyn_water_flux(indexc)*dtime
write(iulog,*)'qflx_rootsoi_col(1:nlevsoil) = ',qflx_rootsoi_col(indexc,:)*dtime
#ifdef COUP_OAS_PFL
! TODO: Balance errors must be fixed for fully coupled model (ICON-eCLM-ParFlow)
write(iulog,*)'Ignoring water balance error...'
#else
write(iulog,*)'clm model is stopping'
call endrun(decomp_index=indexc, clmlevel=namec, msg=errmsg(sourcefile, __LINE__))
#endif
end if
end if
#endif

! Snow balance check

Expand Down Expand Up @@ -691,6 +683,7 @@ subroutine BalanceCheck( bounds, &

! Soil energy balance check

#ifndef COUP_OAS_PFL
found = .false.
do c = bounds%begc,bounds%endc
if (col%active(c)) then
Expand All @@ -704,16 +697,12 @@ subroutine BalanceCheck( bounds, &
write(iulog,*)'WARNING: BalanceCheck: soil balance error (W/m2)'
write(iulog,*)'nstep = ',nstep
write(iulog,*)'errsoi_col = ',errsoi_col(indexc)
#ifdef COUP_OAS_PFL
! TODO: Balance errors must be fixed for fully coupled model (ICON-eCLM-ParFlow)
write(iulog,*)'Ignoring soil balance error...'
#else
if (abs(errsoi_col(indexc)) > 1.e-4_r8 .and. (DAnstep > skip_steps) ) then
write(iulog,*)'clm model is stopping'
call endrun(decomp_index=indexc, clmlevel=namec, msg=errmsg(sourcefile, __LINE__))
end if
#endif
end if
#endif

end associate

Expand Down
1 change: 0 additions & 1 deletion src/clm5/main/lnd2atmMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ subroutine lnd2atm(bounds, &
do j = 1, nlevsoi
if (lnd2atm_inst%qflx_parflow_grc(g,j) == spval) then
lnd2atm_inst%qflx_parflow_grc(g,j) = 0._r8
write(iulog,*)'WARNING: qflx_parflow_grc is nan at grid point ',g,' level',j,' replaced with 0.'
end if
end do
enddo
Expand Down