Fortuna 2.5 Quick Start: Difference between revisions
(5 intermediate revisions by the same user not shown) | |||
Line 22: | Line 22: | ||
where ''USERID'' is, of course, your repository username, which should be the same as your NASA and NCCS username. Then, issue the command: | where ''USERID'' is, of course, your repository username, which should be the same as your NASA and NCCS username. Then, issue the command: | ||
cvs co -r Fortuna- | cvs co -r Fortuna-2_5_p5 Fortuna | ||
This should check out the latest stable version of the model from the repository and create a directory called <code>GEOSagcm</code>. | This should check out the latest stable version of the model from the repository and create a directory called <code>GEOSagcm</code>. | ||
=== Compiling the Model === | === Compiling the Model === | ||
Line 98: | Line 98: | ||
== Output and Plots == | == Output and Plots == | ||
During a normal run, the <code>gcm_run.j</code> script will run the model for the segment length (current default is | During a normal run, the <code>gcm_run.j</code> script will run the model for the segment length (current default is 10 days). The model creates output files (with an <code>nc4</code> extension), also called collections (of output variables), in <code>''EXPDIR''/scratch</code> directory. After each segment, the script moves the output to the <code>''EXPDIR''/holding</code> and spawns a post-processing batch job which partitions and moves the output files within the <code>holding</code> directory to their own distinct collection directory, which is again partitioned into the appropriate year and month. The post processing script then checks to | ||
see if a full month of data is present. If not, the post-processing job ends. If there is a full month, the script will then run the time-averaging executable to produce a monthly mean file in <code>''EXPDIR''/ | see if a full month of data is present. If not, the post-processing job ends. If there is a full month, the script will then run the time-averaging executable to produce a monthly mean file in <code>''EXPDIR''/geosgcm_*</code>. The post-processing script then spawns a new batch job which will archive the data onto the mass-storage drives (<code>/archive/u/''USERID''/GEOS5.0/''EXPID''</code>). | ||
If a monthly average file was made, the post-processing script will also | If a monthly average file was made, the post-processing script will also | ||
Line 112: | Line 112: | ||
The contents of the output files (including which variables get saved) may be configured in the <code>''HOMEDIR''/HISTORY.rc</code> -- a good description of this file may be found at http://modelingguru.nasa.gov/clearspace/docs/DOC-1190 . | The contents of the output files (including which variables get saved) may be configured in the <code>''HOMEDIR''/HISTORY.rc</code> -- a good description of this file may be found at http://modelingguru.nasa.gov/clearspace/docs/DOC-1190 . | ||
'''Back to [[GEOS-5 Documentation for Fortuna 2. | '''Back to [[GEOS-5 Documentation for Fortuna 2.5]]''' |
Latest revision as of 07:31, 19 March 2012
This page describes the minimum steps required to build and run GEOS-5 Fortuna 2.5 on NCCS discover and NAS pleiades. You should successfully complete the steps in these instructions before doing anything more complicated.
Back to GEOS-5 Documentation for Fortuna 2.5
How to Obtain GEOS-5 and Compile Source Code
There are two options for obtaining the model source code: from the CVS repository on the NCCS progress server, and from the SVN "public" repository on the trac server. Since the code on progress is more current, elgible users are strongly encouraged to obtain accounts from NCCS and use the progress repository.
Using the NCCS progress CVS code repository
The following assumes that you know your way around Unix, have successfully logged into your cluster account and have an account on the source code repository with the proper ssh
configuration -- see the progress repository quick start: https://progress.nccs.nasa.gov/trac/admin/wiki/CVSACL. The link requires your NCCS username and password.
The commands below assume that your shell is csh
. Since the scripts to build and run GEOS-5 tend to be written in the same, you shouldn't bother trying to import too much into an alternative shell. If you prefer a different shell, it is easiest just to open a csh
process to build the model and your experiment.
Furthermore, model builds should be created in your space under /discover/nobackup
, as creating them under your home directory will quickly wipe out your disk quota.
Set the following three environment variables:
setenv CVS_RSH ssh setenv CVSROOT :ext:USERID@cvsacl:/cvsroot/esma
where USERID is, of course, your repository username, which should be the same as your NASA and NCCS username. Then, issue the command:
cvs co -r Fortuna-2_5_p5 Fortuna
This should check out the latest stable version of the model from the repository and create a directory called GEOSagcm
.
Compiling the Model
cd
into GEOSagcm/src
and source
the file called g5_modules
:
source g5_modules
This will set up the build environment. If you then type
module list
you should see:
Currently Loaded Modulefiles: 1) comp/intel-11.0.083 3) lib/mkl-10.0.3.020 5) other/SIVO-PyD/spd_1.0.0 2) mpi/impi-3.2.2.006 4) other/comp/gcc-4.5
If this all worked, then type:
gmake install
This will build the model. It will take about 40 minutes. If this works, it should create a directory under GEOSagcm
called Linux/bin
. In here you should find the executable: GEOSgcm.x
.
Running GEOS-5
First of all, to run jobs on the cluster you will need to set up passwordless ssh
(which operates within the cluster). To do so, run the following from your discover home directory:
cd .ssh ssh-keygen -t dsa cat id_dsa.pub >> authorized_keys
Similarly, transferring the daily output files (in monthly tarballs) requires passwordless authentication from discover to dirac. While in ~/.ssh
on discover, run
ssh-keygen -t dsa
Then, log into dirac and cut and paste the contents of the id_rsa.pub
and id_dsa.pub
files on discover into the ~/.ssh/authorized_keys
file on dirac. Problems with ssh
should be referred to NCCS support.
To set the model up to run, in the GEOSagcm/src/Applications/GEOSgcm_App
directory we run:
gcm_setup
The gcm_setup
script asks you a few questions such as an experiment name (with no spaces, called EXPID) and description (spaces ok). It will also ask you for the model resolution, expecting one of the available lat-lon domain sizes, the dimensions separated by a space. For your first time out you will probably want to enter 144 91
(corresponding to ~2 degree resolution). Towards the end it will ask you for a group ID -- the default is g0602 (GMAO modeling group). Enter whatever is appropriate, as necessary. The rest of the questions provide defaults which will be suitable for now, so just press enter for these.
The script produces an experiment directory (EXPDIR) in your space as /discover/nobackup/USERID/EXPID
, which contains, among other things, the sub-directories:
post
(containing the incomplete post-processing job script and .rc file)archive
(containing an incomplete archiving job script)plot
(containing an incomplete plotting job script and .rc file)
The post-processing script will complete (i.e., add necessary commands to) the archiving and plotting scripts as it runs. The setup script that you ran also creates an experiment home directory (HOMEDIR) as ~USERID/geos5/EXPID
containing the run scripts and GEOS resource (.rc
) files.
The run scripts need some more environment variables -- here are the minimum contents of a .cshrc
:
umask 022 unlimit limit stacksize unlimited set arch = `uname` setenv LD_LIBRARY_PATH ${LIBRARY_PATH}:${BASEDIR}/${arch}/lib
The umask 022
is not strictly necessary, but it will make the various files readable to others, which will facilitate data sharing and user support. Your home directory ~USERID
is also inaccessible to others by default; running chmod 755 ~
is helpful.
Copy the restart (initial condition) files and associated cap_restart
into EXPDIR. Keep the "originals" handy since if the job stumbles early in the run it might stop after having renamed them. The model expects restart filenames to end in "rst" but produces them with the date and time appended, so you may have to rename them back to ending in "rst". The cap_restart
file is often provided with a set of restarts, but if not you can create it: is simply one line of text with the date of the restart files in the format YYYYMMDD HHMMSS
(with a space). The boundary conditions/forcings are provided by symbolic links created by the run script.
If you need an arbitrary set of restarts, you can copy them from /archive/u/aeichman/restarts/Fortuna-2_5/
, where they are indexed by date and resolution.
The script you submit, gcm_run.j
, is in HOMEDIR. It should be ready to go as is. The parameter END_DATE in CAP.rc
(previously in gcm_run.j
) can be set to the date you want the run to stop. An alternative way to stop the run is by commenting out the line if ( $capdate < $enddate ) qsub $HOMDIR/gcm_run.j
at the end of the script, which will prevent the script from being resubmitted, or rename the script file. You may eventually want to tune parameters in the CAP.rc
file JOB_SGMT (the number of days per segment, the interval between saving restarts) and NUM_SGMT (the number of segments attempted in a job) to maximize your run time.
Submit the job with qsub gcm_run.j
. You can keep track of it with qstat
or qstat | grep USERID
, or follow stdout with tail -f /discover/pbs_spool/JOBID.OU
, JOBID being returned by qsub
and displayed with qstat
. Jobs can be killed with qdel JOBID
. The standard out and standard error will be delivered as files to the working directory at the time you submitted the job.
Output and Plots
During a normal run, the gcm_run.j
script will run the model for the segment length (current default is 10 days). The model creates output files (with an nc4
extension), also called collections (of output variables), in EXPDIR/scratch
directory. After each segment, the script moves the output to the EXPDIR/holding
and spawns a post-processing batch job which partitions and moves the output files within the holding
directory to their own distinct collection directory, which is again partitioned into the appropriate year and month. The post processing script then checks to
see if a full month of data is present. If not, the post-processing job ends. If there is a full month, the script will then run the time-averaging executable to produce a monthly mean file in EXPDIR/geosgcm_*
. The post-processing script then spawns a new batch job which will archive the data onto the mass-storage drives (/archive/u/USERID/GEOS5.0/EXPID
).
If a monthly average file was made, the post-processing script will also
check to see if it should spawn a plot job. Currently, our criteria for
plotting are: 1) if the month created was February or August, AND
2) there are at least 3 monthly average files, then a plotting job for
the seasons DJF or JJA will be issued. The plots are created as gifs in EXPDIR/plots_CLIM
.
The post-processing script can be found in:
GEOSagcm/src/GMAO_Shared/GEOS_Util/post/gcmpost.script
. The nc4
output files can be opened and plotted with gradsnc4
-- see http://www.iges.org/grads/gadoc/tutorial.html for a tutorial, but use sdfopen
instead of open
.
The contents of the output files (including which variables get saved) may be configured in the HOMEDIR/HISTORY.rc
-- a good description of this file may be found at http://modelingguru.nasa.gov/clearspace/docs/DOC-1190 .