Obtaining a GCHP Run Directory
Previous | Next | Getting Started With GCHP | GCHP Main Page
- Hardware and Software Requirements
- Downloading Source Code and Data Directories
- Obtaining a Run Directory
- Setting Up the GCHP Environment
- Compiling
- Running GCHP: Basics
- Running GCHP: Configuration
- Output Data
- Developing GCHP
- Run Configuration Files
Overview
Starting in version 12.1.0, GCHP no longer uses the Unit Tester to create run directories. Instead, create run directories directly from the GCHP source code repository. If you are uncertain about what version you have, please contact the GEOS-Chem Support Team. Please note that we always recommend upgrading to the latest version.
Step 1: Create Run Directory
Navigate to GCHP subdirectory Run/
and run shell script createRunDir.sh
.
./createRunDir.sh
You can pass a run directory name as an optional argument if you wish, or you can set it interactively later on.
./createRunDir.sh gchp_12.1.0_RnPbBe
During the course of script execution you will be asked a series of questions:
- The very first time you create a run directory you will be prompted for your ExtData path where you store GEOS-Chem shared data directories. The ExtData path should include the name of your ExtData directory. For example, it may be something like this:
/n/lfs/gcgrid/gcdata/ExtData
. It is a good idea to have this ready prior to creating your first run directory. Make sure you do not include any symbolic links in the path. Once entered, it will be stored in file.geoschem/config
in your home directory as environment variableGC_DATA_ROOT
. If that file does not already exist it will be created for you. Please note that since the directory it is stored in begins with a period it will be invisible unless you show hidden files using a command such asls -a
. - Subsequent runs of createRunDir.sh will always source that file to get your location for shared data directories and you will not be prompted again. If your ExtData path changes in the future you must provide the new path in .geoschem/config. The run directory creation script will prompt you to do so only if the file is missing or if the path within it is not valid.
- You will next be prompted for what simulation you wish to create a run directory for. Enter the integer number next to the simulation type you want to use that is displayed on the screen.
- Following simulation type, enter the meteorology you want to use in the same way. Options for GEOS-FP and MERRA2 will be displayed.
- Next, enter the target path where you want your run directory to be stored. Do not include symbolic links in the path.
- You will then be prompted to enter a run directory name if you did not pass one as an optional argument when calling the script. You are given the option to simply press return and use the default run directory name of format gchp_{simulation_type}. If you are not storing your run directory at a path that indicates GEOS-Chem version, we recommend storing the version number directly in the run directory name to avoid later confusion. However, please note that you can always look up the run directory version within the run directory itself in file rundir.version.
- Finally, you will be asked if you want to track run directory changes with git version control. This feature is useful if you plan on making feature updates to GEOS-Chem that involve changes to the run directory, such as adding emissions. With version control you can keep track of exactly what you changed relative to the original settings. This is also useful if you plan on submitting an update for inclusion in the standard model since you can copy changes directly from your version history to GCHP/Run, and then commit those changes in the same clone as your source code updates. If you forked the repository you can then push to your fork and do a pull request to send us your updates.
Step 2: Set Environment File Symbolic Link
Once you have created a run directory you need to set the gchp.env symbolic link to your GCHP environment file. This file will be sourced automatically every time you compile using the Makefile and every time you run using one of the provided run scripts (more on this later in the manual). If you write your own run script, be sure to include source gchp.env to use the same environment that you compiled with.
To set the gchp.env symbolic link execute shell script setEnvironment and pass the path to your environment file. You can keep your environment file anywhere on your system; it does not need to be stored in the run directory.
./setEnvironment /home/gchp/envs/gchp_ifort17_openmpi.env
Several examples of GCHP environment files are provided in subdirectory environmentFileSamples. For more information on developing a working environment file for GCHP see the next chapter in this online manual.
Previous | Next | Getting Started With GCHP | GCHP Main Page