[Met_help] [rt.rap.ucar.edu #91665] History for Problem with poly region

John Halley Gotway via RT met_help at ucar.edu
Fri Aug 23 16:07:06 MDT 2019


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

John, I am having an issue with gridstat using a poly region.  I defined three regions which are latitude bands.  The north region and tropical region work as expected provide verification data (MET data files returned aren't empty), but the southern region is not returning in data even though I am windowing a global model.  The southern region is defined as latitude "<=-19.4&&>=-89.5".  I tried reversing this ">=-89.5&&<=-19.4" but I still get empty data files returned.   I don't get  any error messages when I run MET using the poly regions.

I sent the two poly files, config file, and two model files on AMERDEC.

Is there anything I missed?

Thanks
Bob


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

Subject: Problem with poly region
From: John Halley Gotway
Time: Fri Aug 23 12:08:13 2019

Bob,

The logic for determining which grid points are inside very large
polyline
regions for a global grid can get messy.  It sometime yields
unexpected
results.

If you really want latitude bands, I'd recommend running the
gen_vx_mask
tool instead.  Here's an example of doing so to define your SH region
on
the GFS domain:
   /usr/local/met-8.1.1/bin/gen_vx_mask gfs.grib gfs.grib
gfs_SH_mask.nc
-type lat -thresh '<=-19.4&&>=-89.5' -name SH_MASK

And then plot the result to verify:
   /usr/local/met-8.1.1/bin/plot_data_plane gfs_SH_mask.nc
gfs_SH_mask.ps
'name="SH_MASK"; level="(*,*)";'

The resulting image is attached.

In your MET config file, you'd replace the ".poly" filename with
NetCDF
output of gen_vx_mask.

Does that solve it?

Thanks,
John


On Fri, Aug 23, 2019 at 9:48 AM robert.craig.2 at us.af.mil via RT <
met_help at ucar.edu> wrote:

>
> Fri Aug 23 09:47:55 2019: Request 91665 was acted upon.
> Transaction: Ticket created by robert.craig.2 at us.af.mil
>        Queue: met_help
>      Subject: Problem with poly region
>        Owner: Nobody
>   Requestors: robert.craig.2 at us.af.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=91665 >
>
>
> John, I am having an issue with gridstat using a poly region.  I
defined
> three regions which are latitude bands.  The north region and
tropical
> region work as expected provide verification data (MET data files
returned
> aren't empty), but the southern region is not returning in data even
though
> I am windowing a global model.  The southern region is defined as
latitude
> "<=-19.4&&>=-89.5".  I tried reversing this ">=-89.5&&<=-19.4" but I
still
> get empty data files returned.   I don't get  any error messages
when I run
> MET using the poly regions.
>
> I sent the two poly files, config file, and two model files on
AMERDEC.
>
> Is there anything I missed?
>
> Thanks
> Bob
>
>

------------------------------------------------
Subject: RE: [Non-DoD Source] Re: [rt.rap.ucar.edu #91665] Problem with poly region
From: robert.craig.2 at us.af.mil
Time: Fri Aug 23 12:13:44 2019

John, that is exactly what I did and check the image I sent you in
AMRDEC.  If you didn't get my files, I will try to resend.

Thanks
Bob

-----Original Message-----
From: John Halley Gotway via RT <met_help at ucar.edu>
Sent: Friday, August 23, 2019 1:08 PM
To: CRAIG, ROBERT J GS-12 USAF ACC 16 WS/WXN
<robert.craig.2 at us.af.mil>
Cc: 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 #91665] Problem with
poly region

Bob,

The logic for determining which grid points are inside very large
polyline regions for a global grid can get messy.  It sometime yields
unexpected results.

If you really want latitude bands, I'd recommend running the
gen_vx_mask tool instead.  Here's an example of doing so to define
your SH region on the GFS domain:
   /usr/local/met-8.1.1/bin/gen_vx_mask gfs.grib gfs.grib
gfs_SH_mask.nc -type lat -thresh '<=-19.4&&>=-89.5' -name SH_MASK

And then plot the result to verify:
   /usr/local/met-8.1.1/bin/plot_data_plane gfs_SH_mask.nc
gfs_SH_mask.ps 'name="SH_MASK"; level="(*,*)";'

The resulting image is attached.

In your MET config file, you'd replace the ".poly" filename with
NetCDF output of gen_vx_mask.

Does that solve it?

Thanks,
John


On Fri, Aug 23, 2019 at 9:48 AM robert.craig.2 at us.af.mil via RT <
met_help at ucar.edu> wrote:

>
> Fri Aug 23 09:47:55 2019: Request 91665 was acted upon.
> Transaction: Ticket created by robert.craig.2 at us.af.mil
>        Queue: met_help
>      Subject: Problem with poly region
>        Owner: Nobody
>   Requestors: robert.craig.2 at us.af.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=91665
> >
>
>
> John, I am having an issue with gridstat using a poly region.  I
> defined three regions which are latitude bands.  The north region
and
> tropical region work as expected provide verification data (MET data
> files returned aren't empty), but the southern region is not
returning
> in data even though I am windowing a global model.  The southern
> region is defined as latitude "<=-19.4&&>=-89.5".  I tried reversing
this ">=-89.5&&<=-19.4" but I still
> get empty data files returned.   I don't get  any error messages
when I run
> MET using the poly regions.
>
> I sent the two poly files, config file, and two model files on
AMERDEC.
>
> Is there anything I missed?
>
> Thanks
> Bob
>
>



------------------------------------------------
Subject: RE: [Non-DoD Source] Re: [rt.rap.ucar.edu #91665] Problem with poly region
From: robert.craig.2 at us.af.mil
Time: Fri Aug 23 12:13:49 2019

I sent them to your email, not met_help.

-----Original Message-----
From: John Halley Gotway via RT <met_help at ucar.edu>
Sent: Friday, August 23, 2019 1:08 PM
To: CRAIG, ROBERT J GS-12 USAF ACC 16 WS/WXN
<robert.craig.2 at us.af.mil>
Cc: 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 #91665] Problem with
poly region

Bob,

The logic for determining which grid points are inside very large
polyline regions for a global grid can get messy.  It sometime yields
unexpected results.

If you really want latitude bands, I'd recommend running the
gen_vx_mask tool instead.  Here's an example of doing so to define
your SH region on the GFS domain:
   /usr/local/met-8.1.1/bin/gen_vx_mask gfs.grib gfs.grib
gfs_SH_mask.nc -type lat -thresh '<=-19.4&&>=-89.5' -name SH_MASK

And then plot the result to verify:
   /usr/local/met-8.1.1/bin/plot_data_plane gfs_SH_mask.nc
gfs_SH_mask.ps 'name="SH_MASK"; level="(*,*)";'

The resulting image is attached.

In your MET config file, you'd replace the ".poly" filename with
NetCDF output of gen_vx_mask.

Does that solve it?

Thanks,
John


On Fri, Aug 23, 2019 at 9:48 AM robert.craig.2 at us.af.mil via RT <
met_help at ucar.edu> wrote:

>
> Fri Aug 23 09:47:55 2019: Request 91665 was acted upon.
> Transaction: Ticket created by robert.craig.2 at us.af.mil
>        Queue: met_help
>      Subject: Problem with poly region
>        Owner: Nobody
>   Requestors: robert.craig.2 at us.af.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=91665
> >
>
>
> John, I am having an issue with gridstat using a poly region.  I
> defined three regions which are latitude bands.  The north region
and
> tropical region work as expected provide verification data (MET data
> files returned aren't empty), but the southern region is not
returning
> in data even though I am windowing a global model.  The southern
> region is defined as latitude "<=-19.4&&>=-89.5".  I tried reversing
this ">=-89.5&&<=-19.4" but I still
> get empty data files returned.   I don't get  any error messages
when I run
> MET using the poly regions.
>
> I sent the two poly files, config file, and two model files on
AMERDEC.
>
> Is there anything I missed?
>
> Thanks
> Bob
>
>



------------------------------------------------
Subject: Problem with poly region
From: John Halley Gotway
Time: Fri Aug 23 14:30:49 2019

Bob,

OK, I pulled the files to take a closer look.  I ran the NH hemisphere
one
on my local machine and it successfully produced a non-empty .stat
file.

*/usr/local/met-8.1.1/bin/grid_stat 1908010024 1908020000
CBSNHEM_galwem_updated -outdir out -log run_nh.log*

I do have 2 suggestions to make though.

First, I looked at the NetCDF output of Gen-Vx-Mask, named cbsnhem.nc
and
cbsshem.nc.  The variables in both those files are named "lat_mask".
That
variable name ultimately gets written to the VX_MASK column in the
Grid-Stat output files.  You should really use different names so that
you
can tell the output apart.  The is easily done using the "-name"
command
line option for Gen-Vx-Mask.  Here's the example I sent last time
which
does use that:

*/usr/local/met-8.1.1/bin/plot_**data_plane gfs_SH_mask.nc
gfs_SH_mask.ps
'name="SH_MASK"; level="(*,*)";'*

Second, I see that you have two different config files, one for the NH
and
another for the SH.  It'd run more efficiently to compute the stats
for
these 2 regions in the same call to Grid-Stat.  Just setup the mask
dictionary like this:

mask = {
   grid = [];
   poly = [ "/h/data/global/WXQC/data/met/poly/cbsnhem.nc",
               "/h/data/global/WXQC/data/met/poly/cbsshem.nc" ];
}
...
output_prefix    = "NHEM_and_SHEM";

I've attached the run_nh.log file for your reference.  Are you able to
make
it any further?

Thanks,
John

On Fri, Aug 23, 2019 at 12:14 PM robert.craig.2 at us.af.mil via RT <
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=91665 >
>
> I sent them to your email, not met_help.
>
> -----Original Message-----
> From: John Halley Gotway via RT <met_help at ucar.edu>
> Sent: Friday, August 23, 2019 1:08 PM
> To: CRAIG, ROBERT J GS-12 USAF ACC 16 WS/WXN
<robert.craig.2 at us.af.mil>
> Cc: 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 #91665] Problem with
poly
> region
>
> Bob,
>
> The logic for determining which grid points are inside very large
polyline
> regions for a global grid can get messy.  It sometime yields
unexpected
> results.
>
> If you really want latitude bands, I'd recommend running the
gen_vx_mask
> tool instead.  Here's an example of doing so to define your SH
region on
> the GFS domain:
>    /usr/local/met-8.1.1/bin/gen_vx_mask gfs.grib gfs.grib
gfs_SH_mask.nc
> -type lat -thresh '<=-19.4&&>=-89.5' -name SH_MASK
>
> And then plot the result to verify:
>    /usr/local/met-8.1.1/bin/plot_data_plane gfs_SH_mask.nc
gfs_SH_mask.ps
> 'name="SH_MASK"; level="(*,*)";'
>
> The resulting image is attached.
>
> In your MET config file, you'd replace the ".poly" filename with
NetCDF
> output of gen_vx_mask.
>
> Does that solve it?
>
> Thanks,
> John
>
>
> On Fri, Aug 23, 2019 at 9:48 AM robert.craig.2 at us.af.mil via RT <
> met_help at ucar.edu> wrote:
>
> >
> > Fri Aug 23 09:47:55 2019: Request 91665 was acted upon.
> > Transaction: Ticket created by robert.craig.2 at us.af.mil
> >        Queue: met_help
> >      Subject: Problem with poly region
> >        Owner: Nobody
> >   Requestors: robert.craig.2 at us.af.mil
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=91665
> > >
> >
> >
> > John, I am having an issue with gridstat using a poly region.  I
> > defined three regions which are latitude bands.  The north region
and
> > tropical region work as expected provide verification data (MET
data
> > files returned aren't empty), but the southern region is not
returning
> > in data even though I am windowing a global model.  The southern
> > region is defined as latitude "<=-19.4&&>=-89.5".  I tried
reversing
> this ">=-89.5&&<=-19.4" but I still
> > get empty data files returned.   I don't get  any error messages
when I
> run
> > MET using the poly regions.
> >
> > I sent the two poly files, config file, and two model files on
AMERDEC.
> >
> > Is there anything I missed?
> >
> > Thanks
> > Bob
> >
> >
>
>
>
>

------------------------------------------------
Subject: RE: [Non-DoD Source] Re: [rt.rap.ucar.edu #91665] Problem with poly region
From: robert.craig.2 at us.af.mil
Time: Fri Aug 23 14:36:51 2019

John, I was having a problem with the SH hemisphere file.  The
northern hemisphere and tropical files worked fine for me as well.  I
will update my code with your suggestions once I can find out why SH
doesn't work.

Thanks
Bob

-----Original Message-----
From: John Halley Gotway via RT <met_help at ucar.edu>
Sent: Friday, August 23, 2019 3:31 PM
To: CRAIG, ROBERT J GS-12 USAF ACC 16 WS/WXN
<robert.craig.2 at us.af.mil>
Cc: 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 #91665] Problem
with poly region

Bob,

OK, I pulled the files to take a closer look.  I ran the NH hemisphere
one on my local machine and it successfully produced a non-empty .stat
file.

*/usr/local/met-8.1.1/bin/grid_stat 1908010024 1908020000
CBSNHEM_galwem_updated -outdir out -log run_nh.log*

I do have 2 suggestions to make though.

First, I looked at the NetCDF output of Gen-Vx-Mask, named cbsnhem.nc
and cbsshem.nc.  The variables in both those files are named
"lat_mask".  That variable name ultimately gets written to the VX_MASK
column in the Grid-Stat output files.  You should really use different
names so that you can tell the output apart.  The is easily done using
the "-name" command line option for Gen-Vx-Mask.  Here's the example I
sent last time which does use that:

*/usr/local/met-8.1.1/bin/plot_**data_plane gfs_SH_mask.nc
gfs_SH_mask.ps 'name="SH_MASK"; level="(*,*)";'*

Second, I see that you have two different config files, one for the NH
and another for the SH.  It'd run more efficiently to compute the
stats for these 2 regions in the same call to Grid-Stat.  Just setup
the mask dictionary like this:

mask = {
   grid = [];
   poly = [ "/h/data/global/WXQC/data/met/poly/cbsnhem.nc",
               "/h/data/global/WXQC/data/met/poly/cbsshem.nc" ]; } ...
output_prefix    = "NHEM_and_SHEM";

I've attached the run_nh.log file for your reference.  Are you able to
make it any further?

Thanks,
John

On Fri, Aug 23, 2019 at 12:14 PM robert.craig.2 at us.af.mil via RT <
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=91665 >
>
> I sent them to your email, not met_help.
>
> -----Original Message-----
> From: John Halley Gotway via RT <met_help at ucar.edu>
> Sent: Friday, August 23, 2019 1:08 PM
> To: CRAIG, ROBERT J GS-12 USAF ACC 16 WS/WXN
> <robert.craig.2 at us.af.mil>
> Cc: 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 #91665] Problem with
> poly region
>
> Bob,
>
> The logic for determining which grid points are inside very large
> polyline regions for a global grid can get messy.  It sometime
yields
> unexpected results.
>
> If you really want latitude bands, I'd recommend running the
> gen_vx_mask tool instead.  Here's an example of doing so to define
> your SH region on the GFS domain:
>    /usr/local/met-8.1.1/bin/gen_vx_mask gfs.grib gfs.grib
> gfs_SH_mask.nc -type lat -thresh '<=-19.4&&>=-89.5' -name SH_MASK
>
> And then plot the result to verify:
>    /usr/local/met-8.1.1/bin/plot_data_plane gfs_SH_mask.nc
> gfs_SH_mask.ps 'name="SH_MASK"; level="(*,*)";'
>
> The resulting image is attached.
>
> In your MET config file, you'd replace the ".poly" filename with
> NetCDF output of gen_vx_mask.
>
> Does that solve it?
>
> Thanks,
> John
>
>
> On Fri, Aug 23, 2019 at 9:48 AM robert.craig.2 at us.af.mil via RT <
> met_help at ucar.edu> wrote:
>
> >
> > Fri Aug 23 09:47:55 2019: Request 91665 was acted upon.
> > Transaction: Ticket created by robert.craig.2 at us.af.mil
> >        Queue: met_help
> >      Subject: Problem with poly region
> >        Owner: Nobody
> >   Requestors: robert.craig.2 at us.af.mil
> >       Status: new
> >  Ticket <URL:
> > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=91665
> > >
> >
> >
> > John, I am having an issue with gridstat using a poly region.  I
> > defined three regions which are latitude bands.  The north region
> > and tropical region work as expected provide verification data
(MET
> > data files returned aren't empty), but the southern region is not
> > returning in data even though I am windowing a global model.  The
> > southern region is defined as latitude "<=-19.4&&>=-89.5".  I
tried
> > reversing
> this ">=-89.5&&<=-19.4" but I still
> > get empty data files returned.   I don't get  any error messages
when I
> run
> > MET using the poly regions.
> >
> > I sent the two poly files, config file, and two model files on
AMERDEC.
> >
> > Is there anything I missed?
> >
> > Thanks
> > Bob
> >
> >
>
>
>
>



------------------------------------------------
Subject: Problem with poly region
From: John Halley Gotway
Time: Fri Aug 23 15:05:44 2019

Bob,

Yes, good point!  I think I figured it out.  Take a close look at the
regrid section of your config file:







*regrid = {   to_grid    = "latlon 144 72 0 0 2.5 2.5";   method     =
AW_MEAN;   width      = 5;   vld_thresh = 0.5;   shape      =
SQUARE;}*

This tells Grid-Stat to regrid the forecast and observation data to
the
grid defined by "latlon 144 72 0 0 2.5 2.5".  Here's how you interpret
those numbers, from the share/met/config/README file:
   latlon Nx Ny lat_ll lon_ll delta_lat delta_lon

You've define the lower-left corner at (0, 0), which occurs at the
equator... and includes no data in the southern hemisphere.  You want
that
corner to actually be (-90, 0) for the south pole.  After this change
I get
some matched pairs:
*   to_grid    = "latlon 144 72 -90 0 2.5 2.5";*

Have a good weekend.

John

On Fri, Aug 23, 2019 at 2:37 PM robert.craig.2 at us.af.mil via RT <
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=91665 >
>
> John, I was having a problem with the SH hemisphere file.  The
northern
> hemisphere and tropical files worked fine for me as well.  I will
update my
> code with your suggestions once I can find out why SH doesn't work.
>
> Thanks
> Bob
>
> -----Original Message-----
> From: John Halley Gotway via RT <met_help at ucar.edu>
> Sent: Friday, August 23, 2019 3:31 PM
> To: CRAIG, ROBERT J GS-12 USAF ACC 16 WS/WXN
<robert.craig.2 at us.af.mil>
> Cc: 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 #91665] Problem
with
> poly region
>
> Bob,
>
> OK, I pulled the files to take a closer look.  I ran the NH
hemisphere one
> on my local machine and it successfully produced a non-empty .stat
file.
>
> */usr/local/met-8.1.1/bin/grid_stat 1908010024 1908020000
> CBSNHEM_galwem_updated -outdir out -log run_nh.log*
>
> I do have 2 suggestions to make though.
>
> First, I looked at the NetCDF output of Gen-Vx-Mask, named
cbsnhem.nc and
> cbsshem.nc.  The variables in both those files are named "lat_mask".
> That variable name ultimately gets written to the VX_MASK column in
the
> Grid-Stat output files.  You should really use different names so
that you
> can tell the output apart.  The is easily done using the "-name"
command
> line option for Gen-Vx-Mask.  Here's the example I sent last time
which
> does use that:
>
> */usr/local/met-8.1.1/bin/plot_**data_plane gfs_SH_mask.nc
gfs_SH_mask.ps
> 'name="SH_MASK"; level="(*,*)";'*
>
> Second, I see that you have two different config files, one for the
NH and
> another for the SH.  It'd run more efficiently to compute the stats
for
> these 2 regions in the same call to Grid-Stat.  Just setup the mask
> dictionary like this:
>
> mask = {
>    grid = [];
>    poly = [ "/h/data/global/WXQC/data/met/poly/cbsnhem.nc",
>                "/h/data/global/WXQC/data/met/poly/cbsshem.nc" ]; }
...
> output_prefix    = "NHEM_and_SHEM";
>
> I've attached the run_nh.log file for your reference.  Are you able
to
> make it any further?
>
> Thanks,
> John
>
> On Fri, Aug 23, 2019 at 12:14 PM robert.craig.2 at us.af.mil via RT <
> met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=91665 >
> >
> > I sent them to your email, not met_help.
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT <met_help at ucar.edu>
> > Sent: Friday, August 23, 2019 1:08 PM
> > To: CRAIG, ROBERT J GS-12 USAF ACC 16 WS/WXN
> > <robert.craig.2 at us.af.mil>
> > Cc: 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 #91665] Problem
with
> > poly region
> >
> > Bob,
> >
> > The logic for determining which grid points are inside very large
> > polyline regions for a global grid can get messy.  It sometime
yields
> > unexpected results.
> >
> > If you really want latitude bands, I'd recommend running the
> > gen_vx_mask tool instead.  Here's an example of doing so to define
> > your SH region on the GFS domain:
> >    /usr/local/met-8.1.1/bin/gen_vx_mask gfs.grib gfs.grib
> > gfs_SH_mask.nc -type lat -thresh '<=-19.4&&>=-89.5' -name SH_MASK
> >
> > And then plot the result to verify:
> >    /usr/local/met-8.1.1/bin/plot_data_plane gfs_SH_mask.nc
> > gfs_SH_mask.ps 'name="SH_MASK"; level="(*,*)";'
> >
> > The resulting image is attached.
> >
> > In your MET config file, you'd replace the ".poly" filename with
> > NetCDF output of gen_vx_mask.
> >
> > Does that solve it?
> >
> > Thanks,
> > John
> >
> >
> > On Fri, Aug 23, 2019 at 9:48 AM robert.craig.2 at us.af.mil via RT <
> > met_help at ucar.edu> wrote:
> >
> > >
> > > Fri Aug 23 09:47:55 2019: Request 91665 was acted upon.
> > > Transaction: Ticket created by robert.craig.2 at us.af.mil
> > >        Queue: met_help
> > >      Subject: Problem with poly region
> > >        Owner: Nobody
> > >   Requestors: robert.craig.2 at us.af.mil
> > >       Status: new
> > >  Ticket <URL:
> > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=91665
> > > >
> > >
> > >
> > > John, I am having an issue with gridstat using a poly region.  I
> > > defined three regions which are latitude bands.  The north
region
> > > and tropical region work as expected provide verification data
(MET
> > > data files returned aren't empty), but the southern region is
not
> > > returning in data even though I am windowing a global model.
The
> > > southern region is defined as latitude "<=-19.4&&>=-89.5".  I
tried
> > > reversing
> > this ">=-89.5&&<=-19.4" but I still
> > > get empty data files returned.   I don't get  any error messages
when I
> > run
> > > MET using the poly regions.
> > >
> > > I sent the two poly files, config file, and two model files on
AMERDEC.
> > >
> > > Is there anything I missed?
> > >
> > > Thanks
> > > Bob
> > >
> > >
> >
> >
> >
> >
>
>
>
>

------------------------------------------------
Subject: RE: [Non-DoD Source] Re: [rt.rap.ucar.edu #91665] Problem with poly region
From: robert.craig.2 at us.af.mil
Time: Fri Aug 23 15:29:37 2019

That’s it.

Thanks
Bob

-----Original Message-----
From: John Halley Gotway via RT <met_help at ucar.edu>
Sent: Friday, August 23, 2019 4:06 PM
To: CRAIG, ROBERT J GS-12 USAF ACC 16 WS/WXN
<robert.craig.2 at us.af.mil>
Cc: 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 #91665] Problem
with poly region

Bob,

Yes, good point!  I think I figured it out.  Take a close look at the
regrid section of your config file:







*regrid = {   to_grid    = "latlon 144 72 0 0 2.5 2.5";   method     =
AW_MEAN;   width      = 5;   vld_thresh = 0.5;   shape      =
SQUARE;}*

This tells Grid-Stat to regrid the forecast and observation data to
the grid defined by "latlon 144 72 0 0 2.5 2.5".  Here's how you
interpret those numbers, from the share/met/config/README file:
   latlon Nx Ny lat_ll lon_ll delta_lat delta_lon

You've define the lower-left corner at (0, 0), which occurs at the
equator... and includes no data in the southern hemisphere.  You want
that corner to actually be (-90, 0) for the south pole.  After this
change I get some matched pairs:
*   to_grid    = "latlon 144 72 -90 0 2.5 2.5";*

Have a good weekend.

John

On Fri, Aug 23, 2019 at 2:37 PM robert.craig.2 at us.af.mil via RT <
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=91665 >
>
> John, I was having a problem with the SH hemisphere file.  The
> northern hemisphere and tropical files worked fine for me as well.
I
> will update my code with your suggestions once I can find out why SH
doesn't work.
>
> Thanks
> Bob
>
> -----Original Message-----
> From: John Halley Gotway via RT <met_help at ucar.edu>
> Sent: Friday, August 23, 2019 3:31 PM
> To: CRAIG, ROBERT J GS-12 USAF ACC 16 WS/WXN
> <robert.craig.2 at us.af.mil>
> Cc: 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 #91665] Problem
> with poly region
>
> Bob,
>
> OK, I pulled the files to take a closer look.  I ran the NH
hemisphere
> one on my local machine and it successfully produced a non-empty
.stat file.
>
> */usr/local/met-8.1.1/bin/grid_stat 1908010024 1908020000
> CBSNHEM_galwem_updated -outdir out -log run_nh.log*
>
> I do have 2 suggestions to make though.
>
> First, I looked at the NetCDF output of Gen-Vx-Mask, named
cbsnhem.nc
> and cbsshem.nc.  The variables in both those files are named
"lat_mask".
> That variable name ultimately gets written to the VX_MASK column in
> the Grid-Stat output files.  You should really use different names
so
> that you can tell the output apart.  The is easily done using the
> "-name" command line option for Gen-Vx-Mask.  Here's the example I
> sent last time which does use that:
>
> */usr/local/met-8.1.1/bin/plot_**data_plane gfs_SH_mask.nc
> gfs_SH_mask.ps 'name="SH_MASK"; level="(*,*)";'*
>
> Second, I see that you have two different config files, one for the
NH
> and another for the SH.  It'd run more efficiently to compute the
> stats for these 2 regions in the same call to Grid-Stat.  Just setup
> the mask dictionary like this:
>
> mask = {
>    grid = [];
>    poly = [ "/h/data/global/WXQC/data/met/poly/cbsnhem.nc",
>                "/h/data/global/WXQC/data/met/poly/cbsshem.nc" ]; }
...
> output_prefix    = "NHEM_and_SHEM";
>
> I've attached the run_nh.log file for your reference.  Are you able
to
> make it any further?
>
> Thanks,
> John
>
> On Fri, Aug 23, 2019 at 12:14 PM robert.craig.2 at us.af.mil via RT <
> met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=91665 >
> >
> > I sent them to your email, not met_help.
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT <met_help at ucar.edu>
> > Sent: Friday, August 23, 2019 1:08 PM
> > To: CRAIG, ROBERT J GS-12 USAF ACC 16 WS/WXN
> > <robert.craig.2 at us.af.mil>
> > Cc: 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 #91665] Problem
with
> > poly region
> >
> > Bob,
> >
> > The logic for determining which grid points are inside very large
> > polyline regions for a global grid can get messy.  It sometime
> > yields unexpected results.
> >
> > If you really want latitude bands, I'd recommend running the
> > gen_vx_mask tool instead.  Here's an example of doing so to define
> > your SH region on the GFS domain:
> >    /usr/local/met-8.1.1/bin/gen_vx_mask gfs.grib gfs.grib
> > gfs_SH_mask.nc -type lat -thresh '<=-19.4&&>=-89.5' -name SH_MASK
> >
> > And then plot the result to verify:
> >    /usr/local/met-8.1.1/bin/plot_data_plane gfs_SH_mask.nc
> > gfs_SH_mask.ps 'name="SH_MASK"; level="(*,*)";'
> >
> > The resulting image is attached.
> >
> > In your MET config file, you'd replace the ".poly" filename with
> > NetCDF output of gen_vx_mask.
> >
> > Does that solve it?
> >
> > Thanks,
> > John
> >
> >
> > On Fri, Aug 23, 2019 at 9:48 AM robert.craig.2 at us.af.mil via RT <
> > met_help at ucar.edu> wrote:
> >
> > >
> > > Fri Aug 23 09:47:55 2019: Request 91665 was acted upon.
> > > Transaction: Ticket created by robert.craig.2 at us.af.mil
> > >        Queue: met_help
> > >      Subject: Problem with poly region
> > >        Owner: Nobody
> > >   Requestors: robert.craig.2 at us.af.mil
> > >       Status: new
> > >  Ticket <URL:
> > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=91665
> > > >
> > >
> > >
> > > John, I am having an issue with gridstat using a poly region.  I
> > > defined three regions which are latitude bands.  The north
region
> > > and tropical region work as expected provide verification data
> > > (MET data files returned aren't empty), but the southern region
is
> > > not returning in data even though I am windowing a global model.
> > > The southern region is defined as latitude "<=-19.4&&>=-89.5".
I
> > > tried reversing
> > this ">=-89.5&&<=-19.4" but I still
> > > get empty data files returned.   I don't get  any error messages
when I
> > run
> > > MET using the poly regions.
> > >
> > > I sent the two poly files, config file, and two model files on
AMERDEC.
> > >
> > > Is there anything I missed?
> > >
> > > Thanks
> > > Bob
> > >
> > >
> >
> >
> >
> >
>
>
>
>



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


More information about the Met_help mailing list