[Met_help] [rt.rap.ucar.edu #96354] History for gen_vx_mask

John Halley Gotway via RT met_help at ucar.edu
Wed Aug 19 15:56:19 MDT 2020


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

Folks - I have a question regarding gen_vx_mask with -box option.

The documentation says:
Box (box) masking reads an input ASCII file containing Lat/Lon locations and draws a box around each
point. The height and width of the box is specified by the -height and -width command line options
in grid units. For a square, only one of -height or -width needs to be used.

However, it seems that the box is placed at the lower left corner of the Lat/Lon locations. Can you please confirm what's gen_vx_mask doing? Thanks.

Efren A. Serra (Contractor)
Physicist

DeVine Consulting, Inc.
Naval Research Laboratory
Marine Meteorology Division
7 Grace Hopper Ave., STOP 2
Monterey, CA 93943
Code 7542
Mobile: 408-425-5027



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

Subject: gen_vx_mask
From: John Halley Gotway
Time: Wed Aug 19 13:36:26 2020

Efren,

I see you have a question about running the gen_vx_mask tool using the
"-type box" option. With this option, gen_vx_mask reads the input
lat/lon's
and converts each to a grid x/y location. Here's the line where the
tool
calls the "get_xy_ll()" function to determine the lower-left corner of
the
box:

https://github.com/dtcenter/MET/blob/master_v9.1/met/src/tools/other/gen_vx_mask/gen_vx_mask.cc#L586

So that's based on the decimal grid x/y location of that lat/lon and
the
box width and height. And here's where that function is defined:

https://github.com/dtcenter/MET/blob/e1e3e81e85a6581743b81a59bc6d8a6f58e6ad58/met/src/basic/vx_util/interp_util.cc#L903

The drawing of that box is based on the "parity" of the height and
width...
where parity just means odd or even.

Please let me know if this code is behaving in a way you don't expect.
And
if so, please send along an example to illustrate.

Thanks,
John

On Wed, Aug 19, 2020 at 1:01 PM efren.serra.ctr at nrlmry.navy.mil via RT
<
met_help at ucar.edu> wrote:

>
> Wed Aug 19 13:01:46 2020: Request 96354 was acted upon.
> Transaction: Ticket created by efren.serra.ctr at nrlmry.navy.mil
>        Queue: met_help
>      Subject: gen_vx_mask
>        Owner: Nobody
>   Requestors: efren.serra.ctr at nrlmry.navy.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=96354 >
>
>
> Folks - I have a question regarding gen_vx_mask with -box option.
>
> The documentation says:
> Box (box) masking reads an input ASCII file containing Lat/Lon
locations
> and draws a box around each
> point. The height and width of the box is specified by the -height
and
> -width command line options
> in grid units. For a square, only one of -height or -width needs to
be
> used.
>
> However, it seems that the box is placed at the lower left corner of
the
> Lat/Lon locations. Can you please confirm what's gen_vx_mask doing?
Thanks.
>
> Efren A. Serra (Contractor)
> Physicist
>
> DeVine Consulting, Inc.
> Naval Research Laboratory
> Marine Meteorology Division
> 7 Grace Hopper Ave., STOP 2
> Monterey, CA 93943
> Code 7542
> Mobile: 408-425-5027
>
>
>

------------------------------------------------
Subject: RE: [rt.rap.ucar.edu #96354] gen_vx_mask
From: efren.serra.ctr at nrlmry.navy.mil
Time: Wed Aug 19 13:38:37 2020

John - Thanks for the quick response. I'm using MET v8.1; I hope your
explanation below still holds.

-----Original Message-----
From: John Halley Gotway via RT <met_help at ucar.edu>
Sent: Wednesday, August 19, 2020 12:36 PM
To: Serra, Mr. Efren, Contractor, Code 7531
<efren.serra.ctr at nrlmry.navy.mil>
Subject: Re: [rt.rap.ucar.edu #96354] gen_vx_mask

Efren,

I see you have a question about running the gen_vx_mask tool using the
"-type box" option. With this option, gen_vx_mask reads the input
lat/lon's and converts each to a grid x/y location. Here's the line
where the tool calls the "get_xy_ll()" function to determine the
lower-left corner of the
box:

https://github.com/dtcenter/MET/blob/master_v9.1/met/src/tools/other/gen_vx_mask/gen_vx_mask.cc#L586

So that's based on the decimal grid x/y location of that lat/lon and
the box width and height. And here's where that function is defined:

https://github.com/dtcenter/MET/blob/e1e3e81e85a6581743b81a59bc6d8a6f58e6ad58/met/src/basic/vx_util/interp_util.cc#L903

The drawing of that box is based on the "parity" of the height and
width...
where parity just means odd or even.

Please let me know if this code is behaving in a way you don't expect.
And if so, please send along an example to illustrate.

Thanks,
John

On Wed, Aug 19, 2020 at 1:01 PM efren.serra.ctr at nrlmry.navy.mil via RT
< met_help at ucar.edu> wrote:

>
> Wed Aug 19 13:01:46 2020: Request 96354 was acted upon.
> Transaction: Ticket created by efren.serra.ctr at nrlmry.navy.mil
>        Queue: met_help
>      Subject: gen_vx_mask
>        Owner: Nobody
>   Requestors: efren.serra.ctr at nrlmry.navy.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=96354
> >
>
>
> Folks - I have a question regarding gen_vx_mask with -box option.
>
> The documentation says:
> Box (box) masking reads an input ASCII file containing Lat/Lon
> locations and draws a box around each point. The height and width of
> the box is specified by the -height and -width command line options
in
> grid units. For a square, only one of -height or -width needs to be
> used.
>
> However, it seems that the box is placed at the lower left corner of
> the Lat/Lon locations. Can you please confirm what's gen_vx_mask
doing? Thanks.
>
> Efren A. Serra (Contractor)
> Physicist
>
> DeVine Consulting, Inc.
> Naval Research Laboratory
> Marine Meteorology Division
> 7 Grace Hopper Ave., STOP 2
> Monterey, CA 93943
> Code 7542
> Mobile: 408-425-5027
>
>
>



------------------------------------------------
Subject: RE: [rt.rap.ucar.edu #96354] gen_vx_mask
From: efren.serra.ctr at nrlmry.navy.mil
Time: Wed Aug 19 15:46:26 2020

John - I figured it out; the grid resolution are the "grid units."
Hence, if I want a 10 degree box around a storm center with a box mask
using a 1/4 degree resolution, I better specify -height of 40 to
gen_vx_mask, don't I?

-----Original Message-----
From: John Halley Gotway via RT <met_help at ucar.edu>
Sent: Wednesday, August 19, 2020 12:36 PM
To: Serra, Mr. Efren, Contractor, Code 7531
<efren.serra.ctr at nrlmry.navy.mil>
Subject: Re: [rt.rap.ucar.edu #96354] gen_vx_mask

Efren,

I see you have a question about running the gen_vx_mask tool using the
"-type box" option. With this option, gen_vx_mask reads the input
lat/lon's and converts each to a grid x/y location. Here's the line
where the tool calls the "get_xy_ll()" function to determine the
lower-left corner of the
box:

https://github.com/dtcenter/MET/blob/master_v9.1/met/src/tools/other/gen_vx_mask/gen_vx_mask.cc#L586

So that's based on the decimal grid x/y location of that lat/lon and
the box width and height. And here's where that function is defined:

https://github.com/dtcenter/MET/blob/e1e3e81e85a6581743b81a59bc6d8a6f58e6ad58/met/src/basic/vx_util/interp_util.cc#L903

The drawing of that box is based on the "parity" of the height and
width...
where parity just means odd or even.

Please let me know if this code is behaving in a way you don't expect.
And if so, please send along an example to illustrate.

Thanks,
John

On Wed, Aug 19, 2020 at 1:01 PM efren.serra.ctr at nrlmry.navy.mil via RT
< met_help at ucar.edu> wrote:

>
> Wed Aug 19 13:01:46 2020: Request 96354 was acted upon.
> Transaction: Ticket created by efren.serra.ctr at nrlmry.navy.mil
>        Queue: met_help
>      Subject: gen_vx_mask
>        Owner: Nobody
>   Requestors: efren.serra.ctr at nrlmry.navy.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=96354
> >
>
>
> Folks - I have a question regarding gen_vx_mask with -box option.
>
> The documentation says:
> Box (box) masking reads an input ASCII file containing Lat/Lon
> locations and draws a box around each point. The height and width of
> the box is specified by the -height and -width command line options
in
> grid units. For a square, only one of -height or -width needs to be
> used.
>
> However, it seems that the box is placed at the lower left corner of
> the Lat/Lon locations. Can you please confirm what's gen_vx_mask
doing? Thanks.
>
> Efren A. Serra (Contractor)
> Physicist
>
> DeVine Consulting, Inc.
> Naval Research Laboratory
> Marine Meteorology Division
> 7 Grace Hopper Ave., STOP 2
> Monterey, CA 93943
> Code 7542
> Mobile: 408-425-5027
>
>
>



------------------------------------------------
Subject: gen_vx_mask
From: John Halley Gotway
Time: Wed Aug 19 15:55:47 2020

Yes, makes sense to me. Glad you figured it out. I'll go ahead and
resolve
this ticket.

John

On Wed, Aug 19, 2020 at 3:46 PM efren.serra.ctr at nrlmry.navy.mil via RT
<
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=96354 >
>
> John - I figured it out; the grid resolution are the "grid units."
Hence,
> if I want a 10 degree box around a storm center with a box mask
using a 1/4
> degree resolution, I better specify -height of 40 to gen_vx_mask,
don't I?
>
> -----Original Message-----
> From: John Halley Gotway via RT <met_help at ucar.edu>
> Sent: Wednesday, August 19, 2020 12:36 PM
> To: Serra, Mr. Efren, Contractor, Code 7531 <
> efren.serra.ctr at nrlmry.navy.mil>
> Subject: Re: [rt.rap.ucar.edu #96354] gen_vx_mask
>
> Efren,
>
> I see you have a question about running the gen_vx_mask tool using
the
> "-type box" option. With this option, gen_vx_mask reads the input
lat/lon's
> and converts each to a grid x/y location. Here's the line where the
tool
> calls the "get_xy_ll()" function to determine the lower-left corner
of the
> box:
>
>
>
https://github.com/dtcenter/MET/blob/master_v9.1/met/src/tools/other/gen_vx_mask/gen_vx_mask.cc#L586
>
> So that's based on the decimal grid x/y location of that lat/lon and
the
> box width and height. And here's where that function is defined:
>
>
>
https://github.com/dtcenter/MET/blob/e1e3e81e85a6581743b81a59bc6d8a6f58e6ad58/met/src/basic/vx_util/interp_util.cc#L903
>
> The drawing of that box is based on the "parity" of the height and
width...
> where parity just means odd or even.
>
> Please let me know if this code is behaving in a way you don't
expect. And
> if so, please send along an example to illustrate.
>
> Thanks,
> John
>
> On Wed, Aug 19, 2020 at 1:01 PM efren.serra.ctr at nrlmry.navy.mil via
RT <
> met_help at ucar.edu> wrote:
>
> >
> > Wed Aug 19 13:01:46 2020: Request 96354 was acted upon.
> > Transaction: Ticket created by efren.serra.ctr at nrlmry.navy.mil
> >        Queue: met_help
> >      Subject: gen_vx_mask
> >        Owner: Nobody
> >   Requestors: efren.serra.ctr at nrlmry.navy.mil
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=96354
> > >
> >
> >
> > Folks - I have a question regarding gen_vx_mask with -box option.
> >
> > The documentation says:
> > Box (box) masking reads an input ASCII file containing Lat/Lon
> > locations and draws a box around each point. The height and width
of
> > the box is specified by the -height and -width command line
options in
> > grid units. For a square, only one of -height or -width needs to
be
> > used.
> >
> > However, it seems that the box is placed at the lower left corner
of
> > the Lat/Lon locations. Can you please confirm what's gen_vx_mask
doing?
> Thanks.
> >
> > Efren A. Serra (Contractor)
> > Physicist
> >
> > DeVine Consulting, Inc.
> > Naval Research Laboratory
> > Marine Meteorology Division
> > 7 Grace Hopper Ave., STOP 2
> > Monterey, CA 93943
> > Code 7542
> > Mobile: 408-425-5027
> >
> >
> >
>
>
>
>

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


More information about the Met_help mailing list