PlotPointObs: Basic Use Case

met_tool_wrapper/PlotPointObs/PlotPointObs.conf

Scientific Objective

Generate a postscript image to plot point observations using a gridded file to define the domain to plot the points.

Datasets

Point Observations: NetCDF generated by PB2NC and ASCII2NC
Grid: GRIB2 NAM
Location: All of the input data required for this use case can be found in the met_test sample data tarball. Click here to the METplus releases page and download sample data for the appropriate release: https://github.com/dtcenter/METplus/releases
This tarball should be unpacked into the directory that you will set the value of INPUT_BASE. See ‘Running METplus’ section for more information.
Data Source: NAM and NDAS

METplus Components

This use case utilizes the METplus PlotPointObs wrapper to generate a command to run the MET tool plot_point_obs if all required files are found.

METplus Workflow

PlotPointObs is the only tool called in this example. It processes the following run time:

Valid: 2012-04-09 12Z
Forecast lead: 12 hour

METplus Configuration

METplus first loads the default configuration file found in parm/metplus_config, then it loads any configuration files passed to METplus via the command line: parm/use_cases/met_tool_wrapper/PlotPointObs/PlotPointObs.conf

[config]


# Documentation for this use case can be found at
# https://metplus.readthedocs.io/en/latest/generated/met_tool_wrapper/PlotPointObs/PlotPointObs.html

# For additional information, please see the METplus Users Guide.
# https://metplus.readthedocs.io/en/latest/Users_Guide

###
# Processes to run
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#process-list
###

PROCESS_LIST = PlotPointObs


###
# Time Info
# LOOP_BY options are INIT, VALID, RETRO, and REALTIME
# If set to INIT or RETRO:
#   INIT_TIME_FMT, INIT_BEG, INIT_END, and INIT_INCREMENT must also be set
# If set to VALID or REALTIME:
#   VALID_TIME_FMT, VALID_BEG, VALID_END, and VALID_INCREMENT must also be set
# LEAD_SEQ is the list of forecast leads to process
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#timing-control
###

PLOT_POINT_OBS_RUNTIME_FREQ = RUN_ONCE_FOR_EACH

LOOP_BY = VALID
VALID_TIME_FMT = %Y%m%d%H
VALID_BEG = 2012040912
VALID_END = 2012040912
VALID_INCREMENT = 1M

LEAD_SEQ = 12H


###
# File I/O
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info
###

PLOT_POINT_OBS_INPUT_DIR = {INPUT_BASE}/met_test/new/test_out
PLOT_POINT_OBS_INPUT_TEMPLATE =
   pb2nc/ndas.{valid?fmt=%Y%m%d}.t{valid?fmt=%H}z.prepbufr.tm00.nc,
   ascii2nc/trmm_{valid?fmt=%Y%m%d%H}_3hr.nc

PLOT_POINT_OBS_GRID_INPUT_DIR = {INPUT_BASE}/met_test/new/model_data/grib2/nam
PLOT_POINT_OBS_GRID_INPUT_TEMPLATE = nam_{init?fmt=%Y%m%d%H}_F{lead?fmt=%3H}.grib2

PLOT_POINT_OBS_OUTPUT_DIR = {OUTPUT_BASE}/plot_point_obs
PLOT_POINT_OBS_OUTPUT_TEMPLATE = nam_and_ndas.{valid?fmt=%Y%m%d}.t{valid?fmt=%H}z.prepbufr_CONFIG.ps

#PLOT_POINT_OBS_SKIP_IF_OUTPUT_EXISTS = False


###
# PlotPointObs Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#plotpointobs
###

PLOT_POINT_OBS_TITLE = NAM {init?fmt=%Y%m%d%H} F{lead?fmt=%2H} vs NDAS 500mb RH and TRMM 3h > 0

#PLOT_POINT_OBS_CONFIG_FILE = {PARM_BASE}/met_config/PlotPointObsConfig_wrapped

#LOG_PLOT_POINT_OBS_VERBOSITY = 2

PLOT_POINT_OBS_GRID_DATA_FIELD = { name = "RH"; level = "P500"; }
PLOT_POINT_OBS_GRID_DATA_REGRID_TO_GRID = NONE
#PLOT_POINT_OBS_GRID_DATA_REGRID_METHOD =
#PLOT_POINT_OBS_GRID_DATA_REGRID_WIDTH =
#PLOT_POINT_OBS_GRID_DATA_REGRID_VLD_THRESH =
#PLOT_POINT_OBS_GRID_DATA_REGRID_SHAPE =
PLOT_POINT_OBS_GRID_DATA_GRID_PLOT_INFO_COLOR_TABLE = MET_BASE/colortables/NCL_colortables/BlueGreen14.ctable
#PLOT_POINT_OBS_GRID_DATA_GRID_PLOT_INFO_PLOT_MIN =
PLOT_POINT_OBS_GRID_DATA_GRID_PLOT_INFO_PLOT_MAX = 100.0
#PLOT_POINT_OBS_GRID_DATA_GRID_PLOT_INFO_COLORBAR_FLAG =

#PLOT_POINT_OBS_MSG_TYP =
#PLOT_POINT_OBS_SID_INC =
#PLOT_POINT_OBS_SID_EXC =
#PLOT_POINT_OBS_OBS_VAR =
#PLOT_POINT_OBS_OBS_GC =
#PLOT_POINT_OBS_OBS_QUALITY =
#PLOT_POINT_OBS_VALID_BEG =
#PLOT_POINT_OBS_VALID_END =
#PLOT_POINT_OBS_LAT_THRESH =
#PLOT_POINT_OBS_LON_THRESH =
#PLOT_POINT_OBS_ELV_THRESH =
#PLOT_POINT_OBS_HGT_THRESH =
#PLOT_POINT_OBS_PRS_THRESH =
#PLOT_POINT_OBS_OBS_THRESH =
#PLOT_POINT_OBS_CENSOR_THRESH =
#PLOT_POINT_OBS_CENSOR_VAL =
#PLOT_POINT_OBS_DOTSIZE =
#PLOT_POINT_OBS_LINE_COLOR =
#PLOT_POINT_OBS_LINE_WIDTH =
#PLOT_POINT_OBS_FILL_COLOR =

#PLOT_POINT_OBS_FILL_PLOT_INFO_FLAG =
#PLOT_POINT_OBS_FILL_PLOT_INFO_COLOR_TABLE =
#PLOT_POINT_OBS_FILL_PLOT_INFO_PLOT_MIN =
#PLOT_POINT_OBS_FILL_PLOT_INFO_PLOT_MAX =
#PLOT_POINT_OBS_FILL_PLOT_INFO_COLORBAR_FLAG =

PLOT_POINT_OBS_POINT_DATA =
  {
    msg_typ = "ADPSFC";
    obs_gc = 61;
    obs_thresh = > 0.0;
    fill_color = [0, 0, 255];
  },
  {
    msg_typ = "ADPSFC";
    obs_var = "RH";
    fill_color = [100, 100, 100];
  },
  {
    msg_typ = "ADPUPA";
    obs_var = "RH";
    prs_thresh = == 500;
    dotsize(x) = 7.5;
    line_color = [0, 0, 0];
    fill_plot_info = {
      flag = TRUE;
      color_table = "MET_BASE/colortables/NCL_colortables/BlueGreen14.ctable";
      plot_min = 0.0;
      plot_max = 100.0;
      colorbar_flag = FALSE;
    }
  }

MET Configuration

METplus sets environment variables based on user settings in the METplus configuration file. See How METplus controls MET config file settings for more details.

YOU SHOULD NOT SET ANY OF THESE ENVIRONMENT VARIABLES YOURSELF! THEY WILL BE OVERWRITTEN BY METPLUS WHEN IT CALLS THE MET TOOLS!

If there is a setting in the MET configuration file that is currently not supported by METplus you’d like to control, please refer to: Overriding Unsupported MET config file settings

Note

See the PlotPointObs MET Configuration section of the User’s Guide for more information on the environment variables used in the file below:

////////////////////////////////////////////////////////////////////////////////
//
// Plot-Point-Obs configuration file.
//
// For additional information, please see the MET Users Guide.
//
////////////////////////////////////////////////////////////////////////////////

// Gridded data plotting options

//grid_data = {
${METPLUS_GRID_DATA_DICT}

////////////////////////////////////////////////////////////////////////////////

// Point data filtering options
// May be set separately in each "point_data" entry

//msg_typ =
${METPLUS_MSG_TYP}

//sid_inc =
${METPLUS_SID_INC}

//sid_exc =
${METPLUS_SID_EXC}

//obs_var =
${METPLUS_OBS_VAR}

//obs_gc =
${METPLUS_OBS_GC}

//obs_quality =
${METPLUS_OBS_QUALITY}

//valid_beg =
${METPLUS_VALID_BEG}

//valid_end =
${METPLUS_VALID_END}

//lat_thresh =
${METPLUS_LAT_THRESH}

//lon_thresh =
${METPLUS_LON_THRESH}

//elv_thresh =
${METPLUS_ELV_THRESH}

//hgt_thresh =
${METPLUS_HGT_THRESH}

//prs_thresh =
${METPLUS_PRS_THRESH}

//obs_thresh =
${METPLUS_OBS_THRESH}

// Point data pre-processing options
// May be set separately in each "point_data" entry

//convert(x)    = x;

//censor_thresh =
${METPLUS_CENSOR_THRESH}

//censor_val =
${METPLUS_CENSOR_VAL}


// Point data plotting options
// May be set separately in each "point_data" entry

//dotsize =
${METPLUS_DOTSIZE}

//line_color =
${METPLUS_LINE_COLOR}

//line_width =
${METPLUS_LINE_WIDTH}

//fill_color =
${METPLUS_FILL_COLOR}

//fill_plot_info = {
${METPLUS_FILL_PLOT_INFO_DICT}

// Array of point data filtering, pre-processing, and plotting options
//point_data =
${METPLUS_POINT_DATA}

tmp_dir = "${MET_TMP_DIR}";

////////////////////////////////////////////////////////////////////////////////

${METPLUS_MET_CONFIG_OVERRIDES}

Running METplus

Pass the use case configuration file to the run_metplus.py script along with any user-specific system configuration files if desired:

run_metplus.py /path/to/METplus/parm/use_cases/met_tool_wrapper/PlotPointObs/PlotPointObs.conf /path/to/user_system.conf

See Running METplus for more information.

Expected Output

A successful run will output the following both to the screen and to the logfile:

INFO: METplus has successfully finished running.

Refer to the value set for OUTPUT_BASE to find where the output data was generated. Output for this use case will be found in plot_point_obs (relative to OUTPUT_BASE) and will contain the following file:

  • nam_and_ndas.20120409.t12z.prepbufr_CONFIG.ps

Keywords

Note

  • PlotPointObsToolUseCase

  • GRIBFileUseCase

  • NetCDFFileUseCase

Navigate to the METplus Quick Search for Use Cases page to discover other similar use cases.

sphinx_gallery_thumbnail_path = ‘_static/met_tool_wrapper-PlotPointObs.png’

Total running time of the script: (0 minutes 0.000 seconds)

Gallery generated by Sphinx-Gallery