The OpenGGCM can either be run at the Community Coordinated Modeling Center (CCMC) at NASA GSFC or, with permission from the OpenGGCM team, from a local copy of the source code.
Requesting a model run
- Run on demand at the CCMC (Community Coordinated Modeling Center) at NASA GSFC.
Running a local copy of the model
Tools and information
Basic rules
- Running OpenGGCM occurs in 2 phases: (a) pre-compilation, and (b) compilation and execution. These 2 steps can occur on different machines. It is thus good practice to keep the source tree and run the pre-compilation on a local machine. That makes it easier to keep sources, input data, etc together, and still be able to run the model on different machine from one source tree. Other advantages are that backups are done locally (where all information is stored to make a run) and that one only needs to istall all the tools required for the pre-compilation process once without having to deal with different OS quirks. This also separates the code and input data from the output data, which often need to reside on different file systems because of their size. Steps (a) and (b) are completely automated and only require an ssh login from the local machine to the machine where OpenGGCM is actually running on. The latter is called the 'target' in many places. Note that this does not prevent one from doing everything on one machine, but some care must be taken to avoid directory name conflicts.
- Directories on 'local'
- $HOME/..optional../$OPENGGCMDIR souces from git or tarball
- $HOME/..optional../$RUN one for every run
- Directories on 'target'
- $HOME/$OUTDIR/$TARGETDIR/$RUN will be created during precomp. Compilation and running occurs here.
- $OUTDIR, $TARGETDIR, and $RUN are defined in the runme file
Back to top
Installing the model
Set up account on GitHub
- Create GitHub account
- (Optional) Set up auto-login to GitHub
- Get your public key from ~/.ssh/id_rsa.pub (if you don't have a public key yet, use ssh-keygen to create it)
- Enter you public key into GitHub under Settings/SSH and GPG Keys
Set up personal OpenGGCM repository in GitHub
- Contact Kai or Doug to get added to the GitHub openggcm team
- Fork copy of unh-hpc/openggcm
Due to some configuration issues, the following temporary fix needs to be run on Marvin:
* load git module
*module load git-gcc8
Set up local OpenGGCM repository
Note: The code should be installed on the machine on which you intend to set up your model inputs and initiate your runs.
- Clone main repository in desired directory
- git clone git@github.com:unh-hpc/openggcm.git (will create an openggcm directory in current directory)
- Add your repository as remote in your local repo
- git remote add <remotename> git@github.com:<GitHubaccountname>/openggcm.git
Select the version of the code to use
git checkout <version>
, where <version>
is origin/testing
for the latest and greatest, or v5.0
for the last release
Keep your version up-to-date
- Fetch changes periodically
- git fetch <remotename> ("origin" for the main repository, <remotename> for yours)
Back to top
Preparing the model
Setting up the environment
- Define the environment variable OPENGGCMDIR to point to your local repo
-
export OPENGGCMDIR=<openggcm directory>
(bash syntax, other shells may be different; put in .bash_profile, .bashrc, .profile, or other startup file)
Due to some configuration issues, the following temporary environment variables need to be set on Marvin:
* add path for corrected openmpi executables
*export PATH=$PATH:/mnt/lustre/germaschewski/kaig/src/spack/opt/spack/linux-rhel7-zen/gcc-8.2.0/openmpi-4.1.0-ohzmwmrjsompc3ouirjtqfzgybpordlm/bin
* add path for hdf5 libraries (if not using hdf5 output, path can be blank but MUST BE SET)
*export HDF5_DIR=/cm/shared/apps/hdf5/1.10.1
- Generate build files
- ./autogen.sh (in openggcm directory)
Build openggcm tools (necessary for compiling; only need to rebuild if OpenGGCM code is updated)
- cd to openggcm/util directory
- ./configure --prefix=$HOME (will put executables into your $HOME/bin directory)
- make clean
- make
- make install
Back to top
Starting a run
- Create a run directory (all input files go here; $RUN variable will use directory name by default)
- Make sure necessary files are in $RUN directory (see Inputs)
- solar wind data (swdata file or spacecraft data files (wi.bxgse, etc.))
- spacecraft orbits (orbits.txt)
- Create and edit a runme script (see explanation of runme parameters)
- create a default runme (runme.default) by running $OPENGGCMDIR/run-template/generate_runme
or
- copy another runme and make changes
- Execute the runme (./runme)
Back to top