[Met_help] [rt.rap.ucar.edu #91500] History for Union of masks in gen_vx_mask

John Halley Gotway via RT met_help at ucar.edu
Tue Sep 3 09:36:42 MDT 2019


----------------------------------------------------------------
  Initial Request
----------------------------------------------------------------

Is there a way to create the union of multiple masking regions (NPL + SPL = Plains) when running gen_vx_mask?

----------------------------------------------------------------
  Complete Ticket History
----------------------------------------------------------------

Subject: Union of masks in gen_vx_mask
From: John Halley Gotway
Time: Tue Aug 13 11:42:27 2019

Hi Logan,

I saw that you were looking for an example of creating a masking
region as the union of two other regions, and I created a met-help
ticket for the response.

This is actually very easy to do.  To combine multiple masks together,
you can run the gen_vx_mask tool multiple times, passing the output
from one run as the input for the next run.

The following two commands compute the union of the NPL and SPL poly
masks:

#
# sample_G212.grib is a GRIB file on grid #212
#
/usr/local/met-8.1/bin/gen_vx_mask \
sample_G212.grib \
/usr/local/met-8.1/share/met/poly/NPL.poly \
G212_NPL.nc

#
# pass the output of the previous run as input to the next run
#
/usr/local/met-8.1/bin/gen_vx_mask \
G212_NPL.nc \
/usr/local/met-8.1/share/met/poly/SPL.poly \
G212_NPL_and_SPL.nc

By default, when you pass gen_vx_mask it's own output, it knows to
read that input data and compute the union of the previous mask with
the current mask.  But there's lot of options here with the -union,
-intersection, -symdiff, and -value command line options.

Hope that helps clarify.

Thanks,
John

------------------------------------------------


More information about the Met_help mailing list