MET Practical Sessions, January 2012

Gen-Poly-Mask Tool: General

Gen-Poly-Mask Functionality

The Gen-Poly-Mask tool is a small utility which may be run to speed up the execution time of the other MET tools. You may use Gen-Poly-Mask to define a bitmap masking region for your domain. It takes as input a gridded data file defining your domain and an ASCII lat/lon polyline file defining a masking region. It writes out a NetCDF file containing a bitmap for that masking region.

You can then use the output of Gen-Poly-Mask to define masking regions in the Point-Stat, Grid-Stat, Ensemble-Stat, and MODE tools. While those tools can also read the ASCII lat/lon polyline directly, they are able to process the output of Gen-Poly-Mask much more quickly than the original polyline. The idea is to define your masking region once with Gen-Poly-Mask and apply the output many times in Point-Stat, Grid-Stat, Ensemble-Stat, and MODE.

Gen-Poly-Mask Usage

View the usage statement for Gen-Poly-Mask by simply typing the following:

    bin/gen_poly_mask
Usage: gen_poly_mask  
  data_file Gridded file in either GRIB or NetCDF format
  mask_poly ASCII Lat/Lon polyline file
  netcdf_file Output NetCDF mask file to be written
  [-rec i] GRIB record number to use
  [-log file] Outputs log messages to the specified file
  [-v level] Level of logging

At a minimum, the input data_file, the input mask_poly polyline file, and the output netcdf_file must be passed on the command line.