This chapter discusses general aspects of MM5 modeling system programs, including
MM5 modeling system programs, TERRAIN, REGRID, LITTLE_R/RAWINS, INTERPF, NESTDOWN, INTERPB, RIP/GRAPH and MM5, can all be run on Unix workstations, PC running Linux, Cray's and IBM's. Running MM5 programs on a Linux PC requires either the Portland Group, or INTEL Fortran and C compilers. The primary reasons for these choices are 1) they supports Cray pointers which are used in several programs, including MM5 model; and 2) they have Fortran 90 compilers.
MM5 modeling system programs are mostly Fortran programs that require compilation on your local computer. Some (Fortran 77) programs need recompilation each time you change model configuration. Others (Fortran 90) programs need only be compiled once. A user should try to know your computer and compiler. Find out how much usable memory you have on the computer, and what version of compiler you have. This information can come handy when you encounter problems when compiling and running the modeling system programs and report problems to mesouser. If you are thinking about purchasing a computer, get at least 0.5 to 1 Gb memory and a few Gb of disk. As most of the MM5 preprocessor programs are being migrated to Fortran 90, you will need a f90 compiler too to compile the programs. The following table lists the source code type and compiler required to compile them:
MM5 programs do not require NCAR Graphics to run. It is a matter of convenience to have it, since a few programs use it to help you configure model domains and prepare data. Some of the vitualization software that come with the MM5 system (RIP and GRAPH programs) is based on NCAR Graphics. NCAR Graphics is a licensed software, but part of it has become free and this is the part that MM5 modeling system requires. For more information on NCAR Graphics, please see its Web page: http://ngwww.ucar.edu/.
There are a few things a user needs to prepare before starting running jobs on your workstation.
setenv NCARG_ROOT /usr/local/ncarg
This enables a user to load NCAR Graphics libraries when compiling programs which use NCAR Graphics (Terrain, Little_r, Rawins, RIP and Graph).
MM5 modeling system programs are archived in three locations: NCAR's anonymous ftp, NCAR IBM-accessible disk, and NCAR's Mass Storage System (MSS).
On the ftp site, the source code tar files are archived under /mesouser/MM5V3:
/mesouser/MM5V3/TERRAIN.TAR.gz
/mesouser/MM5V3/LITTLE_R.TAR.gz
/mesouser/MM5V3/INTERPF.TAR.gz
/mesouser/MM5V3/NESTDOWN.TAR.gz
/mesouser/MM5V3/INTERPB.TAR.gz
/mesouser/mm53dvar/3dvar.tar.gz
On NCAR's IBM, the source code tar files and job decks reside in ~mesouser/MM5V3:
~mesouser/MM5V3/TERRAIN.TAR.gz
~mesouser/MM5V3/INTERPF.TAR.gz
~mesouser/MM5V3/LITTLE_R.TAR.gz
~mesouser/MM5V3/NESTDOWN.TAR.gz
~mesouser/MM5V3/INTERPB.TAR.gz
~mesouser/MM5V3/CRAY/*.deck.cray
On MSS, the source code tar files are archived in /MESOUSER/MM5V3
/MESOUSER/MM5V3/TERRAIN.TAR.gz
/MESOUSER/MM5V3/INTERPF.TAR.gz
/MESOUSER/MM5V3/LITTLE_R.TAR.gz
/MESOUSER/MM5V3/NESTDOWN.TAR.gz
/MESOUSER/MM5V3/INTERPB.TAR.gz
Previous releases are also available on ftp and MSS. To obtain files from IBM and MSS, you need to have an NCAR SCD computing account. To access program tar files from NCAR's anonymous ftp site, do the following (taking MM5 tar file as an example):
Once you download these tar files, use Unix gunzip command to decompress the .gz files,
and untar the file by using the command
After you untar the file, a program directory will be created. In this example, an MM5 directory will be created with all source code files inside it.
All utility programs are archived under MM5V3/Util/ directory on ftp and NCAR IBM-accessible disk. The list of the utility programs are:
A program tar file contains all source code (excluding NCAR Graphics), makefile, and instructions (in README file) required to compile and run that particular program. As an example, the files contained in program RAWINS tar file are listed below:
CHANGES Description of changes to the program
Diff/ Will contain difference files between consecutive releases
Makefile Makefile to create the program executable
README General information about the program directory
Templates/ Job script directory
Typically there are several steps to set up and run the modeling system programs. For detailed instruction on how to compile and run a particular program, read the respective chapter and README file inside the tar file.
For FORTRAN 77 programs TERRAIN, and RAWINS:
1) Type make x.deck to create job script to compile and run the program.
2) Edit x.deck to select appropriate shell variables, parameter statements, and namelist.
3) Type x.deck to (compile and) run the program.
1) Edit include files if necessary.
2) Type make to create the program executable.
3) Type graph.csh n m mm5-modeling-system-output-file to run.
For FORTRAN 90 programs REGRID, LITTLE_R, INTERPF, INTERPB and NESTDOWN:
1) Type make to compile the program.
2) Edit either the job script and/or namelist.input file.
3) Type the executable name to run
the program, e.g. regridder
Most of MM5 modeling system programs have a job deck or script to help you run the program. Some are called x.deck, and some are x.csh. While x.deck can be used either for a batch job (such as on an IBM) or interactive job, x.csh is only for interactive use. They have very similar functions. When using these job decks or scripts, they assume the program source code is local. Most also expect all input files are local too.
To obtain an appropriate job script for your computer, type `make x.deck' to create a deck for program x (program name in lower case, e.g. make terrain.deck).
The general job deck construct and functions are the following:
Since the MM5 modeling system is designed for multiple applications, there are many options on how a job may be run. These options include different sources for inputting terrestrial and meteorological data, ways to do objective analysis, running the model with or without 4DDA option, and whether an MM5 job is an initial or restart run, etc. A user is required to go through the shell variables and make appropriate selections for your application.
The following is an example taken from the pregrid.csh, and the selection is with regarding to the type of global analysis to be used to create the first guess fields:
# Select the source of 3-d analyses
set SRC3D = GRIB # Many GRIB-format datasets
Other examples of shell variables are listed below and they need to be defined by users for each program of the MM5 modeling system:
REGRID/pregrid SRC3D,SRCSST,SRCSNOW,SRCSOIL,VTxxx
RAWINS INOBS, SFCsw, BOGUSsw,InRaobs,InSfc3h,InSfc6h
MM5 STARTsw, FDDAsw (in IBM batch deck only)
These shell variables will be
discussed in detail in the other chapters of this document.
The FORTRAN 77 MM5 modeling system programs require a user to set parameter statements in a deck or script (TERRAIN and RAWINS), or directly in an include file (GRAPH), which are typically used to define the parameterized dimensions for a FORTRAN 77 program before compilation takes place. The unix cat command is used in a deck to create FORTRAN include files containing these parameter statements. These are direct modifications to the source code, implying that strict FORTRAN syntax must be observed. The usage of cat is shown below:
This creates a Fortran include file param.incl in the src/ directory and this include file will be used by a number of subroutines during compilation. As an example, the following is taken from terrain.deck:
cat > src/parame.incl.tmp << EOF
C IIMX,JJMX are the maximum size of the domains, NSIZE = IIMX*JJMX
The MM5 modeling system uses FORTRAN namelist to provide a way of selecting different options without re-compiling the program. If the namelist is inside a shell script or a deck, the unix cat command is used to create namelist files from the shell script during the execution of the shell script. The variables in the namelist for each program are described in detail in other chapters of this document. The format is the following
Where xxxx is the name of the namelist. Since the namelist is not a ANSI 77 standard, the FORTRAN 77 compiler used by different machines may have different syntax for the namelist. Namelist for FORTRAN 90 programs doesn't have this problem. The following is an example of namelist MAPBG from program TERRAIN for Cray, SGI, SUN and Compaq:
PHIC = 36.0, ; CENTRAL LATITUDE (minus for southern hemesphere)
XLONC = -85.0, ; CENTRAL LONGITUDE (minus for western hemesphere)
IEXP = .T., ; .T. EXTENDED COARSE DOMAIN, .F. NOT EXTENDED.
AEXP = 360., ; APPROX EXPANSION(KM)
IPROJ = 'LAMCON', ; MAP PROJECTION
For most Fortran 90 programs, edit namelist file namelist.input directly.
After the user has 1) correctly set
the shell variables, 2) modified the parameter statements, and 3) set up
the FORTRAN namelist, there is typically no more user modification required
in the deck. The rest of the script can be treated as a black box.
After you set the parameter statement either in a deck or directly in include file for any FORTRAN 77 program, type
to compile and run the program. Or type
to compile, and then type x.deck to run.
For FORTRAN 90 program, simply type
make to compile, and type the executable name to run.
Unix make utility is used to generate FORTRAN executable in the MM5 modeling system. The rules and compile options a make command uses are contained in the Makefile for programs TERRAIN, REGRID, LITTLE_R/RAWINS, INTERPF, INTERPB, NESTDOWN, RIP and GRAPH, and configure.user for program MM5. For more information on make, please see Chapters 3 and 9 of this document.
For most FORTRAN 77 programs, files
with file names are typically linked to Fortran units prior to execution
of the program inside a deck or shell script. For example,
ln -s terrain.namelist fort.15
This command makes a soft `link' between filename terrain.namelist and Fortran-unit number 15.
timex ./X.exe >&! X.print.out, or time ./X.exe >& X.print.out
Where X is the program name. And Unix command timex or time is used to get a timing of the executable run. Example:
timex mm5.exe >&! mm5.print.out
At the end of your mm5.print.out file, you will see something like:
which tells you how long the mm5 job has taken in terms of wallclock time (real).
MM5 modeling system programs require several datasets to run. Mesouser provides the terrestrial datasets for program TERRAIN. Programs REGRID, LITTLE_R and RAWINS will require other archived data or data in real-time to run.
Since V3.6, maximum snow albedo data at 1 degree resolution can be ingetsted into the model via REGRID using the ALMX_FILE file which is supplied with the REGRID.TAR.gz file. It is suggested that this file be used if one intends to use the Noah LSM option in MM5. Monthly albedo fields at 0.15 degree resolution can also be ingested via REGRID for Noah LSM use. These data are available from
/MESOUSER/DATASETS/REGRID/MONTHLY_ALBEDO.TAR.gz,
ftp://ftp.ucar.edu/mesouser/MM5V3/REGRID_DATA/MONTHLY_ALBEDO.TAR.gz
When a job is completed, certain output files are generated, which are named program-name_DOMAINx (e.g., REGRID_DOMAIN1, LITTLE_R_DOMAIN1, etc.). It is up to the user to archive the output. If you want to keep the output files, move them to a disk where you can keep them. If you run the same program again, these files will be overwritten.
Date is represented in the MM5 modeling system programs by up to 24 characters in the form of yyyy-mm-dd_hh:mm:ss:xxxx, where yyyy represents 4-digit year, mm 2-digit month, dd 2-digit day, hh 2-digit hour, mm (again) 2-digit minutes, ss 2 digit second, and xxxx ten thousandths of a second (optional). This replaces the 8-digit integer date representation, YYMMDDHH, in previous modeling system codes. For example, 1200 UTC 24 January 2005 is represented as 2005-01-24_12:00:00 in the model. Note that all model times are referring to Universal Time or Greenwich Mean Time, and not local time.
The Data Support Section of NCAR's Scientific Computing Division provides catalogs of data MM5 modeling system programs REGRID and LITTLE_R/RAWINS use. These catalogs are available from the Data Support Section of NCAR/SCD:
http://dss.ucar.edu/datasets/dsNNN.x/MSS-file-list.html
ftp://ncardata.ucar.edu/datasets/dsNNN.x
where NNN.x is a dataset identifier.
Most datasets that MM5 uses are listed below:
NCEP Final Analysis (GRIB, 1 degree resolution) 1999SEP15 - CON |
|
NCEP/NCAR Global Reanalysis, 6 hourly, monthly (1948-Current) |
|
U.S. NAVY FNOC N.HEM SEA SFC TEMP ANALS, DAILY 1961NOV-1993DEC |
|
Information on NCEP/NCAR Reanalysis Project (NNRP) and on European Center Reanalysis can be found at URL
http://dss.ucar.edu/pub/reanalyses.html
The NCEP Eta model data (the AWIP data, GRID 212), NCEP Final Analysis and ECMWF ERA40 are recent additions to NCAR's archive. Information about the data can be found at:
http://dss.ucar.edu/datasets/ds609.2.html
http://dss.ucar.edu/datasets/ds083.2.html
http://dss.ucar.edu/datasets/ds118.0.html and http://dss.ucar.edu/datasets/ds118.1.html
When choosing to run the Noah land-surface model option in MM5, one can use the NNRP, AWIP or Final Analysis datasets at NCAR. These datasets contain additional fields required by LSM to initialize soil temperature and moisture. A recent addition which can also be used as input to the Noah LSM option, is the AGRMET data supplied by AFWA. AGRMET data provides soil temperature, soil moisture, soil water, land-sea mask and soil height data. One can use this dataset in combination with any other 3-dimensional meteorological analyses. This dataset can be obtained from:
This data is available since October 2002. Documentation regarding this data is available from:
http://www2.mmm.ucar.edu/mm5/mm5v3/data/agrmet.html
A sample of the catalog for NCEP dataset DS083.0 is shown below:
Y47606 1998OCT01-1998OCT31, 12524 BLKS, 86.0MB
Y48077 1998NOV01-1998NOV30, 12120 BLKS, 83.3MB
Y48277 1998DEC01-1998DEC31, 12524 BLKS, 85.9MB
The MSS filenames correspond to these files are
A sample of the catalog for NCEP Global upper air observation dataset DS343.4 looks like
Y47652 1998OCT01-1998OCT31, 9096 BLKS LIST A98
Y48086 1998NOV01-1998NOV30, 8688 BLKS LIST A98
Y48286 1998DEC01-1998DEC31, 8541 BLKS, SEE NOTES - LIST A98
NOTE:ADPUPA 1998DEC15 MISSING LIST A98
Similarly, the MSS file name corresponding to the Oct 1998 dataset is
File specifics for all global analysis used as input to REGRID are no longer required. Shell scripts are provided to access the data MASTER file, find the MSS file names, and obtain them based on user selected data source and date. If you run LITTLE_R or RAWINS at your local computer, you will still need to go to the catalog, find the file name on MSS, and access them from NCAR's computer. Note that you need to use -fBI option with msread to obtain observations to be used on your workstation. A small utility program, fetch.csh, may be used to obtain observational data too.
NCAR has a couple of free data sets available from the NCAR/DSS web site. These data sets are updated monthly, and are available for the latest 12 months. The free data sets are:
NCEP Final Analysis (GRIB, 1 degree resolution) 1999SEP15 - CON |
|
NCEP/NCAR Global Reanalysis, 6 hourly, monthly (1948-Current) |
|
For more information on the free data sets, see:
http://www2.mmm.ucar.edu/mm5/mm5v3/data/free_data.html
If you don't have access to NCAR's data, you need to consider where you can obtain similar data to run the modeling system.
Seaice fractional data is available from the Near Real-TimeSSM/I EASE-Grid Daily Global Ice Concentration and Snow Extent. Boulder, CO, USA: National Snow and Ice Data Center.
This data can be obtained from their web site:
http://nsidc.org/data/nise1.html
Please become a registered user before downloading data (no charge).
SST data on a 0.5 degree grid is available from NCEP's ftp server: ftp://ftpprd.ncep.noaa.gov/pub/emc/mmab/history/sst
Files names has the format: rtg_sst_grib_0.5.YYYYMMDD
This data is in GRIB format and is available since Febuaray 2001.
If you are interested in running MM5 in real-time, a good source of data can be obtained from NCEP's ftp server: ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com. NCEP provides a number of datasets from their global and regional models at this site.
nam/prod/nam.YYYYMMDD/nam.tXXz.grbgrbYY.tm00
(eg. nam/prod/nam.20021223/nam.t18z.grbgrb12.tm00 )
gfs/prod/gfs.YYYYMMDD/gfs.tXXz.pgrbfYY
(eg. gfs/prod/gfs.20021223/gfs.t12z.pgrbf12 )