-
Notifications
You must be signed in to change notification settings - Fork 29
Updating the MOM6 component
Because the MOM6 component in ufs-s2s-model consists of multiple submodules, creating a branch for development work can be tricky. Experience has shown that is usually best to first create the MOM6-interface branch separately and then update the ufs-s2s-model fork to use it rather than trying to create the MOM6-interface branch directly in the ufs-s2s-model fork.
The following steps will show how Jane can create a branch of the MOM6-interface which will use a feature branch of her MOM6 fork. Jane can then create a ufs-s2s-model branch which uses this updatedMOM6 branch.
- Jane first makes sure her fork of MOM6-interface is up-to-date with the NOAA-EMC repository. Then she checks out her MOM6-interface into a WORK area and creates a branch which will contain her update to the MOM6 repo.
git clone git@github.com:JaneDoe/MOM6-interface.git WORK
git submodule update --init --recursive
git checkout -b feature/mom6_interface_with_updatedMOM6
- Jane then adds her branch of her MOM6 repository, fetches it, and points to her update branch.
cd src/MOM6
git remote add JD git@github.com:JaneDoe/MOM6.git
git fetch JD
git checkout feature/updatedMOM6
- Jane now needs to return to the top of WORK directory, sync the submodules for the new MOM6 branch within the MOM6-interface and edit the .gitmodules to point to her fork of MOM6:
cd ../../
git submodule sync
[submodule "src/MOM6"]
path = src/MOM6
url = https://github.com/JaneDoe/MOM6
[submodule "src/mkmf"]
path = src/mkmf
url = https://github.com/NOAA-EMC/mkmf
- A git status will now show that both .gitmodules and src/MOM6 have changed. Committing the result should result in the feature/mom6_interface_with_updatedMOM6 branch in Jane's MOM6-interface fork. It will be pointing to her feature/updatedMOM6 branch in the MOM6 submodule.
git add src/MOM6
git add .gitmodules
git push --set-upstream origin feature/mom6_interface_with_updatedMOM6
- After cloning her fork of the ufs-s2s-model into a working area WORK, Jane creates a branch of ufs-s2s-model which will contain her branch for the MOM6-interface containing her updated MOM6 branch.
git clone git@github.com:JaneDoe/ufs-s2s-model.git WORK
cd WORK
git submodule update --init --recursive
git checkout -b feature/s2s_with_updatedMOM6
- Jane edits the .gitmodules to point to her MOM6-interface fork and then syncs the submodules:
[submodule "MOM6"]
path = MOM6
url = https://github.com/JaneDoe/MOM6-interface
git submodule sync
- Changing into the MOM6 subdirectory and checking the remote should confirm that the MOM6-interface is using Jane's MOM6-interface fork:
cd MOM6
git remote -v
origin https://github.com/JaneDoe/MOM6-interface (fetch)
origin https://github.com/JaneDoe/MOM6-interface (push)
and git fetch will bring in Jane's MOM6-interface branches and allow her to check out feature/mom6_interface_with_updatedMOM6 which contains her MOM6 fork with the feature/updated MOM6 branch:
git fetch
git checkout feature/mom6_interface_with_updatedMOM6
- git status at the top of the WORK will show that both .gitmodules and src/MOM6 have new commits. Jane can now add and commit her feature/s2s_with_updatedMOM6 to her ufs-s2s-fork
git add MOM6
git add .gitmodules
git commit
git push --set-upstream origin feature/s2s_with_updatedMOM6
Jane's ufs-s2s-model fork should now contain a branch feature/s2s_with_updatedMOM6 which points to her updated MOM6 branch in her MOM6-interface fork.
Jane then double checks her work by doing a test checkout of her ufs-s2s repository to confirm that the MOM6 hash corresponds to the hash of her feature/updatedMOM6 branch in her MOM6 fork.
Creating a GitHub Account for Development Work
Participating in the Development Process (Under Construction)
Developer Information
- Debug mode
- Restarting the coupled model
- Changing the number of PEs for FV3
- Updating the MOM6-interface
- Profile Timing across Components
- Porting to a new machine
Wiki Links
Applications (include workflow)
Models
- UFS Weather Model
- UFS Subseasonal to Seasonal Model
- UFS Hurricane Analysis and Forecast System Model
Utilities
- NCEPLIBS - builds bundled library dependencies
- NCEPLIBS-external - builds external library dependencies