This is a demonstration of a possible repository structure for managing MOM6 regression answers.
- This repository contains GFDL's regression answers for their c3 platform only. Other platforms should have their own repository.
- This repository need not be visible to anyone who does not have access to the same platform (i.e. it could be private).
- Commits are only made when the regression answers change.
- MOM6-examples is a sub-module of this repository. When regression answers change the new commit of the sub-module must be added with the changed answers.
- Regression answers have a suffix which is a label usually referring to a compiler name. These labels are listed in labels.json.
- Copy regression answers generated by MOM6 into the corresponding directory under regressions.
- Stage any changed regressions and also add the MOM6-examples sub-module commit.
- Commit.
- Push (if sharing with other developers)
For example:
# Copy files
foreach compiler (gnu intel pgi)
foreach file (`cd MOM6-examples ; find * -name ocean.stats.$compiler -o -name seaice.stats.$compiler`)
mkdir -p regressions/$file:h
\cp MOM6-examples/$file regressions/$file
end
end
git add regressions
git add MOM6-examples
git commit
- Ideally, MOM6 would write the regression answers directly to the regressions directory but a simple script (like the one above) is most likely to be needed.
- The commits in this repository make up a much smaller list than for MOM6-examples because regression answers do not change often.
- The labels.json file is not mandatory but could have sufficient information in it for automated systems to interpret.
git init
git add labels.json
git add README.md
git clone git@github.com:NOAA-GFDL/MOM6-examples
git submodule init
git submodule add ./MOM6-examples
git add regressions
git commit -m 'First regression answers on this platform'