This repository has been archived by the owner on Oct 23, 2020. It is now read-only.
MPAS-A sfc update stream immutable, consistency checks #1158
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.
The surface update stream 'surface' is turned into an immutable stream like in the init_atmosphere core. Further, a consistency check is added when running the atmospheric core to ensure a correct handling of config_sst_update and the surface update stream being present or not in the stream list file.
For this, a new routine atm_sanity_check_sfc_update is added to mpast_atm_core.F: This routine checks for consistency between the surface update settings in the namelist (config_sst_update) and the stream list settings.
If config_sst_update is true, the surface update stream 'surface' must be present in streams.atmosphere. As an immutable stream, the 'surface' stream is automatically added to the list of streams, even if it is not included in streams.atmosphere; however, its input/output intervals are set to 'none'. Thus, if config_sst_update is true and input_interval is 'none', the code will abort.
If config_sst_update is false, the 'surface' stream is set to inactive to avoid reading the stream. This is necessary because reading the stream without performing the necessary adjustments triggered by config_sst_update can cause the model to crash/segfault.