|
PHYEX 0.9.5
PHYsique EXternalisée
|
This document is intended for integrators who are in charge of assembling contributions received through pull requests.
Regarding array-syntax, the applicable norm depends on the branch:
Pull requests can be received on all these kind of branches and must be merged into the master branch with according norm.
The pull request comes directly from a developer. It must be based on the arome branch. When the interfaces with the rest of the model are modified, a pull request is also sent to the IAL repository (modifications of the CALL statements).
Details for point 6:
Because the interfaces between the physics and the rest of the model can change, the IAL version to use with PHYEX must be referenced in the 'src/phyex/ial_version.json' file (repository, commit and cycle of IAL, used by the phyex-check_ial tool). On the IAL side, the PHYEX version is referenced in the bundle/bundle.yml file.
In addition, if some files must be excluded from the IAL compilation, they must be listed in the 'src/phyex/gmkpack_ignored_files' file.
The developer sends its pull request on the Méso-NH repository (the physics source code is embedded in the model source code).
Integration details:
The Meso-NH version used to test PHYEX is described in the 'src/phyex/mesonh_version.json' file.
Pull requests must be based on the master branch.
The PHYEX administrator:
A release is a tag vX.Y.Z of the master branch, X.Y.Z being the version stored in the src/phyex/VERSION file. The push of such a tag triggers the "Release" GitHub workflow (.github/workflows/release.yaml), which:
The workflow can also be run manually, on any branch (Actions tab, "Release" workflow, "Run workflow" button): everything is built as for a release, without checking the version and without publishing; the release note then lists the commits since the last release tag. This is useful to check that a release would succeed before tagging.
The source code must follow the coding norms and the strict mnh_expand directives (described in the Coding Norms documentation). They are checked by the phyex-check_norms tool (also run by the "tests" GitHub workflow).
In addition to the scientific validation, the following tests must give the same results (with bit-reproducibility) in each of the model (arome, mesonh, lmdz and testprogs):
When possible, the new version of PHYEX must reproduce the old results (scientific modifications must be activated with namelist keys).
These tests are performed by the phyex-check_<model> tools; the reference commits for the test cases of each model are given in the 'testing' entry of the src/phyex/<model>_version.json files. The phyex-check_commit tool performs all the checks (coding norms, consistency, documentation generation, python wheel creation and test cases of the different models) and the clone_and_test.sh script can run them automatically (e.g. by cron) on the last commit of a branch, the result being attached to the commit on GitHub. These tools are described in the Tools documentation.
The source code stored in the master branches must be usable by all the models. But these models can have contradictory constraints. To bypass this difficulty, the source code is preprocessed before being included in the compilation environment of each model.
This preprocessing step can be done on the fly (in this case the preprocessing tools must be available aside of the compilation tools, it is the case of the CMake build system of PHYEX, see the PHYEX_TRANSFORMATION option in the Offline documentation), or the result of the preprocessing can be stored in the PHYEX package (in this case, the preprocessing is done once and can be used by several users). This second possibility is useful to historize the source code really used during the model compilation and enables contributions to the PHYEX package without the need of the preprocessing tools.
The preprocessed versions of the source code are put in model specific branches:
The preprocessing tools are described in the Tools documentation.