Merge stochastic physics (SPPT only) into GSL's develop branch - #239
Merge stochastic physics (SPPT only) into GSL's develop branch#239gsketefian wants to merge 227 commits into
Conversation
…he stochastic_physics submodule itself will be added in a separate commit.
…'t updated during latest merge of gsl/develop.
…he gsl/MPAS_stoch_physics in the stochastic_physics repo.
…teger seed workaround.
… smoke) from "output" to "output_smoke" (and file from "history..." to "history_smoke...". This is necessary because the stream name "output" is already taken by the main output stream, and having the same name for two different output streams apparently causes SMIOL I/O errors during the forecast (and incorrect/corrupted history*.nc files).
…) no stale stream_list.atmosphere files exist in the two default_inputs directories (one under core_atmosphere and the other immediately under the MPAS-Model top-level directory), and (2) for the atmosphere core, all files (stream-related as well as namelist) in the top-level directory are backed up before new such files are copied from the default_inputs directory back up a level into the top-level directory. Previously, existing (and thus possibly outdated) stream_list.atmosphere.* files in the top-level directory were not being replaced by newer ones in default_inputs, and that was causing unexpected (and wrong) behavior. Probably a similar fix is needed for the init_atmsophere core and maybe even other ones.
…ll as its output file) so it doesn't conflict with the default output stream.
…tochastic_physics's master branh will gradually happen.
…/MPAS_stoch_physics_try_merge_stoch_master
…tochastic_physics code know that the dycore being used is MPAS.
…ill instead be defined in the Makefile for stochastic_physics only (in a separate commit into the stochastic_physics repo) since it is only needed by the stochastic_physics submodule.
…e that is now added in the Makefile in stochastic_physics).
…s the TEMPO tables.
Looks like the tests are all now passing. Thanks for catching the reason why the test failed; I neglected to look at the output log before making my comment. Thanks for the other changes. I think we're now ready for final review. I'll nudge that forward today. |
|
@AndersJensen-NOAA @XiaSun-Atmos could you please review before tomorrow's code discussion meeting? Thanks! |
| ( cd $(ROOT_DIR)/default_inputs; for FILE in `ls -1`; do \ | ||
| if [ -e ../$$FILE ]; then \ | ||
| N=1; \ | ||
| while [ -e "../$$FILE.old$$(printf '%03d' $$N)" ]; do N=$$((N+1)); done; \ | ||
| mv "../$$FILE" "../$$FILE.old$$(printf '%03d' $$N)"; \ | ||
| fi; \ | ||
| cp $$FILE ../.; \ | ||
| done ) |
There was a problem hiding this comment.
@clark-evans @XiaSun-Atmos I changed this to the following new behavior:
- Namelist and stream files in the root
default_inputsdirectory (MPAS-Model/default_inputs) get updated only if the corresponding new ones in the core'sdefault_inputs(MPAS-Model/src/core_atmosphere/default_inputs) are different. If so, the old ones are backed up with a time stamp and the new ones are copied in. If the new ones are the same as the old, the old ones are kept. Any files that don't have a new version (e.g. the stream name was changed) get renamed with a time stamp. This is better than what I had before (less clutter) since previously, backups were made of all files regardless of whether the files changed. - Namelist and stream files in the root directory itself (
MPAS-Model/) get the same treatment as in step 1, except the source for these isMPAS-Model/default_inputs, notMPAS-Model/src/core_atmosphere/default_inputs. - To do all this, I introduced a new script (
MPAS-Model/src/tools/update_default_input_files.sh) instead of trying to cram it all in into theMakefile. It's called twice in theMakefile, once for each of the two previous steps.
I think these changes also addresses Co-Pilot's concern above that there will be too many "old"/backup files created.
…g, which stand for longitude_fourier and latitude_legendre) from the registry since this array is only for debugging.
…to ensure it never fails - for debugging purposes.
…utput" stream (since we removed it from the Registry.xml).
…chastic physics by removing stoch_pattern_gg from the stream_list file for the "output" stream).
|
@clark-evans I made a couple more changes (and bug fixes) to address the reviewer comments. The PR is now ready for review. |
…om "%" to "unitless".
…nflicts with noaa/develop branch.
…oaa/develop branch into this one (src/core_atmosphere/mpas_atm_core.F), commit six manually-merged versions of files that github reports will have conflicts when noaa/develop is merged in. This should avoid those conflicts.
|
@AndersJensen-NOAA @XiaSun-Atmos I know it's a lot of code, but if you could each take a look at this soon, I think we should finally be able to merge and move forward pending favorable reviews. |
…ted and propogated to other directories.
| @@ -0,0 +1,100 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
@clark-evans @XiaSun-Atmos This is the new default-input-file update script that is called in MPAS-Model/src/core_atmosphere/Makefile.
…ations to whole-physics tendencies. This should not make a difference.
| exchange_halo_group ) | ||
| call mpas_timer_stop('physics_get_tend') | ||
| call post_physics_get_tend(block % configs, state, diag, tend) | ||
|
|
There was a problem hiding this comment.
@clark-evans I switched the order of the calls to apply stochastic perturbations (call stochastic_physics_pattern_apply(domain, 'prog')) and get scalar tendencies (call post_physics_get_tend(...)) to the order you slightly preferred. I reran my tests on the 3 grids (CONUS 3km, 15km, 120km) with and without stochastic physics. All tests finished without crashing (although I don't check the quality of the forecasts nor compare with previous runs).
This PR enables use of the SPPT scheme of stochastic physics into MPAS-Model. This is addressed in Issue #204.
Main changes:
stochastic_physicscode as a submodule.Makefiles, registryxmlfiles, and fortran files, and GitHub workflow files to allow the SPPT stochastic scheme to be used with MPAS.stochastic_physicscode as a submodule. There is a companion PR into the authoritativestochastic_physicsrepo here.This PR adds a new GitHub Actions CI workflow (
run_mpas_stoch.yml) that runs two tests of MPAS-Model on a winter case using GFS ICs/LBCs and with SPPT enabled. The first test is the "convection_permitting" physics suite, and the second is with the "hrrrv5" suite. These two tests use the same grid, static file, ICs, LBCs, etc as the existing CI test(s) for the winter case with GFS ICs/LBCs, etc. These tests require the setup (namelist, streams, etc) files located in the directoriesMandatory Questions
MPAS-Model/testing_and_setup/ufs-community/cases/ufscommunity.[convection_permitting|hrrrv5].gfs.winter.stoch, which are under version control.Priority Reviewers