[Met_help] [rt.rap.ucar.edu #86545] History for POLY file question

John Halley Gotway via RT met_help at ucar.edu
Fri Aug 10 09:42:46 MDT 2018


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

Hi,

I have global forecast and observation grids that I'm mapping to a common regrid domain, since they are different grid resolutions.

The forecast grid:

85:4125548:vt=2018080812:mean sea level:12 hour fcst:var discipline=0 master_table=2 parmcat=3 parm=1:ENS=+1
    ndata=65160:undef=0:mean=101118:min=94916.5:max=105411
    grid_template=0:winds(N/S):
        lat-lon grid:(360 x 181) units 1e-06 input WE:NS output WE:SN res 48
        lat 90.000000 to -90.000000 by 1.000000
        lon 0.000000 to 359.000000 by 1.000000 #points=65160

The observation grid:

724:325143763:vt=2018080812:mean sea level:anl:var discipline=0 master_table=14 parmcat=3 parm=1:
    ndata=1038240:undef=0:mean=100911:min=94271.8:max=104086
    grid_template=0:winds(N/S):
        lat-lon grid:(1440 x 721) units 1e-06 input WE:SN output WE:SN res 48
        lat -90.000000 to 90.000000 by 0.250000
        lon 0.000000 to 359.750000 by 0.250000 #points=1038240

I regrid to the forecast grid that's a one degree resolution:

   to_grid    = FCST;

When I run grid_stat on the full domain I get the correct number of points:

Processing PRMSL/A0 versus PRMSL/A0, for interpolation method NEAREST(1), over region FULL, using 65160 pairs.

But when I use a northern hemisphere POLY file I created:

NHEM
0.00000 -180.00000
0.00000 179.00000
89.00000 179.00000
89.00000 -180.00000
0.00000 -180.00000

Rather than getting half of the grid, 32580 pairs, instead I get:

Processing PRMSL/A0 versus PRMSL/A0, for interpolation method NEAREST(1), over region NHEM, using 88 pairs.

I used 89 as the top latitude because I got "too close to the pole" errors with a setting of latitude 89.5 or higher.

I've tried a bunch of different settings but none of them seem to work.  I can't figure out if the 0 to 359 longitude in the GriB2 headers are the reason why -180 to 179 fail.

I tried a second time with:

NHEM
0.00000 0.00000
0.00000 359.00000
89.00000 359.00000
89.00000 0.00000
0.00000 0.00000

And the result was:

Processing PRMSL/A0 versus PRMSL/A0, for interpolation method NEAREST(1), over region NHEM, using 176 pairs.

What are the correct settings to get the Northern Hemisphere subset?

Thanks,
Matt

Matthew C. Sittel, Meteorologist
University Corporation for Atmospheric Research
Matthew.Sittel.ctr at us.af.mil





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

Subject: POLY file question
From: John Halley Gotway
Time: Thu Aug 09 13:56:17 2018

Hi Matt,

Defining a lat/lon polyline file for a global domain does not work
well in
MET.  Once a polyline covers more than 1/2 the globe it isn't well-
defined
what's "inside" the mask versus what's "outside" the mask.  We have an
open
development ticket for Randy Bullock to look more closely at defining
polyline masks for global grids, but that doesn't help you now.

The preferable solution is using a feature we added to the gen_vx_mask
utility to define thresholds for the latitude and longitude values
directly.  And this functionality does existing in met-6.1, which is
what I
believe you are using.

Pick a gridded data file that already lives on your verification
domain
(lets call it fcst.grb2), and run it through gen_vx_mask like this:

   gen_vx_mask fcst.grb2 fcst.grb2 NHEM_mask.nc -type lat -thresh ge0

This reads the latitudes from the grid on which the in.grb2 data
lives.
Any grid points with latitude >= 0 are included in the mask.

In your Grid-Stat config file, replace your reference to the lat/lon
polyline file with the path to this output from gen_vx_mask.

Hope that does the trick.

Thanks,
John

On Thu, Aug 9, 2018 at 1:45 PM SITTEL, MATTHEW C CTR USAF AFWA 16
WS/WXN
via RT <met_help at ucar.edu> wrote:

>
> Thu Aug 09 13:45:50 2018: Request 86545 was acted upon.
> Transaction: Ticket created by matthew.sittel.ctr at us.af.mil
>        Queue: met_help
>      Subject: POLY file question
>        Owner: Nobody
>   Requestors: matthew.sittel.ctr at us.af.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545 >
>
>
> Hi,
>
> I have global forecast and observation grids that I'm mapping to a
common
> regrid domain, since they are different grid resolutions.
>
> The forecast grid:
>
> 85:4125548:vt=2018080812:mean sea level:12 hour fcst:var
discipline=0
> master_table=2 parmcat=3 parm=1:ENS=+1
>     ndata=65160:undef=0:mean=101118:min=94916.5:max=105411
>     grid_template=0:winds(N/S):
>         lat-lon grid:(360 x 181) units 1e-06 input WE:NS output
WE:SN res
> 48
>         lat 90.000000 to -90.000000 by 1.000000
>         lon 0.000000 to 359.000000 by 1.000000 #points=65160
>
> The observation grid:
>
> 724:325143763:vt=2018080812:mean sea level:anl:var discipline=0
> master_table=14 parmcat=3 parm=1:
>     ndata=1038240:undef=0:mean=100911:min=94271.8:max=104086
>     grid_template=0:winds(N/S):
>         lat-lon grid:(1440 x 721) units 1e-06 input WE:SN output
WE:SN res
> 48
>         lat -90.000000 to 90.000000 by 0.250000
>         lon 0.000000 to 359.750000 by 0.250000 #points=1038240
>
> I regrid to the forecast grid that's a one degree resolution:
>
>    to_grid    = FCST;
>
> When I run grid_stat on the full domain I get the correct number of
points:
>
> Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
NEAREST(1),
> over region FULL, using 65160 pairs.
>
> But when I use a northern hemisphere POLY file I created:
>
> NHEM
> 0.00000 -180.00000
> 0.00000 179.00000
> 89.00000 179.00000
> 89.00000 -180.00000
> 0.00000 -180.00000
>
> Rather than getting half of the grid, 32580 pairs, instead I get:
>
> Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
NEAREST(1),
> over region NHEM, using 88 pairs.
>
> I used 89 as the top latitude because I got "too close to the pole"
errors
> with a setting of latitude 89.5 or higher.
>
> I've tried a bunch of different settings but none of them seem to
work.  I
> can't figure out if the 0 to 359 longitude in the GriB2 headers are
the
> reason why -180 to 179 fail.
>
> I tried a second time with:
>
> NHEM
> 0.00000 0.00000
> 0.00000 359.00000
> 89.00000 359.00000
> 89.00000 0.00000
> 0.00000 0.00000
>
> And the result was:
>
> Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
NEAREST(1),
> over region NHEM, using 176 pairs.
>
> What are the correct settings to get the Northern Hemisphere subset?
>
> Thanks,
> Matt
>
> Matthew C. Sittel, Meteorologist
> University Corporation for Atmospheric Research
> Matthew.Sittel.ctr at us.af.mil
>
>
>
>
>

------------------------------------------------
Subject: RE: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file question
From: SITTEL, MATTHEW C CTR USAF AFWA 16 WS/WXN
Time: Thu Aug 09 14:09:05 2018

It appears to have worked.  Now, how would I get just the 20S to 20N
band?  I tried putting in multiple thresholds "-thresh le20 -thresh
ge-20" and that didn't work.

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Thursday, August 9, 2018 2:56 PM
To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL
<matthew.sittel.ctr at us.af.mil>
Subject: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
question

Hi Matt,

Defining a lat/lon polyline file for a global domain does not work
well in MET.  Once a polyline covers more than 1/2 the globe it isn't
well-defined what's "inside" the mask versus what's "outside" the
mask.  We have an open development ticket for Randy Bullock to look
more closely at defining polyline masks for global grids, but that
doesn't help you now.

The preferable solution is using a feature we added to the gen_vx_mask
utility to define thresholds for the latitude and longitude values
directly.  And this functionality does existing in met-6.1, which is
what I believe you are using.

Pick a gridded data file that already lives on your verification
domain (lets call it fcst.grb2), and run it through gen_vx_mask like
this:

   gen_vx_mask fcst.grb2 fcst.grb2 NHEM_mask.nc -type lat -thresh ge0

This reads the latitudes from the grid on which the in.grb2 data
lives.
Any grid points with latitude >= 0 are included in the mask.

In your Grid-Stat config file, replace your reference to the lat/lon
polyline file with the path to this output from gen_vx_mask.

Hope that does the trick.

Thanks,
John

On Thu, Aug 9, 2018 at 1:45 PM SITTEL, MATTHEW C CTR USAF AFWA 16
WS/WXN via RT <met_help at ucar.edu> wrote:

>
> Thu Aug 09 13:45:50 2018: Request 86545 was acted upon.
> Transaction: Ticket created by matthew.sittel.ctr at us.af.mil
>        Queue: met_help
>      Subject: POLY file question
>        Owner: Nobody
>   Requestors: matthew.sittel.ctr at us.af.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545
> >
>
>
> Hi,
>
> I have global forecast and observation grids that I'm mapping to a
> common regrid domain, since they are different grid resolutions.
>
> The forecast grid:
>
> 85:4125548:vt=2018080812:mean sea level:12 hour fcst:var
discipline=0
> master_table=2 parmcat=3 parm=1:ENS=+1
>     ndata=65160:undef=0:mean=101118:min=94916.5:max=105411
>     grid_template=0:winds(N/S):
>         lat-lon grid:(360 x 181) units 1e-06 input WE:NS output
WE:SN
> res
> 48
>         lat 90.000000 to -90.000000 by 1.000000
>         lon 0.000000 to 359.000000 by 1.000000 #points=65160
>
> The observation grid:
>
> 724:325143763:vt=2018080812:mean sea level:anl:var discipline=0
> master_table=14 parmcat=3 parm=1:
>     ndata=1038240:undef=0:mean=100911:min=94271.8:max=104086
>     grid_template=0:winds(N/S):
>         lat-lon grid:(1440 x 721) units 1e-06 input WE:SN output
WE:SN
> res
> 48
>         lat -90.000000 to 90.000000 by 0.250000
>         lon 0.000000 to 359.750000 by 0.250000 #points=1038240
>
> I regrid to the forecast grid that's a one degree resolution:
>
>    to_grid    = FCST;
>
> When I run grid_stat on the full domain I get the correct number of
points:
>
> Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> NEAREST(1), over region FULL, using 65160 pairs.
>
> But when I use a northern hemisphere POLY file I created:
>
> NHEM
> 0.00000 -180.00000
> 0.00000 179.00000
> 89.00000 179.00000
> 89.00000 -180.00000
> 0.00000 -180.00000
>
> Rather than getting half of the grid, 32580 pairs, instead I get:
>
> Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> NEAREST(1), over region NHEM, using 88 pairs.
>
> I used 89 as the top latitude because I got "too close to the pole"
> errors with a setting of latitude 89.5 or higher.
>
> I've tried a bunch of different settings but none of them seem to
> work.  I can't figure out if the 0 to 359 longitude in the GriB2
> headers are the reason why -180 to 179 fail.
>
> I tried a second time with:
>
> NHEM
> 0.00000 0.00000
> 0.00000 359.00000
> 89.00000 359.00000
> 89.00000 0.00000
> 0.00000 0.00000
>
> And the result was:
>
> Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> NEAREST(1), over region NHEM, using 176 pairs.
>
> What are the correct settings to get the Northern Hemisphere subset?
>
> Thanks,
> Matt
>
> Matthew C. Sittel, Meteorologist
> University Corporation for Atmospheric Research
> Matthew.Sittel.ctr at us.af.mil
>
>
>
>
>



------------------------------------------------
Subject: POLY file question
From: John Halley Gotway
Time: Thu Aug 09 14:20:25 2018

Matt,

You can define a more complex threshold like this: -thresh 'ge-
20&&le20'

I used those single quotes to hopefully avoid making the shell
unhappy.
Note that '>=-20&&<=20' should also work... but the shell gets pretty
persnikety about greater than and less then symbols.

FYI, let's say you wanted to make a lat/lon box... lat for -20 to 20
and
lon from -100 to 25.  You have to run gen_vx_mask twice:

gen_vx_mask fcst.grb2 fcst.grb2 lat_band.nc -type lat -thresh 'ge-
20&&le20'
gen_vx_mask lat_band.nc lat_band.nc lat_lon_box.nc -type lon -thresh
'ge-100&&le25' -intersection

The "-intersection" argument tells gen_vx_mask to take the
intersection of
the input mask with the current mask.

John

On Thu, Aug 9, 2018 at 2:09 PM SITTEL, MATTHEW C CTR USAF AFWA 16
WS/WXN
via RT <met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545 >
>
> It appears to have worked.  Now, how would I get just the 20S to 20N
> band?  I tried putting in multiple thresholds "-thresh le20 -thresh
ge-20"
> and that didn't work.
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, August 9, 2018 2:56 PM
> To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL <
> matthew.sittel.ctr at us.af.mil>
> Subject: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
question
>
> Hi Matt,
>
> Defining a lat/lon polyline file for a global domain does not work
well in
> MET.  Once a polyline covers more than 1/2 the globe it isn't well-
defined
> what's "inside" the mask versus what's "outside" the mask.  We have
an open
> development ticket for Randy Bullock to look more closely at
defining
> polyline masks for global grids, but that doesn't help you now.
>
> The preferable solution is using a feature we added to the
gen_vx_mask
> utility to define thresholds for the latitude and longitude values
> directly.  And this functionality does existing in met-6.1, which is
what I
> believe you are using.
>
> Pick a gridded data file that already lives on your verification
domain
> (lets call it fcst.grb2), and run it through gen_vx_mask like this:
>
>    gen_vx_mask fcst.grb2 fcst.grb2 NHEM_mask.nc -type lat -thresh
ge0
>
> This reads the latitudes from the grid on which the in.grb2 data
lives.
> Any grid points with latitude >= 0 are included in the mask.
>
> In your Grid-Stat config file, replace your reference to the lat/lon
> polyline file with the path to this output from gen_vx_mask.
>
> Hope that does the trick.
>
> Thanks,
> John
>
> On Thu, Aug 9, 2018 at 1:45 PM SITTEL, MATTHEW C CTR USAF AFWA 16
WS/WXN
> via RT <met_help at ucar.edu> wrote:
>
> >
> > Thu Aug 09 13:45:50 2018: Request 86545 was acted upon.
> > Transaction: Ticket created by matthew.sittel.ctr at us.af.mil
> >        Queue: met_help
> >      Subject: POLY file question
> >        Owner: Nobody
> >   Requestors: matthew.sittel.ctr at us.af.mil
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545
> > >
> >
> >
> > Hi,
> >
> > I have global forecast and observation grids that I'm mapping to a
> > common regrid domain, since they are different grid resolutions.
> >
> > The forecast grid:
> >
> > 85:4125548:vt=2018080812:mean sea level:12 hour fcst:var
discipline=0
> > master_table=2 parmcat=3 parm=1:ENS=+1
> >     ndata=65160:undef=0:mean=101118:min=94916.5:max=105411
> >     grid_template=0:winds(N/S):
> >         lat-lon grid:(360 x 181) units 1e-06 input WE:NS output
WE:SN
> > res
> > 48
> >         lat 90.000000 to -90.000000 by 1.000000
> >         lon 0.000000 to 359.000000 by 1.000000 #points=65160
> >
> > The observation grid:
> >
> > 724:325143763:vt=2018080812:mean sea level:anl:var discipline=0
> > master_table=14 parmcat=3 parm=1:
> >     ndata=1038240:undef=0:mean=100911:min=94271.8:max=104086
> >     grid_template=0:winds(N/S):
> >         lat-lon grid:(1440 x 721) units 1e-06 input WE:SN output
WE:SN
> > res
> > 48
> >         lat -90.000000 to 90.000000 by 0.250000
> >         lon 0.000000 to 359.750000 by 0.250000 #points=1038240
> >
> > I regrid to the forecast grid that's a one degree resolution:
> >
> >    to_grid    = FCST;
> >
> > When I run grid_stat on the full domain I get the correct number
of
> points:
> >
> > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > NEAREST(1), over region FULL, using 65160 pairs.
> >
> > But when I use a northern hemisphere POLY file I created:
> >
> > NHEM
> > 0.00000 -180.00000
> > 0.00000 179.00000
> > 89.00000 179.00000
> > 89.00000 -180.00000
> > 0.00000 -180.00000
> >
> > Rather than getting half of the grid, 32580 pairs, instead I get:
> >
> > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > NEAREST(1), over region NHEM, using 88 pairs.
> >
> > I used 89 as the top latitude because I got "too close to the
pole"
> > errors with a setting of latitude 89.5 or higher.
> >
> > I've tried a bunch of different settings but none of them seem to
> > work.  I can't figure out if the 0 to 359 longitude in the GriB2
> > headers are the reason why -180 to 179 fail.
> >
> > I tried a second time with:
> >
> > NHEM
> > 0.00000 0.00000
> > 0.00000 359.00000
> > 89.00000 359.00000
> > 89.00000 0.00000
> > 0.00000 0.00000
> >
> > And the result was:
> >
> > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > NEAREST(1), over region NHEM, using 176 pairs.
> >
> > What are the correct settings to get the Northern Hemisphere
subset?
> >
> > Thanks,
> > Matt
> >
> > Matthew C. Sittel, Meteorologist
> > University Corporation for Atmospheric Research
> > Matthew.Sittel.ctr at us.af.mil
> >
> >
> >
> >
> >
>
>
>
>

------------------------------------------------
Subject: RE: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file question
From: SITTEL, MATTHEW C CTR USAF AFWA 16 WS/WXN
Time: Thu Aug 09 14:37:41 2018

Thanks John.  I tried "-thresh ge20 && le80" but I put spaces in
between.  I was close!  Looks like they are all working correctly.

I'm working on replacing legacy code with MET to verify our global
ensemble.  This is part of it: verifying each individual member over
the entire global domain and also in subregions.  I'll also be doing
the same thing for the full ensemble.  Hopefully I won't have too much
more trouble with getting that set up.

Matt

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Thursday, August 9, 2018 3:20 PM
To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL
<matthew.sittel.ctr at us.af.mil>
Subject: Re: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
question

Matt,

You can define a more complex threshold like this: -thresh 'ge-
20&&le20'

I used those single quotes to hopefully avoid making the shell
unhappy.
Note that '>=-20&&<=20' should also work... but the shell gets pretty
persnikety about greater than and less then symbols.

FYI, let's say you wanted to make a lat/lon box... lat for -20 to 20
and lon from -100 to 25.  You have to run gen_vx_mask twice:

gen_vx_mask fcst.grb2 fcst.grb2 lat_band.nc -type lat -thresh 'ge-
20&&le20'
gen_vx_mask lat_band.nc lat_band.nc lat_lon_box.nc -type lon -thresh
'ge-100&&le25' -intersection

The "-intersection" argument tells gen_vx_mask to take the
intersection of the input mask with the current mask.

John

On Thu, Aug 9, 2018 at 2:09 PM SITTEL, MATTHEW C CTR USAF AFWA 16
WS/WXN via RT <met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545 >
>
> It appears to have worked.  Now, how would I get just the 20S to 20N
> band?  I tried putting in multiple thresholds "-thresh le20 -thresh
ge-20"
> and that didn't work.
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, August 9, 2018 2:56 PM
> To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL <
> matthew.sittel.ctr at us.af.mil>
> Subject: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
> question
>
> Hi Matt,
>
> Defining a lat/lon polyline file for a global domain does not work
> well in MET.  Once a polyline covers more than 1/2 the globe it
isn't
> well-defined what's "inside" the mask versus what's "outside" the
> mask.  We have an open development ticket for Randy Bullock to look
> more closely at defining polyline masks for global grids, but that
doesn't help you now.
>
> The preferable solution is using a feature we added to the
gen_vx_mask
> utility to define thresholds for the latitude and longitude values
> directly.  And this functionality does existing in met-6.1, which is
> what I believe you are using.
>
> Pick a gridded data file that already lives on your verification
> domain (lets call it fcst.grb2), and run it through gen_vx_mask like
this:
>
>    gen_vx_mask fcst.grb2 fcst.grb2 NHEM_mask.nc -type lat -thresh
ge0
>
> This reads the latitudes from the grid on which the in.grb2 data
lives.
> Any grid points with latitude >= 0 are included in the mask.
>
> In your Grid-Stat config file, replace your reference to the lat/lon
> polyline file with the path to this output from gen_vx_mask.
>
> Hope that does the trick.
>
> Thanks,
> John
>
> On Thu, Aug 9, 2018 at 1:45 PM SITTEL, MATTHEW C CTR USAF AFWA 16
> WS/WXN via RT <met_help at ucar.edu> wrote:
>
> >
> > Thu Aug 09 13:45:50 2018: Request 86545 was acted upon.
> > Transaction: Ticket created by matthew.sittel.ctr at us.af.mil
> >        Queue: met_help
> >      Subject: POLY file question
> >        Owner: Nobody
> >   Requestors: matthew.sittel.ctr at us.af.mil
> >       Status: new
> >  Ticket <URL:
> > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545
> > >
> >
> >
> > Hi,
> >
> > I have global forecast and observation grids that I'm mapping to a
> > common regrid domain, since they are different grid resolutions.
> >
> > The forecast grid:
> >
> > 85:4125548:vt=2018080812:mean sea level:12 hour fcst:var
> > discipline=0
> > master_table=2 parmcat=3 parm=1:ENS=+1
> >     ndata=65160:undef=0:mean=101118:min=94916.5:max=105411
> >     grid_template=0:winds(N/S):
> >         lat-lon grid:(360 x 181) units 1e-06 input WE:NS output
> > WE:SN res
> > 48
> >         lat 90.000000 to -90.000000 by 1.000000
> >         lon 0.000000 to 359.000000 by 1.000000 #points=65160
> >
> > The observation grid:
> >
> > 724:325143763:vt=2018080812:mean sea level:anl:var discipline=0
> > master_table=14 parmcat=3 parm=1:
> >     ndata=1038240:undef=0:mean=100911:min=94271.8:max=104086
> >     grid_template=0:winds(N/S):
> >         lat-lon grid:(1440 x 721) units 1e-06 input WE:SN output
> > WE:SN res
> > 48
> >         lat -90.000000 to 90.000000 by 0.250000
> >         lon 0.000000 to 359.750000 by 0.250000 #points=1038240
> >
> > I regrid to the forecast grid that's a one degree resolution:
> >
> >    to_grid    = FCST;
> >
> > When I run grid_stat on the full domain I get the correct number
of
> points:
> >
> > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > NEAREST(1), over region FULL, using 65160 pairs.
> >
> > But when I use a northern hemisphere POLY file I created:
> >
> > NHEM
> > 0.00000 -180.00000
> > 0.00000 179.00000
> > 89.00000 179.00000
> > 89.00000 -180.00000
> > 0.00000 -180.00000
> >
> > Rather than getting half of the grid, 32580 pairs, instead I get:
> >
> > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > NEAREST(1), over region NHEM, using 88 pairs.
> >
> > I used 89 as the top latitude because I got "too close to the
pole"
> > errors with a setting of latitude 89.5 or higher.
> >
> > I've tried a bunch of different settings but none of them seem to
> > work.  I can't figure out if the 0 to 359 longitude in the GriB2
> > headers are the reason why -180 to 179 fail.
> >
> > I tried a second time with:
> >
> > NHEM
> > 0.00000 0.00000
> > 0.00000 359.00000
> > 89.00000 359.00000
> > 89.00000 0.00000
> > 0.00000 0.00000
> >
> > And the result was:
> >
> > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > NEAREST(1), over region NHEM, using 176 pairs.
> >
> > What are the correct settings to get the Northern Hemisphere
subset?
> >
> > Thanks,
> > Matt
> >
> > Matthew C. Sittel, Meteorologist
> > University Corporation for Atmospheric Research
> > Matthew.Sittel.ctr at us.af.mil
> >
> >
> >
> >
> >
>
>
>
>



------------------------------------------------
Subject: POLY file question
From: John Halley Gotway
Time: Thu Aug 09 14:43:45 2018

Great, thanks.  I'll go ahead and resolve this ticket.  Just let us
know
what other issues arise.

Thanks,
John

On Thu, Aug 9, 2018 at 2:38 PM SITTEL, MATTHEW C CTR USAF AFWA 16
WS/WXN
via RT <met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545 >
>
> Thanks John.  I tried "-thresh ge20 && le80" but I put spaces in
between.
> I was close!  Looks like they are all working correctly.
>
> I'm working on replacing legacy code with MET to verify our global
> ensemble.  This is part of it: verifying each individual member over
the
> entire global domain and also in subregions.  I'll also be doing the
same
> thing for the full ensemble.  Hopefully I won't have too much more
trouble
> with getting that set up.
>
> Matt
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, August 9, 2018 3:20 PM
> To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL <
> matthew.sittel.ctr at us.af.mil>
> Subject: Re: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
> question
>
> Matt,
>
> You can define a more complex threshold like this: -thresh 'ge-
20&&le20'
>
> I used those single quotes to hopefully avoid making the shell
unhappy.
> Note that '>=-20&&<=20' should also work... but the shell gets
pretty
> persnikety about greater than and less then symbols.
>
> FYI, let's say you wanted to make a lat/lon box... lat for -20 to 20
and
> lon from -100 to 25.  You have to run gen_vx_mask twice:
>
> gen_vx_mask fcst.grb2 fcst.grb2 lat_band.nc -type lat -thresh
> 'ge-20&&le20'
> gen_vx_mask lat_band.nc lat_band.nc lat_lon_box.nc -type lon -thresh
> 'ge-100&&le25' -intersection
>
> The "-intersection" argument tells gen_vx_mask to take the
intersection of
> the input mask with the current mask.
>
> John
>
> On Thu, Aug 9, 2018 at 2:09 PM SITTEL, MATTHEW C CTR USAF AFWA 16
WS/WXN
> via RT <met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545 >
> >
> > It appears to have worked.  Now, how would I get just the 20S to
20N
> > band?  I tried putting in multiple thresholds "-thresh le20
-thresh
> ge-20"
> > and that didn't work.
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Thursday, August 9, 2018 2:56 PM
> > To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL <
> > matthew.sittel.ctr at us.af.mil>
> > Subject: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
> > question
> >
> > Hi Matt,
> >
> > Defining a lat/lon polyline file for a global domain does not work
> > well in MET.  Once a polyline covers more than 1/2 the globe it
isn't
> > well-defined what's "inside" the mask versus what's "outside" the
> > mask.  We have an open development ticket for Randy Bullock to
look
> > more closely at defining polyline masks for global grids, but that
> doesn't help you now.
> >
> > The preferable solution is using a feature we added to the
gen_vx_mask
> > utility to define thresholds for the latitude and longitude values
> > directly.  And this functionality does existing in met-6.1, which
is
> > what I believe you are using.
> >
> > Pick a gridded data file that already lives on your verification
> > domain (lets call it fcst.grb2), and run it through gen_vx_mask
like
> this:
> >
> >    gen_vx_mask fcst.grb2 fcst.grb2 NHEM_mask.nc -type lat -thresh
ge0
> >
> > This reads the latitudes from the grid on which the in.grb2 data
lives.
> > Any grid points with latitude >= 0 are included in the mask.
> >
> > In your Grid-Stat config file, replace your reference to the
lat/lon
> > polyline file with the path to this output from gen_vx_mask.
> >
> > Hope that does the trick.
> >
> > Thanks,
> > John
> >
> > On Thu, Aug 9, 2018 at 1:45 PM SITTEL, MATTHEW C CTR USAF AFWA 16
> > WS/WXN via RT <met_help at ucar.edu> wrote:
> >
> > >
> > > Thu Aug 09 13:45:50 2018: Request 86545 was acted upon.
> > > Transaction: Ticket created by matthew.sittel.ctr at us.af.mil
> > >        Queue: met_help
> > >      Subject: POLY file question
> > >        Owner: Nobody
> > >   Requestors: matthew.sittel.ctr at us.af.mil
> > >       Status: new
> > >  Ticket <URL:
> > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545
> > > >
> > >
> > >
> > > Hi,
> > >
> > > I have global forecast and observation grids that I'm mapping to
a
> > > common regrid domain, since they are different grid resolutions.
> > >
> > > The forecast grid:
> > >
> > > 85:4125548:vt=2018080812:mean sea level:12 hour fcst:var
> > > discipline=0
> > > master_table=2 parmcat=3 parm=1:ENS=+1
> > >     ndata=65160:undef=0:mean=101118:min=94916.5:max=105411
> > >     grid_template=0:winds(N/S):
> > >         lat-lon grid:(360 x 181) units 1e-06 input WE:NS output
> > > WE:SN res
> > > 48
> > >         lat 90.000000 to -90.000000 by 1.000000
> > >         lon 0.000000 to 359.000000 by 1.000000 #points=65160
> > >
> > > The observation grid:
> > >
> > > 724:325143763:vt=2018080812:mean sea level:anl:var discipline=0
> > > master_table=14 parmcat=3 parm=1:
> > >     ndata=1038240:undef=0:mean=100911:min=94271.8:max=104086
> > >     grid_template=0:winds(N/S):
> > >         lat-lon grid:(1440 x 721) units 1e-06 input WE:SN output
> > > WE:SN res
> > > 48
> > >         lat -90.000000 to 90.000000 by 0.250000
> > >         lon 0.000000 to 359.750000 by 0.250000 #points=1038240
> > >
> > > I regrid to the forecast grid that's a one degree resolution:
> > >
> > >    to_grid    = FCST;
> > >
> > > When I run grid_stat on the full domain I get the correct number
of
> > points:
> > >
> > > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > > NEAREST(1), over region FULL, using 65160 pairs.
> > >
> > > But when I use a northern hemisphere POLY file I created:
> > >
> > > NHEM
> > > 0.00000 -180.00000
> > > 0.00000 179.00000
> > > 89.00000 179.00000
> > > 89.00000 -180.00000
> > > 0.00000 -180.00000
> > >
> > > Rather than getting half of the grid, 32580 pairs, instead I
get:
> > >
> > > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > > NEAREST(1), over region NHEM, using 88 pairs.
> > >
> > > I used 89 as the top latitude because I got "too close to the
pole"
> > > errors with a setting of latitude 89.5 or higher.
> > >
> > > I've tried a bunch of different settings but none of them seem
to
> > > work.  I can't figure out if the 0 to 359 longitude in the GriB2
> > > headers are the reason why -180 to 179 fail.
> > >
> > > I tried a second time with:
> > >
> > > NHEM
> > > 0.00000 0.00000
> > > 0.00000 359.00000
> > > 89.00000 359.00000
> > > 89.00000 0.00000
> > > 0.00000 0.00000
> > >
> > > And the result was:
> > >
> > > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > > NEAREST(1), over region NHEM, using 176 pairs.
> > >
> > > What are the correct settings to get the Northern Hemisphere
subset?
> > >
> > > Thanks,
> > > Matt
> > >
> > > Matthew C. Sittel, Meteorologist
> > > University Corporation for Atmospheric Research
> > > Matthew.Sittel.ctr at us.af.mil
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>

------------------------------------------------
Subject: RE: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file question
From: SITTEL, MATTHEW C CTR USAF AFWA 16 WS/WXN
Time: Thu Aug 09 14:52:08 2018

Does gen_vx_mask have a way to name the variable so that all of my
subregions don’t say "lat_mask" under VX_MASK in the output stats?
All five of the ones I built say that and thus the results are
ambiguous unless I can flag them somehow in the config file to take on
different names.

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Thursday, August 9, 2018 3:44 PM
To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL
<matthew.sittel.ctr at us.af.mil>
Subject: Re: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
question

Great, thanks.  I'll go ahead and resolve this ticket.  Just let us
know what other issues arise.

Thanks,
John

On Thu, Aug 9, 2018 at 2:38 PM SITTEL, MATTHEW C CTR USAF AFWA 16
WS/WXN via RT <met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545 >
>
> Thanks John.  I tried "-thresh ge20 && le80" but I put spaces in
between.
> I was close!  Looks like they are all working correctly.
>
> I'm working on replacing legacy code with MET to verify our global
> ensemble.  This is part of it: verifying each individual member over
> the entire global domain and also in subregions.  I'll also be doing
> the same thing for the full ensemble.  Hopefully I won't have too
much
> more trouble with getting that set up.
>
> Matt
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, August 9, 2018 3:20 PM
> To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL <
> matthew.sittel.ctr at us.af.mil>
> Subject: Re: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
> question
>
> Matt,
>
> You can define a more complex threshold like this: -thresh 'ge-
20&&le20'
>
> I used those single quotes to hopefully avoid making the shell
unhappy.
> Note that '>=-20&&<=20' should also work... but the shell gets
pretty
> persnikety about greater than and less then symbols.
>
> FYI, let's say you wanted to make a lat/lon box... lat for -20 to 20
> and lon from -100 to 25.  You have to run gen_vx_mask twice:
>
> gen_vx_mask fcst.grb2 fcst.grb2 lat_band.nc -type lat -thresh
> 'ge-20&&le20'
> gen_vx_mask lat_band.nc lat_band.nc lat_lon_box.nc -type lon -thresh
> 'ge-100&&le25' -intersection
>
> The "-intersection" argument tells gen_vx_mask to take the
> intersection of the input mask with the current mask.
>
> John
>
> On Thu, Aug 9, 2018 at 2:09 PM SITTEL, MATTHEW C CTR USAF AFWA 16
> WS/WXN via RT <met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545 >
> >
> > It appears to have worked.  Now, how would I get just the 20S to
20N
> > band?  I tried putting in multiple thresholds "-thresh le20
-thresh
> ge-20"
> > and that didn't work.
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Thursday, August 9, 2018 2:56 PM
> > To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL <
> > matthew.sittel.ctr at us.af.mil>
> > Subject: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
> > question
> >
> > Hi Matt,
> >
> > Defining a lat/lon polyline file for a global domain does not work
> > well in MET.  Once a polyline covers more than 1/2 the globe it
> > isn't well-defined what's "inside" the mask versus what's
"outside"
> > the mask.  We have an open development ticket for Randy Bullock to
> > look more closely at defining polyline masks for global grids, but
> > that
> doesn't help you now.
> >
> > The preferable solution is using a feature we added to the
> > gen_vx_mask utility to define thresholds for the latitude and
> > longitude values directly.  And this functionality does existing
in
> > met-6.1, which is what I believe you are using.
> >
> > Pick a gridded data file that already lives on your verification
> > domain (lets call it fcst.grb2), and run it through gen_vx_mask
like
> this:
> >
> >    gen_vx_mask fcst.grb2 fcst.grb2 NHEM_mask.nc -type lat -thresh
> > ge0
> >
> > This reads the latitudes from the grid on which the in.grb2 data
lives.
> > Any grid points with latitude >= 0 are included in the mask.
> >
> > In your Grid-Stat config file, replace your reference to the
lat/lon
> > polyline file with the path to this output from gen_vx_mask.
> >
> > Hope that does the trick.
> >
> > Thanks,
> > John
> >
> > On Thu, Aug 9, 2018 at 1:45 PM SITTEL, MATTHEW C CTR USAF AFWA 16
> > WS/WXN via RT <met_help at ucar.edu> wrote:
> >
> > >
> > > Thu Aug 09 13:45:50 2018: Request 86545 was acted upon.
> > > Transaction: Ticket created by matthew.sittel.ctr at us.af.mil
> > >        Queue: met_help
> > >      Subject: POLY file question
> > >        Owner: Nobody
> > >   Requestors: matthew.sittel.ctr at us.af.mil
> > >       Status: new
> > >  Ticket <URL:
> > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545
> > > >
> > >
> > >
> > > Hi,
> > >
> > > I have global forecast and observation grids that I'm mapping to
a
> > > common regrid domain, since they are different grid resolutions.
> > >
> > > The forecast grid:
> > >
> > > 85:4125548:vt=2018080812:mean sea level:12 hour fcst:var
> > > discipline=0
> > > master_table=2 parmcat=3 parm=1:ENS=+1
> > >     ndata=65160:undef=0:mean=101118:min=94916.5:max=105411
> > >     grid_template=0:winds(N/S):
> > >         lat-lon grid:(360 x 181) units 1e-06 input WE:NS output
> > > WE:SN res
> > > 48
> > >         lat 90.000000 to -90.000000 by 1.000000
> > >         lon 0.000000 to 359.000000 by 1.000000 #points=65160
> > >
> > > The observation grid:
> > >
> > > 724:325143763:vt=2018080812:mean sea level:anl:var discipline=0
> > > master_table=14 parmcat=3 parm=1:
> > >     ndata=1038240:undef=0:mean=100911:min=94271.8:max=104086
> > >     grid_template=0:winds(N/S):
> > >         lat-lon grid:(1440 x 721) units 1e-06 input WE:SN output
> > > WE:SN res
> > > 48
> > >         lat -90.000000 to 90.000000 by 0.250000
> > >         lon 0.000000 to 359.750000 by 0.250000 #points=1038240
> > >
> > > I regrid to the forecast grid that's a one degree resolution:
> > >
> > >    to_grid    = FCST;
> > >
> > > When I run grid_stat on the full domain I get the correct number
> > > of
> > points:
> > >
> > > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > > NEAREST(1), over region FULL, using 65160 pairs.
> > >
> > > But when I use a northern hemisphere POLY file I created:
> > >
> > > NHEM
> > > 0.00000 -180.00000
> > > 0.00000 179.00000
> > > 89.00000 179.00000
> > > 89.00000 -180.00000
> > > 0.00000 -180.00000
> > >
> > > Rather than getting half of the grid, 32580 pairs, instead I
get:
> > >
> > > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > > NEAREST(1), over region NHEM, using 88 pairs.
> > >
> > > I used 89 as the top latitude because I got "too close to the
pole"
> > > errors with a setting of latitude 89.5 or higher.
> > >
> > > I've tried a bunch of different settings but none of them seem
to
> > > work.  I can't figure out if the 0 to 359 longitude in the GriB2
> > > headers are the reason why -180 to 179 fail.
> > >
> > > I tried a second time with:
> > >
> > > NHEM
> > > 0.00000 0.00000
> > > 0.00000 359.00000
> > > 89.00000 359.00000
> > > 89.00000 0.00000
> > > 0.00000 0.00000
> > >
> > > And the result was:
> > >
> > > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > > NEAREST(1), over region NHEM, using 176 pairs.
> > >
> > > What are the correct settings to get the Northern Hemisphere
subset?
> > >
> > > Thanks,
> > > Matt
> > >
> > > Matthew C. Sittel, Meteorologist
> > > University Corporation for Atmospheric Research
> > > Matthew.Sittel.ctr at us.af.mil
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>



------------------------------------------------
Subject: POLY file question
From: John Halley Gotway
Time: Thu Aug 09 15:04:00 2018

Matt,

Yes, here's a selection from the usage statement for the tool:

Usage: gen_vx_mask
...
        [-name string]
...
               "-name string" specifies the output variable name for
the
mask (optional).

Thanks,
John

On Thu, Aug 9, 2018 at 2:52 PM SITTEL, MATTHEW C CTR USAF AFWA 16
WS/WXN
via RT <met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545 >
>
> Does gen_vx_mask have a way to name the variable so that all of my
> subregions don’t say "lat_mask" under VX_MASK in the output stats?
All
> five of the ones I built say that and thus the results are ambiguous
unless
> I can flag them somehow in the config file to take on different
names.
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, August 9, 2018 3:44 PM
> To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL <
> matthew.sittel.ctr at us.af.mil>
> Subject: Re: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
> question
>
> Great, thanks.  I'll go ahead and resolve this ticket.  Just let us
know
> what other issues arise.
>
> Thanks,
> John
>
> On Thu, Aug 9, 2018 at 2:38 PM SITTEL, MATTHEW C CTR USAF AFWA 16
WS/WXN
> via RT <met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545 >
> >
> > Thanks John.  I tried "-thresh ge20 && le80" but I put spaces in
between.
> > I was close!  Looks like they are all working correctly.
> >
> > I'm working on replacing legacy code with MET to verify our global
> > ensemble.  This is part of it: verifying each individual member
over
> > the entire global domain and also in subregions.  I'll also be
doing
> > the same thing for the full ensemble.  Hopefully I won't have too
much
> > more trouble with getting that set up.
> >
> > Matt
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Thursday, August 9, 2018 3:20 PM
> > To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL <
> > matthew.sittel.ctr at us.af.mil>
> > Subject: Re: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY
file
> > question
> >
> > Matt,
> >
> > You can define a more complex threshold like this: -thresh 'ge-
20&&le20'
> >
> > I used those single quotes to hopefully avoid making the shell
unhappy.
> > Note that '>=-20&&<=20' should also work... but the shell gets
pretty
> > persnikety about greater than and less then symbols.
> >
> > FYI, let's say you wanted to make a lat/lon box... lat for -20 to
20
> > and lon from -100 to 25.  You have to run gen_vx_mask twice:
> >
> > gen_vx_mask fcst.grb2 fcst.grb2 lat_band.nc -type lat -thresh
> > 'ge-20&&le20'
> > gen_vx_mask lat_band.nc lat_band.nc lat_lon_box.nc -type lon
-thresh
> > 'ge-100&&le25' -intersection
> >
> > The "-intersection" argument tells gen_vx_mask to take the
> > intersection of the input mask with the current mask.
> >
> > John
> >
> > On Thu, Aug 9, 2018 at 2:09 PM SITTEL, MATTHEW C CTR USAF AFWA 16
> > WS/WXN via RT <met_help at ucar.edu> wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545 >
> > >
> > > It appears to have worked.  Now, how would I get just the 20S to
20N
> > > band?  I tried putting in multiple thresholds "-thresh le20
-thresh
> > ge-20"
> > > and that didn't work.
> > >
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Thursday, August 9, 2018 2:56 PM
> > > To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL <
> > > matthew.sittel.ctr at us.af.mil>
> > > Subject: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
> > > question
> > >
> > > Hi Matt,
> > >
> > > Defining a lat/lon polyline file for a global domain does not
work
> > > well in MET.  Once a polyline covers more than 1/2 the globe it
> > > isn't well-defined what's "inside" the mask versus what's
"outside"
> > > the mask.  We have an open development ticket for Randy Bullock
to
> > > look more closely at defining polyline masks for global grids,
but
> > > that
> > doesn't help you now.
> > >
> > > The preferable solution is using a feature we added to the
> > > gen_vx_mask utility to define thresholds for the latitude and
> > > longitude values directly.  And this functionality does existing
in
> > > met-6.1, which is what I believe you are using.
> > >
> > > Pick a gridded data file that already lives on your verification
> > > domain (lets call it fcst.grb2), and run it through gen_vx_mask
like
> > this:
> > >
> > >    gen_vx_mask fcst.grb2 fcst.grb2 NHEM_mask.nc -type lat
-thresh
> > > ge0
> > >
> > > This reads the latitudes from the grid on which the in.grb2 data
lives.
> > > Any grid points with latitude >= 0 are included in the mask.
> > >
> > > In your Grid-Stat config file, replace your reference to the
lat/lon
> > > polyline file with the path to this output from gen_vx_mask.
> > >
> > > Hope that does the trick.
> > >
> > > Thanks,
> > > John
> > >
> > > On Thu, Aug 9, 2018 at 1:45 PM SITTEL, MATTHEW C CTR USAF AFWA
16
> > > WS/WXN via RT <met_help at ucar.edu> wrote:
> > >
> > > >
> > > > Thu Aug 09 13:45:50 2018: Request 86545 was acted upon.
> > > > Transaction: Ticket created by matthew.sittel.ctr at us.af.mil
> > > >        Queue: met_help
> > > >      Subject: POLY file question
> > > >        Owner: Nobody
> > > >   Requestors: matthew.sittel.ctr at us.af.mil
> > > >       Status: new
> > > >  Ticket <URL:
> > > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545
> > > > >
> > > >
> > > >
> > > > Hi,
> > > >
> > > > I have global forecast and observation grids that I'm mapping
to a
> > > > common regrid domain, since they are different grid
resolutions.
> > > >
> > > > The forecast grid:
> > > >
> > > > 85:4125548:vt=2018080812:mean sea level:12 hour fcst:var
> > > > discipline=0
> > > > master_table=2 parmcat=3 parm=1:ENS=+1
> > > >     ndata=65160:undef=0:mean=101118:min=94916.5:max=105411
> > > >     grid_template=0:winds(N/S):
> > > >         lat-lon grid:(360 x 181) units 1e-06 input WE:NS
output
> > > > WE:SN res
> > > > 48
> > > >         lat 90.000000 to -90.000000 by 1.000000
> > > >         lon 0.000000 to 359.000000 by 1.000000 #points=65160
> > > >
> > > > The observation grid:
> > > >
> > > > 724:325143763:vt=2018080812:mean sea level:anl:var
discipline=0
> > > > master_table=14 parmcat=3 parm=1:
> > > >     ndata=1038240:undef=0:mean=100911:min=94271.8:max=104086
> > > >     grid_template=0:winds(N/S):
> > > >         lat-lon grid:(1440 x 721) units 1e-06 input WE:SN
output
> > > > WE:SN res
> > > > 48
> > > >         lat -90.000000 to 90.000000 by 0.250000
> > > >         lon 0.000000 to 359.750000 by 0.250000 #points=1038240
> > > >
> > > > I regrid to the forecast grid that's a one degree resolution:
> > > >
> > > >    to_grid    = FCST;
> > > >
> > > > When I run grid_stat on the full domain I get the correct
number
> > > > of
> > > points:
> > > >
> > > > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > > > NEAREST(1), over region FULL, using 65160 pairs.
> > > >
> > > > But when I use a northern hemisphere POLY file I created:
> > > >
> > > > NHEM
> > > > 0.00000 -180.00000
> > > > 0.00000 179.00000
> > > > 89.00000 179.00000
> > > > 89.00000 -180.00000
> > > > 0.00000 -180.00000
> > > >
> > > > Rather than getting half of the grid, 32580 pairs, instead I
get:
> > > >
> > > > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > > > NEAREST(1), over region NHEM, using 88 pairs.
> > > >
> > > > I used 89 as the top latitude because I got "too close to the
pole"
> > > > errors with a setting of latitude 89.5 or higher.
> > > >
> > > > I've tried a bunch of different settings but none of them seem
to
> > > > work.  I can't figure out if the 0 to 359 longitude in the
GriB2
> > > > headers are the reason why -180 to 179 fail.
> > > >
> > > > I tried a second time with:
> > > >
> > > > NHEM
> > > > 0.00000 0.00000
> > > > 0.00000 359.00000
> > > > 89.00000 359.00000
> > > > 89.00000 0.00000
> > > > 0.00000 0.00000
> > > >
> > > > And the result was:
> > > >
> > > > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > > > NEAREST(1), over region NHEM, using 176 pairs.
> > > >
> > > > What are the correct settings to get the Northern Hemisphere
subset?
> > > >
> > > > Thanks,
> > > > Matt
> > > >
> > > > Matthew C. Sittel, Meteorologist
> > > > University Corporation for Atmospheric Research
> > > > Matthew.Sittel.ctr at us.af.mil
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>

------------------------------------------------
Subject: RE: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file question
From: SITTEL, MATTHEW C CTR USAF AFWA 16 WS/WXN
Time: Fri Aug 10 06:09:36 2018

Thanks John-that worked nicely, and most importantly keeps Bob happy!

Matt

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Thursday, August 9, 2018 4:04 PM
To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL
<matthew.sittel.ctr at us.af.mil>
Subject: Re: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
question

Matt,

Yes, here's a selection from the usage statement for the tool:

Usage: gen_vx_mask
...
        [-name string]
...
               "-name string" specifies the output variable name for
the mask (optional).

Thanks,
John

On Thu, Aug 9, 2018 at 2:52 PM SITTEL, MATTHEW C CTR USAF AFWA 16
WS/WXN via RT <met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545 >
>
> Does gen_vx_mask have a way to name the variable so that all of my
> subregions don’t say "lat_mask" under VX_MASK in the output stats?
> All five of the ones I built say that and thus the results are
> ambiguous unless I can flag them somehow in the config file to take
on different names.
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, August 9, 2018 3:44 PM
> To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL <
> matthew.sittel.ctr at us.af.mil>
> Subject: Re: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
> question
>
> Great, thanks.  I'll go ahead and resolve this ticket.  Just let us
> know what other issues arise.
>
> Thanks,
> John
>
> On Thu, Aug 9, 2018 at 2:38 PM SITTEL, MATTHEW C CTR USAF AFWA 16
> WS/WXN via RT <met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545 >
> >
> > Thanks John.  I tried "-thresh ge20 && le80" but I put spaces in
between.
> > I was close!  Looks like they are all working correctly.
> >
> > I'm working on replacing legacy code with MET to verify our global
> > ensemble.  This is part of it: verifying each individual member
over
> > the entire global domain and also in subregions.  I'll also be
doing
> > the same thing for the full ensemble.  Hopefully I won't have too
> > much more trouble with getting that set up.
> >
> > Matt
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Thursday, August 9, 2018 3:20 PM
> > To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL <
> > matthew.sittel.ctr at us.af.mil>
> > Subject: Re: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY
file
> > question
> >
> > Matt,
> >
> > You can define a more complex threshold like this: -thresh 'ge-
20&&le20'
> >
> > I used those single quotes to hopefully avoid making the shell
unhappy.
> > Note that '>=-20&&<=20' should also work... but the shell gets
> > pretty persnikety about greater than and less then symbols.
> >
> > FYI, let's say you wanted to make a lat/lon box... lat for -20 to
20
> > and lon from -100 to 25.  You have to run gen_vx_mask twice:
> >
> > gen_vx_mask fcst.grb2 fcst.grb2 lat_band.nc -type lat -thresh
> > 'ge-20&&le20'
> > gen_vx_mask lat_band.nc lat_band.nc lat_lon_box.nc -type lon
-thresh
> > 'ge-100&&le25' -intersection
> >
> > The "-intersection" argument tells gen_vx_mask to take the
> > intersection of the input mask with the current mask.
> >
> > John
> >
> > On Thu, Aug 9, 2018 at 2:09 PM SITTEL, MATTHEW C CTR USAF AFWA 16
> > WS/WXN via RT <met_help at ucar.edu> wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545 >
> > >
> > > It appears to have worked.  Now, how would I get just the 20S to
> > > 20N band?  I tried putting in multiple thresholds "-thresh le20
> > > -thresh
> > ge-20"
> > > and that didn't work.
> > >
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Thursday, August 9, 2018 2:56 PM
> > > To: SITTEL, MATTHEW C CTR USAF AFMC AFLCMC/HBAW-OL <
> > > matthew.sittel.ctr at us.af.mil>
> > > Subject: [Non-DoD Source] Re: [rt.rap.ucar.edu #86545] POLY file
> > > question
> > >
> > > Hi Matt,
> > >
> > > Defining a lat/lon polyline file for a global domain does not
work
> > > well in MET.  Once a polyline covers more than 1/2 the globe it
> > > isn't well-defined what's "inside" the mask versus what's
"outside"
> > > the mask.  We have an open development ticket for Randy Bullock
to
> > > look more closely at defining polyline masks for global grids,
but
> > > that
> > doesn't help you now.
> > >
> > > The preferable solution is using a feature we added to the
> > > gen_vx_mask utility to define thresholds for the latitude and
> > > longitude values directly.  And this functionality does existing
> > > in met-6.1, which is what I believe you are using.
> > >
> > > Pick a gridded data file that already lives on your verification
> > > domain (lets call it fcst.grb2), and run it through gen_vx_mask
> > > like
> > this:
> > >
> > >    gen_vx_mask fcst.grb2 fcst.grb2 NHEM_mask.nc -type lat
-thresh
> > > ge0
> > >
> > > This reads the latitudes from the grid on which the in.grb2 data
lives.
> > > Any grid points with latitude >= 0 are included in the mask.
> > >
> > > In your Grid-Stat config file, replace your reference to the
> > > lat/lon polyline file with the path to this output from
gen_vx_mask.
> > >
> > > Hope that does the trick.
> > >
> > > Thanks,
> > > John
> > >
> > > On Thu, Aug 9, 2018 at 1:45 PM SITTEL, MATTHEW C CTR USAF AFWA
16
> > > WS/WXN via RT <met_help at ucar.edu> wrote:
> > >
> > > >
> > > > Thu Aug 09 13:45:50 2018: Request 86545 was acted upon.
> > > > Transaction: Ticket created by matthew.sittel.ctr at us.af.mil
> > > >        Queue: met_help
> > > >      Subject: POLY file question
> > > >        Owner: Nobody
> > > >   Requestors: matthew.sittel.ctr at us.af.mil
> > > >       Status: new
> > > >  Ticket <URL:
> > > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86545
> > > > >
> > > >
> > > >
> > > > Hi,
> > > >
> > > > I have global forecast and observation grids that I'm mapping
to
> > > > a common regrid domain, since they are different grid
resolutions.
> > > >
> > > > The forecast grid:
> > > >
> > > > 85:4125548:vt=2018080812:mean sea level:12 hour fcst:var
> > > > discipline=0
> > > > master_table=2 parmcat=3 parm=1:ENS=+1
> > > >     ndata=65160:undef=0:mean=101118:min=94916.5:max=105411
> > > >     grid_template=0:winds(N/S):
> > > >         lat-lon grid:(360 x 181) units 1e-06 input WE:NS
output
> > > > WE:SN res
> > > > 48
> > > >         lat 90.000000 to -90.000000 by 1.000000
> > > >         lon 0.000000 to 359.000000 by 1.000000 #points=65160
> > > >
> > > > The observation grid:
> > > >
> > > > 724:325143763:vt=2018080812:mean sea level:anl:var
discipline=0
> > > > master_table=14 parmcat=3 parm=1:
> > > >     ndata=1038240:undef=0:mean=100911:min=94271.8:max=104086
> > > >     grid_template=0:winds(N/S):
> > > >         lat-lon grid:(1440 x 721) units 1e-06 input WE:SN
output
> > > > WE:SN res
> > > > 48
> > > >         lat -90.000000 to 90.000000 by 0.250000
> > > >         lon 0.000000 to 359.750000 by 0.250000 #points=1038240
> > > >
> > > > I regrid to the forecast grid that's a one degree resolution:
> > > >
> > > >    to_grid    = FCST;
> > > >
> > > > When I run grid_stat on the full domain I get the correct
number
> > > > of
> > > points:
> > > >
> > > > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > > > NEAREST(1), over region FULL, using 65160 pairs.
> > > >
> > > > But when I use a northern hemisphere POLY file I created:
> > > >
> > > > NHEM
> > > > 0.00000 -180.00000
> > > > 0.00000 179.00000
> > > > 89.00000 179.00000
> > > > 89.00000 -180.00000
> > > > 0.00000 -180.00000
> > > >
> > > > Rather than getting half of the grid, 32580 pairs, instead I
get:
> > > >
> > > > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > > > NEAREST(1), over region NHEM, using 88 pairs.
> > > >
> > > > I used 89 as the top latitude because I got "too close to the
pole"
> > > > errors with a setting of latitude 89.5 or higher.
> > > >
> > > > I've tried a bunch of different settings but none of them seem
> > > > to work.  I can't figure out if the 0 to 359 longitude in the
> > > > GriB2 headers are the reason why -180 to 179 fail.
> > > >
> > > > I tried a second time with:
> > > >
> > > > NHEM
> > > > 0.00000 0.00000
> > > > 0.00000 359.00000
> > > > 89.00000 359.00000
> > > > 89.00000 0.00000
> > > > 0.00000 0.00000
> > > >
> > > > And the result was:
> > > >
> > > > Processing PRMSL/A0 versus PRMSL/A0, for interpolation method
> > > > NEAREST(1), over region NHEM, using 176 pairs.
> > > >
> > > > What are the correct settings to get the Northern Hemisphere
subset?
> > > >
> > > > Thanks,
> > > > Matt
> > > >
> > > > Matthew C. Sittel, Meteorologist University Corporation for
> > > > Atmospheric Research Matthew.Sittel.ctr at us.af.mil
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>



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


More information about the Met_help mailing list