**HOW TO RUN MM5toGrADS**

1.  **gunzip MM5toGRADS.TAR.gz**

2.  **tar xvf MM5toGrADS.TAR**

3.  **Type "make"**

4.  **Edit namelist.input (Make changes to namelist.input )**

5.  **Change file names in mm5_to_grads.csh**

6.  **Type "./mm5_to_grads.csh" to execute the program**

7.  **Repeat step 6 for Domain 2**

> **8. ls --l (You'll find grads output file for domain 1 and domain 2
> and control**
>
> **files)**
>
> **mm5_grads_output_domain1.ctl**
>
> **mm5_grads_output_domain1.dat**
>
> **mm5_grads_output_domain2.ctl**
>
> **mm5_grads_output_domain2.dat**

**9. Launch grads to visualize the output**

**File : MM5toGrADS/namelist.input**

&RECORD1

!\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

TIMIN=1

TIMAX=-99

! For TIMIN and TIMAX, 1 = first model output time,

! 2 = second, etc.

! For TIMAX, enter -99 for last output time

! For all model times, set: TIMIN = 1 , TIMAX=-99

!\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

NSKIP=1

! This is the skip increment. After the first GrADS output

! is written, this many time levels of the INFILE are

! skipped before more output is written to the GrADS file.

! 1=every output time

! 3=every third output time

! 12=every 12th output time, etc.

!\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

IFLINUX=1 ! set this =1 if you need \"byteswapped\" in your .ctl file

!\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

IFMAP=1

! set =1 for map

! set =0 for no map

! Note: -GrADS uses interpolation for IFMAP=1 and the

! following map projections: Lambert and polar

! stereographic

! -no interpolation used by GrADS for IFMAP=0 or Mercator

! map projection

! -SH polar stereographic projection not supported (yet)

!\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

IFSFC=0

! set =1 for output at lowest model level only

! set =0 for full 3D output (files can be large!)

! Might want to use IFSFC=1 for smaller file size or to get

! a quick look at surface fields without outputting

! data for all levels)

!\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

IFSKEW=0

! IFSKEW=0 will write fully 3-D data

! IFSKEW=1 will write out data at 1 grid point only.

ISKW=120 ! the i point (in N-S direction)

JSKW=120 ! the j point (in E-W direction)

!\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

ZTYPE=1

! set =1 for output on native level:

! TERRAIN = surface only

! REGRID = pressure

! RAWINS = pressure

! MMINPUT = sigma

! MMOUT = sigma

! set =2 to interpolate output from sigma to pressure.

! For this option, you need to set the

! following:

! Pressure levels to interpolate to (in mb):

! please list levels in order, from bottom to top

plev = 1000., 950., 925., 900., 850., 800., 750., 700., 650., 600.,
550., 500., 450.

, 400., 350., 300., 250., 200., 150.,100.

/

&RECORD10

!c\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

!c 3D Variables

!c 1=yes 0=no

!c

!c\-- Native model output \--c

IFU = 0 ! X wind (grid-relative if IFMAP=0)

! (earth-relative if IFMAP=1)

IFV = 0 ! Y wind (grid-relative if IFMAP=0)

! (earth-relative if IFMAP=1)

IFW = 0 ! Vertical velocity

IFPP = 0 ! Pressure perturbation

IFT = 0 ! Temperature

IFQ = 0 ! Water vapor mixing ratio

IFCLW = 0 ! Cloud water mixing ratio

IFRNW = 0 ! Rain water mixing ratio

IFRTND = 0 ! Radiation tendency

IFZ = 0 ! Height (above ground) of the sigma levels

IFTKE = 0 ! Turbulence kinetic energy (if avail.)

IFICE = 0 ! Ice water mixing ratio (if avail.)

IFSNOW = 0 ! Snow water mixing ratio (if avail.)

IFGRAUP = 0 ! Graupel mixing ratio (if avail.)

IFNCI = 0 ! Number concentration of ice (if avail.)

/

&RECORD11

!\-- Derived model output \--c

IFTD = 0 ! Dewpoint temperature

IFRH = 0 ! Relative humidity

IFTH = 0 ! Potential temperature

IFTHE = 0 ! Equivalent potential temperature

IFPRS = 0 ! Pressure

IFVOR = 0 ! Vorticity (vertical component)

IFPV = 0 ! Potential vorticity

IFDIV = 0 ! Divergence (horizontal component)

IFDIR = 0 ! Wind direction

IFTADV = 0 ! Temperature advection (horizontal)

IFDBZ = 0 ! Reflectivity (Note: should only be used for output

! from fully explicit simulatations. For runs with

! a cumulus paramaterization, this output is

! meaningless.)

IFH = 0 ! Geopotential height

/

&RECORD12

!\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

! 2D Variables

! 1=yes 0=no

!

!\-- Native model output \--c

IFPS = 0 ! P-star

IFTG = 1 ! Ground temperature

IFRC = 1 ! Accumulated convective precipitation

IFRN = 1 ! Accumulated non-convective precipitation

IFTER = 0 ! Terrain height above sea level

IFXMF = 0 ! Map-scale factor on cross points

IFDMF = 0 ! Map-scale factor on dot points

IFCOR = 0 ! Corilois parameter

IFTR = 0 ! Infinite reservoir temp

IFXLAT = 0 ! Latitude on cross points

IFXLON = 0 ! Longitude on cross points

IFLU = 1 ! Land use category

IFSC = 0 ! Snow cover

IFPBLH = 0 ! PBL depth

IFPBLR = 0 ! PBL regime

IFSHF = 0 ! Surface sensible heat flux

IFLHF = 0 ! Surface latent heat flux

IFUST = 0 ! Frictional velocity (u-star)

IFSWD = 0 ! Surface downward shortwave radiation

IFLWD = 0 ! Surface downward longwave radiation

IFSWO = 0 ! Top outgoing shortwave radiation

IFLWO = 0 ! Top outgoing longwave radiation

IFSST = 0 ! Sea surface temperature (if avail.)

IFST1 = 0 ! SOIL TEMP 1 (if avail.)

IFST2 = 0 ! SOIL TEMP 2 (if avail.)

IFST3 = 0 ! SOIL TEMP 3 (if avail.)

IFST4 = 0 ! SOIL TEMP 4 (if avail.)

IFSM1 = 0 ! SOIL MOISTURE 1 (if avail.)

IFSM2 = 0 ! SOIL MOISTURE 2 (if avail.)

IFSM3 = 0 ! SOIL MOISTURE 3 (if avail.)

IFSM4 = 0 ! SOIL MOISTURE 4 (if avail.)

IFCAN = 0 ! CANOPY MOISTURE (if avail.)

IFSND = 0 ! Water equivalent of snow depth (if avail.)

IFSSI = 0 ! Sea Ice (if avail.)

IFSRO = 0 ! Surface Runoff (if avail.)

IFURO = 0 ! Underground Runoff (if avail.)

IFT2M = 0 ! 2 m Temperature (if avail.)

IFQ2M = 0 ! 2 m Mixing Ratio (if avail.)

IFU10 = 0 ! 10 m U wind component (if avail.)

IFV10 = 0 ! 10 m V wind component (if avail.)

/

&RECORD13

!\-- Derived model output \--c

IFPSLV = 0 ! Sea level pressure

IFCREF = 0 ! Composite reflectivity (Note: should only be used for

! output from fully explicit simulatations. For runs

! with a cumulus paramaterization, this output is

! meaningless.)

IfICLW = 0 ! Integrated cloud water

IFIRNW = 0 ! Integrated rain water

IFPWAT = 0 ! Precipitable water

IFCLFR = 0 ! Cloud fraction at 3 levels

/

**File: MM5toGrADS/mm5_to_grads.csh**

#!/bin/csh

\# \"infilename\" is the input file to the MM5toGrADS program

\# (include full path if file is not in current directory)

\#

\# \"outfilename\" is the name of the output from the MM5toGrADS program

\# (include full path if you do not want the files to be placed in

\# current directory)

\# outfilename will be used for both the .ctl and .dat file

\# In the case below the files test.ctl and test.dat will be created

set infilename = \"/usr/people/sriki/final/MM5/Run/MMOUT_DOMAIN1\"

set outfilename = \"mm5_grads_output_domain1\"

\###############################################################

\###############################################################

\##### \#####

\##### END OF USER MODIFICATIONS \#####

\##### \#####

\###############################################################

\###############################################################

#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- SET THE SYMBOLIC LINKS
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--#

echo \....setting links to data\....

echo dset \^\${outfilename}.dat \> \${outfilename}.ctl

rm -f fort.10

rm -f fort.80

rm -f fort.81

ln -s \${infilename} fort.10

ln -s \${outfilename}.dat fort.80

ln -s \${outfilename}.ctl fort.81

###assign -a \${outfilename}.dat -F null fort.80

#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- RUN THE PROGRAM
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--#

echo \....running\....

./grads.exe

#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- CLEAN UP
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--#

rm -f fort.10

rm -f fort.80

rm -f fort.81

echo \....Program finished\....