Bug fix for optional input arg "conserve_ice10_tzero" (StieglitzSnow.F90) #1025
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An optional input argument ("conserve_ice10_tzero") was used in an if statement inside subroutine StieglitzSnow_relayer(), but the optional input argument may not be provided by the calling routine.
In the GCM, the optional argument is provided in both calls to StieglitzSnow_relayer(). In the LDAS (incl. catch_incr.F90), however, the optional argument is not always provided, which makes the "if" statement fail with a seg fault error.
The fix is to use the local variable ("conserve_ice10_tzero_tmp"), which always exists, in the offending if statement.
Could be considered trivially 0-diff based on inspection of code change.
cc: @amfox37 @biljanaorescanin @sdrabenh @lcandre2 @saraqzhang @gmao-qliu