Chapter 10: NESTDOWN

 

  

10.1 Purpose

 

The NESTDOWN program horizontally interpolates σ−coordinate data, from a coarse grid to a fine grid. Modifying the number of vertical levels or their spatial distribution is permitted, usually for the purpose of increasing vertical resolution to complement a finer horizontal grid. The input data is on a σ-coordinate, either output from the mesoscale model or the initial condition file for model input. The output remains on the σ−coordinate. The program requires that the fine grid TERRAIN data be made available as input. Optionally, the coarse-grid lower boundary file may be required.

 

If this program is being used to produce a higher resolution model run from a coarse grid, there are several advantages: 1) the model has lateral boundary conditions that use consistent physics with the coarse grid model; 2) the lateral boundary conditions are available at a relatively high temporal frequency; 3) the vertical structure of the atmosphere is not significantly modified through vertical interpolation. Without the inclusion of observations, though, the model is able to drift.

 

The NESTDOWN program runs on the following platforms: Compaq/Alpha, Cray, DEC, HP, IBM, SGI, Sun, PCs running Linux (Fedora with PGI or Intel compilers), and MAC (OSX with xlf). The NESTDOWN code is written in FORTRAN 90.

 

 

10.2 NESTDOWN Procedure

 

 

 

 

 

 

10.3 Base State Computation

 

The base state computation is handled identically to that described in Chapter 7 INTERPF. However, two base states are computed: one for the coarse grid and one for the fine grid. The only difference between the two is the terrain elevation, as all of the other constants use the same values (P00, Ts0, A, PTOP, TISO). If vertical nesting is requested, then the base state for the new sigma level distribution is also computed, but only for the fine grid.

 

 

10.4 Shell Variables (for NCAR IBM job deck only)

 

All of the MM5 system job decks for NCAR IBMs are written as C-shell executables. Strict adherence to C-shell syntax is required in this section.

Table 10.1: NESTDOWN IBM deck shell variables.

C-shell

Variable

Name

Options and Use

ExpName

location of MSS files, keep same as used for deck generating input file for this program

InName

directory location of LOWBDY and TERRAIN files on MSS

RetPd

time in days to retain data on MSS after last access

InData

local names of the MM5 output, the LOWBDY, and the fine grid TERRAIN files

 

10.5 Parameter Statements

 

Guess what? No domain-specific FORTRAN PARAMETER statements required.

 

 

10.6 FORTRAN Namelist Input File

 

Most of the available options for the NESTDOWN code are handled through the namelist input file. Since this is a FORTRAN namelist (a FORTRAN 90 standard), syntax is very strict. There are five namelist records for NESTDOWN. There are no default values, the entire namelist must be correctly modified for each program execution. However, there are a few values that do not often need to be changed.

 

Table 10.2: NESTDOWN namelist values: RECORD0.

Namelist

Record

Namelist

Variable

Description

RECORD0

INPUT_FILE

CHARACTER string, coarse grid input file from INTERPF or MM5, complete with directory structure

RECORD0

INPUT_LOWBDY_FILE

CHARACTER string, LOWBDY file from coarse grid INTERPF, complete with directory structure

(OPTIONAL, if USE_MM5_LOWBDY = .FALSE., this file is not necessary)

RECORD0

INPUT_TERRAIN_FILE

CHARACTER string, fine grid input file from TERRAIN, complete with directory structure

Table 10.3: NESTDOWN namelist values: RECORD1.

Namelist

Record

Namelist

Variable

Description

RECORD1

START_YEAR

starting time, 4 digit INTEGER of the year

RECORD1

START_MONTH

starting time, 2 digit INTEGER of the month

RECORD1

START_DAY

starting time, 2 digit INTEGER of the day

RECORD1

START_HOUR

starting time, 2 digit INTEGER of the hour

RECORD1

END_YEAR

ending time, 4 digit INTEGER of the year

RECORD1

END_MONTH

ending time, 2 digit INTEGER of the month

RECORD1

END_DAY

ending time, 2 digit INTEGER of the day

RECORD1

END_HOUR

ending time, 2 digit INTEGER of the hour

RECORD1

INTERVAL

time interval in seconds between analysis/forecast periods

RECORD1

LESS_THAN_24H

T/F flag of whether to force less than 24 h in the analysis (FALSE by default)

 

Table 10.4: NESTDOWN namelist values: RECORD2.

Namelist

Record

Namelist

Variable

Description

RECORD2

SIGMA_F_BU

REAL array, new sigma distribution, full-levels, bottom-up (only required for vertical nesting)

RECORD 2

SST_TO_ICE_THRESHOLD

REAL, temperature at which SST is cold enough to turn the "water" category into an "ice" category (not advised for LSM or polar physics in MM5)

 

Table 10.5: NESTDOWN namelist values: RECORD4, 5 and 6.

Namelist

Record

Namelist

Variable

Description

RECORD4

WRTH2O

T/F flag, saturation is with respect to liquid water (inoperative currently)

RECORD 5

IFDATIM

INTEGER, number of time periods of initial condition output required (only 1 is necessary if not doing analysis nudging), "-1" is the magic choice for selecting all time periods are to be output

RECORD6

INTERP_METHOD

INTEGER; horizontal interpolation choice:

1 = overlapping parabolic, BINT (fast),

2 = positive definite, SINT (slow)

RECORD6

USE_MM5_LOWBDY

T/F flag, use the information inside the input file to build the LOWBDY file; TRUE implies that the user provides the INPUT_LOWBDY_FILE

from the coarse grid as input

 

 

 

10.7 Horizontal Interpolation

 

There are several horizontal interpolation options used inside NESTDOWN, though the user is only allowed to control the selection of positive definite (slow) vs. overlapping parabolic (faster). If the user selects a 3:1 ratio in the TERRAIN program, a tailored 3:1 interpolator is employed. Other ratios require the BINT function. For masked fields, a linear 4-point interpolation is selected if all four surrounding points are valid. If at least one of the points is inappropriate for a masked interpolation and at least one of the points is valid, then an average of the possible data points (of the four surrounding values) is computed. Masked fields with no valid surrounding points have various default values based on the field name.

 

 

10.8 Vertical Corrections after Horizontal Interpolation

 

The horizontal interpolation takes place on σ coordinates. With the introduction of the fine grid terrain elevation data, there are locations with a significant extent of orographic change. The 3D temperature, 3D mixing ratio, 2D ground temperature, and the 2D soil temperatures are slightly modified to reduce the initial imbalance the model will feel with these fields.

 

 

10.8.1 Temperature correction

 

The air temperature and ground temperature adjustments are based upon the difference in the reference temperature change at the particular (i,j,k) location. The "F" subscript is the new variable with fine grid terrain elevation, the "C" subscript denotes the coarse terrain values, and the "R" refers to the reference temperature. Other than a few constants, the reference temperature differences are a function of terrain elevation differences only. For the ground temperature and soil temperature adjustments, the lowest σ level value of the reference temperature difference is used as the correction.

 

       

(10.1)

 

 

The original fine grid mixing ratio, computed with the original fine grid temperature, is converted to relative humidity. This is re-diagnosed as mixing ratio, but using the adjusted fine grid temperature. Essentially, RH is conserved.

 

 

10.8.2 Horizontal-wind correction

 

 

 

The option to modify the horizontal winds based on the elevation differences from the horizontally interpolated terrain elevation and the fine grid input terrain is currently commented out, which matches the treatment given to fine grid domains initialized within MM5.

 

1. restrict the vertical extrapolation to only 1 level at most

 

       

(10.2)

 

2. vertical gradient of horizontal wind components

 

       

(10.3)

 

 

3. new wind component

 

       

(10.4)

 

 

10.9 How to Run NESTDOWN

 

1) Obtain the source code tar file from one of the following places:

 

   Anonymous ftp:

   ftp://ftp.ucar.edu/mesouser/MM5V3/NESTDOWN.TAR.gz

 

   On NCAR MSS:

   /MESOUSER/MM5V3/NESTDOWN.TAR.gz

 

2) gunzip and untar the file.

 

3) Type `make' to create an executable for your platform.

 

4) On the NCAR IBMs, edit nestdown.deck.ibm (located in ~mesouser/MM5V3/IBM) to select script options and to select namelist options. On a workstation, edit the namelist.input file for the namelist options.

 

5) On the NCAR IBMs, type nestdown.deck.ibm to compile and execute the program. It is usually a good practice to redirect the output to a file so that if the program fails, you can take a look at the log file. To do so, type: nestdown.deck.ibm >& nestdown.log, for example. On a workstation, or on a IBM running interactively, run the executable directly (nestdown >& nestdown.log).

 

NESTDOWN input files:

   Either MMINPUT_DOMAINn or MMOUT_DOMAINn

   TERRAIN_DOMAINm

   LOWBDY_DOMAINn (optional)

where n is the coarse grid domain identifier on input and m is the fine grid domain identifier. The location of the input files (directory information) is provided in the namelist.input file.

 

NESTDOWN output files:

   MMINPUT_DOMAINm

   LOWBDY_DOMAINm

   BDYOUT_DOMAINm

where m is the fine grid domain identifier on output. These files are created in the current working directory. The user has no control over the naming convention.

 
10.10 NESTDOWN didn't Work! What Went Wrong?

 

  • Most of the errors from NESTDOWN that do not end with a "segmentation fault", "core dump", or "floating point error" are accompanied with a simple print statement. Though the message itself may not contain enough substance to correct the problem, it will lead you to the section of the code that failed, which should provide more diagnostic information. The last statement that NESTDOWN prints during a controlled failed run is the diagnostic error. 
  • To see if NESTDOWN completed successfully, first check to see if the "STOP 99999" statement appears. Also check to see that NESTDOWN processed each of the requested times from the namelist. The initial condition file should be written-to after each analysis time (up to the number of time periods requested in the namelist file). The boundary condition file is written-to after each analysis time, beginning with the second time period. The LOWBDY file is only written once (either the end of the NESTDOWN program if the LOWBDYfile is computed, or at the beginning of the program if the LOWBDY file is directly interpolated).
     
  • Remember that to generate a single boundary condition file, you must have at least two time periods, so that a lateral boundary tendency may be computed. Even if you are not going to run a long forecast, it is advantageous to provide a full day for the lateral boundary condition file, as this file contains the daily mean of the surface air temperature and thedaily mean of the SST. Users may mitigate this situation by providing the coarse grid's LOWBDY file as input, which contains the previous analysis' daily mean fields.

 

10.11 File I/O

 

The NESTDOWN program has input and output files that are ingested and created during the program execution. The gridded input files and all of the output files are unformatted FORTRAN (binary, sequential access). One of the input files is a human-readable namelist formatted file of run-time options.

 

The following tables are lists of input and output units for the NESTDOWN program.

Table 10.6: NESTDOWN program input files.

File Name

Description

namelist.input

namelist file containing run-time options

MMINPUT_DOMAINn

MMOUT_DOMAINn

coarse grid input data on σ levels

LOWBDY_DOMAINn

optional input file, contains the coarse grid reservoir temperature and mean SST

TERRAIN_DOMAINm

the fine grid terrestial information

Table 10.7: NESTDOWN program output files.

File Name

Description

MMINPUT_DOMAINm

fine grid initial condition for MM5

BDYOUT_DOMAINm

fine grid lateral boundary condition for MM5

LOWBDY_DOMAINm

fine grid lower boundary condition (reservoir temperature and mean SST)

 

10.12 NESTDOWN tar File

 

The nestdown.tar file contains the following files and directories:

 

CHANGES

Description of changes to the NESTDOWN program

Makefile

Makefile to create NESTDOWN executable

README

General information about the NESTDOWN directory

namelist.input

Namelist file containing run-time options

nestdown.deck

Job deck for usage on one of NCAR's Crays

src/

NESTDOWN source code