
Program mm5_p_convert
(beta version November 5, 2004)
(updated Sept 2, 2008)

The function of the this program is to convert MM5 pressure level
data coming either from REGRID or RAWINS/LITTLE_R to the format
of SI's hinterp output, namely hinterp.d0x.{date_string}. 

This program uses the INTERPF code structure and modules from
both INTERPF and SI. The program reads MM5 pressure level data,
estimate variables that SI needs but MM5 pressure-level dataset
does not have, change variable names to those of SI's, write
pressure-level data to SI's hinterp output format, and create
a meta data file.

One will need to run vinterp in SI to complete the pre-processing
to use MM5 pressure-level data for WRF. 

In SI, one will need a modified vinterp program (a patch will be
provided), and a fully editted wrfsi.nl namelist file. There is
no need to run gridgen in SI, all static surface fields are coming
from MM5. For this reason, please set surface_input_source = 2 
in WRF's namelist.input file.

The data produced by this program have been tested for domain 1
and domain 2 REGRID output files, single domain and nested WRF runs
using both domain 1 and 2 output files converted by this program. 

Big glitches: LSM option is not currently working in WRF using
the converted dataset. This will be resolved in near future.

For questions, please send emails to wrfhelp@ucar.edu

---------------------------------------------------------------

To compile mm5pconvert:

- Type 'make' in the mm5_p_convert directory to compile;

- When make is successful, executable mm5pconvert will appear in this
  directory.

---------------------------------------------------------------

To run mm5_p_convert:

Edit namelist.input, and type ./mm5pconvert to execute the program.

Required input file for mm5pconvert can come from either 
REGRID (REGRID_DOMAINx, where x = 1,2,3,...), or 
RAWINS (RAWINS_DOAMINx) or 
little_r (LITTLE_R_DOMAINx).
The directory and name of the input file are set in namelist.input.

If one has multiple nest input to process, run this program for
each domain. Since WRF only needs nest input at initial time, process
nest domain data only for one time. So you will create

hinterp.d01.{date_string}
hinterp.d02.{date_string}
hinterp.d03.{date_string}
hinterp.global.metadata

---------------------------------------------------------------

How to continue to run in SI:

- Install SI as usual.
- Will still need a MOAD_DATAROOT directory with subdirectories, log,
  siprd and static under $MOAD_DATAROOT.
- Need a fully editted wrfsi.nl file and place it in $MOAD_DATAROOT/static. 
  If you would like to process nest data, edit wrfsi.nl as you do with SI,
  and if you have hinterp.d02.* file, then running vinterp will produce
  wrf_real_input_em.d02.* file.
- To run vinterp only in SI after doing the above steps,

  Type 

  setenv INSTALLROOT your-install-root
  setenv MOAD_DATAROOT your-working-directory

  then type

  $INSTALLROOT/bin/vinterp.exe

---------------------------------------------------------------

Files/directories in this directory:

Makefile:  top-level makefile
README:    general information about how to run mm5_p_convert
configure.rules:   rules for compilation
namelist.input: namelist file requiring user modification
src:       directory of mm5_p_convert source code

---------------------------------------------------------------

Updates:

7/10/08:
- Correct an error when supplementing top levels soil temperature field for TMN.

9/2/09:
- Correct nest starting location indices. These indices in x and y were reversed.
