Chapter 11: INTERPB

 

 

11.1 Purpose

 

The INTERPB program handles the data transformation required to go from the mesoscale model on σ coordinates back to pressure levels. This program only handles vertical interpolation and a few diagnostics. The output from this program is suitable for input to REGRIDDER (to re-grid a model forecast), LITTLE_R (for pressure-level re-analysis), INTERPF (for pressure to σ interpolation for generating model input) and GRAPH (for visualization and diagnostic computation). In practice, much of the post-analysis performed with MM5 data is done interactively with diagnostic and visualization tools that can handle simple vertical coordinate transformations on-the-fly.

 

The INTERPB program can run 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).

 

 

11.2 INTERPB Procedure

  • input model input or model output data (INTERPF, NESTDOWN, MM5)
  • compute total pressure on dot and cross points
  • compute RH and Z on s levels
  • compute 2D fields on both staggerings: surface pressure, sea level pressure, latitude, longitude, "computationally expedient" surface pressure
  • extrapolate below ground and above top s surface
  •          variables: u and v, temperature, moisture, height, pressure, and ELSE

             options: extrapolate or constant

  • interpolate to selected pressure levels
  •          options: linear in pressure, linear in ln pressure, linear in pk

  • output interpolated data

 

 

 

 

 

11.3 Sea Level Pressure Computation

 

Please note that the "X" used in the following computations, and throughout this chapter, signifies an arithmetic multiplication, not a cross product.

 

1. Find two surrounding σ levels 100 hPa above the surface, compute T at this level

 

       

(11.1)

 

 

 

 

 

2. Find Ts (surface temperature), Tm (mean temperature in layer above ground), Z at level 100 hPa above surface, and Tslv (sea level temperature)

 

 

       

(11.2)

 

       

(11.3)

 

       

(11.4)

 

 

       

(11.5)

 

 

3. Then sea level pressure is calculated as

 

       

(11.6)

 

11.4 Vertical Interpolation/Extrapolation

 

Extrapolation is required near the surface when

 

       

(11.7)

 

where Pint-bot is typically 1000 hPa. This is handled in a subroutine specifically to allow pipelining of expensive inner loops for the vertical interpolation scheme. Extrapolation is required near the top of the model when

 

       

(11.8)

 

 

 

where Pint-top is typically PTOP. Every column of σ level data has a fictitious level inserted in the column, below the 1000 hPa level (the chosen value is 1001 hPa).

 

 

 

 

11.4.1 Interpolation (non-hydrostatic)

Similar to the front-end interpolation, the back-end interpolation is handled as either linear in pressure, linear in ln pressure, linear in p κ . The vertical interpolation on the back-end may not be entirely contained within the bounds of valid data, resulting in extrapolation. The non-hydrostatic pressure from the forecast data is given as

 

       

(11.9)

 

 

 

 

 

       

(11.10)

 

 

 

 

11.5 Parameter Statements

 

And again, no domain-specific FORTRAN PARAMETER statements.

 

 

11.6 FORTRAN Namelist Input File

 

Most of the available options for the INTERPB code are handled through the namelist input file. Since this is a FORTRAN namelist (a FORTRAN 90 standard), syntax is very strict. There are three namelist records for INTERPB. There are no default values, the entire namelist must be correctly modified for each program execution.

 

Table 11.1: INTERPB namelist values: RECORD0.

Namelist

Record

Namelist

Variable

Description

RECORD0

INPUT_FILE

CHARACTER string, σ -level input file (from MM5, INTERPF, or NESTDOWN), complete with directory structure

 

Table 11.2: INTERPB 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

 

Table 11.3: INTERPB namelist values: RECORD2.

Namelist

Record

Namelist

Variable

Description

RECORD2

pressure_bu_no_sfc_Pa

array of REALs, pressure (Pa) from 100000 up to

(but not necessarily including) PTOP, the surface pressure is NOT included

 

 

Table 11.4: INTERPB namelist values: RECORD3.

Namelist

Record

Namelist

Variable

Description

RECORD3

print_info

LOGICAL: TRUE = send extra printout to the standard out; FALSE = nah, don't do that

 

 

The entries in the RECORD4 namelist record (described in the following three tables) are optional. Default values for each variable have been established to remain internally consistent with other interpolation assumptions made through out the modeling system. This record is not available from the standard namelist.input file in the INTERPB directory, but is located in the ./INTERPB/.hidden/namelist.input file. This record is to allow the user access to differing methods for the vertical interpolation and the extrapolations which are performed above or below the model half σ levels.

 

 

Table 11.5: INTERPB namelist values: RECORD4

Namelist

Record

Namelist

Variable

Description

RECORD4

uv_interp_method

CHARACTER, "linear in p", linear in log p", or "linear in p**kappa" for u and v

RECORD4

t_interp_method

CHARACTER, "linear in p", linear in log p", or "linear in p**kappa" for temperature

RECORD4

moist_interp_method

CHARACTER, "linear in p", linear in log p", or "linear in p**kappa" for all moisture species

RECORD4

height_interp_method

CHARACTER, "linear in p", linear in log p", or "linear in p**kappa" for height

RECORD4

p_interp_method

CHARACTER, "linear in p", linear in log p", or "linear in p**kappa" for pressure

RECORD4

else_interp_method

CHARACTER, "linear in p", linear in log p", or "linear in p**kappa" for everything else

 

 

Table 11.6: INTERPB namelist values: RECORD4

Namelist

Record

Namelist

Variable

Description

RECORD4

uv_extrap_up

CHARACTER, "constant" or "extrapolate" for u and v

RECORD4

t_extrap_up

CHARACTER, "constant" or "extrapolate" for temperature

RECORD4

moist_extrap_up

CHARACTER, "constant" or "extrapolate" for all moisture species

RECORD4

height_extrap_up

CHARACTER, "constant" or "extrapolate" for height

RECORD4

p_extrap_up

CHARACTER, "constant" or "extrapolate" for pressure

RECORD4

else_extrap_up

CHARACTER, "constant" or "extrapolate" for everything else

Table 11.7: INTERPB namelist values: RECORD4

Namelist

Record

Namelist

Variable

Description

RECORD4

uv_extrap_low

CHARACTER, "constant" or "extrapolate" for u and v

RECORD4

t_extrap_low

CHARACTER, "constant" or "extrapolate" for temperature

RECORD4

moist_extrap_low

CHARACTER, "constant" or "extrapolate" for all moisture species

RECORD4

height_extrap_low

CHARACTER, "constant" or "extrapolate" for height

RECORD4

p_extrap_low

CHARACTER, "constant" or "extrapolate" for pressure

RECORD4

else_extrap_low

CHARACTER, "constant" or "extrapolate" for everything else

 

 

 

11.7 How to Run INTERPB

 

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

 

         Anonymous ftp:

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

 

          On NCAR MSS:

         MESOUSER/MM5V3/INTERPB.TAR.gz

 

2) gunzip and untar the INTERPB.TAR.gz file.

 

3) Type `make' to create an executable for your platform. Users may choose to run the interpb program with the available job deck on the NCAR IBMs. This file, interpb.deck.ibm, is located on the NCAR IBM blackforest machine at ~mesouser/MM5V3/IBM. As with other job decks for the IBMs, the proper NQS instructions are included at the top, and most of the namelist options are handled through shell variables. Files are read from and written to the NCAR MSS.

 

4) Edit the namelist.input file to select the run-time options.

 

5) Run the executable directly by typing `interpb >& interpb.log'.

 

INTERPB expects an input file (such as MMOUT_DOMAINn or MMINPUT_DOMAINn, where n is the domain identifier of the input data) to be provided. This is specified in the namelist.input file.

 

INTERPB outputs the files: MMOUTP_DOMAINn, REGRID_DOMAINn, and FILE_MMOUTP:blah, where n is the domain identifier of the input data and blah is the date string typical of the intermediate format files. The user has no control over the output file naming convention.

 

 

11.8 INTERPB didn't Work! What Went Wrong?

 

  • Most of the errors from INTERPB 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 INTERPB prints during a controlled failed run is the diagnostic error. 
  • To see if INTERPB completed successfully, first check to see if the "STOP 99999" statement appears. Also check to see that INTERPB processed each of the requested times from the namelist.  
  • When INTERPB runs into an interpolation error that it did not expect (i.e. forced to do an extrapolation when none should be required), INTERPB will stop and print out the offending (I,J,K) and pressure values.  

 

11.9 File I/O

 

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

 

The following tables are for the input and output units.

 

Table 11.8: INTERPB program input files.

File Name

Description

namelist.input

namelist file containing run-time options

MMOUT_DOMAINn

model output file on s coordinates, where n is the domain identifier

Table 11.9: INTERPB program output files.

File Name

Description

MMOUTP_DOMAINn,

REGRID_DOMAINn

pressure-level file suitable for input to LITTLE_R, INTERPF and GRAPH, where n is the domain identifier (MMOUTP has all model output 3d fields, REGRID has only the traditional 3d arrays: wind, temperature, moisture, height)

FILE_MMOUTP:blah

intermediate format file, suitable for input to the REGRIDDER program (as it would come from PREGRID), where blah is the 13-character date string

 

 

11.10 INTERPB tar File

 

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

 

.hidden/

Special namelist.input file with interpolation and extrapolation options

Makefile

Makefile to create INTERPB executable

README

General information about the INTERPB directory

namelist.input

Namelist file containing run-time options

src/

INTERPB source code