marshallward / Gaea-stats-MOM6-examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a demonstration of a possible repository structure for managing MOM6 regression answers.

Basics (rules)

  1. This repository contains GFDL's regression answers for their c3 platform only. Other platforms should have their own repository.
  2. This repository need not be visible to anyone who does not have access to the same platform (i.e. it could be private).
  3. Commits are only made when the regression answers change.
  4. 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.
  5. Regression answers have a suffix which is a label usually referring to a compiler name. These labels are listed in labels.json.

Workflow for when regression answers change

  1. Copy regression answers generated by MOM6 into the corresponding directory under regressions.
  2. Stage any changed regressions and also add the MOM6-examples sub-module commit.
  3. Commit.
  4. 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

Comments

  1. 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.
  2. The commits in this repository make up a much smaller list than for MOM6-examples because regression answers do not change often.
  3. The labels.json file is not mandatory but could have sufficient information in it for automated systems to interpret.

To create a similar repository for a new platform

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'

About


Languages

Language:Gnuplot 84.6%Language:Makefile 8.9%Language:Shell 6.5%