STRC · Changing the Output Fields in the WS Eta
Changing the Output Fields in the WS Eta
 
I. Controlling the Post Processing
II. Adding a Field
III. Interpolation to other Grid Projections

I. CONTROLLING THE POST PROCESSING

The $WS_ETA/data/const/cntrl.parm file controls the fields and levels that are written to the initial GRIB file. The $WS_ETA/data/const/cntrl.examples file contains examples of possible fields that can be output by the WS Eta. Each parameter in the $WS_ETA/data/const/cntrl.parm file is controlled by two lines in this file. For example:

(U WIND ON PRESS SFCS) Q=( 48), S=( 8), SCAL=(-3.0), SMTH=(00 00 00)
L=(11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 00000 00000)

The first line describes the field, sets the Q and S values (no longer used), and defines the precision and smoothing.

SCAL defines the precision that is written out to the GRIB data. Positive values denote decimal scaling (maintain that number of significant digits), while negative values describe binary scaling (precise to 2^{SCAL}; SCAL=-3.0 gives output precise to the nearest 1/8). Higher resolution runs should output the data with more precision if performing complex diagnostics on the data that involve higher order derivatives (e.g., Q vectors, vorticity advection).

The final item on the first line is the smoothing block SMTH. The first value controls the number of smoothing passes applied to the staggered (where mass and wind points are separate) grid and the second value controls the number of smoothing passes applied to the filled grid (the post ``fills'' the native grid so there are mass and wind data at all gridpoints). The third value activates a 25-point Bleck filter on the output grid, which for the workstation post is the filled grid. The Bleck filter removes small scale features and largely preserves extrema in the data even after multiple applications. As seen in the included cntrl.parm file, smoothing typically is not performed on most fields.

The second line controls the output levels (and whether a field will be created at all) by providing on/off switches for the output.

For multi-level data, the switches (1 = generate, 0 = do not generate) control the output levels, with the lowest pressure level (furthest from ground) controlled by the leftmost element of the string. This ordering can be reversed by using 2's in place of 1's; 2's make the switches be applied from the ground up. For isobaric data the levels being switched on and off correspond to the SPL values in the fcstdata file, and the first LSM values in the string are used. For single level data, the leftmost number is used as the switch (1 = generate, 0 = do not generate).

EXAMPLES (assuming LSM=39, with SPL values defined every 25 hPa from 50 hPa to 1000 hPa):

(MESINGER MEAN SLP ) Q=( 8), S=( 138), SCAL=(-0.1), SMTH=(00 00 00)
L=(10000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000)

(TEMP ON PRESS SFCS ) Q=( 16), S=( 8), SCAL=(-3.0), SMTH=(00 00 00)
L=(00000 00000 00000 00000 00000 11111 11111 11110 00000 00000 00000 00000)

(TEMP ON PRESS SFCS ) Q=( 16), S=( 8), SCAL=(-3.0), SMTH=(00 00 00)
L=(22222 22222 22220 00000 00000 00000 00000 00000 00000 00000 00000 00000)

(SPEC HUM ON ETA SFCS) Q=( 95), S=( 149), SCAL=( 2.7), SMTH=(00 00 00)
L=(22220 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000)


Translations:

The first output field is a special sea level pressure reduction designed for use with the Eta model. SCAL=-0.1 specifies that the value is stored to a precision of 2^{-0.1}, or pretty close to the nearest Pa.

The second example is isobaric temperature. The initial 25 0's turn off output of this field between 50 hPa and 650 hPa, and then subsequent 14 1's turn on output between 675 hPa and 1000 hPa. SCAL=-3.0 writes out the data to the nearest 0.125.

The third output field is identical to the second, but by using 2's instead of 1's it is clearer that output is being generated for the 14 output pressure levels closest to the ground.

The fourth output field is for specific humidity on Eta surfaces. The 2's indicate that the output switches are working from the ground up. Thus data will be written for the four lowest Eta surfaces above ground. SCAL=2.7 will maintain 2-3 significant digits (higher levels of precision create larger GRIB files, fractional values approach the precision of the next higher integer value but store fewer bits).

II. ADDING A FIELD

Many more fields are included in a sample file $WS_ETA/data/const/cntrl.example; the easiest way to add a field is to copy one of these into the cntrl.parm file.

Suppose a posting of highest freezing level data is desired. Searching through the AVBL_RAWD file finds the proper two lines.

DATA IFILV(165),AVBL(165),IQ(165),IS(165) & /1,'HIGHEST FREEZE LVL ',007,204/


The crucial piece of information from above is actually the character string in quotes on the second line. The numbers listed after the character string (7 and 204 above) give the GRIB specification of the field described by the character string. The first value is the GRIB parameter number ( 007 = geopotential height) and the second is vertical coordinate ( 204 = highest tropospheric freezing level; this is a special NCEP definition). The number preceding the character string on line two is a switch that indicates whether the variables are stored on mass (1) or wind (0) gridpoints.

To add this field into the cntrl.parm file, this character string (including any spaces) is placed between parenthesis on the first line of the cntrl file. Proper formatting is crucial in the cntrl.parm file; make sure any lines added match the format of the other lines in the file. Q and S can be set to any value as they will be replaced by the GRIB definitions described above as the program runs. For this example they are set to the GRIB values. Scaling and smoothing are set to their desired values, and since this is ``single level'' data, only the leftmost element of the second line is set to 1. The lines added to the cntrl.parm file would look something like this:

(HIGHEST FREEZE LVL ) Q=( 7), S=( 204), SCAL=(-2.0), SMTH=(00 00 00)
L=(10000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000)

III. INTERPOLATION TO OTHER GRID PROJECTIONS

The workstation post creates GRIB output on the native e-grid (files with names like EGRD3Dhh.t00s), but this output on the rotated latitude-longitude projection of the Eta model is not readily degribbed by most software packages. The outjob_special script uses the included GRIB utility copygb to interpolate the native grid data onto regular lat-lon (latlon_hh) and Lambert Conic Conformal grids (lmbc_hh), where hh represents the forecast hour. These interpolated GRIB files on standard map projections should be much easier to degrib.

One item to point out about copygb is that the binary precision specified in the cntrl.parm file will not automatically carry over to the copygb output files. The copygb lines within the outjob_special script specify a scaling though the ``-s'' flag, but this scaling is applied equally to all fields. This indiscriminate scaling might make the lmbc and latlon files unnecessarily large. A way to maintain control over the precision of various fields is to use more decimal scaling (SCAL > 0) in the cntrl.parm file. Decimal scaling from the original EGRD3D file will automatically carry over to the interpolated GRIB fields without using a ``-s'' option. A possible solution is given in the cntrl.dec file which avoids using binary scaling. To use decimal scaling exclusively the following changes would need to be made to the outjob_special file: 1) change the symbolic link from cntrl.parm to cntrl.dec; 2) remove the -s"2,-3" from the copygb.x lines. This purely decimal scaling option was not thoroughly tested, so it may require some tuning by the user.

The file outjob_input_lat contains a string of numbers beginning with 255 that describes the lat-lon output domain. These numbers have the format:

255 0 IDIM JDIM LAT1 LON1 128 LAT2 LON2 DLAT DLON 64

where

IDIM, JDIM: The dimensions of the output regular lat-lon grid. These values should not be confused with the IM and JM of the model.

LAT1, LON1: The latitude and longitude of the southwest corner of the output grid. The values are expressed in millidegrees. For example, a corner point at 15N, 112.5W would be expressed as 15000 -112500.

LAT2, LON2: As with LAT1, LON1, but for the northeast corner of the output grid.

DLAT, DLON: These are the spacings between output gridpoints in millidegrees of latitude and longitude, with a default value of 250.

The file outjob_input_lmbc has a slightly different string of numbers:

255 3 IDIM JDIM LAT1 LON1 8 CLON DX DY 0 64 TLAT1 TLAT2

where

IDIM, JDIM: These are the dimensions of the Lambert Conformal grid.

LAT1, LON1: The southwest corner specified as in the lat-lon output grid.

CLON: The center longitude of the lambert conformal projection. It will default to be the same as TLM0D (the center longitude of the model).

DX,DY: These are the grid spacings at the true latitude in the X and Y directions. Values are expressed in meters, and default to the approximate spacing of the filled native e-grid (with both mass and wind data at all points).

TLAT1, TLAT2: These are the ``true latitudes'' of the lambert conformal projection. By default they both are equal to TPH0D (the center latitude of the model).

These values should provide sufficient information to ``degrib'' the data regardless of the software package being used.

* There is a great deal of flexibility built into the post-processor. Unused data can be eliminated by commenting out any unneeded portions of outjob_special (e.g., eliminate the latlon or lmbc output). Fields or levels that are not needed can be controlled through the cntrl.parm file. The "outjob_input'' files can be edited to create output for a specific domain.