Skip to content

Quick start guide for HAFS developer v2.0

Jili Dong edited this page Mar 5, 2020 · 10 revisions

This is a quick guide for developers to update HAFS code and fix bugs. Currently the guide is on working on hafs-community repository directly instead of requiring developers to create a new individual fork.

1 Obtain the HAFS package (community version):

% git clone https://github.com/hafs-community/HAFS.git
$ cd HAFS
$ git checkout develop
$ git submodule update --init --recursive

2 Create a new feature branch from support/HAFS and work on it

Find out the submodule(s) the user would like to work on; please refer to Hierarchical Repository Structure

Now use FV3 (fv3atm) as an example:

$ cd HAFS/sorc/hafs_forecast.fd/FV3
$ git checkout support/HAFS
$ git pull origin support/HAFS
$ git checkout -b feature/change_sth

Work on this new branch by modifying/adding code

3 Push the changes to remote

When ready to push the update/bug-fix/changes, first sync with the support/HAFS branch:

$ git checkout support/HAFS
$ git pull origin support/HAFS
$ git checkout feature/change_sth
$ git merge support/HAFS

Now commit and push the changes

$ git add modified-files
$ git commit -m "update message"
$ git push origin feature/change_sth

4 Pull request

Now it is time to do a pull request (PR) on github.com

Please request merging hafs-community/feature/change_sth to hafs-community/support/HAFS through creating a pull request