Setting Up the Fortuna 2.0 Single Column Model

This page describes the steps and modifications necessary to build and run the Single Column Model (SCM) under Fortuna 2.0 on discover. It assumes that you have successfully run the model as described in GEOS-5 Quick Start.

Checking Out and Modifying GEOS-5 for SCM

First, check out the Fortuna 2.0 code as usual:

cvs co -r  Fortuna-2_0  Fortuna

Then cd to the directory

GEOSagcm/src/GEOSgcs_GridComp/GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSsuperdyn_GridComp/GEOSdatmodyn_GridComp

and update these files from the SCM branch:

cvs upd -r b_Fortuna-2_0_SCM GEOS_DatmoDynGridComp.F90 reader.F90

Then compile the model as usual.

The modifications in the SCM branch will eventually be merged with the main branch so that this step is unnecessary.

Setting Up and Running SCM Experiments

The setup script for the SCM experiments is /discover/nobackup/aeichman/scm/setup/getSCMdata.sh . You do not have to run the gcm_setup script as you do to set up a global run.

At the time of this writing there are six experiments to choose from:

Create your own directory and copy to it the script getSCMdata.sh, then modify and uncomment the first executable line, which creates a symbolic link to the model executable (GEOSagcm/Linux/bin/GEOSgcm.x), so that it points to your own model executable. Uncomment one of the lines that assign the variable SOURCEDIR to choose the experiment to run. Then run the script. It will copy all of the necessary resource, forcing and data files to the working directory. Each experiment requires its own directory. If you modify the resource files (e.g., HISTORY.rc) you may want to copy the setup directory to your own area and modify it and the setup script accordingly so that you don't clobber your modifications.

Then you can just run the model executable from the command line in the directory you created. You will have to load the proper modules by sourcing GEOSagcm/src/g5_modules. Although it runs with a single processor, on discover you should run it from an interactive job on a compute node (as opposed to the discover front end). Since all of the necessary configuration files are copied to the experiment directory, it requires none of the extra environmental infrastructure needed for a global experiment that the run script gcm_run.j creates.

Creating Driving Datasets from MERRA

Given the resource and other files that come with a complete SCM configuration, a driving data file for the same location and time span can be generated using MERRA output.

Obtaining MERRA Data

MERRA output files are located under /archive on NCCS discover and can be time consuming to obtain. For this purpose a set of scripts have been created to make the task easier. To use them, create a subdirectory and copy the contents of /discover/nobackup/aeichman/scm/util/get-merra to it. You should have the following:

getter.j
MERRAobsys.rc
README
watcher.j


To use the scripts, modify the line in getter.j starting setenv PATH ${PATH}: ... to point to the directory src/GMAO_Shared/GMAO_etc/ in your local Fortuna 2.0 build, which contains the necessary utilities. These use perl libraries, which may require additions to your environment. To specify the range of MERRA data to obtain, modify the variables BEGIN_date and END_date (both in the format YYYYMMDD). You may need to modify your group name in the PBS environment variables as well.

Then qsub watcher.j (not getter.j). It will submit the getter.j script while submitting a version of itself to monitor the "getter" job. getter.j uses the acquire utility to smoothly transfer files from /archive to the current directory. If the getter job ends without finishing -- most likely because the allotted walltime ran out -- then the watcher job will repeat the process, until all the data in the specified range are copied to the current directory. For data sets of a month or so this may take a few hours, but the scripts should run without intervention. If something interrupts this process, the same scripts may be started again, and acquire will be intelligent enough figure out where it needs to pick up.

For more details, see README.

Generating the Driving Data

Now the ASCII .dat file used for the driving data can be created.

Check out the data file generator with the following command:

cvs co -r Fortuna-merra2scm_v1 Fortuna

Then cd GEOSagcm/src/GMAO_Shared/GEOS_Util/post. The source file merra2scm.F is there; this must be modified to the time and location of the data set to be created. Change the parameters begdate and enddate to the dates you want to cover, but leave begtime and endtime alone. The parameters lonbegin, lonend, latbegin, and latend specify the location and appropriate values can be gleaned from the filenames in the appropriate experiment under /discover/nobackup/aeichman/scm/scminfiles/ -- for example, the filename tile.data_simple1_XY1x1-C_34N_100W_38N_95W. (Note that these file names are truncated when copied by the SCM setup script.) Finally, change the variable dirname to the directory where you copied the MERRA data.

Then cd up to the src directory, run make install, and run the executable merra2scm.x. It will generate the driving data file merra_scm.dat, which can be used to replace the one with the expriment data.


Note that you will probably have to change the begin time in the cap_restart and the end time in CAP.rc to the appropriate times in begtime and endtime. Otherwise the behavior should be the same.