Difference between revisions of "Obtaining a GCHP Run Directory"

From Geos-chem
Jump to: navigation, search
Line 6: Line 6:
 
#[[Setting_Up_the_GCHP_Environment|Setting Up the GCHP Environment]]
 
#[[Setting_Up_the_GCHP_Environment|Setting Up the GCHP Environment]]
 
#[[Compiling_GCHP|Compiling]]
 
#[[Compiling_GCHP|Compiling]]
#[[GCHP_Basic_Example_Run|Basic Example Run]]
+
#[[GCHP_Basic_Example_Run|Running GCHP: Part 1]]
#[[Running_GCHP|Configuring a Run]]
+
#[[Running_GCHP|Running GCHP: Part 2]]
 
#[[GEOS-Chem_HP_Output_Data|Output Data]]
 
#[[GEOS-Chem_HP_Output_Data|Output Data]]
 
#[[Developing_GCHP|Developing GCHP]]
 
#[[Developing_GCHP|Developing GCHP]]

Revision as of 22:51, 6 March 2019

Previous | Next | User Manual Home | GCHP Home

  1. Hardware and Software Requirements
  2. Downloading Source Code and Data Directories
  3. Obtaining a Run Directory
  4. Setting Up the GCHP Environment
  5. Compiling
  6. Running GCHP: Part 1
  7. Running GCHP: Part 2
  8. Output Data
  9. Developing GCHP
  10. Run Configuration Files


Overview

The method for creating a run directory changed between 12.1.0 and prior versions. Prior to 12.1.0, acquiring a GCHP run directory requires downloading the GEOS-Chem Unit Tester, configuring a text file, and running a perl script. This is the same method as creating GEOS-Chem Classic run directories. For version 12.1.0 and later, we no longer use the Unit Tester to create run directories. Instead, create run directories directly from the GCHP source code repository.

This page separately details both methods of run directory creation. Make sure you follow instructions for the GEOS-Chem version that you are using. If you are uncertain about what version you have, please contact the GEOS-Chem Support Team.

12.1.0 and Later

Step 1: Create Run Directory

Run directories are created directly from the GCHP source code repository starting in version 12.1.0. 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.

./createRunDir.sh gchp_12.1.0_RnPbBe

During the course of script execution you will be asked a series of questions:

  1. 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 variable GC_DATA_ROOT. If that file does not already exist it will be created for you.
  2. 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.
  3. 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.
  4. Following simulation type, enter the meteorology you want to use in the same way. Options for GEOS-FP and MERRA2 will be displayed.
  5. Next, enter the target path where you want your run directory to be stored. Do not include symbolic links in the path.
  6. 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.
  7. 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, including those changes in the same repository as your source code 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. 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.

Step 3: Copy Run Script to Run Directory (Optional)

Run scripts are what you submit to your compute cluster to execute your GCHP run. It is not required since you sometimes can run interactively using the same resources used for your command line tasks. However, we recommend submitting GCHP runs as jobs. Several examples of GCHP run scripts, mostly for SLURM, are provided in subdirectory runScriptSamples. All example run scripts include source gchp.env. If you customize your own run script make sure you include this before use.

Prior to 12.1.0

Step 1: Create Run Directory

Prior to version 12.1.0 you can create a GCHP run directory using the GEOS-Chem Unit Tester. The instructions for this are nearly the same as instructions for creating a GEOS-Chem Classic run directory. See the GEOS-Chem Classic wiki page for creating a GEOS-Chem run directory for additional information beyond what is provided below.

From your primary GCHP directory (e.g. /mypath/GCHP), download a clean copy the development version of the GEOS-Chem Unit Tester on Github:

git clone git@github.com:geoschem/geos-chem-unittest.git UT

There are three run directories available for GCHP: the radon-lead-beryllium simulation, the standard full chemistry simulation, and the benchmarking simulation which incorporates both simple and complex SOA for validation. The default settings for all run directories are a 72-level simulation using 0.25x0.3125 GEOS-FP meteorology and internal c24 cubed sphere grid resolution (roughly equivalent to 4x5). Please note that unlike GEOS-Chem Classic there are not separate run directories for different grid resolutions.

Example steps for creating a standard full-chemistry run directory called gchp_standard:

  1. Change directories into /mypath/GCHP/UT/perl
  2. Open CopyRunDirs.input in a text editor and make the following changes:
    1. Update GCGRID_ROOT and DATA_ROOT to point to the GEOS-Chem shared data directories on your system.
    2. Update variable UNIT_TEST_ROOT to match the directory to which you cloned the unit tester (e.g. /mypath/UT)
    3. Update variable COPY_PATH to be the target directory where you want to store your run directories (e.g. /mypath/GCHP/rundirs)
    4. Uncomment the lines for the GCHP run directories you would like to download (search for gchp_standard)
    5. Set the start and end dates for the simulations you are creating.
    6. Make sure all other run directory options are commented out
  3. Run the following perl script to create the run directory /mypath/GCHP/rundirs/gchp_standard:
    ./gcCopyRunDirs CopyRunDirs.input

See the Creating GEOS-Chem run directories wiki page for more information.

Step 2: Set Up the Run Directory

Symbolic links to restart files, input data, and tile files for mapping between lat-lon and cubed sphere grids are automatically included in the run directory and do not require additional setup. However, you should check that the links were properly set by ensuring none are broken symbolic links.

Then manually set a symbolic link to your source code directory. A utility bash script included in the run directory called setCodeDir will do this for you. Execute it as follows:

./setCodeDir /path/to/code

Note that there should not be any symbolic links within the path that you pass to setCodeDir as this will cause a compile error within ESMF.


Previous | Next | User Manual Home | GCHP Home