Plots or grids data from MD files or grids.
MDX CLE PREFIX =
MDX LIST PREFIX=
MDX PLT [keywords]
MDX PLT ugrid vgrid [keywords]
MDX grid [keywords]
MDX parm [keywords]
MDX has many keywords for fetching and displaying data. They are divided into five groups for discussion.
if the parameter WNV is specified, a negative LSIZE plots vectors of constant length; if the parameter WIN is specified, a positive LSIZE defines a relative length of the wind barb; specify u and v lengths with the same value
place to plot the data relative to the station location; the station is located at 41 in a 9 x 9 matrix starting at 1 in the upper-left corner, increasing along a row; use when plotting more than one parameter (default=41)
selects data from the MD file that meets its conditions; in the SORT keyword list, do not use an equals sign (=) between keywords and loval, hival; hival is optional if loval is numeric; do not specify hival if loval is alphabetic; keyword is any parameter from an MD file or a ROW and COL number, for example: SORT=TIME 12 13 ST WI
MDX is a flexible routine that plots or contours from any schema MD file or grid. When plotting or contouring ISFC, SVCA, IRAB or RAOB schema MD file data, it is easier to use commands SFCPLOT, SFCCON, RAOBPLOT and RAOBCON. When contouring grid data, it's easier to use command GRDDISP.
MDX is the general MD file plotter/gridder. It is intended for use in macros, not entered directly.
With each MDX command entry, the information (i.e., parm, time, date, map boundaries, display colors) is stored in strings with a special character prefix. The default prefix is a dollar sign ($), but you can define a prefix using keyword PREFIX with any single character except a pound sign (#) or alphanumeric character.
The parm parameter may be any key name in the MD file (use command MDL to list the keys), or one of these derived parameters: ABV, ADV, DVG, MIX, SPD, STR, THA, THAE, VOR, WIN, WNV.
When you use the plus sign (+) as the last positional parameter, the command information is stored in the string table but not plotted. This allows you to run arithmetic operations on the data using the PLT option with the keyword PREFIX.
The most basic command to display data is MDX parm, where parm is any parameter found in an MD file. The command plots all of this parameter from the current MD file (from MDU SET) on the current graphics frame on a map as determined by the limits of the data. To do anything more with MDX, you must know something about the type of data in the MD file. For example, if you want to plot 500 mb heights for day 97250 at 12 UTC over the Midwest, you must know that the height, pressure, day and time are referenced through parameters Z, P, DAY and TIME in the MD file.
The command to enter (with IRAB schema data in MD file 5000) is:
MDX Z MAP=MID MDF=5000 SORT=P 500 DAY 97250 TIME 12
Keyword SORT provides a way of limiting the data to a specific subset of interest. This is probably the most used keyword along with a map specification keyword (MAP or LAT, LON). When using history data, the contour plot does not indicate a day unless you indicate that day as a SORT condition. Do NOT use an equals sign (=) between the keys and values in the SORT list.
Keywords LAT and LON default to limits that guarantee complete coverage of the data distribution, rounded to the nearest whole degree.
When MDX creates and interpolates data to a grid, the amount of extrapolation into data void regions is controlled via SYSKEY word 897. It has a range of 2 to 20 and a default of 10. Use command SYSVAL to list or change its value. Grid points beyond its value are assigned missing value codes, and are not contoured. Note that data density, grid spacing and smoothing can affect a data value's results.
and the ADDE command PTDISP in place of MDX SOU=MDF OUT=PLO.
Before using this example, enter MDX CLE to clear and initialize the string entries that MDX uses.
1. Plot the weather data from MD file 4000 at 18 UTC.
MDX WX1 MDF=4000 SORT=TIME 1
2. Contour the temperature advection from MD file 3020 over the Midwest at 15 UTC.
MDX T ADV MDF=3020 MAP=MID OUT=CON SORT=TIME 15
3. Plot T in degrees Fahrenheit for MD file 4050, for Wisconsin.
MDX T + MDF=4050 UNIT=F MAP=WI
MDX T COLOR=2
4. Plot the temperature from the current surface data for 15 UTC for a lat/lon box. The MD file is the last digit of the Julian day (if zero, MD=10); today is 97322 so use MD file 2.
MDX T MDF=2 LAT=30 50 LON=90 105 SORT=TIME 15
EG; MDX T SORT=TIME 15 TYPE 0 UNIT=C
5. Plot 1000-500 mb thickness over the USA, 12 UTC, MD file 1030, by entering the following command sequence.
MDX Z + SORT=P 500 TIME 12 MAP=USA MDF=1030 PREFIX=$
MDX CLEAR PREFIX=!
MDX Z + SORT=P 1000 TIME 12 MAP=USA MDF=1030 PREFIX=!
MDX PREFIX=$ - !
6. Grid the winds from MD files 2020 and 2045 for streamlines.
MDX STR + MDF=2020 PREFIX=$
MDX STR + MDF=2045 PREFIX=!
MDX PREFIX=$ : !
7. Use THAE, THA and MIX. It is easier to use the macros (SFCPLOT, RAOBPLOT, etc.) to display these derived parameters. When using MDX, an extra keyword, DERIVE, is necessary.
MDX MIX MDF=3 MAP=MID DERIVE=T TD PSL ZS SORT=TIME 17 DAY 92003 TYPE 0
8. Plot the grid points on the graphics for grid 10, grid file 6512, which contains temperature data.
MDX 10 SOU=GRID GRIDF=6512 MAP=MID UNIT=C
9. Plot the wind flags at the grid points for u grid 1 and v grid 2. When plotting wind flags, you cannot change the units.
MDX PLT 1 2 SOU=GRID PRO=SAT SORT=TIME 12
10. Plot parameters T and TD from MD file 4000 at 12 UTC over Wisconsin. Position the temperature above the dew points with the PLACE keyword. First, set it up with no plot.
MDX T TD + MDF=4000 SORT=TIME 12 MAP=WI PLACE=41 50
11. Plot the u- and v-component vectors on the graphics from grids 1 and 2. When plotting wind vectors, you cannot change the units.
MDX PLT 1 2 SOU=GRID DER=WNV MAP=MID
12. Plot the weather symbols for 18 UTC on day 97301.
MDX WX1 UNIT=SYMB MDF=1 MAP=MID SORT=TIME 18 TYPE 0 DAY 97301