Top level directory structure
When you check out the HWRF system, the top-level directory structure consists of the following subdirectories:
- bin/
- doc/
- ecf/
- examples/
- exec/
- graphics/
- jobs/
- lib/
- modulefiles/
- nwport/
- parm/
- rocoto/
- scripts/
- share/
- sorc/
- ush/
- wrappers/
These directories represent the standard locations and naming conventions needed by the HWRF run scripts. Following a successful build and install of the system software, the system executables are located in the exec/ sub-directory. The HWRF run scripts are divided between the three directories rocoto/, scripts/, and ush/. Lastly, the component source code, which comes from community repositories, is located in sorc/.
Component model directory (sorc/)
If you were to look into the sorc/ directory as it is stored on the repository, you would see that it contains only three files and the single directory:
- .externals
- build/
- doc/
- checkoutgit.sh
- checkoutgsi.sh
- checkoutww3.sh
- executables.lst
- Makefile
- README
Of particular importance here is the file .externals, but we will briefly discuss the other contents of this directory first. The Makefile together with the directory build/ make up the build system, and the file executables.lst is used to install the executables. The README file contains a complete description of how to build and install the HWRF system. The checkout*.sh scripts can be used to checkout GSI (checkoutgsi.sh), WW3 (checkoutww3.sh), or GSI+WW3 (checkoutgit.sh). Note that DTC did not support WW3 to the community.
The file .externals is used by SVN to set the external properties of the sorc/ directory. The details of how this work are beyond the scope of this tutorial, and the user should read about svn externals for full details. Examining the file, we see that it contains a collection of directory names and associated svn and github addresses.
The file .externals "effectively" tells SVN where to locate code external to the current repository. This is where the component model source code is located. When a checkout of the HWRF repository is conducted, svn populates the sorc/ directory from these other repositories. For example, it creates the directory sorc/gfdl-vortextracker/ and populates it from the HWRF branch of the svn-dtc-gfdl-vortextracker.cgd.ucar.edu repository. This process is then repeated for the other component directories. An eighth component, ProdGSI, must be checked out manually by running the checkoutgsi.sh script.
When the external checkouts are completed (including the separate ProdGSI checkout), the sorc/ directory contains eight additional component model directories:
- WRFV3/
- WPSV3/
- UPP/
- pomtc/
- ncep-coupler/
- hwrf-utilities/
- gfdl-vortextracker/
- ProdGSI/
The HWRF trunk checks out its model components from the HWRF branch of the respective repositories. The location of the checkout will be different for developers who have a development branch. When one is doing development on a specific component, the external typically points to that development branch.