GEOS-5 Checkout and Build Instructions (Fortuna): Difference between revisions

 
(58 intermediate revisions by the same user not shown)
Line 1: Line 1:
These instructions presume checking out the older DAS tag: GEOSadas-5_3_0_p3-piesa_0r7 module: GEOSadas-5_3
These instructions presume checking out the PIESA group tag: '''AeroChem-Fortuna-2_5-b23'''.


== How to Check Out and Build the Code ==
== How to Check Out and Build the Code ==
=== Find a place to store and build the code ===
=== Find a place to store and build the code ===
The GEOS-5 (AGCM) source code checks out at about 198 MB of space.  Once compiled, the complete package is about 1.3 GB.  Your home space on '''discover''' may not be sufficient for checking out and building the code.  You should consider either requesting either a larger quota in your home space (call the tag x6-9120 and ask, telling them you are doing GEOS-5 development work) or building in your (larger) nobackup space.  But consider, ''nobackup'' is not backed up.  So be careful...
The GEOS-5 (AGCM) source code checks out at about 55 MB of space.  Once compiled, the complete package is about 1.3 GB.  Your home space on '''discover''' may not be sufficient for checking out and building the code.  You should consider either 1) requesting a larger quota in your home space (call the tag x6-9120 and ask, telling them you are doing GEOS-5 development work) or 2) building in your (larger) nobackup space (recommended).  But consider, ''nobackup'' is not backed up.  So be careful...


One strategy I like is to check the code out to my ''nobackup'' space, but then make symlink from him home space back to that.  For example, if I have my code stored at $NOBACKUP/GEOSagcm, I would make a symlink in my home space to point to that like:
One strategy I like is to check the code out to my ''nobackup'' space, but then make symlink from him home space back to that.  For example, if I have my code stored at $NOBACKUP/GEOSagcm, I would make a symlink in my home space to point to that like:
  % ln -s $NOBACKUP/GEOSagcm GEOSagcm
  % ln -s $NOBACKUP/GEOSagcm GEOSagcm


=== Setup your environment and check out code ===
=== Check Out the Code ===
With the above step complete, let's get ourselves ready to check out the code.  We'll be using the ''cvs'' command to check out the code.  The basic syntax is:
Let's get ourselves ready to check out the code.  We'll be using the ''cvs'' command to check out the code.  The basic syntax is:


  % cvs -d $CVSROOT checkout -d DIRECTORY -r TAGNAME MODULENAME
  % cvs -d $CVSROOT checkout -d DIRECTORY -r TAGNAME MODULENAME
Line 15: Line 16:
Here, $CVSROOT specifies the CVS repository we'll be getting the code from, DIRECTORY is the name of the directory you would like to create to hold the code, MODULENAME is the particular module (set of code) we'll be checking out, and TAGNAME is a particular version of that module.  Let's fill in the blanks:
Here, $CVSROOT specifies the CVS repository we'll be getting the code from, DIRECTORY is the name of the directory you would like to create to hold the code, MODULENAME is the particular module (set of code) we'll be checking out, and TAGNAME is a particular version of that module.  Let's fill in the blanks:


  % cvs -d :ext:c-sourcemotel.gsfc.nasa.gov:/cvsroot/esma co -d GEOSagcm -r GEOSadas-5_3_0_p3-piesa_0r7 GEOSadas-5_3
  % cvs -d :ext:pcolarco@cvsacldirect:/cvsroot/esma co -d GEOSagcm -r AeroChem-Fortuna-2_5-b23 Fortuna
 
So our module is ''GEOSadas-5_3'' and the tag is ''GEOSadas-5_3_0_p3-piesa_0r7''.  The code will check-out to a newly created directory call ''GEOSagcm''.  Note that I substituted the shortcut ''co'' for ''checkout'' in the above command.


The above command is generally valid.  You ought to be able to execute it and checkout some code.  If you don't have your ''ssh keys'' setup on '''sourcemotel''' then you should be prompted for your '''sourcemotel''' passwordThe assumption here is that your username on '''sourcemotel''' is the same as on the machine you are checking the code out on. If not, modify the command like this:
So our module is ''Fortuna'' and the tag is ''AeroChem-Fortuna-2_5-b23''.  The code will check-out to a newly created directory call ''GEOSagcm''.  Note that I substituted the shortcut ''co'' for ''checkout'' in the above command.


  % cvs -d :ext:SOURCEMOTEL_USERNAME@c-sourcemotel.gsfc.nasa.gov:/cvsroot/esma co -d GEOSagcm -r GEOSadas-5_3_0_p3-piesa_0r7 GEOSadas-5_3
The above command is generally valid. You ought to be able to execute it and checkout some code. If you don't have your ''ssh keys'' setup on '''cvsacl''' then you should be prompted for your '''cvsacl''' password. The assumption here is that your username on '''cvsacl''' is the same as on the machine you are checking the code out on.


Here's a short cut.  So that you don't have to type in the ''-d :ext:c-sourcemotel.gsfc.nasa.gov:/cvsroot/esma'' business all the time, you can add the following lines to your, e.g., ''.cshrc'' file:
Here's a short cut.  So that you don't have to type in the ''-d :ext:pcolarco@cvsacldirect:/cvsroot/esma'' business all the time, you can add the following lines to your, e.g., ''.cshrc'' file:


  setenv CVSROOT ':ext:SOURCEMOTEL_USERNAME@c-sourcemotel.gsfc.nasa.gov:/cvsroot/esma'
  setenv CVSROOT ':ext:pcolarco@cvsacldirect:/cvsroot/esma'
  setenv CVS_RSH ssh
  setenv CVS_RSH ssh


Modify as appropriate to put in your username in or if you use a different shell (i.e., put the analog of these lines into your .bashrc file or whatever).
Modify as appropriate to put in your username in or if you use a different shell (i.e., put the analog of these lines into your .bashrc file or whatever).  Or if you are on a different machine than discover, the path to the '''cvsacl''' repository may be somewhat different.


If you set that up, you should be able now to type in:
If you set that up, you should be able now to type in:


  % cvs co -d GEOSagcm -r Fortuna-2_1 Fortuna  
  % cvs co -d GEOSagcm -r AeroChem-Fortuna-2_5-b23 Fortuna  


Enter your password when prompted (if necessary) and the code should check out.
and the code will check out.


If you want to avoid typing in your password all the time (recommended) you need to set up your ''ssh keys''.  Once you have created your keys on the local machine (i.e., '''discover''') you want to give '''sourcemotel''' the contents of the public key file (~/.ssh/id_dsa.pub).  Log on to '''sourcemotel''' in your browser and click on the "My Page" tab and then on the "Account Maintenance" heading.  Scroll down the page and you'll see a little block called "Shell Account Information."  Inside that is a link to "Edit Keys."  Click the link and then paste the contents of your id_dsa.pub file as a new line into the windowClick "Update" and you're good to go.  It may take 10-15 minutes for '''sourcemotel''' to propagate the updated keys, so until that happens you may still have to type in your password.
=== Build the Code ===
Now you've checked out the codeYour should have a directory called GEOSagcm in front of youYou're almost ready to build the code at this point.


=== Setup your environment and build the code ===
The first thing to do is to set up your shell environment.  First, we need to define the environment variable ESMADIR, e.g.,
Now you've checked out the code. Your should have a directory called GEOSagcm in front of you.  You're almost ready to build the code at this point.
  % setenv ESMADIR $NOBACKUP/GEOSagcm
assuming you put the source code in your $NOBACKUP directory.


The first thing to do is to set up your environment to use the appropriate compilers and libraries.  There's a short-cut, easy way to do this:
Then:


  % cd GEOSagcm/src
  % cd GEOSagcm/src
Line 47: Line 48:


This loads the relevant "modules" for this version of the model.  The "modules" specify the version of compiler, MPI libraries, and scientific libraries assumed by the code.  This step also sets the environment variable BASEDIR, which specifies the version of the so-called "Baselibs" the code requires.  The "Baselibs" contain, e.g., the netcdf and ESMF libraries.
This loads the relevant "modules" for this version of the model.  The "modules" specify the version of compiler, MPI libraries, and scientific libraries assumed by the code.  This step also sets the environment variable BASEDIR, which specifies the version of the so-called "Baselibs" the code requires.  The "Baselibs" contain, e.g., the netcdf and ESMF libraries.
There's one other environment variable to set:
% setenv ESMADIR $HOME/GEOSagcm
where you edit the path to point wherever your GEOSagcm directory is located.  This sets the location of where the build gets installed.  It should default to this location, but in case you have multiple instances of the code checked out it's a good idea to be explicit.


By the way, I have an alias in my .cshrc file that actually accomplishes the above tasks.  It looks like this:
By the way, I have an alias in my .cshrc file that actually accomplishes the above tasks.  It looks like this:
  % alias g5 'setenv ESMADIR $HOME/GEOSagcm;cd $ESMADIR/src;source g5_modules'
  % alias g5 'setenv ESMADIR $NOBACKUP/GEOSagcm;cd $ESMADIR/src;source g5_modules'


Now, assuming you're in the source directory, you can build the issuing the following command:
Now, assuming you're in the source directory, you can build the issuing the following command:
Line 64: Line 61:


The code builds faster in this instance, but be warned that without optimization any generated code will run very slowly.
The code builds faster in this instance, but be warned that without optimization any generated code will run very slowly.
''NOTE: I don't find the parallel build to actually work at this point, so if the following fails I suggest just doing a gmake install --ed.''


A better way is to do a parallel build.  To do this, start an interactive queue (on '''discover'''):
A better way is to do a parallel build.  To do this, start an interactive queue (on '''discover'''):
Line 95: Line 94:
  include
  include
  lib
  lib
The executables are in the ''bin'' directory.
The executables are in the ''bin'' directory.  The resource files are in the ''etc'' directory.


In this example, the directory ''GEOSagcm'' is the root directory everything ends up under.  You can specify another location by setting the environment variable ESMADIR to some other location and installing again.
In this example, the directory ''GEOSagcm'' is the root directory everything ends up under.  You can specify another location by setting the environment variable ESMADIR to some other location and installing again.


'''Note:''' This example has built the model with HDF5/NC4 support.  The output files generated will be in netcdf4 format, and will need to be viewed using ''gradsnc4'' (as opposed to ''gradshdf'').  You can build with HDF4/NC3 support instead by compiling like
== How to Setup and Run an Experiment ==
% gmake ESMA_SDF=hdf --jobs=8 pinstall |& tee make.log
Now that you've built the code, let's try to run it.  In the exercise that follows, we will create a fresh experiment.
 
== How to Setup and Run and Experiment ==
Now that you've built the code, let's try to run it.  In the exercise that follows, we will ''clone'' a previous experiment.  This will give you the basic idea of how to set up an experiment that we can refine in later exercises.


In what follows I will assume we are working on the NCCS computer '''discover'''.
In what follows I will assume we are working on the NCCS computer '''discover'''.
Line 111: Line 107:
We're not sure what this means, but Arlindo says it is important.
We're not sure what this means, but Arlindo says it is important.


Next, let's setup an environment variable GEOSUTIL that points to the GEOS_Util directory in your model build. In my case, it looks something like:
Let's make sure that your binaries from your compiled GEOS-5 code are in your path.  Include the following line somewhere in your .cshrc file:
  setenv GEOSUTIL /home/colarco/GEOSagcm/src/GMAO_shared/GEOS_Util
  setenv PATH .:$NOBACKUP/GEOSagcm/Linux/bin:$PATH
The GEOS_Util stuff is needed by the post-processing scripts.
where obviously you replace the particular path to the binaries with your path. Note what this implies: it won't be a good idea to move or clean this directory while the model is running!


Finally, let's make sure that your binaries from your compiled GEOS-5 code are in your path.  Include the following line somewhere in your .cshrc file:
setenv PATH .:/home/colarco/GEOSagcm/Linux/bin:$PATH
where obviously you replace the particular path to my binaries (/home/colarco/GEOSagcm/Linux/bin) with your path.  Note what this implies: it won't be a good idea to move or clean this directory while the model is running!


 
=== Create the Experiment Directories ===
=== Setup Experiment using gcm_setup ===
From your model build '''src''' directory, go into Applications/GEOSgcm_App.  Then run ''gcm_setup''.
From your model build 'src' directory, go into Applications/GEOSgcm_App.  Then run 'gcm_setup'.


  % cd Applications/GEOSgcm_App
  % cd Applications/GEOSgcm_App
  % ./gcm_setup
  % ./gcm_setup


Your will be prompted to answer some questions:
Your will be prompted to answer some questions.  Here they are with some typical responses:
  experiment ID
  Enter the Experiment ID:
  1-line description of the experiment
  bR_control
  model resolution (IM JM)
  Enter a 1-line Experiment Description:
  aero provider (PCHEM or GOCART)
  bR_control,descriptive_text,no_spaces_allowed
  HOME directory
Enter the Lat/Lon Horizontal Resolution: IM JM
  EXP directory
  or ..... the Cubed-Sphere Resolution: cNN
  group ID
  144 91 <font color=red>[Presumption is we're not doing cubed-sphere]</font>
Enter the Model Vertical Resolution: LM (Default: 72)
  [Enter for default; <font color=red>have not tested alternative vertical resolutions</font>]
  Do you wish to run GOCART? (Default: NO or FALSE)
  YES
  Enter the GOCART Emission Files to use: "CMIP" (Default), "PIESA", or "OPS":
  PIESA <font color=red>[chooses AeroCom emissions]</font>
Enter the AERO_PROVIDER: GOCART (Default) or PCHEM:
  [Enter for default]
  Enter Desired Location for HOME Directory (to contain scripts and RC files)
  [Enter for default]
  Enter Desired Location for EXP Directory (to contain model output and restart files)
  [Enter for default]
Enter Location for Build directory containing:  src/ Linux/ etc...
  [Enter for default]
  Current GROUPS: [List of groups you belong to]
  [Choose group]
Upon completion, you will have two directories, the HOME directory which is in your home space (something like ~/geos5/EXPID, where EXPID is the Experiment ID you named) and the EXP directory which is in your nobackup space.
 
=== Setup the Experiment HOME Directory ===
 
Go to the HOME directory.  You need to edit a couple of files to get the experiment to run the way you want:
 
'''AGCM.rc'''
 
This file controls the model run characteristics.  For example, for our tag (and answering the setup questions as above) the '''AGCM.rc''' file has the following lines characteristic (to run '''GOCART''' with interactive aerosol forcing):
GOCART_INTERNAL_RESTART_FILE:          gocart_internal_rst
GOCART_INTERNAL_RESTART_TYPE:          binary
GOCART_INTERNAL_CHECKPOINT_FILE:        gocart_internal_checkpoint
GOCART_INTERNAL_CHECKPOINT_TYPE:        binary
#AEROCLIM:    ExtData/CMIP/L72/aero_clm/gfedv2.aero.eta.%y4%m2clm.nc
#AEROCLIMDEL: ExtData/CMIP/L72/aero_clm/gfedv2.del_aero.eta.%y4%m2clm.nc
#AEROCLIMYEAR: 2002
 
DU_OPTICS: ExtData/CMIP/x/opticsBands_DU.v4.nc
SS_OPTICS: ExtData/CMIP/x/opticsBands_SS.v3.nc
SU_OPTICS: ExtData/CMIP/x/opticsBands_SU.v3.nc
OC_OPTICS: ExtData/CMIP/x/opticsBands_OC.nc
BC_OPTICS: ExtData/CMIP/x/opticsBands_BC.nc
NUM_BANDS: 18
 
DIURNAL_BIOMASS_BURNING: yes
 
      RATS_PROVIDER: PCHEM  # options: PCHEM, GMICHEM, STRATCHEM (Radiatively active tracers)
      AERO_PROVIDER: GOCART  # options: PCHEM, GOCART            (Radiatively active aerosols)
ANALYSIS_OX_PROVIDER: PCHEM  # options: PCHEM, GMICHEM, STRATCHEM, GOCART


Now you will have two directories, the HOMEDIR which is in your home space (something like ~/geos5/EXPID) and the EXPDIR which is in your nobackup space.
To run with climatological aerosol forcing, modify the appropriate lines above to look like:
AEROCLIM:    ExtData/AeroCom/L72/aero_clm/gfedv2.aero.eta.%y4%m2clm.nc
AEROCLIMDEL: ExtData/AeroCom/L72/aero_clm/gfedv2.del_aero.eta.%y4%m2clm.nc
AEROCLIMYEAR: 2002
AERO_PROVIDER: PCHEM  # options: PCHEM, GOCART            (Radiatively active aerosols)


Go to the HOMEDIR.  You need to edit a couple of files to get the experiment to run the way you want.
'''HISTORY.rc'''
e.g., edit AGCM.tmpl to setup model run time parameters (this is where you would setup a replay, turn on/off diurnal BB emissions, change aerosol forcing characteristics).
e.g., edit HISTORY.tmpl to setup model history output
e.g., edit the run script (gcm_run.j)
--I do this: copy gcm_run.j -> gcm_run.1 (you want to edit the END_DATE and STOP_DATE)
Now create a file called "cap_restart" which has contents of the model start date in the form YYYYMMDD HHMMSS
Copy cap_restart to your EXPDIR
% cp cap_restart /discover/nobackup/USERNAME/EXPID


Now go to your EXPDIR
This file controls the output streams from the model.  Mine has the following collections:
You might want to edit the resource files in the RC sub-directory (e.g., Chem_Registry.rc to turn things on/off)
  COLLECTIONS: 'geosgcm_prog'
You also need some restarts to run the model.  For Fortuna at "b" resolution you can copy a set (valid nominally at 20071001) from /discover/nobackup/pcolarco/restart0/fortuna/b72. You can just copy these files into your experiment directory, but what I like to is make a "restart0" directory in my EXPDIR and copy the files there, and then copy back up to the EXPDIR.
              'geosgcm_surf'
              'geosgcm_moist'
              'geosgcm_turb'
              'geosgcm_gwd'
              'geosgcm_tend'
              'geosgcm_bud'
              'tavg2d_aer_x'
              'inst3d_aer_v'
              'tavg3d_aer_p'
              'tavg2d_chm_x'
              'tavg3d_chm_p'
              'inst2d_hwl_x'
              'inst2d_force_x'
              'inst3d_force_p'
            ::


At this point you should be good to go. Go back to your HOMDIR and qsub gcm_run.1
'''CAP.rc'''


=== Populate the Experiment Directory ===
This file controls the timing of the model run.  For example, you specify the END_DATE, the number of days to run per segment (JOB_SGMT) and the number of segments (NUM_SGMT).  If you modify nothing else, the model would run until it reached END_DATE or had run for NUM_SGMT segments.  Note that you might think that BEG_DATE specifies a beginning date for the model to run.  It is set by default to BEG_DATE: 18910301 000000, which is probably before the period you want to simulate.  The actual model start time is specified later when we set up your EXP directory.
At the beginning of the experiment, the experiment directory will contain a few things:


# Resource Files
'''gcm_run.j'''
# Restart Files
# The GEOSgcm.x executable (the model itself)


I've provided a sample experiment directory (/discover/nobackup/colarco/dragnet).  There are a number of files that end in ".rc"These are the ''resource files''.  Copy these to your experiment directory.
This is the model run script.  You might not need to edit anything, but check in here to see if we are pointing to the right emission files.  This is system dependent.  For our tag, on discover, there is a line:
setenv CHMDIR  /discover/nobackup/projects/gmao/share/dao_ops/fvInput_nc3
which points to the emission files presumed in this runYou might have to modify this line on a different system or to use different emission inventories.


I've prepared a set of restarts based on a previous GEOS-5 run that will serve for this example.  You can find these files in /discover/nobackup/colarco/restart0/b72/.  Copy all the "*rst" files to your experiment directory, e.g.,
'''An Optional Modification'''
% cp /discover/nobackup/colarco/restart0/b72/*rst /discover/nobackup/colarco/dragnet


Finally, copy your GEOSgcm.x executable from wherever you built the model to your experiment directory, e.g.,
For some applications it is desirable to have the model stop running to generate restarts on fixed dates and then start up again.  (Each instance of the model running for some number of days and then stopping and generating restarts is called a ''segment''.)  For example, suppose we want restarts at the beginning and middle of the month. I've added this functionality, but you need to make a few edits.  What works is to ensure your model runs to the middle of the first month (in practice, the 17th of the month), stopping it, and then from that point to the 1st of the next month. Here's how: edit '''CAP.rc''' so that
  % cp /discover/nobackup/colarco/GEOSagcm/Linux/bin/GEOSgcm.x /discover/nobackup/colarco/dragnet
END_DATE:    20070101 210000
JOB_SGMT:    00000017 000000
  NUM_SGMT:    12
substituting the appropriate YYYYMM in END_DATE for the overall time you want your experiment to end.


There's one other file you need: in my experiment directory find a file called ''cap_restart''.  Copy this over to your experiment directory.  Take a look at this file.  It has one line with two numbers:
By default the '''gcm_run.j''' on this tag has the following environment variables set like this:
  20021001 210000
  set STOP_MID_MONTH = 1
These are the YYYYMMDD and HHMMSS timestamp I am using to start the model run. Note that I choose these dates to correspond to the date at which the restarts I gave you are valid.
  set DFLT_JOB_SGMT = 16


I haven't told you anything much about the resource filesSuffice to say for now that this group I am providing here will differ from the resource files in your source code collectionI've modified these to run aerosols and use aerosol source files that will work for the time period we will simulate.
Here's what is happening: overall model control is handled by '''CAP.rc'''.  We specify the model finish time with END_DATE in '''CAP.rc'''.  As set up, JOB_SGMT is the number of days to run the model in a single segment, and NUM_SGMT is the number of segments to run in a single queue submissionWith STOP_MID_MONTH set to '''1''' what happens is that the JOB_SGMT environment variable is tweaked for each half-month of the model run.  That is, the first segment runs the initial number of days (in this case, 17) and the next segment runs for however many days are needed to reach the 1st of the next month.  (In this example, I'm presuming we're starting from an initial date of 19991231, which requires us to run for 17 days to cause the model to stop on 20000117, which is the desired monthly mid-point.) What's really happening is that CAP.rc is being edited after each segment to specify the (hopefully) correct number of days to run the next segment.  Here, NUM_SGMT is set to '''12''', which will run the model for 6 months in a single queue submission (1/2 month per segment).  This seems to fit conservatively for our resolution in a single 8-hour wallclock time request.


=== Populate the Home Directory ===
If you don't care about any of this, you can set STOP_MID_MONTH = 0, which bypasses this logic and all segments are exactly as long as JOB_SGMT specifies.
Now go into your home directory and copy the contents of my sample into yours:
% cd /home/USERNAME/geos5/YOUR_EXPID
% cp /home/colarco/geos5/dragnet/* .


There are several files here:
'''Running on Pleiades'''
AGCM.tmpl
CAP.tmpl
HISTORY.tmpl
gcm_run.j
gcm_post.j
gcm_post.script
gcm_regress.j


For the moment, we don't need to do anything to AGCM.tmpl or CAP.tmpl.  They are filled in with information from the run script and written as AGCM.rc and CAP.rc in your experiment directory(As a rule, if you have AGCM.rc and CAP.rc and HISTORY.rc in your experiment directory, you might want to remove them before starting an experiment so that you know you are using the *.tmpl files from your home directory.)
This tag has successfully checked out, built, run, and archived results on NAS machine PleiadesNo modifications to scripts are needed, as the appropriate choices for that machine are handled in gcm_setup.


We have to make several edits to the remaining files.  In particular, we need to change the group ID code used to charge your jobs to PBS, we need to change the experiment ID to match the ID you've chosen for your experiment, and we need to modify various path variables to point to your user ID (not mine!).  You can accomplish these changes by using ''grep'' on the files.  For example, look for instances of my group ID ''r0605'':
=== Setup the EXP directory ===
% grep r0605 *
Now go to your EXP directory.
on these files find the following:
  gcm_post.j:#PBS -W group_list=r0605
  gcm_regress.j:#PBS -W group_list=r0605
  gcm_run.j:#PBS -W group_list=r0605
Unless you have permission to charge to r0605 you need to change these numbers.  Use your favorite editor to do this.  Recall, to find your group ID, use ''getsponsor''.


Here's the result of grepping on my username:
You want to specify the model start time at this pointCreate a file called ''cap_restart"The contents of the file should read:
% grep colarco *
  YYYYMMDD HHMMSS
AGCM.tmpl:#REPLAY_FILE: /discover/nobackup/colarco/replay_b/winds/b5_merrasc_jan92.ana.eta.%y4%m2%d2_%h2z.hdf
where you replace the strings above with the year-month-day and hour-minute-second of your desired model start timeFor example:
  gcm_post.j:setenv GEOSUTIL        /home/colarco/GEOS_Util
  20071231 210000
  gcm_post.j:setenv  SOURCE      /discover/nobackup/colarco/$EXPID
  gcm_post.j:setenv  ARCHIVE    /archive/u/colarco/GEOS5.0/$EXPID
gcm_post.j:setenv  HOMDIR      /home/colarco/geos5/$EXPID
gcm_regress.j:setenv GEOSUTIL        /home/colarco/GEOS_Util
gcm_regress.j:setenv    EXPDIR  /discover/nobackup/colarco/$EXPID
gcm_regress.j:setenv    HOMDIR  /home/colarco/geos5/$EXPID
gcm_run.j:setenv GEOSUTIL        /home/colarco/GEOS_Util
gcm_run.j:setenv    EXPDIR  /discover/nobackup/colarco/$EXPID
gcm_run.j:setenv    HOMDIR  /home/colarco/geos5/$EXPID
gcm_run.j:/bin/ln -s /discover/nobackup/colarco/SST/dataoceanfile_MERRA_sst_1971-current.${OGCM_IM}x${OGCM_JM}.LE        sst.data
gcm_run.j:/bin/ln -s /discover/nobackup/colarco/SST/dataoceanfile_MERRA_ice_temperature_1971-current.${OGCM_IM}x${OGCM_JM}.LE        sstsi.data
  gcm_run.j:/bin/ln -s /discover/nobackup/colarco/SST/dataoceanfile_MERRA_fraci_1971-current.${OGCM_IM}x${OGCM_JM}.LE        fraci.data
Ignore the entry in AGCM.tmpl for now, it's been commented out.  Ignore also the last three entries (pertaining to the location of the SST files); for whatever reason there were incompatible SST files on '''discover''' and these were copied by hand over from '''palm'''. For now, we'll use these.  All the other instances of username "colarco" should be modified.


Finally, here's the results of grepping on my experiment ID:
You might want to edit the resource files in the RC sub-directory (e.g., '''GEOS_ChemGridComp.rc''' to turn on '''GOCART''' and '''Chem_Registry.rc''' to turn components on/off).
% grep dragnet *
gcm_post.j:setenv  EXPID      dragnet
gcm_regress.j:#PBS -N dragnet
gcm_regress.j:setenv    EXPID  dragnet
gcm_run.j:#PBS -N dragnet
gcm_run.j:setenv    EXPID  dragnet
HISTORY.tmpl:EXPID:  dragnet
Your should change all instances of '''dragnet''' here to reflect your user ID.  Note that lines that look like ''#PBS -N dragnet'' are really just the name of the experiment that PBS queueing system reports. This does not have to replicate your experiment ID at all; it is merely a string that helps you identify your job running in PBS.


You also need some restarts to run the model.  For Fortuna at "b" resolution you can copy a set (valid nominally at 20071231) from /discover/nobackup/projects/gmao/iesa/aerosol/Data/restarts/Fortuna-2_5/b72/20071231/ (on pleiades: /nobackupp10/pcolarco/restart0/piesa/Fortuna-2_5/).  You can just copy all the files *.rst into your experiment directory, but what I like to is make a "restart0" directory in my EXP directory and copy the files there, and then copy back up to the EXP directory.  ***Note: For tags more recent than AeroChem-Fortuna-2_5-b7 bootstrap moist_import_rst by erasing this file from the restarts.***


=== Run the Simulation ===
=== Run the Simulation ===
At this point we're ready to take a crack at running the model.  Go into your experiment home directory (e.g., /home/colarco/geos5/dragnet).  You can start the model job by issuing:
At this point we're ready to take a crack at running the model.  Go into your experiment HOME directory.  You can start the model job by issuing:
  % qsub gcm_run.j
  % qsub gcm_run.j
And check the progress by issuing:
And check the progress by issuing:
  % qstat | grep YOUR_USERNAME
  % qstat | grep YOUR_USERNAME