Skip to content

GSI User Information

RussTreadon-NOAA edited this page Jan 26, 2023 · 4 revisions

Welcome to the GSI wiki!

Forking the Official NOAA-EMC/GSI Repository

Only a handful of people have write access to the official repository. All development will be done through personal forks. To create a fork of NOAA-EMC/GSI, simply click the Fork button on the top right corner of the page.

Please see GitHub's help guide for forking for more information.

Cloning your Personal Fork

Now that you have created your fork, it is time to clone your fork into your workspace. The GSI still requires the fix submodules under github in order to run, so you will clone the fork using the --recursive option in order to fetch the contents of the fix submodules.

For example,

git clone --recursive [email protected]:FirstLast-NOAA/GSI.git

clones FirstLast-NOAA's personal fork into a local directory.

Compiling the GSI on various NOAA machines

Script ush/build.sh run cmake and make to build the GSI and EnKF executables. To build the package

  • cd ush
  • ./build.sh

The build creates directory build. This is the directory from which ctests (regression tests) are executed. Upon successful completion build.sh places the gsi and enkf executables in directory install/bin. This directory is at the same level as ush.

Updating your Fork when the Official Repository is Updated

You fork is a separate entity from the official repository. In order to update your fork with changes in the official repository, you will need to add a remote upstream to your local repository. To do this:

  1. Add a new upstream remote, pointing to the official NOAA-EMC/GSI repository, into your cloned fork.

    git remote add upstream https://github.com/NOAA-EMC/GSI

  2. Use git remote -v to ensure that the new upstream is properly set. Output should be similar to

[First.Last@v72a3 ush]$ git remote -v
origin  [email protected]:FirstLast-NOAA/GSI.git (fetch)
origin  [email protected]:FirstLast-NOAA/GSI.git (push)
upstream        https://github.com/NOAA-EMC/GSI (fetch)
upstream        https://github.com/NOAA-EMC/GSI (push)
  1. Use git remote update to bring in the upstream (official) repository

    git remote update

  2. If you aren't in develop, then checkout develop (or master)

    git checkout develop

  3. Merge the upstream (official) develop to forked develop

    git merge upstream/develop

  4. Ensure that your fix submodule is sync'd and updated

    git submodule sync

    git submodule update

  5. Handle potential conflicts

  6. Push updated forked develop (or master) to forked repository

    git push origin develop

  7. Checkout and merge updated develop (or master) to personal branch

  8. Push the personal branch back to the fork.