5.1.16.1. Point2Grid: Basic Use Case

met_tool_wrapper/Point2Grid/Point2Grid.conf

Scientific Objective

Putting point observations onto a grid for use with other tools.

Datasets

Observations: Stage 2 NetCDF 1-hour Precipitation Accumulation
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.

METplus Components

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

METplus Workflow

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

Init: 2017-06-01_0Z

This use case puts point observations onto a specified grid

METplus Configuration

METplus first loads all of the configuration files found in parm/metplus_config, then it loads any configuration files passed to METplus via the command line with the -c option, i.e. -c parm/use_cases/met_tool_wrapper/Point2Grid/Point2Grid.conf

[config]
## Configuration-related settings such as the process list, begin and end times, etc.

# List of applications to run - only Point2Grid for this case
PROCESS_LIST = Point2Grid 

# time looping - 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
LOOP_BY = INIT

# Format of VALID_BEG and VALID_END using % items
# %Y = 4 digit year, %m = 2 digit month, %d = 2 digit day, etc.
# see www.strftime.org for more information
# %Y%m%d%H expands to YYYYMMDDHH
INIT_TIME_FMT = %Y%m%d%H

# Start time for METplus run - must match INIT_TIME_FMT
INIT_BEG = 2017060100

# End time for METplus run - must match INIT_TIME_FMT
INIT_END = 2017060300

# Increment between METplus runs (in seconds if no units are specified)
#  Must be >= 60 seconds
INIT_INCREMENT = 24H

# List of forecast leads to process for each run time (init or valid)
# If unset, defaults to 0 (don't loop through forecast leads
LEAD_SEQ = 12H

# Order of loops to process data - Options are times, processes
# Not relevant if only one item is in the PROCESS_LIST
# times = run all wrappers in the PROCESS_LIST for a single run time, then
#   increment the run time and run all wrappers again until all times have
#   been evaluated.
# processes = run the first wrapper in the PROCESS_LIST for all times
#   specified, then repeat for the next item in the PROCESS_LIST until all
#   wrappers have been run
LOOP_ORDER = times

# Verbosity of MET output - overrides LOG_VERBOSITY for Point2Grid only
# This has shown to be a bad idea because it takes precedence over LOG_MET_VERBOSITY/LOG_VERBOSIT
# LOG_POINT2GRID_VERBOSITY = 1

# Time relative to valid time (in seconds if no units are specified) to allow files to be considered
#  valid. Set both BEGIN and END to 0 to require the exact time in the filename
#  Not used in this example.
POINT2GRID_FILE_WINDOW_BEGIN = 0
POINT2GRID_FILE_WINDOW_END = 0

# Value to pass with the -to_grid See MET User's Guide for more information
POINT2GRID_REGRID_TO_GRID = G212

# Value to pass with the -field string. See MET User's Guide for more information
# FIELD and LEVEL both end up in the -field string
POINT2GRID_INPUT_FIELD =TMP
POINT2GRID_INPUT_LEVEL =

# Value to pass with the -qc argument
POINT2GRID_QC_FLAGS = 0

# Value to pass with the -adp argument - This is a file name with GOES Aerosol Detection Product data 
POINT2GRID_ADP =

# Value to pass with the -method argumen - Default is UW_MEAN, other examples are
POINT2GRID_REGRID_METHOD = MAX 

# Value to pass with the -gaussian-dx argument - Distance interval for gaussian smoothing
# Default is 81.271
POINT2GRID_GAUSSIAN_DX = 81.271

# Value to pass with the -gaussian-radius argument - radius of influence for the gaussian smoothing
# Default is 120
POINT2GRID_GAUSSIAN_RADIUS = 120 

# Value to pass with the -prob_cat_thresh argument - threshold for probability of occurrence
POINT2GRID_PROB_CAT_THRESH =

# Value to pass with the -vld_thresh argument - threshold for percentage of valid data .5 default 
POINT2GRID_VLD_THRESH = 

# End of [config] section and start of [dir] section
[dir]

# Input/Output directories can be left empty if the corresponding template contains the full path to the files
POINT2GRID_INPUT_DIR = 

POINT2GRID_OUTPUT_DIR =

# End of [dir] section and start of [filename_templates] section
[filename_templates]

# Template to look for input to Point2Grid relative to POINT2GRID_INPUT_DIR
POINT2GRID_INPUT_TEMPLATE = {INPUT_BASE}/met_test/data/sample_obs/prepbufr/sample_pb.nc

# Template to use to write output from Point2Grid
POINT2GRID_OUTPUT_TEMPLATE = {OUTPUT_BASE}/met_tool_wrapper/Point2Grid/grid.{init?fmt=%Y%d%H}.nc

MET Configuration

None. Point2Grid does not use configuration files.

Running METplus

This use case can be run two ways:

  1. Passing in Point2Grid.conf then a user-specific system configuration file:

    run_metplus.py -c /path/to/METplus/parm/use_cases/met_tool_wrapper/Point2Grid/Point2Grid.conf -c /path/to/user_system.conf
    
  2. Modifying the configurations in parm/metplus_config, then passing in Point2Grid.conf:

    run_metplus.py -c /path/to/METplus/parm/use_cases/met_tool_wrapper/Point2Grid/Point2Grid.conf
    

The former method is recommended. Whether you add them to a user-specific configuration file or modify the metplus_config files, the following variables must be set correctly:

  • INPUT_BASE - Path to directory where sample data tarballs are unpacked (See Datasets section to obtain tarballs). This is not required to run METplus, but it is required to run the examples in parm/use_cases

  • OUTPUT_BASE - Path where METplus output will be written. This must be in a location where you have write permissions

  • MET_INSTALL_DIR - Path to location where MET is installed locally

Example User Configuration File:

[dir]
INPUT_BASE = /path/to/sample/input/data
OUTPUT_BASE = /path/to/output/dir
MET_INSTALL_DIR = /path/to/met-X.Y

NOTE: All of these items must be found under the [dir] section.

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 point2grid (relative to OUTPUT_BASE) and will contain the following files:

  • grid.20170100.nc

  • grid.20170200.nc

  • grid.20170300.nc

Keywords

sphinx_gallery_thumbnail_path = ‘_static/met_tool_wrapper-Point2Grid.png’

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

Gallery generated by Sphinx-Gallery