7.1. Clone and build Global Workflow

7.1.1. Quick Instructions

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

Note

Here we are making the assumption that you are using the workflow to run an experiment and so are working from the authoritative repository. If you are using a development branch then follow the instructions in Contributing to the Global Workflow. Once you do that you can follow the instructions here with the only difference being the repository/fork you are cloning from.

Clone the global-workflow and cd into the sorc directory:

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

The build_all.sh script can be used to build all required components of the global workflow. The accepted arguments is a list of systems to be built. This includes builds for GFS, GEFS, and SFS forecast-only experiments, GSI and GDASApp-based DA for cycled GFS experiments. See feature availability to see which system(s) are available on each supported system.

./build_all.sh [gfs] [gefs] [sfs] [gcafs] [gsi] [gdas] [all]

For example, to run GFS experiments with GSI DA, execute:

./build_all.sh gfs gsi

This builds the GFS, UFS-utils, GFS-utils, WW3 with PDLIB (structured wave grids), UPP, GSI, GSI-monitor, and GSI-utils executables.

For coupled cycling (using only new UFSDA) execute:

./build_all.sh gfs gdas

This builds all of the same executables, except it builds the GDASApp instead of the GSI.

To run GEFS (forecast-only) execute:

./build_all.sh gefs

This builds the GEFS, UFS-utils, GFS-utils, WW3 without PDLIB (unstructure wave grids), and UPP executables.

To run SFS (forecast-only) execute:

./build_all.sh sfs

This builds the same components as GEFS, except the UFS model is built in hydrostatic mode.

To run GCAFS execute:

./build_all.sh gcafs gdas

This builds everything you need to run GCAFS in forecast-only or cycled mode.

./link_workflow.sh

7.1.2. Clone workflow and component repositories

7.1.2.1. Workflow

There are several ways to clone repositories from GitHub. Below we describe how to clone the global-workflow using the https method.

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

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 --recurse-submodules BRANCH_NAME

Note

Branch must already exist. 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 --recurse-submodules my_branch
git branch
* my_branch
develop

Using --recurse-submodules is important to ensure you are updating the component versions to match the branch.

7.1.3. Build components

Under the /sorc folder is a script to build all components called build_all.sh. After checking out the branch you wish to use, run this script to build all components codes:

 ./build_all.sh [-a UFS_app][-k][-h][-v] [list of system(s) to build]
-a UFS_app:
  Build a specific UFS app instead of the default
-k:
  Kill all builds immediately if one fails
-h:
  Print this help message and exit
-v:
  Execute all build scripts with -v option to turn on verbose where supported

Lastly, pass to build_all.sh a list of systems to build.  This includes `gfs`, `gefs`, `sfs`, `gcafs`, `gsi`, `gdas`, and `all`.

For examples of how to use this script, see build examples.