Skip to content

Clone and build global workflow

Kate Friedman edited this page Aug 12, 2021 · 14 revisions

This section will provide details on cloning and building the global-workflow on supported NOAA HPCs.

Quick instructions

Quick clone/build/link instructions (more detailed instructions below):

> git clone https://github.com/NOAA-EMC/global-workflow.git
> cd global-workflow/sorc
> sh checkout.sh
> sh build_all.sh
> sh link_fv3gfs.sh emc [dell][cray][hera][jet][orion]

1) Clone workflow and component repositories

Workflow:

https method:

git clone https://github.com/NOAA-EMC/global-workflow.git

ssh method (using a password protected SSH key):

git clone git@github.com:NOAA-EMC/global-workflow.git

Check what you just cloned (by default you will have only the develop branch):

> cd global-workflow
> git branch
* develop

You now have a cloned copy of the global-workflow git repository. To checkout a branch or tag in your clone:

git checkout BRANCH_NAME

Note: Branch must already exist here ^. If it does not you need to make a new branch using the “-b” flag:

git checkout -b BRANCH_NAME

The “checkout” command will checkout BRANCH_NAME and switch your clone to that branch. Example:

> git checkout my_branch          ← checkout the ‘my_branch’ branch into clone
> git branch
* my_branch                       ← now your clone is the ‘my_branch’ branch
  develop

Components:

Once you have cloned the workflow repository it's time to checkout/clone its components. The components will be checked out under the /sorc folder via a script called checkout.sh. Run the script with no arguments:

> cd sorc
> sh checkout.sh

If wishing to run with the operational GTG UPP and WAFS (only for select users) provide the -o flag with checkout.sh:

> sh checkout.sh -o

Each component cloned via checkout.sh will have a log (checkout-COMPONENT.log). Check the screen output and logs for clone errors.

2) Build components

Under the /sorc folder is a script to build all components called build_all.sh. After running checkout.sh run this script to build all components codes:

> sh build_all.sh

A partial build option is also available via two methods:

a) modify fv3gfs_build.cfg config file to disable/enable particular builds and then rerun build_all.sh

b) run individual build scripts also available in /sorc folder for each component or group of codes

3) Link components

At runtime the global-workflow needs all pieces in place within the main superstructure. To establish this a link script is run to create symlinks from the top level folders down to component files checked out in /sorc folders.

After running the checkout and build scripts run the link script:

sh link_fv3gfs.sh $RUN_ENVIR $MACHINE

...where:

  • RUN_ENVIR is either "emc" or "nco". The "nco" option is only used by NCO during installation into production. Users should use the "emc" option otherwise.
  • MACHINE is the HPC/platform/machine you're on. Options are: dell, cray, hera, orion

Example:

> sh link_fv3gfs.sh emc hera