|
PHYEX 0.9.5
PHYsique EXternalisée
|
This section is intended for developers who want to contribute to the PHYEX package. Developer who is interested in plugging the physics in a new model can refer to the Plugging documentation. The topics covered are as follows:
The package contains two kinds of branches:
For model specific branches, only the source code adapted for a given model is present (one directory per parametrisation and an aux directory). They are intended to be included directly in the compilation system of the hosting model.
The master branch contains the following directories and files:
The model specific branches are:
In addition, the testprogs_data, testprogs_data2 and testprogs_data3 branches contain modified source code used to generate the input data of the test programs (more on this topic in the Offline documentation).
Versions of the master branch are tagged with tags named "vX.Y.Z" (for example "v1.0.0"). The commit of the arome branch corresponding to this version is tagged "vX.Y.Z_arome" (for example "v1.0.0\_arome"). The version number is only stored in the src/phyex/VERSION file (used by CMake, the python package and the python tools): it must be updated before tagging a new version. The "consistency" GitHub workflow (or the phyex-check_consistency tool) checks that it is the version of the last release tag.
AROME and HARMONIE-AROME are built as a bundle: the model is built with source codes coming from various repositories. The PHYEX source code is no longer included in the IAL repository: the bundle description (bundle/bundle.yml file of IAL) references the version (commit of the arome branch) of PHYEX to use.
The AROME and HARMONIE-AROME developers only see the code of the arome branch. This code is ready for inclusion (array-syntax already transformed into DO loops for instance): developers do not need to manipulate code transformation tools.
Workflow details (getting the source code in blue, pull request in red, integration in green):
The physics source code is embedded in the Méso-NH source code.
The physics source code comes directly from a mesonh specific branch (these branches are named mesonh_<commit_hash>) which contain code ready for use in the Méso-NH model (array-syntax...).
Pull requests concerning the physics continue to follow the same path as before (ie pull requests are submitted to the Meso-NH repository). The Meso-NH integrator will submit a pull request to the PHYEX repository with only the relevant files.
Other developers must work with source code coming directly from the master branch. They issue pull requests directly on this branch as usual with git repositories.
Before submitting a pull request, the contribution can be checked with the tools described in the Tools documentation (phyex-check_norms for the coding norms, phyex-check_testprogs for the bit-reproducibility of the test programs, phyex-check_commit for all the checks).
The title of a pull request must start with 'bugfix: ', 'feature: ' or 'bugfix+feature: ', in any case (this is checked automatically). This prefix is used by the phyex-changelog tool to sort the modifications by category. The description is pre-filled by a template (.github/pull_request_template.md) asking for a description of the modifications and of their impact on the results; the coding norms, the compilation and the execution of the tests must be OK.
The code must contain comments. The documentation rules to follow are described in the CodingNorms document.