Output

Output griggs Wed, 04/24/2019 - 16:02

Display the output PostScript files we just generated by running the following commands:

gv $MET_TUTORIAL_DATA/output/point_stat/nam.t00z.awip1236.tm00.20070330_TMPZ2.ps &
gv $MET_TUTORIAL_DATA/output/plot_data_plane/rtma_2012051712_F000.ps &
gv $MET_TUTORIAL_DATA/output/pcp_combine/sample_fcst_24L_2005080800V_12A.ps &
gv $MET_TUTORIAL_DATA/output/series_analysis/series_analysis_2005080700_2005080800_3A_RMSE.ps &

Customizing Plots

The Plot-Data-Plane tool is intended to provide a quick-look at your data, not a full-featured plotting interface. However, there are a few options:

  • The -color_table option overrides the default color table. Look in $MET_BASE/colortables for other color tables or copy one and create your own.
  • The -plot_range option manually sets the plotting range. When color tables specify a range of plotting values as [0, 1], they are automatically rescaled to the min/max values in the dataset. This option manually overrides that min/max plotting scale.
  • The -title option adds a title to the plot.
  • The background map data is specified by the contents of $MET_BASE/config/ConfigMapData. That configuration file specifies the map data files, line colors, line widths, and line types to be plotted. Changes to that file affect all spatial plots generated by the MET tools, including Plot-Data-Plane.

Re-run the plot from the previous page, but specify the color table, plotting limits and title:

plot_data_plane \
$MET_TUTORIAL_DATA/input/sample_fcst/2007033000/nam.t00z.awip1236.tm00.20070330.grb \
$MET_TUTORIAL_DATA/output/point_stat/nam.t00z.awip1236.tm00.20070330_TMPZ2.ps \
'name="TMP"; level="Z2";' \
-color_table $MET_BASE/colortables/NCL_colortables/BlueRed.ctable \
-plot_range 253 293 \
-title "2-m Temperature"

Display the resulting image:

gv $MET_TUTORIAL_DATA/output/point_stat/nam.t00z.awip1236.tm00.20070330_TMPZ2.ps &

The ConfigConstants file can be found in both the data/config and $MET_BASE/config directories. At runtime, the MET tools read all the static data files from the share directory which was generated by running make install. Define the MET_BASE environment variable to point the MET tools to a different location for these static data files.

Image File Conversion

PostScript images are rather large compared to bitmap image formats, such as PNG and GIF. If available on your system, the ImageMagick convert tool provides quick and easy image file conversions. For example, let's convert a PostScript file to PNG format:

convert -rotate 90 -background white -flatten \
$MET_TUTORIAL_DATA/output/point_stat/nam.t00z.awip1236.tm00.20070330_TMPZ2.ps \
$MET_TUTORIAL_DATA/output/point_stat/nam.t00z.awip1236.tm00.20070330_TMPZ2.png

Display the resulting image by opening it in a web browser or by running the ImageMagick display tool:

display $MET_TUTORIAL_DATA/output/point_stat/nam.t00z.awip1236.tm00.20070330_TMPZ2.png &