NESTDOWN Tutorial

(updated 3/06/02)

The function of program NESTDOWN is two-fold. First, it is used to generate input files for a one-way nested MM5 run. In this scenario, MM5 model is first run on some coarser mesh(es). NESTDOWN takes output from MM5, together with TERRAIN output for a finer mesh, and generates input files for another MM5 run on the finer mesh. For example, you can run MM5 at 90 and 30 km resolutions first, then take the model output at 30 km resolution and 10 km TERRAIN output (or any integer coarse-to-fine mesh ratio) in NESTDOWN, and NESTDOWN will generate input files for MM5 at 10 km. Second, NESTDOWN can be used to generate nest input files for MM5. You may notice that Version 3's INTERPF program only produces input files for MM5 at one resolution. This is because MM5 can start nests with the option of inputting a nest terrain file (IOVERW=2 option). But if you would like to generate nest input files, use NESTDOWN. This program works with sigma-level data, and requires nest terrain to be in the input files (you cannot do horizontal interpolation without inputting the finer mesh terrain).

To learn more about how the NESTDOWN program works, please read Chapter 10 of the Tutorial Notes.

Where to Start?

First, go back to MM5V3 directory and download the NESTDOWN program tar file from NCAR's ftp site. Once you have it on your machine, type the following to unzip and untar it:

gunzip NESTDOWN.TAR.gz
tar -xvf NESTDOWN.TAR

After this, you should see a program directory NESTDOWN/ created in your working directory. cd to this directory:

cd NESTDOWN

and you should see the following files and subdirectories listed:

ls -l

-rwxr-xr-x   1 mesouser system     1535 Feb 11 19:36 CHANGES
-rwxr-xr-x   1 mesouser system     3805 Mar 12 17:34 Makefile
drwxr-xr-x   2 mesouser system     8192 Feb 19 12:20 Diff
-rwxr-xr-x   1 mesouser system     2500 Feb 11 19:34 README
-rwxr-xr-x   1 mesouser system      419 Jun  7 19:34 configure.rules
-rwxr-xr-x   1 mesouser system       92 Jun  7 19:34 macros_nestdown
-rwxr-xr-x   1 mesouser system      733 Feb 11 19:34 namelist.input
-rw-r--r--   1 mesouser system      659 Feb 11 19:34 namelist.input.SOC
-rw-r--r--   1 mesouser system     6989 Feb 11 19:34 nestdown.deck
drwxr-xr-x   2 mesouser system     8192 Feb 11 19:34 src

Read the README file in the directory.

Now you are ready to work with NESTDOWN.

How to Run NESTDOWN? (It is very similar to running INTERPF)

1. Compile NESTDOWN:

NESTDOWN is a Fortran 90 program, like REGRID and INTERPF. You only need to compile it once unless you modify the code. To compile, type:

make >& make.out &

This compiles the code on your machine, and writes output from "make" to file make.out. If it is successful, you should have created the executable called interpf in the directory:

./nestdown -> src/nestdown
 

2. Edit the namelist.input file. It is partially set up for the SOC case (dates only). Other highlighted namelist variables are the typical ones you need to modify when you work on a different case. In this example, we assume that we will be doing a one-way MM5 run at 10 km resolution after we've done the 90/30 km run. We assume that we have MM5 model output at 1 hour interval, and we would like to create initial and boundary condition files at 10 km (require TERRAIN_DOMAIN3 at 10 km - a user may rerun TERRAIN to include this domain). The 10 km run (because of its small domain size) will be run for 3 hours only and from hour 3 to hour 6 of the 90/30 km run. Once you've changed it, type the following to run:

nestdown >& log &

If you are successful, you should find these additional files generated in the directory:

-rw-r--r--   1 mesouser system   4749176 Apr  5 13:21 BDYOUT_DOMAIN3
-rw-r--r--   1 mesouser system    134920 Apr  5 13:21 LOWBDY_DOMAIN3
-rw-r--r--   1 mesouser system   2130712 Apr  5 13:20 MMINPUT_DOMAIN3
-rw-r--r--   1 mesouser system      7031 Apr  5 13:21 log

where log is a log file of all print statements generated by the NESTDOWN program, and again if anything goes wrong, this is the first place to look for clues. Near the end of the log file, you should see the following line if the job finished correctly:

STOP 99999

Similar to output from INTERPF, MMINPUT_DOMAIN3 is the binary initial condition file for MM5, and it contains 3-D wind, temperature, mixing ratio, vertical motion and perturbation pressure fields on model sigma levels. BDYOUT_DOMAIN3 and LOWBDY_DOMAIN3 are lateral boundary condition and lower boundary condition files for MM5.

There is no plot file generated from NESTDOWN. To check whether input files are OK, you can run program GRAPH/RIP if you have NCAR Graphics on your machine.

If everything checks out ok, then your attempt to run NESTDOWN should be a successful one. You are now ready to run MM5 model. Remember, when you copy or move these files to MM5/Run directory, you need to name all files with suffix X_DOMAIN1, since to MM5, this domain will be the first domain.


Miscellanies:

Since Version 3.5, NESTDOWN also does vertical interpolation to new sigma levels.

For a brief  introduction to the NESTDOWN program, you can also view the bi-annual tutorial slides.


Trouble Shooting:

1. The namelist problem with Sun machine may appear here too. In that case, split namelist variable input_file into a few lines, or just one:

 input_file(1)           = '../MM5/Run/MMOUT_DOMAIN2'


If you have run NESTDOWN successfully, you can now try to run MM5 again.

If you have questions, ask mesouser.


TUTORIAL_HOME
TERRAIN
REGRID
RAWINS/LITTLE_R
INTERPF
MM5
NESTDOWN
INTERPB
GRAPH
RIP
GrADS