Hurricane WRF (HWRF) | Using the Code

Checking out the code

The HWRF system is available through a SVN checkout from a unified set of code repositories plus a git clone command for the GSI data assimilation component (obtained by running the sorc/ script). Each code repository contains a trunk, which contains the common shared version of the code to be used by all of the developers; the branches, which contain individual Project Development Branches; and tags to reference special check points in the code development, such as releases.

For those developers who only intend to run the HWRF system, and will not be committing code development back into the repository, the trunk is suitable for their needs. With the exception of the GSI component, developers may checkout the trunk with a single command:

svn co HWRF

This command produces a top level directory named HWRF. The structure and contents of this HWRF directory conform to the requirements of the HWRF run scripts. For details on the directory contents see the section on Code Structure.

A second command must be used to obtain the Gridpoint Statistical Interpolation (GSI) code for those developers wishing to run the HWRF data assimilation system. The GSI code is housed in a Git repository and should be cloned within the HWRF/sorc directory:

cd HWRF/sorc

To run the above script, you must first set up SSH keys, separately on each machine that you wish to use. To set up SSH keys, please follow these instructions.

When the developer intends to commit code changes to the DTC repository, it is necessary for the developer to request the creation of a Project Development Branch from which they can do their development. A Project Development Branch is an isolated copy of the trunk from which one or more developers can place their work under version control without modifying the HWRF trunk (e.g. the main source of the code). The developer can freely commit any code development to this branch because by design it is separate from the trunk code. Only when the development is stable and passes the necessary tests is it reintegrated into the trunk to be shared with all of the developers.

Typically a Project Development Branch is named after the user or after a specific project. DTC can help developers create branches in the DTC repositories and check them out. To checkout a personal development branch named myproject into the directory myHWRF, use the command:

svn co myHWRF

Passwords & Usernames

The first time each repository is accessed on a particular machine, SVN or Git will prompt you for your username and password before commencing with the download. This means that the first time you conduct a checkout, you will be prompted first for the username and password for the HWRF repository, and then, one at a time, for the username and password for each of the external repositories used to populate the sorc/ directory (e.g. WRF, WPS, hwrf-utilities, etc.). Once this initial checkout is complete, the system will remember the username and password for each of the repositories and you should not need to enter it again.

The HWRF system can be checked out with two password/username combinations. The first accesses all of the SVN repositories and the second is for GitHub access to GSI, WPS, WRF, and UPP. For information on obtaining access to the repositories, please visit this page.

When attempting a checkout on a particular machine, for the very first time, SVN will prompt you with a message that looks something like this:

      Error validating server certificate for 'svn-dtc-hwrf.cgd.ucar
      - The certificate is not issued by a trusted authority. Use the 
        fingerprint to validate the certificate manually
      - The certificate hostname does not match.
      - The certificate has expired. Certificate information:
      - Hostname: localhost.localdomain
      - Valid: from Thu, 21 Feb 2008 06:32:25 GMT until Fri, 20 Feb
        2009 06:32:25 GMT
      - Issuer: SomeOrganizationalUnit, SomeOrganization, SomeCity, 
        SomeState, --
      - Fingerprint: 86:01:bb:01:dc: 60:b9:96:22:67:a4:49:ff
      (R)eject, accept (t)emporarily or accept (p)ermanently?

Select option p.

You will then be asked for your password. SVN will guess your username based on your login identification.

      Authentication realm:  dtc:hwrf
      Password for 'myusername':

If the default username is not correct, and most likely it is not, simply hit the return key and enter the correct username.

      Authentication realm:  dtc:hwrf

Hit return again, and enter the appropriate password.

      Authentication realm:  dtc:hwrf
      Username: Password for '':

At this stage it is useful to remember that all usernames are strictly lower case.

After the SVN checkout is complete, the final step is to checkout the HWRF branch of the GSI repository by running the ./ script in the sorc/ directory. To run this script, you must first set up SSH keys, separately on each machine that you wish to use. To set up SSH keys, please follow these instructions.