Skip to content

Commit

Permalink
Update readGroundwaterSettings.m
Browse files Browse the repository at this point in the history
in case the groundwater level <= 0 cm (groundwater level >= top level of soil), there is no soil profile and the model will crash. To avoid that, assign a minimum groundwater level = of 1 cm
  • Loading branch information
MostafaGomaa93 authored Jun 21, 2024
1 parent fbaec06 commit dcdb1bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/+groundwater/readGroundwaterSettings.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ soilThick cumulative soil layers thickness (from top to bottom)
% Check that the position of the water table is within the soil column
if gw_Dep <= 0
warning('The soil is fully saturated up to the land surface level!');
gw_Dep = 1.0; % to avoid model crashing, assign minimum gw_Dep value of 1 cm
elseif gw_Dep > ModelSettings.Tot_Depth
warning('Groundwater table is below the end of the soil column!');
end
Expand Down

0 comments on commit dcdb1bb

Please sign in to comment.