Skip navigation
NASA Logo, National Aeronautics and Space Administration
Modeling Guru Banner
Currently Being Moderated

Basic Tutorial on Running GEOSagcm with GMI Chemistry

VERSION 6  Click to view document history
Created on: Feb 7, 2011 3:19 PM by Jules Kouatchou - Last Modified:  Feb 25, 2014 10:42 AM by Jules Kouatchou
This document briefly describes how to obtain, compile and run the
GEOSagcm code.
The focus is in running the Chemistry component of the model under
two configurations.
We also present how the output files can be processed to generate
useful plots.

This document briefly describes how to obtain, compile and run the GEOSagcm code. The focus is in running the Chemistry component of the model under two configurations. We also present how the output files can be processed to generate useful plots.

 

 

Obtaining the Code

 

To obtain on discover a copy of the code with tag AeroChem-Fortuna-2_1-m4-JEN, issue the following commands:

 

setenv workDir /discover/nobackup/userID/myDIR
cd $workDir
cvs -d :ext:userID@progressdirect:/cvsroot/esma co -r AeroChem-Fortuna-2_1-m4-JEN Fortuna

 

You will get directory GEOSagcm/ containing the source code. Here userID is the user's name on discover.

 

 

Compiling the Code

The following module setting is needed to compile and run the code:

 

module purge
module load comp/intel-11.0.083
module load lib/mkl-9.1.023
module load other/mpi/mvapich2-1.4.1/intel-11.0.083
setenv BASEDIR /discover/nobackup/projects/gmao/share/dao_ops/Baselibs/v3.2.0_build1

 

To compile the code, type:

 

cd $workDir/GEOSagcm/src
gmake install >& compileGEOSagcm.LOG &

 

You can check the progress of your compilation by typing:

 

tail -f compileGEOSagcm.LOG

 

You may check the file compileGEOSagcm.LOG to find out if there any major compilation error. In any case, a successful compilation will generate the executable:

 

$workDir/GEOSagcm/src/Applications/GEOSgcm_App/GEOSgcm.x

 

 

Setting Up the Run Directory

 

When the compilation is completed, you can now generate the run directory that should contain all the necessary files/directories to perform experiments. The process involves running a script:

 

cd $workDir/GEOSagcm/src/Applications/GEOSgcm_App
./gcm_setup

 

You will be prompted to answer a few questions:

 

 

a) Enter the Experiment ID:
   The Experiment ID should be an easily identifiable name representing
   each individual experiment you create. One possibility is your initials
   followed by a 3-digit number: eg) abc001

b) Enter a 1-line Experiment Description:
   The Experiment Description should be a concise statement describing the
   relevant nature of your experiment.

c) Enter the Model Resolution (IM JM):
   The options are:
       72  46   (~ 4 -deg)
      144  91   (~ 2 -deg)
      288 181   (~ 1 -deg)
      576 361   (~1/2-deg)
     1152 721   (~1/4-deg)

d) Enter the AERO_PROVIDER:
   The AERO PROVIDER describes the Chemistry Component to be used for
   Radiatively Active Aerosols. PCHEM is the default used for most
   AMIP-style Climate Runs.

e) Enter Desired Location for HOME Directory:
   The HOME directory will contain your run scripts and primary resource (rc) files.

f) Enter Desired Location for EXP  Directory:
   The EXP  directory will contain your restarts and model output.
   The HOME and EXP directories can be the same, eg)
   /discover/nobackup/$LOGNAME/abc001

g) Enter your GROUP ID:
   Your GROUP ID is your charge code used for NCCS accounting.

 

If everything goes well, the directory

 

$workDir/expID

 

 

 

will be created and it will contain the following files or sub-directories:

 

AGCM.rc:          file setting model paramters
CAP.127:          file containing information on start date & time,
                  end date & time of job segment, duration of job
                  segment, stop date & time of entire experiment.
CAP.rc:
cap_restart:      file containing starting date (YYYYMMDD) and
                  hour (HHMMSS) of job segment
ckdirs:           script for listing files in a set of directories
gcm_regress.j:    PBS script for regression tests
gcm_run.127:      PBS script for submitting the job
gcm_run.j:
get.restarts:     script to obtain the restart files
HISTORY.rc:       file for selecting the type of diagnostics to be produced
linkbcs:          script for setting logical links to BC files

geosgcm_diag/:
geosgcm_prog/:
gmichem_aerdust/:
gmichem_chem/:
gmichem_depos/:
holding/:         location where output files are moved to after a
                  successful run.
plot/:            contains PBS script for plotting
post/:            contains PBS script for post-processing analysis
RC/:              contains all the resource files needed to drive the model
restart/:         location of restart files generated by the model
scratch/:         temporary directory used to keep necessary files
                  while the code is running

-------------------------------------------------------------------
Renamed restart files to be used at the start of each experiment.
You will have to obtain these files from a previous successful run.
-------------------------------------------------------------------
catch_internal_rst
fvcore_internal_rst
gmichem_import_rst
gmichem_internal_rst
gocart_internal_rst
irrad_internal_rst
lake_internal_rst
landice_internal_rst
moist_import_rst
moist_internal_rst
saltwater_import_rst
saltwater_internal_rst
solar_internal_rst
surf_import_rst
turb_import_rst
turb_internal_rst

 

 

Remark 1

 

By running the script gcm_setup, you automatically copy the executable to your experiment directory. Whenever you modify the code and obtain a new executable, make sure that you manually copy the executable GEOSgcm.x from:

 

$workDir/GEOSagcm/src/Applications/GEOSgcm_App

 

 

Running the Executable

Unfortunately,  at this time there is no central repository where necessary restart files for a particular date can be obtained. You will need to contact someone who was able to have a successful run in order to get such files. Here is a sample script that was used to copy scripts and restart files to the experiment directory ($workDir/expID/):

 

set DESTDIR = workDir/expID
set SOURCEDIR = /discover/nobackup/projects/gmi/gmidata2/input/forGEOS5/run_info
/bin/mkdir -p ${DESTDIR}


set FILELIST = ( AGCM.rc CAP.127 CAP.rc cap_restart \
                 ckdirs gcm_run.127 get.restarts HISTORY.rc vegdyn.data )


foreach FILE ( ${FILELIST} )
 /bin/cp ${SOURCEDIR}/${FILE} ${DESTDIR}/${FILE}
end


set DESTDIR = /discover/nobackup/jkouatch/runAeroChem_Fortuna/run001/RC
set SOURCEDIR = workDir/expID/RC
/bin/mkdir -p ${DESTDIR}


set FILELIST = ( BC_GridComp.rc Chem_MieRegistry.rc Chem_Registry.rc DU_GridComp.rc \
                 DU_Registry.rc GEOS_ChemGridComp.rc GMI_GridComp.rc GMI_namelist \
                 OC_GridComp---bbbo.rc OC_GridComp---bbnb.rc OC_GridComp---full.rc \
                 OC_GridComp.rc SC_GridComp.rc setkin_chem_mech.txt SS_GridComp.rc \
                 SU_GridComp.rc )


foreach FILE ( ${FILELIST} )
 /bin/cp ${SOURCEDIR}/${FILE} ${DESTDIR}/${FILE}
end

 

 

 

Some basic editings are required:


Edit the file get.restarts to set


    o OUTDIR: full path of your experiment directory (workDir/expID/)


Edit the file gcm_run.127 to change the path to:
    o HOMEDIR
    o EXPDIR


and load the modules:


    module purge
    module load comp/intel-11.0.083
    module load lib/mkl-9.1.023
    module load other/mpi/mvapich2-1.4.1/intel-11.0.083
    setenv BASEDIR /discover/nobackup/projects/gmao/share/dao_ops/Baselibs/v3.2.0_build1


Edit the file HISTORY.rc to change:
    o EXPID
    o EXPDSC


Edit the file get_restarts to change the path to:
    o INDIR
    o OUTDIR


Edit the file RC/GMI_GridComp.rc to change the path to:
    o namelistFile
    o kineticsTextFile

 

From your experiment directory ($workDir/expID), you need to run the script get.restarts (to obtain the restart files) by typing:

 

./get.restarts

 

 

 

Duration of Experiment


In the process of creating the experiment directory, the following files were created:


  • CAP.127: contains begin/end date and time of entire job, stop date, duration (in days) of each job segment.
  • gcm_run.127: PBS script
  • cap_restart: contains two numbers pointing to the starting date YYYYMMDD and starting hour HHMMSS of the job.


Assume that we want to carry out a 12-month experiment with January 1, 2008 as starting date. We want to run one month at the time. The file cap_restart will have:


 

20080101 000000

 



and the file CAP.127 will have the settings:


        BEG_DATE:     20000101 000000

        END_DATE:     20080201 000000

        JOB_DURATION: 00000031 000000

        JOB_DURATION_DEFAULT: 31


        STOP_DATE: 20090101


Note that the stop date STOP_DATE is January 1, 2009. You will need to submit the PBS script:


 

qsub gcm_run.127

 



When the first job segment is completed (for January 2008), two new files will be created for the February 2008 simulation: CAP.128 and gcm_run.128. In addition, the file cap_restart will automatically be updated to contain


 

20080201 000000

 


We are interested in two types of Chemistry experiments:

  • Run with Coupling: the GMI gas-phased Chemistry is coupled with GOCART aerosol Chemistry. GOCART aerosol related variables are fed into GMI in real time.
  • Run without Coupling: GMI gas-phased Chemistry runs alone and reads in aerosol related data from files.

 

 

 

Run with Coupling

Edit the file AGCM.rc and have the settings:

#PCHEM_INTERNAL_RESTART_FILE:             pchem_internal_rst
#PCHEM_INTERNAL_RESTART_TYPE:           binary
#PCHEM_INTERNAL_CHECKPOINT_FILE:      pchem_internal_checkpoint
#PCHEM_INTERNAL_CHECKPOINT_TYPE:     binary

#PCHEM_IMPORT_RESTART_FILE:               pchem_import_rst
#PCHEM_IMPORT_RESTART_TYPE:              binary
#PCHEM_IMPORT_CHECKPOINT_FILE:         pchem_import_checkpoint
#PCHEM_IMPORT_CHECKPOINT_TYPE:        binary

GOCART_INTERNAL_RESTART_FILE:            gocart_internal_rst
GOCART_INTERNAL_RESTART_TYPE:           binary
GOCART_INTERNAL_CHECKPOINT_FILE:      gocart_internal_checkpoint
GOCART_INTERNAL_CHECKPOINT_TYPE:     binary
...
...
GMICHEM_INTERNAL_RESTART_FILE:           gmichem_internal_rst
GMICHEM_INTERNAL_RESTART_TYPE:          binary
GMICHEM_INTERNAL_CHECKPOINT_FILE:     gmi_internal_checkpoint
GMICHEM_INTERNAL_CHECKPOINT_TYPE:    binary

GMICHEM_IMPORT_RESTART_FILE:                gmichem_import_rst
GMICHEM_IMPORT_RESTART_TYPE:               binary
GMICHEM_IMPORT_CHECKPOINT_FILE:          gmi_import_checkpoint
GMICHEM_IMPORT_CHECKPOINT_TYPE:         binary
...
...
# AeroChem Environment
# --------------------
       RATS_PROVIDER: GMICHEM  # options: PCHEM, GMICHEM, STRATCHEM (Radiatively active tracers)
       AERO_PROVIDER: GOCART   # options: PCHEM, GMICHEM, GOCART
ANALYSIS_OX_PROVIDER: GMICHEM  # options: PCHEM, GMICHEM, STRATCHEM, GOCART
....

%
%
Edit the file RC/Chem_Registry.rc and have the settings:
doing_DU:  yes   # mineral dust
doing_SS:  yes   # sea salt
doing_SU:  yes   # sulfates
doing_BC:  yes   # black carbon
doing_OC:  yes   # organic carbon
Edit the file RC/GEOS_ChemGridComp.rc and have the settings:
ENABLE_GOCART:    .TRUE.
AERO_PROVIDER: GOCART
Edit the file RC/SU_GridComp.rc and have the settings:
sing_GMI_OH: yes
using_GMI_NO3: yes
using_GMI_H2O2: yes
Edit the file RC/GMI_GridComp.rc and have the settings:
usingGOCART_BC: T
usingGOCART_DU: T
usingGOCART_OC: T
usingGOCART_SS: T
usingGOCART_SU: T

 

Run without Coupling


Edit the file AGCM.rc and have the settings:

#PCHEM_INTERNAL_RESTART_FILE:            pchem_internal_rst
#PCHEM_INTERNAL_RESTART_TYPE:            binary
#PCHEM_INTERNAL_CHECKPOINT_FILE:         pchem_internal_checkpoint
#PCHEM_INTERNAL_CHECKPOINT_TYPE:         binary

#PCHEM_IMPORT_RESTART_FILE:              pchem_import_rst
#PCHEM_IMPORT_RESTART_TYPE:              binary
#PCHEM_IMPORT_CHECKPOINT_FILE:           pchem_import_checkpoint
#PCHEM_IMPORT_CHECKPOINT_TYPE:           binary

#GOCART_INTERNAL_RESTART_FILE:           gocart_internal_rst
#GOCART_INTERNAL_RESTART_TYPE:           binary
#GOCART_INTERNAL_CHECKPOINT_FILE:        gocart_internal_checkpoint
#GOCART_INTERNAL_CHECKPOINT_TYPE:        binary
...
...
GMICHEM_INTERNAL_RESTART_FILE:          gmichem_internal_rst
GMICHEM_INTERNAL_RESTART_TYPE:          binary
GMICHEM_INTERNAL_CHECKPOINT_FILE:       gmi_internal_checkpoint
GMICHEM_INTERNAL_CHECKPOINT_TYPE:       binary

GMICHEM_IMPORT_RESTART_FILE:            gmichem_import_rst
GMICHEM_IMPORT_RESTART_TYPE:            binary
GMICHEM_IMPORT_CHECKPOINT_FILE:         gmi_import_checkpoint
GMICHEM_IMPORT_CHECKPOINT_TYPE:         binary
...
...
# AeroChem Environment
# --------------------
       RATS_PROVIDER: GMICHEM  # options: PCHEM, GMICHEM, STRATCHEM (Radiatively active tracers)
       AERO_PROVIDER: GMICHEM   # options: PCHEM, GMICHEM, GOCART
ANALYSIS_OX_PROVIDER: GMICHEM  # options: PCHEM, GMICHEM, STRATCHEM, GOCART
....

Edit the file HISTORY.rc to include:


                      'GMICHEM::BCphobic' , 'GMICHEM'  ,
                      'GMICHEM::BCphilic' , 'GMICHEM'  ,
                      'GMICHEM::du001'    , 'GMICHEM'  ,
                      'GMICHEM::du002'    , 'GMICHEM'  ,
                      'GMICHEM::du003'    , 'GMICHEM'  ,
                      'GMICHEM::du004'    , 'GMICHEM'  ,
                      'GMICHEM::oc001'    , 'GMICHEM'  ,
                      'GMICHEM::oc002'    , 'GMICHEM'  ,
                      'GMICHEM::ss001'    , 'GMICHEM'  ,
                      'GMICHEM::ss003'    , 'GMICHEM'  ,
                      'GMICHEM::ss004'    , 'GMICHEM'  ,
                      'GMICHEM::ss005'    , 'GMICHEM'  ,
                      'GMICHEM::SO4'      , 'GMICHEM'  ,


Edit the file RC/Chem_Registry.rc and have the settings:

doing_DU:  no   # mineral dust
doing_SS:  no   # sea salt
doing_SU:  no   # sulfates
doing_BC:  no   # black carbon
doing_OC:  no   # organic carbon

Edit the file RC/GEOS_ChemGridComp.rc and have the settings:

ENABLE_GOCART:    .FALSE.
AERO_PROVIDER: GMICHEM

Edit the file RC/SU_GridComp.rc and have the settings:
using_GMI_OH: no
using_GMI_NO3: no
using_GMI_H2O2: no
Edit the file RC/GMI_GridComp.rc and have the settings:
usingGOCART_BC: F
usingGOCART_DU: F
usingGOCART_OC: F
usingGOCART_SS: F
usingGOCART_SU: F

Post-Processing

With the configuration we use, the model produces daily average files only in the directory $workDir/expID/holding/geosgcm_diag/. To create monthly average files using daily average files, submit the PBS script gcm_post.j located in the directory $workDir/expID/post/:

qsub gcm_post.j

The script will create directories labeled YYYYMM where each of them contain daily files and the monthly one for the corresponding month.

 

Comments (0)

Bookmarked By (0)

More Like This

  • Retrieving data ...

More by Jules Kouatchou

USAGov logo NASA Logo - nasa.gov