Skip to content
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

Open
wants to merge 9 commits into
base: atmosphere/develop
Choose a base branch
from

Conversation

climbfuji
Copy link
Contributor

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.

@mgduda
Copy link
Contributor

mgduda commented Feb 7, 2017

The history of the branch in this PR seems to include quite a few commits that aren't part of the changes for checking the consistency checking of surface updates. Is it possible that this branch is built on top of another unrelated branch that hasn't been merged to atmosphere/develop yet?

@climbfuji
Copy link
Contributor Author

climbfuji commented Feb 7, 2017

Everything up to "59f463d" are changes that are already part of atmosphere/develop, but they weren't in atmosphere/develop at the time the PR was created, as far as I understand (this branch and PR are sitting here since quite a while). I rebased the branch used for this PR onto the atmosphere/develop and will be pushing this to Github after re-running all the tests to make sure the functionality is not broken. However, the surface-stream-immutable branch/PR requires the changes in framework/final_only to work. We discussed to create a more general version of the interval_in / interval_out attributes in the future. But for the time being, I advocate this as a working solution, as the input_interval and output_interval mechanism will be needed for the more generalised version of input/output intervals later on.

Update: just pushed the rebased version, commit history now looks better.

@climbfuji climbfuji force-pushed the atmosphere/sfc-update-stream-immutable branch from b9448e8 to 6437baa Compare February 7, 2017 10:35
@mgduda
Copy link
Contributor

mgduda commented Feb 7, 2017

The commit history looks more reasonable, but it still looks like there are commits here that don't relate directly to consistency checking of surface update streams, e.g., e668414 and 120c36a .

@climbfuji climbfuji force-pushed the atmosphere/sfc-update-stream-immutable branch from e668414 to 6437baa Compare February 8, 2017 04:32
@climbfuji
Copy link
Contributor Author

Ok, removed the latest commit that came in (e668414 - PR1222). The consistency checking of surface streams must know about the input and output intervals. That's why I merged the framework/final_only branch, for which a PR exists since September 24, 2016 (PR1086), into this branch at the beginning. Once framework/final_only is merged into atmosphere/develop, I can rebase this branch/PR and the first three commits 2762236, 120c36a and 6fa578b will be gone. I will have a look at PR1086 and the open questions.

@climbfuji
Copy link
Contributor Author

@mgduda I believe this PR also addresses (or, if not, provides the means to address) an issue with a misleading information given by the atmosphere core when sst updates are disabled, but the surface stream is present: In this case, the diagnostic output at the beginning of each time step says "Read 'surface' input stream valid at 0000-01-01_00:00:00", since the call to MPAS_stream_mgr_read (around line 668 in mpas_atm_core.F) returns without reading the file, and hence does not set the read_time variable. This is quite misleading, as it suggests to users that MPAS read something even though it shouldn't, and that it read data for a weird valid time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants