Add errmsg to check_allocate abort message #311
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.
Fixes #297
Following up from the
tropopause_find
PR I've updatedcheck_allocate
to take inerrmsg
and updated the tropopause_climo_read to use it and other places within SIMA. I did not update all instances of check_allocate, particularly those in dynamics and in cpl/nuopc as I was not sure if they were brought in externally or not.If the optional
errmsg
argument is present a linebreak is added to the end of the abort message using thenew_line
intrinsic (Fortran 2003). Sinceerrmsg
inallocate
is a F2003 feature I think this is safe to use? It can otherwise be removed, it's just used to make the output prettier.This is what it looks like:
or an actual example made possible by a duplicate allocation...