Skip to content

Commit

Permalink
Per #1060, working with @DanielAdriaansen to provide a lat/lon polyli…
Browse files Browse the repository at this point in the history
…ne file example and then update gen_vx_mask to point to that example.
  • Loading branch information
JohnHalleyGotway committed May 5, 2023
1 parent 6abfcc3 commit cc69435
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 17 deletions.
45 changes: 29 additions & 16 deletions docs/Users_Guide/config_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,8 @@ Point-Stat and Ensemble-Stat, the reference time is the forecast valid time.
end = 5400;
}
.. _config_options-mask:

mask
^^^^

Expand All @@ -1566,21 +1568,32 @@ in the following ways:
NetCDF output of the Gen-Vx-Mask tool.

* An ASCII file containing a lat/lon polygon.
Latitude in degrees north and longitude in degrees east.
The first and last polygon points are connected.
For example, "MET_BASE/poly/EAST.poly" which consists of n points:
"poly_name lat1 lon1 lat2 lon2... latn lonn"

Several masking polygons used by NCEP are predefined in the
installed *share/met/poly* directory. Creating a new polygon is as
simple as creating a text file with a name for the polygon followed
by the lat/lon points which define its boundary. Adding a new masking
polygon requires no code changes and no recompiling. Internally, the
lat/lon polygon points are converted into x/y values in the grid. The
lat/lon values for the observation points are also converted into x/y
grid coordinates. The computations performed to check whether the
observation point falls within the polygon defined is done in x/y
grid space.

* The file must contain a name for the region followed by the latitude
(degrees north) and longitude (degrees east) for each vertex of the boundary.
The values are separated by whitespace (e.g. spaces or newlines), and the
first and last polygon points are connected.
The general form is "poly_name lat1 lon1 lat2 lon2... latn lonn".
Here is an example of a rectangle consisting of 4 points:

.. code-block:: none
RECTANGLE
25 -120
55 -120
55 -70
25 -70
Several masking polygons used by NCEP are predefined in the
installed *share/met/poly* directory. Creating a new polygon is as
simple as creating a text file with a name for the polygon followed
by the lat/lon points which define its boundary. Adding a new masking
polygon requires no code changes and no recompiling. Internally, the
lat/lon polygon points are converted into x/y values in the grid. The
lat/lon values for the observation points are also converted into x/y
grid coordinates. The computations performed to check whether the
observation point falls within the polygon defined is done in x/y
grid space.

* The NetCDF output of the gen_vx_mask tool.

Expand All @@ -1591,7 +1604,7 @@ in the following ways:
applied, any grid point where the resulting field is 0, the mask is
turned off. Any grid point where it is non-zero, the mask is turned
on.
For example, "sample.grib {name = \"TMP\"; level = \"Z2\";} >273"
For example, "sample.grib {name = \"TMP\"; level = \"Z2\";} >273"

* The "sid" entry is an array of strings which define groups of
observation station ID's over which to compute statistics. Each entry
Expand Down
2 changes: 1 addition & 1 deletion docs/Users_Guide/masking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Required arguments for gen_vx_mask

2. The **mask_file** argument defines the masking information, see below.

• For "poly", "poly_xy", "box", "circle", and "track" masking, specify an ASCII Lat/Lon file.
• For "poly", "poly_xy", "box", "circle", and "track" masking, specify an ASCII Lat/Lon file (see "mask.poly" in :numref:`config_options-mask`).

• For "grid" and "data" masking, specify a gridded data file.

Expand Down

0 comments on commit cc69435

Please sign in to comment.