[Met_help] [rt.rap.ucar.edu #84536] History for MET for smaller domain from global output

John Halley Gotway via RT met_help at ucar.edu
Tue Jul 9 12:03:31 MDT 2019


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

Hello!

I have global FV3GFS forecast output  and global observations from CMORPH
on Theia. From the global output, I will like to analyze a smaller domain
e.g. 5N-30N 55W-85W. Is there a configure file where I can set up Lat and
Lon different than the input file?

I saw the gen-vx-mask option in the tutorial but for what I understood does
files are pre made.

Thanks,

Keren


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

Subject: MET for smaller domain from global output
From: John Halley Gotway
Time: Fri Mar 23 15:14:51 2018

Keren,

You have a couple of options here.  Since you're comparing a gridded
forecast field to a gridded analysis, you'll be running a grid-to-grid
tool, like Grid-Stat or MODE.

(1) You could use the "regrid" option in the config files to actually
regrid your data to a smaller domain.  If you're input is a lat/lon
grid
and your output is really just a subset of that lat/lon grid, then
you'd
define the "to_grid" so that the output grid points coincide with the
input
ones.

(2) A second (more common) option would be to just define one (or
more)
subregions over which to compute stats.  And yes, you can definitely
use
gen_vx_mask to define that masking region.  Since you want a range of
lat/lon values, I'd recommend using the "-type lat" and "-type lon"
masking
types.

Here's an example... looks to me like your mask is approximately the
Gulf
of Mexico.  So I named it "GOM_Mask":

(1) Grab a GFS file for the example:
 > wget
http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.2018032312/gfs.t12z.pgrb2.0p25.f012

(2) Run gen_vx_mask to define latitude band:
 > met-6.1/bin/gen_vx_mask gfs.t12z.pgrb2.0p25.f012
gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type lat -thresh 'ge5&&le30'

(3) Run gen_vx_mask to intersect the longitude band
 > met-6.1/bin/gen_vx_mask lat_band.nc lat_band.nc GOM_Mask.nc -type
lon
-thresh 'ge-85&&le-55' -intersection -name GOM_Mask

(4) Plot the result using plot_data_plane
 > met-6.1/bin/plot_data_plane GOM_Mask.nc GOM_Mask.ps
'name="GOM_Mask";
level="(*,*)";'

And I've attached a PNG version of that image.

Then you'd list this mask file in your Grid-Stat config file:

mask = {
   grid = [ "FULL" ];
   poly = [ "path/to/GOM_Mask.nc" ];
}


Hope that helps get you going.

Thanks,
John


On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado - NOAA Affiliate via RT
<
met_help at ucar.edu> wrote:

>
> Fri Mar 23 14:57:16 2018: Request 84536 was acted upon.
> Transaction: Ticket created by keren.rosado at noaa.gov
>        Queue: met_help
>      Subject: MET for smaller domain from global output
>        Owner: Nobody
>   Requestors: keren.rosado at noaa.gov
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
>
>
> Hello!
>
> I have global FV3GFS forecast output  and global observations from
CMORPH
> on Theia. From the global output, I will like to analyze a smaller
domain
> e.g. 5N-30N 55W-85W. Is there a configure file where I can set up
Lat and
> Lon different than the input file?
>
> I saw the gen-vx-mask option in the tutorial but for what I
understood does
> files are pre made.
>
> Thanks,
>
> Keren
>
>

------------------------------------------------
Subject: MET for smaller domain from global output
From: Keren Rosado - NOAA Affiliate
Time: Mon Mar 26 15:01:30 2018

Hi John,

I am using PointStatConfig_ADPUPA_REGRID_G3 to run point stat located
at
/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/

I added  Matthew_Mask.nc in the mask section as you explained above to
the PointStatConfig_ADPUPA_REGRID_G3.
Results from this gave me an error: ERROR  : parse_latlon_poly_file()
->
The polyline file supplied
(/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/masks/Matthew_Mask.nc)
must contain at least 3 pairs of points to define a masking region.

Trying to fix the error, I added the original mask files and added my
new
mask file (Matthew_Mask) and the error still the same.

// Verification masking regions

//

mask = {

   grid = [ "FULL" ];

   poly = [ "${MASKS}/Matthew_Mask.nc",

            "${MASKS}/gfs_NH_G3.nc",

            "${MASKS}/gfs_SH_G3.nc",

            "${MASKS}/gfs_TROP_G3.nc" ];

   sid  = [];

};



Thanks,

Keren


----
Keren Rosado, Ph.D.
NCAS-M Postdoctoral Fellow
NOAA ESRL
Office: (303) 497-5907

On Fri, Mar 23, 2018 at 3:14 PM, John Halley Gotway via RT <
met_help at ucar.edu> wrote:

> Keren,
>
> You have a couple of options here.  Since you're comparing a gridded
> forecast field to a gridded analysis, you'll be running a grid-to-
grid
> tool, like Grid-Stat or MODE.
>
> (1) You could use the "regrid" option in the config files to
actually
> regrid your data to a smaller domain.  If you're input is a lat/lon
grid
> and your output is really just a subset of that lat/lon grid, then
you'd
> define the "to_grid" so that the output grid points coincide with
the input
> ones.
>
> (2) A second (more common) option would be to just define one (or
more)
> subregions over which to compute stats.  And yes, you can definitely
use
> gen_vx_mask to define that masking region.  Since you want a range
of
> lat/lon values, I'd recommend using the "-type lat" and "-type lon"
masking
> types.
>
> Here's an example... looks to me like your mask is approximately the
Gulf
> of Mexico.  So I named it "GOM_Mask":
>
> (1) Grab a GFS file for the example:
>  > wget
> http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.
> 2018032312/gfs.t12z.pgrb2.0p25.f012
>
> (2) Run gen_vx_mask to define latitude band:
>  > met-6.1/bin/gen_vx_mask gfs.t12z.pgrb2.0p25.f012
> gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type lat -thresh 'ge5&&le30'
>
> (3) Run gen_vx_mask to intersect the longitude band
>  > met-6.1/bin/gen_vx_mask lat_band.nc lat_band.nc GOM_Mask.nc -type
lon
> -thresh 'ge-85&&le-55' -intersection -name GOM_Mask
>
> (4) Plot the result using plot_data_plane
>  > met-6.1/bin/plot_data_plane GOM_Mask.nc GOM_Mask.ps
'name="GOM_Mask";
> level="(*,*)";'
>
> And I've attached a PNG version of that image.
>
> Then you'd list this mask file in your Grid-Stat config file:
>
> mask = {
>    grid = [ "FULL" ];
>    poly = [ "path/to/GOM_Mask.nc" ];
> }
>
>
> Hope that helps get you going.
>
> Thanks,
> John
>
>
> On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado - NOAA Affiliate via
RT <
> met_help at ucar.edu> wrote:
>
> >
> > Fri Mar 23 14:57:16 2018: Request 84536 was acted upon.
> > Transaction: Ticket created by keren.rosado at noaa.gov
> >        Queue: met_help
> >      Subject: MET for smaller domain from global output
> >        Owner: Nobody
> >   Requestors: keren.rosado at noaa.gov
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> >
> >
> > Hello!
> >
> > I have global FV3GFS forecast output  and global observations from
CMORPH
> > on Theia. From the global output, I will like to analyze a smaller
domain
> > e.g. 5N-30N 55W-85W. Is there a configure file where I can set up
Lat and
> > Lon different than the input file?
> >
> > I saw the gen-vx-mask option in the tutorial but for what I
understood
> does
> > files are pre made.
> >
> > Thanks,
> >
> > Keren
> >
> >
>
>

------------------------------------------------
Subject: MET for smaller domain from global output
From: John Halley Gotway
Time: Mon Mar 26 16:48:03 2018

Keren,

I went hunting around on theia, looking at your data.  I see that
you're
using either version 5.1 or 5.2 of MET.  The latest available version
on
theia is 7.0.

I'd like to replicate the error message you're getting, so I can see
what
is needed to fix it.  Are you able to send me a single call to Point-
Stat
that replicates this behavior?  Or are you calling it from a long
script
that's doing lots of other step?

Here's a point-stat script I found in your area:
   /scratch3/BMC/fim/Keren.Rosado/MET/scripts/run_point_stat.ksh

Is that what you're running?

Thanks,
John

On Mon, Mar 26, 2018 at 3:01 PM, Keren Rosado - NOAA Affiliate via RT
<
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
>
> Hi John,
>
> I am using PointStatConfig_ADPUPA_REGRID_G3 to run point stat
located at
> /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
>
> I added  Matthew_Mask.nc in the mask section as you explained above
to
> the PointStatConfig_ADPUPA_REGRID_G3.
> Results from this gave me an error: ERROR  :
parse_latlon_poly_file() ->
> The polyline file supplied
>
(/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/masks/Matthew_Mask.nc)
> must contain at least 3 pairs of points to define a masking region.
>
> Trying to fix the error, I added the original mask files and added
my new
> mask file (Matthew_Mask) and the error still the same.
>
> // Verification masking regions
>
> //
>
> mask = {
>
>    grid = [ "FULL" ];
>
>    poly = [ "${MASKS}/Matthew_Mask.nc",
>
>             "${MASKS}/gfs_NH_G3.nc",
>
>             "${MASKS}/gfs_SH_G3.nc",
>
>             "${MASKS}/gfs_TROP_G3.nc" ];
>
>    sid  = [];
>
> };
>
>
>
> Thanks,
>
> Keren
>
>
> ----
> Keren Rosado, Ph.D.
> NCAS-M Postdoctoral Fellow
> NOAA ESRL
> Office: (303) 497-5907
>
> On Fri, Mar 23, 2018 at 3:14 PM, John Halley Gotway via RT <
> met_help at ucar.edu> wrote:
>
> > Keren,
> >
> > You have a couple of options here.  Since you're comparing a
gridded
> > forecast field to a gridded analysis, you'll be running a grid-to-
grid
> > tool, like Grid-Stat or MODE.
> >
> > (1) You could use the "regrid" option in the config files to
actually
> > regrid your data to a smaller domain.  If you're input is a
lat/lon grid
> > and your output is really just a subset of that lat/lon grid, then
you'd
> > define the "to_grid" so that the output grid points coincide with
the
> input
> > ones.
> >
> > (2) A second (more common) option would be to just define one (or
more)
> > subregions over which to compute stats.  And yes, you can
definitely use
> > gen_vx_mask to define that masking region.  Since you want a range
of
> > lat/lon values, I'd recommend using the "-type lat" and "-type
lon"
> masking
> > types.
> >
> > Here's an example... looks to me like your mask is approximately
the Gulf
> > of Mexico.  So I named it "GOM_Mask":
> >
> > (1) Grab a GFS file for the example:
> >  > wget
> > http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.
> > 2018032312/gfs.t12z.pgrb2.0p25.f012
> >
> > (2) Run gen_vx_mask to define latitude band:
> >  > met-6.1/bin/gen_vx_mask gfs.t12z.pgrb2.0p25.f012
> > gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type lat -thresh 'ge5&&le30'
> >
> > (3) Run gen_vx_mask to intersect the longitude band
> >  > met-6.1/bin/gen_vx_mask lat_band.nc lat_band.nc GOM_Mask.nc
-type lon
> > -thresh 'ge-85&&le-55' -intersection -name GOM_Mask
> >
> > (4) Plot the result using plot_data_plane
> >  > met-6.1/bin/plot_data_plane GOM_Mask.nc GOM_Mask.ps
'name="GOM_Mask";
> > level="(*,*)";'
> >
> > And I've attached a PNG version of that image.
> >
> > Then you'd list this mask file in your Grid-Stat config file:
> >
> > mask = {
> >    grid = [ "FULL" ];
> >    poly = [ "path/to/GOM_Mask.nc" ];
> > }
> >
> >
> > Hope that helps get you going.
> >
> > Thanks,
> > John
> >
> >
> > On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado - NOAA Affiliate via
RT <
> > met_help at ucar.edu> wrote:
> >
> > >
> > > Fri Mar 23 14:57:16 2018: Request 84536 was acted upon.
> > > Transaction: Ticket created by keren.rosado at noaa.gov
> > >        Queue: met_help
> > >      Subject: MET for smaller domain from global output
> > >        Owner: Nobody
> > >   Requestors: keren.rosado at noaa.gov
> > >       Status: new
> > >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536
> >
> > >
> > >
> > > Hello!
> > >
> > > I have global FV3GFS forecast output  and global observations
from
> CMORPH
> > > on Theia. From the global output, I will like to analyze a
smaller
> domain
> > > e.g. 5N-30N 55W-85W. Is there a configure file where I can set
up Lat
> and
> > > Lon different than the input file?
> > >
> > > I saw the gen-vx-mask option in the tutorial but for what I
understood
> > does
> > > files are pre made.
> > >
> > > Thanks,
> > >
> > > Keren
> > >
> > >
> >
> >
>
>

------------------------------------------------
Subject: MET for smaller domain from global output
From: Keren Rosado - NOAA Affiliate
Time: Mon Mar 26 19:29:10 2018

Hi John,

I am using a GMTB package that runs MET using rocoto. I copied the
entire
MET directory for the package to work.

The xml file is
located /scratch3/BMC/fim/Keren.Rosado/MET/xml/gf_matthew_jan.xml to
run
this xml I use runrocotoGFK.ksh
I found point stat script different that the one you metioned above
at: /scratch3/BMC/fim/Keren.Rosado/MET/bin/met_point_verf_sfc.ksh and
met_point_verf_ua.ksh

The model output grib files are located
at: /scratch3/BMC/fim/Keren.Rosado/MET/gf_Matthew_jan/2016092900

Let me know if you need any other clarification.

Thanks,

Keren




----
Keren Rosado, Ph.D.
NCAS-M Postdoctoral Fellow
NOAA ESRL
Office: (303) 497-5907

On Mon, Mar 26, 2018 at 4:48 PM, John Halley Gotway via RT <
met_help at ucar.edu> wrote:

> Keren,
>
> I went hunting around on theia, looking at your data.  I see that
you're
> using either version 5.1 or 5.2 of MET.  The latest available
version on
> theia is 7.0.
>
> I'd like to replicate the error message you're getting, so I can see
what
> is needed to fix it.  Are you able to send me a single call to
Point-Stat
> that replicates this behavior?  Or are you calling it from a long
script
> that's doing lots of other step?
>
> Here's a point-stat script I found in your area:
>    /scratch3/BMC/fim/Keren.Rosado/MET/scripts/run_point_stat.ksh
>
> Is that what you're running?
>
> Thanks,
> John
>
> On Mon, Mar 26, 2018 at 3:01 PM, Keren Rosado - NOAA Affiliate via
RT <
> met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> >
> > Hi John,
> >
> > I am using PointStatConfig_ADPUPA_REGRID_G3 to run point stat
located at
> > /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> >
> > I added  Matthew_Mask.nc in the mask section as you explained
above to
> > the PointStatConfig_ADPUPA_REGRID_G3.
> > Results from this gave me an error: ERROR  :
parse_latlon_poly_file() ->
> > The polyline file supplied
> > (/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> masks/Matthew_Mask.nc)
> > must contain at least 3 pairs of points to define a masking
region.
> >
> > Trying to fix the error, I added the original mask files and added
my new
> > mask file (Matthew_Mask) and the error still the same.
> >
> > // Verification masking regions
> >
> > //
> >
> > mask = {
> >
> >    grid = [ "FULL" ];
> >
> >    poly = [ "${MASKS}/Matthew_Mask.nc",
> >
> >             "${MASKS}/gfs_NH_G3.nc",
> >
> >             "${MASKS}/gfs_SH_G3.nc",
> >
> >             "${MASKS}/gfs_TROP_G3.nc" ];
> >
> >    sid  = [];
> >
> > };
> >
> >
> >
> > Thanks,
> >
> > Keren
> >
> >
> > ----
> > Keren Rosado, Ph.D.
> > NCAS-M Postdoctoral Fellow
> > NOAA ESRL
> > Office: (303) 497-5907
> >
> > On Fri, Mar 23, 2018 at 3:14 PM, John Halley Gotway via RT <
> > met_help at ucar.edu> wrote:
> >
> > > Keren,
> > >
> > > You have a couple of options here.  Since you're comparing a
gridded
> > > forecast field to a gridded analysis, you'll be running a grid-
to-grid
> > > tool, like Grid-Stat or MODE.
> > >
> > > (1) You could use the "regrid" option in the config files to
actually
> > > regrid your data to a smaller domain.  If you're input is a
lat/lon
> grid
> > > and your output is really just a subset of that lat/lon grid,
then
> you'd
> > > define the "to_grid" so that the output grid points coincide
with the
> > input
> > > ones.
> > >
> > > (2) A second (more common) option would be to just define one
(or more)
> > > subregions over which to compute stats.  And yes, you can
definitely
> use
> > > gen_vx_mask to define that masking region.  Since you want a
range of
> > > lat/lon values, I'd recommend using the "-type lat" and "-type
lon"
> > masking
> > > types.
> > >
> > > Here's an example... looks to me like your mask is approximately
the
> Gulf
> > > of Mexico.  So I named it "GOM_Mask":
> > >
> > > (1) Grab a GFS file for the example:
> > >  > wget
> > > http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.
> > > 2018032312/gfs.t12z.pgrb2.0p25.f012
> > >
> > > (2) Run gen_vx_mask to define latitude band:
> > >  > met-6.1/bin/gen_vx_mask gfs.t12z.pgrb2.0p25.f012
> > > gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type lat -thresh
'ge5&&le30'
> > >
> > > (3) Run gen_vx_mask to intersect the longitude band
> > >  > met-6.1/bin/gen_vx_mask lat_band.nc lat_band.nc GOM_Mask.nc
-type
> lon
> > > -thresh 'ge-85&&le-55' -intersection -name GOM_Mask
> > >
> > > (4) Plot the result using plot_data_plane
> > >  > met-6.1/bin/plot_data_plane GOM_Mask.nc GOM_Mask.ps
> 'name="GOM_Mask";
> > > level="(*,*)";'
> > >
> > > And I've attached a PNG version of that image.
> > >
> > > Then you'd list this mask file in your Grid-Stat config file:
> > >
> > > mask = {
> > >    grid = [ "FULL" ];
> > >    poly = [ "path/to/GOM_Mask.nc" ];
> > > }
> > >
> > >
> > > Hope that helps get you going.
> > >
> > > Thanks,
> > > John
> > >
> > >
> > > On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado - NOAA Affiliate
via RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > >
> > > > Fri Mar 23 14:57:16 2018: Request 84536 was acted upon.
> > > > Transaction: Ticket created by keren.rosado at noaa.gov
> > > >        Queue: met_help
> > > >      Subject: MET for smaller domain from global output
> > > >        Owner: Nobody
> > > >   Requestors: keren.rosado at noaa.gov
> > > >       Status: new
> > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> Ticket/Display.html?id=84536
> > >
> > > >
> > > >
> > > > Hello!
> > > >
> > > > I have global FV3GFS forecast output  and global observations
from
> > CMORPH
> > > > on Theia. From the global output, I will like to analyze a
smaller
> > domain
> > > > e.g. 5N-30N 55W-85W. Is there a configure file where I can set
up Lat
> > and
> > > > Lon different than the input file?
> > > >
> > > > I saw the gen-vx-mask option in the tutorial but for what I
> understood
> > > does
> > > > files are pre made.
> > > >
> > > > Thanks,
> > > >
> > > > Keren
> > > >
> > > >
> > >
> > >
> >
> >
>
>

------------------------------------------------
Subject: MET for smaller domain from global output
From: John Halley Gotway
Time: Wed Mar 28 22:00:35 2018

Keren,

OK, I understand what's going on here.  This one was tricky!  First
time
I've seen this.

The problem is caused by you mixing tools from MET versions 5.2 and
6.1.
And more specifically, it's the version of NetCDF that's causing the
problem.  Prior to version 6.0, MET used NetCDF3 to read/write NetCDF
files.  Versions 6.0 and later use NetCDF4.

Here's what's happening...
- Running "ncdump -h" on your mask data files reveals that they were
created with MET version 6.1... meaning NetCDF4.
   ncdump -h  /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
masks/Matthew_Mask.nc

 :MET_version = "V6.1" ;


- But in the workflow, you're running MET version 5.2... which expects
NetCDF3 files.


- In "mask.poly" you can pass in either a gridded data file or an
ascii
polyline file.  Point-Stat tries to process the input file first as a
gridded data file.  If that doesn't work, it assumes the input file is
ascii instead.


- So it tries opening "Matthew_Mask.nc" as a gridded data file.  That
fails
because the NetCDF3 library doesn't know anything about NetCDF4 files.
So
it tries to process it as ascii... which fails with the error message
you
saw.


Next, I ran the following commands to convert your mask file from
NetCDF4
to 3:


   module load nco

   nccopy -k 1 masks/Matthew_Mask.nc masks/Matthew_Mask_NetCDF3.nc

And then I updated the Point-Stat config file to point to
"Matthew_Mask_NetCDF3.nc".


When I run Point-Stat, it still fails, but with a much more useful
error
message.  Looks like you didn't generate the mask file for the right
domain:


ERROR  : parse_poly_mask() -> The masking and verification grids do
not
match:

ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000 lon_ll:
-0.000 delta_lat: 0.250 delta_lon: 0.250 !=

ERROR  : Projection: Lambert Conformal Nx: 614 Ny: 428 Lat_LL: 12.190
Lon_LL: 133.459 Lon_orient: 95.000 Alpha: 1356.011 Cone: 0.423 Bx:
346.6564
By: 1189.0556

In general, I'd recommend sticking with a single version of MET.  If
your
scripts/config files are set up to use met-5.2, use that version of
gen_vx_mask to define the input masks.


Hope that helps clarify.


Thanks,
John




On Mon, Mar 26, 2018 at 7:29 PM, Keren Rosado - NOAA Affiliate via RT
<
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
>
> Hi John,
>
> I am using a GMTB package that runs MET using rocoto. I copied the
entire
> MET directory for the package to work.
>
> The xml file is
> located /scratch3/BMC/fim/Keren.Rosado/MET/xml/gf_matthew_jan.xml to
run
> this xml I use runrocotoGFK.ksh
> I found point stat script different that the one you metioned above
> at: /scratch3/BMC/fim/Keren.Rosado/MET/bin/met_point_verf_sfc.ksh
and
> met_point_verf_ua.ksh
>
> The model output grib files are located
> at: /scratch3/BMC/fim/Keren.Rosado/MET/gf_Matthew_jan/2016092900
>
> Let me know if you need any other clarification.
>
> Thanks,
>
> Keren
>
>
>
>
> ----
> Keren Rosado, Ph.D.
> NCAS-M Postdoctoral Fellow
> NOAA ESRL
> Office: (303) 497-5907
>
> On Mon, Mar 26, 2018 at 4:48 PM, John Halley Gotway via RT <
> met_help at ucar.edu> wrote:
>
> > Keren,
> >
> > I went hunting around on theia, looking at your data.  I see that
you're
> > using either version 5.1 or 5.2 of MET.  The latest available
version on
> > theia is 7.0.
> >
> > I'd like to replicate the error message you're getting, so I can
see what
> > is needed to fix it.  Are you able to send me a single call to
Point-Stat
> > that replicates this behavior?  Or are you calling it from a long
script
> > that's doing lots of other step?
> >
> > Here's a point-stat script I found in your area:
> >    /scratch3/BMC/fim/Keren.Rosado/MET/scripts/run_point_stat.ksh
> >
> > Is that what you're running?
> >
> > Thanks,
> > John
> >
> > On Mon, Mar 26, 2018 at 3:01 PM, Keren Rosado - NOAA Affiliate via
RT <
> > met_help at ucar.edu> wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> > >
> > > Hi John,
> > >
> > > I am using PointStatConfig_ADPUPA_REGRID_G3 to run point stat
located
> at
> > > /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > >
> > > I added  Matthew_Mask.nc in the mask section as you explained
above to
> > > the PointStatConfig_ADPUPA_REGRID_G3.
> > > Results from this gave me an error: ERROR  :
parse_latlon_poly_file()
> ->
> > > The polyline file supplied
> > > (/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > masks/Matthew_Mask.nc)
> > > must contain at least 3 pairs of points to define a masking
region.
> > >
> > > Trying to fix the error, I added the original mask files and
added my
> new
> > > mask file (Matthew_Mask) and the error still the same.
> > >
> > > // Verification masking regions
> > >
> > > //
> > >
> > > mask = {
> > >
> > >    grid = [ "FULL" ];
> > >
> > >    poly = [ "${MASKS}/Matthew_Mask.nc",
> > >
> > >             "${MASKS}/gfs_NH_G3.nc",
> > >
> > >             "${MASKS}/gfs_SH_G3.nc",
> > >
> > >             "${MASKS}/gfs_TROP_G3.nc" ];
> > >
> > >    sid  = [];
> > >
> > > };
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Keren
> > >
> > >
> > > ----
> > > Keren Rosado, Ph.D.
> > > NCAS-M Postdoctoral Fellow
> > > NOAA ESRL
> > > Office: (303) 497-5907
> > >
> > > On Fri, Mar 23, 2018 at 3:14 PM, John Halley Gotway via RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > > Keren,
> > > >
> > > > You have a couple of options here.  Since you're comparing a
gridded
> > > > forecast field to a gridded analysis, you'll be running a
> grid-to-grid
> > > > tool, like Grid-Stat or MODE.
> > > >
> > > > (1) You could use the "regrid" option in the config files to
actually
> > > > regrid your data to a smaller domain.  If you're input is a
lat/lon
> > grid
> > > > and your output is really just a subset of that lat/lon grid,
then
> > you'd
> > > > define the "to_grid" so that the output grid points coincide
with the
> > > input
> > > > ones.
> > > >
> > > > (2) A second (more common) option would be to just define one
(or
> more)
> > > > subregions over which to compute stats.  And yes, you can
definitely
> > use
> > > > gen_vx_mask to define that masking region.  Since you want a
range of
> > > > lat/lon values, I'd recommend using the "-type lat" and "-type
lon"
> > > masking
> > > > types.
> > > >
> > > > Here's an example... looks to me like your mask is
approximately the
> > Gulf
> > > > of Mexico.  So I named it "GOM_Mask":
> > > >
> > > > (1) Grab a GFS file for the example:
> > > >  > wget
> > > > http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.
> > > > 2018032312/gfs.t12z.pgrb2.0p25.f012
> > > >
> > > > (2) Run gen_vx_mask to define latitude band:
> > > >  > met-6.1/bin/gen_vx_mask gfs.t12z.pgrb2.0p25.f012
> > > > gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type lat -thresh
'ge5&&le30'
> > > >
> > > > (3) Run gen_vx_mask to intersect the longitude band
> > > >  > met-6.1/bin/gen_vx_mask lat_band.nc lat_band.nc GOM_Mask.nc
-type
> > lon
> > > > -thresh 'ge-85&&le-55' -intersection -name GOM_Mask
> > > >
> > > > (4) Plot the result using plot_data_plane
> > > >  > met-6.1/bin/plot_data_plane GOM_Mask.nc GOM_Mask.ps
> > 'name="GOM_Mask";
> > > > level="(*,*)";'
> > > >
> > > > And I've attached a PNG version of that image.
> > > >
> > > > Then you'd list this mask file in your Grid-Stat config file:
> > > >
> > > > mask = {
> > > >    grid = [ "FULL" ];
> > > >    poly = [ "path/to/GOM_Mask.nc" ];
> > > > }
> > > >
> > > >
> > > > Hope that helps get you going.
> > > >
> > > > Thanks,
> > > > John
> > > >
> > > >
> > > > On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado - NOAA Affiliate
via
> RT <
> > > > met_help at ucar.edu> wrote:
> > > >
> > > > >
> > > > > Fri Mar 23 14:57:16 2018: Request 84536 was acted upon.
> > > > > Transaction: Ticket created by keren.rosado at noaa.gov
> > > > >        Queue: met_help
> > > > >      Subject: MET for smaller domain from global output
> > > > >        Owner: Nobody
> > > > >   Requestors: keren.rosado at noaa.gov
> > > > >       Status: new
> > > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> > Ticket/Display.html?id=84536
> > > >
> > > > >
> > > > >
> > > > > Hello!
> > > > >
> > > > > I have global FV3GFS forecast output  and global
observations from
> > > CMORPH
> > > > > on Theia. From the global output, I will like to analyze a
smaller
> > > domain
> > > > > e.g. 5N-30N 55W-85W. Is there a configure file where I can
set up
> Lat
> > > and
> > > > > Lon different than the input file?
> > > > >
> > > > > I saw the gen-vx-mask option in the tutorial but for what I
> > understood
> > > > does
> > > > > files are pre made.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Keren
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

------------------------------------------------
Subject: MET for smaller domain from global output
From: John Halley Gotway
Time: Wed Mar 28 22:42:11 2018

Keren,

It just occurred to me that you probably won’t get that error message
I got
in my last call to point-stat.  I was using a different set of data
for
testing... on a different domain. Presumably, you did define the masks
correctly for your domain... and I only got that error because I
switched
input data.

Please let me know if that doesn’t fix the issue.

Thanks,
John

On Wed, Mar 28, 2018 at 10:00 PM John Halley Gotway <johnhg at ucar.edu>
wrote:

> Keren,
>
> OK, I understand what's going on here.  This one was tricky!  First
time
> I've seen this.
>
> The problem is caused by you mixing tools from MET versions 5.2 and
6.1.
> And more specifically, it's the version of NetCDF that's causing the
> problem.  Prior to version 6.0, MET used NetCDF3 to read/write
NetCDF
> files.  Versions 6.0 and later use NetCDF4.
>
> Here's what's happening...
> - Running "ncdump -h" on your mask data files reveals that they were
> created with MET version 6.1... meaning NetCDF4.
>    ncdump -h  /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> masks/Matthew_Mask.nc
>
>  :MET_version = "V6.1" ;
>
>
> - But in the workflow, you're running MET version 5.2... which
expects
> NetCDF3 files.
>
>
> - In "mask.poly" you can pass in either a gridded data file or an
ascii
> polyline file.  Point-Stat tries to process the input file first as
a
> gridded data file.  If that doesn't work, it assumes the input file
is
> ascii instead.
>
>
> - So it tries opening "Matthew_Mask.nc" as a gridded data file.
That
> fails because the NetCDF3 library doesn't know anything about
NetCDF4
> files.  So it tries to process it as ascii... which fails with the
error
> message you saw.
>
>
> Next, I ran the following commands to convert your mask file from
NetCDF4
> to 3:
>
>
>    module load nco
>
>    nccopy -k 1 masks/Matthew_Mask.nc masks/Matthew_Mask_NetCDF3.nc
>
> And then I updated the Point-Stat config file to point to
> "Matthew_Mask_NetCDF3.nc".
>
>
> When I run Point-Stat, it still fails, but with a much more useful
error
> message.  Looks like you didn't generate the mask file for the right
domain:
>
>
> ERROR  : parse_poly_mask() -> The masking and verification grids do
not
> match:
>
> ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000
lon_ll:
> -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
>
> ERROR  : Projection: Lambert Conformal Nx: 614 Ny: 428 Lat_LL:
12.190
> Lon_LL: 133.459 Lon_orient: 95.000 Alpha: 1356.011 Cone: 0.423 Bx:
346.6564
> By: 1189.0556
>
> In general, I'd recommend sticking with a single version of MET.  If
your
> scripts/config files are set up to use met-5.2, use that version of
> gen_vx_mask to define the input masks.
>
>
> Hope that helps clarify.
>
>
> Thanks,
> John
>
>
>
>
> On Mon, Mar 26, 2018 at 7:29 PM, Keren Rosado - NOAA Affiliate via
RT <
> met_help at ucar.edu> wrote:
>
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
>>
>> Hi John,
>>
>> I am using a GMTB package that runs MET using rocoto. I copied the
entire
>> MET directory for the package to work.
>>
>> The xml file is
>> located /scratch3/BMC/fim/Keren.Rosado/MET/xml/gf_matthew_jan.xml
to run
>> this xml I use runrocotoGFK.ksh
>> I found point stat script different that the one you metioned above
>> at: /scratch3/BMC/fim/Keren.Rosado/MET/bin/met_point_verf_sfc.ksh
and
>> met_point_verf_ua.ksh
>>
>> The model output grib files are located
>> at: /scratch3/BMC/fim/Keren.Rosado/MET/gf_Matthew_jan/2016092900
>>
>> Let me know if you need any other clarification.
>>
>> Thanks,
>>
>> Keren
>>
>>
>>
>>
>> ----
>> Keren Rosado, Ph.D.
>> NCAS-M Postdoctoral Fellow
>> NOAA ESRL
>> Office: (303) 497-5907
>>
>> On Mon, Mar 26, 2018 at 4:48 PM, John Halley Gotway via RT <
>> met_help at ucar.edu> wrote:
>>
>> > Keren,
>> >
>> > I went hunting around on theia, looking at your data.  I see that
you're
>> > using either version 5.1 or 5.2 of MET.  The latest available
version on
>> > theia is 7.0.
>> >
>> > I'd like to replicate the error message you're getting, so I can
see
>> what
>> > is needed to fix it.  Are you able to send me a single call to
>> Point-Stat
>> > that replicates this behavior?  Or are you calling it from a long
script
>> > that's doing lots of other step?
>> >
>> > Here's a point-stat script I found in your area:
>> >    /scratch3/BMC/fim/Keren.Rosado/MET/scripts/run_point_stat.ksh
>> >
>> > Is that what you're running?
>> >
>> > Thanks,
>> > John
>> >
>> > On Mon, Mar 26, 2018 at 3:01 PM, Keren Rosado - NOAA Affiliate
via RT <
>> > met_help at ucar.edu> wrote:
>> >
>> > >
>> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
>> > >
>> > > Hi John,
>> > >
>> > > I am using PointStatConfig_ADPUPA_REGRID_G3 to run point stat
located
>> at
>> > > /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
>> > >
>> > > I added  Matthew_Mask.nc in the mask section as you explained
above to
>> > > the PointStatConfig_ADPUPA_REGRID_G3.
>> > > Results from this gave me an error: ERROR  :
parse_latlon_poly_file()
>> ->
>> > > The polyline file supplied
>> > > (/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
>> > masks/Matthew_Mask.nc)
>> > > must contain at least 3 pairs of points to define a masking
region.
>> > >
>> > > Trying to fix the error, I added the original mask files and
added my
>> new
>> > > mask file (Matthew_Mask) and the error still the same.
>> > >
>> > > // Verification masking regions
>> > >
>> > > //
>> > >
>> > > mask = {
>> > >
>> > >    grid = [ "FULL" ];
>> > >
>> > >    poly = [ "${MASKS}/Matthew_Mask.nc",
>> > >
>> > >             "${MASKS}/gfs_NH_G3.nc",
>> > >
>> > >             "${MASKS}/gfs_SH_G3.nc",
>> > >
>> > >             "${MASKS}/gfs_TROP_G3.nc" ];
>> > >
>> > >    sid  = [];
>> > >
>> > > };
>> > >
>> > >
>> > >
>> > > Thanks,
>> > >
>> > > Keren
>> > >
>> > >
>> > > ----
>> > > Keren Rosado, Ph.D.
>> > > NCAS-M Postdoctoral Fellow
>> > > NOAA ESRL
>> > > Office: (303) 497-5907
>> > >
>> > > On Fri, Mar 23, 2018 at 3:14 PM, John Halley Gotway via RT <
>> > > met_help at ucar.edu> wrote:
>> > >
>> > > > Keren,
>> > > >
>> > > > You have a couple of options here.  Since you're comparing a
gridded
>> > > > forecast field to a gridded analysis, you'll be running a
>> grid-to-grid
>> > > > tool, like Grid-Stat or MODE.
>> > > >
>> > > > (1) You could use the "regrid" option in the config files to
>> actually
>> > > > regrid your data to a smaller domain.  If you're input is a
lat/lon
>> > grid
>> > > > and your output is really just a subset of that lat/lon grid,
then
>> > you'd
>> > > > define the "to_grid" so that the output grid points coincide
with
>> the
>> > > input
>> > > > ones.
>> > > >
>> > > > (2) A second (more common) option would be to just define one
(or
>> more)
>> > > > subregions over which to compute stats.  And yes, you can
definitely
>> > use
>> > > > gen_vx_mask to define that masking region.  Since you want a
range
>> of
>> > > > lat/lon values, I'd recommend using the "-type lat" and "-
type lon"
>> > > masking
>> > > > types.
>> > > >
>> > > > Here's an example... looks to me like your mask is
approximately the
>> > Gulf
>> > > > of Mexico.  So I named it "GOM_Mask":
>> > > >
>> > > > (1) Grab a GFS file for the example:
>> > > >  > wget
>> > > > http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.
>> > > > 2018032312/gfs.t12z.pgrb2.0p25.f012
>> > > >
>> > > > (2) Run gen_vx_mask to define latitude band:
>> > > >  > met-6.1/bin/gen_vx_mask gfs.t12z.pgrb2.0p25.f012
>> > > > gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type lat -thresh
'ge5&&le30'
>> > > >
>> > > > (3) Run gen_vx_mask to intersect the longitude band
>> > > >  > met-6.1/bin/gen_vx_mask lat_band.nc lat_band.nc
GOM_Mask.nc
>> -type
>> > lon
>> > > > -thresh 'ge-85&&le-55' -intersection -name GOM_Mask
>> > > >
>> > > > (4) Plot the result using plot_data_plane
>> > > >  > met-6.1/bin/plot_data_plane GOM_Mask.nc GOM_Mask.ps
>> > 'name="GOM_Mask";
>> > > > level="(*,*)";'
>> > > >
>> > > > And I've attached a PNG version of that image.
>> > > >
>> > > > Then you'd list this mask file in your Grid-Stat config file:
>> > > >
>> > > > mask = {
>> > > >    grid = [ "FULL" ];
>> > > >    poly = [ "path/to/GOM_Mask.nc" ];
>> > > > }
>> > > >
>> > > >
>> > > > Hope that helps get you going.
>> > > >
>> > > > Thanks,
>> > > > John
>> > > >
>> > > >
>> > > > On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado - NOAA
Affiliate via
>> RT <
>> > > > met_help at ucar.edu> wrote:
>> > > >
>> > > > >
>> > > > > Fri Mar 23 14:57:16 2018: Request 84536 was acted upon.
>> > > > > Transaction: Ticket created by keren.rosado at noaa.gov
>> > > > >        Queue: met_help
>> > > > >      Subject: MET for smaller domain from global output
>> > > > >        Owner: Nobody
>> > > > >   Requestors: keren.rosado at noaa.gov
>> > > > >       Status: new
>> > > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
>> > Ticket/Display.html?id=84536
>> > > >
>> > > > >
>> > > > >
>> > > > > Hello!
>> > > > >
>> > > > > I have global FV3GFS forecast output  and global
observations from
>> > > CMORPH
>> > > > > on Theia. From the global output, I will like to analyze a
smaller
>> > > domain
>> > > > > e.g. 5N-30N 55W-85W. Is there a configure file where I can
set up
>> Lat
>> > > and
>> > > > > Lon different than the input file?
>> > > > >
>> > > > > I saw the gen-vx-mask option in the tutorial but for what I
>> > understood
>> > > > does
>> > > > > files are pre made.
>> > > > >
>> > > > > Thanks,
>> > > > >
>> > > > > Keren
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > >
>> > >
>> >
>> >
>>
>>
>

------------------------------------------------
Subject: MET for smaller domain from global output
From: Keren Rosado - NOAA Affiliate
Time: Thu Mar 29 10:24:57 2018

Hi John,

Thanks  for figuring out the error.

Now, I am having the same error you got about the mask projection.

The first mask I created was Matthew_Mask_NetCDF3.nc and I used
pgrbq000.gfs.2016092900.grib2
to create the mask following your instructions above.

Today, I created a second mask called Matthew_Mask_0329_NetCDF3.nc.
This
mask was created using gfs.t00z.pgrb2.0p25.f000

In both cases I get the same error: (
/scratch3/BMC/fim/Keren.Rosado/MET/log/gf_Matthew_jan/2016092900/met/
met_point_ua_gf_Matthew_jan_2016092900_096.log)

ERROR  : parse_poly_mask() -> The masking and verification grids do
not
match:

ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000 lon_ll:
-0.000 delta_lat: 0.250 delta_lon: 0.250 !=

ERROR  : Projection: Lat/Lon Nx: 360 Ny: 181 lat_ll: -90.000 lon_ll:
-0.000
delta_lat: 1.000 delta_lon: 1.000


P.S. These forecast output files are from FV3 I don't think that
should
matter since they are grib2 format.



Thanks,


Keren



----
Keren Rosado, Ph.D.
NCAS-M Postdoctoral Fellow
NOAA ESRL
Office: (303) 497-5907

On Wed, Mar 28, 2018 at 10:42 PM, John Halley Gotway via RT <
met_help at ucar.edu> wrote:

> Keren,
>
> It just occurred to me that you probably won’t get that error
message I got
> in my last call to point-stat.  I was using a different set of data
for
> testing... on a different domain. Presumably, you did define the
masks
> correctly for your domain... and I only got that error because I
switched
> input data.
>
> Please let me know if that doesn’t fix the issue.
>
> Thanks,
> John
>
> On Wed, Mar 28, 2018 at 10:00 PM John Halley Gotway
<johnhg at ucar.edu>
> wrote:
>
> > Keren,
> >
> > OK, I understand what's going on here.  This one was tricky!
First time
> > I've seen this.
> >
> > The problem is caused by you mixing tools from MET versions 5.2
and 6.1.
> > And more specifically, it's the version of NetCDF that's causing
the
> > problem.  Prior to version 6.0, MET used NetCDF3 to read/write
NetCDF
> > files.  Versions 6.0 and later use NetCDF4.
> >
> > Here's what's happening...
> > - Running "ncdump -h" on your mask data files reveals that they
were
> > created with MET version 6.1... meaning NetCDF4.
> >    ncdump -h  /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > masks/Matthew_Mask.nc
> >
> >  :MET_version = "V6.1" ;
> >
> >
> > - But in the workflow, you're running MET version 5.2... which
expects
> > NetCDF3 files.
> >
> >
> > - In "mask.poly" you can pass in either a gridded data file or an
ascii
> > polyline file.  Point-Stat tries to process the input file first
as a
> > gridded data file.  If that doesn't work, it assumes the input
file is
> > ascii instead.
> >
> >
> > - So it tries opening "Matthew_Mask.nc" as a gridded data file.
That
> > fails because the NetCDF3 library doesn't know anything about
NetCDF4
> > files.  So it tries to process it as ascii... which fails with the
error
> > message you saw.
> >
> >
> > Next, I ran the following commands to convert your mask file from
NetCDF4
> > to 3:
> >
> >
> >    module load nco
> >
> >    nccopy -k 1 masks/Matthew_Mask.nc masks/Matthew_Mask_NetCDF3.nc
> >
> > And then I updated the Point-Stat config file to point to
> > "Matthew_Mask_NetCDF3.nc".
> >
> >
> > When I run Point-Stat, it still fails, but with a much more useful
error
> > message.  Looks like you didn't generate the mask file for the
right
> domain:
> >
> >
> > ERROR  : parse_poly_mask() -> The masking and verification grids
do not
> > match:
> >
> > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000
lon_ll:
> > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> >
> > ERROR  : Projection: Lambert Conformal Nx: 614 Ny: 428 Lat_LL:
12.190
> > Lon_LL: 133.459 Lon_orient: 95.000 Alpha: 1356.011 Cone: 0.423 Bx:
> 346.6564
> > By: 1189.0556
> >
> > In general, I'd recommend sticking with a single version of MET.
If your
> > scripts/config files are set up to use met-5.2, use that version
of
> > gen_vx_mask to define the input masks.
> >
> >
> > Hope that helps clarify.
> >
> >
> > Thanks,
> > John
> >
> >
> >
> >
> > On Mon, Mar 26, 2018 at 7:29 PM, Keren Rosado - NOAA Affiliate via
RT <
> > met_help at ucar.edu> wrote:
> >
> >>
> >> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> >>
> >> Hi John,
> >>
> >> I am using a GMTB package that runs MET using rocoto. I copied
the
> entire
> >> MET directory for the package to work.
> >>
> >> The xml file is
> >> located /scratch3/BMC/fim/Keren.Rosado/MET/xml/gf_matthew_jan.xml
to
> run
> >> this xml I use runrocotoGFK.ksh
> >> I found point stat script different that the one you metioned
above
> >> at: /scratch3/BMC/fim/Keren.Rosado/MET/bin/met_point_verf_sfc.ksh
and
> >> met_point_verf_ua.ksh
> >>
> >> The model output grib files are located
> >> at: /scratch3/BMC/fim/Keren.Rosado/MET/gf_Matthew_jan/2016092900
> >>
> >> Let me know if you need any other clarification.
> >>
> >> Thanks,
> >>
> >> Keren
> >>
> >>
> >>
> >>
> >> ----
> >> Keren Rosado, Ph.D.
> >> NCAS-M Postdoctoral Fellow
> >> NOAA ESRL
> >> Office: (303) 497-5907
> >>
> >> On Mon, Mar 26, 2018 at 4:48 PM, John Halley Gotway via RT <
> >> met_help at ucar.edu> wrote:
> >>
> >> > Keren,
> >> >
> >> > I went hunting around on theia, looking at your data.  I see
that
> you're
> >> > using either version 5.1 or 5.2 of MET.  The latest available
version
> on
> >> > theia is 7.0.
> >> >
> >> > I'd like to replicate the error message you're getting, so I
can see
> >> what
> >> > is needed to fix it.  Are you able to send me a single call to
> >> Point-Stat
> >> > that replicates this behavior?  Or are you calling it from a
long
> script
> >> > that's doing lots of other step?
> >> >
> >> > Here's a point-stat script I found in your area:
> >> >
/scratch3/BMC/fim/Keren.Rosado/MET/scripts/run_point_stat.ksh
> >> >
> >> > Is that what you're running?
> >> >
> >> > Thanks,
> >> > John
> >> >
> >> > On Mon, Mar 26, 2018 at 3:01 PM, Keren Rosado - NOAA Affiliate
via RT
> <
> >> > met_help at ucar.edu> wrote:
> >> >
> >> > >
> >> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536
>
> >> > >
> >> > > Hi John,
> >> > >
> >> > > I am using PointStatConfig_ADPUPA_REGRID_G3 to run point stat
> located
> >> at
> >> > > /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> >> > >
> >> > > I added  Matthew_Mask.nc in the mask section as you explained
above
> to
> >> > > the PointStatConfig_ADPUPA_REGRID_G3.
> >> > > Results from this gave me an error: ERROR  :
> parse_latlon_poly_file()
> >> ->
> >> > > The polyline file supplied
> >> > > (/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> >> > masks/Matthew_Mask.nc)
> >> > > must contain at least 3 pairs of points to define a masking
region.
> >> > >
> >> > > Trying to fix the error, I added the original mask files and
added
> my
> >> new
> >> > > mask file (Matthew_Mask) and the error still the same.
> >> > >
> >> > > // Verification masking regions
> >> > >
> >> > > //
> >> > >
> >> > > mask = {
> >> > >
> >> > >    grid = [ "FULL" ];
> >> > >
> >> > >    poly = [ "${MASKS}/Matthew_Mask.nc",
> >> > >
> >> > >             "${MASKS}/gfs_NH_G3.nc",
> >> > >
> >> > >             "${MASKS}/gfs_SH_G3.nc",
> >> > >
> >> > >             "${MASKS}/gfs_TROP_G3.nc" ];
> >> > >
> >> > >    sid  = [];
> >> > >
> >> > > };
> >> > >
> >> > >
> >> > >
> >> > > Thanks,
> >> > >
> >> > > Keren
> >> > >
> >> > >
> >> > > ----
> >> > > Keren Rosado, Ph.D.
> >> > > NCAS-M Postdoctoral Fellow
> >> > > NOAA ESRL
> >> > > Office: (303) 497-5907
> >> > >
> >> > > On Fri, Mar 23, 2018 at 3:14 PM, John Halley Gotway via RT <
> >> > > met_help at ucar.edu> wrote:
> >> > >
> >> > > > Keren,
> >> > > >
> >> > > > You have a couple of options here.  Since you're comparing
a
> gridded
> >> > > > forecast field to a gridded analysis, you'll be running a
> >> grid-to-grid
> >> > > > tool, like Grid-Stat or MODE.
> >> > > >
> >> > > > (1) You could use the "regrid" option in the config files
to
> >> actually
> >> > > > regrid your data to a smaller domain.  If you're input is a
> lat/lon
> >> > grid
> >> > > > and your output is really just a subset of that lat/lon
grid, then
> >> > you'd
> >> > > > define the "to_grid" so that the output grid points
coincide with
> >> the
> >> > > input
> >> > > > ones.
> >> > > >
> >> > > > (2) A second (more common) option would be to just define
one (or
> >> more)
> >> > > > subregions over which to compute stats.  And yes, you can
> definitely
> >> > use
> >> > > > gen_vx_mask to define that masking region.  Since you want
a range
> >> of
> >> > > > lat/lon values, I'd recommend using the "-type lat" and "-
type
> lon"
> >> > > masking
> >> > > > types.
> >> > > >
> >> > > > Here's an example... looks to me like your mask is
approximately
> the
> >> > Gulf
> >> > > > of Mexico.  So I named it "GOM_Mask":
> >> > > >
> >> > > > (1) Grab a GFS file for the example:
> >> > > >  > wget
> >> > > > http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.
> >> > > > 2018032312/gfs.t12z.pgrb2.0p25.f012
> >> > > >
> >> > > > (2) Run gen_vx_mask to define latitude band:
> >> > > >  > met-6.1/bin/gen_vx_mask gfs.t12z.pgrb2.0p25.f012
> >> > > > gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type lat -thresh
> 'ge5&&le30'
> >> > > >
> >> > > > (3) Run gen_vx_mask to intersect the longitude band
> >> > > >  > met-6.1/bin/gen_vx_mask lat_band.nc lat_band.nc
GOM_Mask.nc
> >> -type
> >> > lon
> >> > > > -thresh 'ge-85&&le-55' -intersection -name GOM_Mask
> >> > > >
> >> > > > (4) Plot the result using plot_data_plane
> >> > > >  > met-6.1/bin/plot_data_plane GOM_Mask.nc GOM_Mask.ps
> >> > 'name="GOM_Mask";
> >> > > > level="(*,*)";'
> >> > > >
> >> > > > And I've attached a PNG version of that image.
> >> > > >
> >> > > > Then you'd list this mask file in your Grid-Stat config
file:
> >> > > >
> >> > > > mask = {
> >> > > >    grid = [ "FULL" ];
> >> > > >    poly = [ "path/to/GOM_Mask.nc" ];
> >> > > > }
> >> > > >
> >> > > >
> >> > > > Hope that helps get you going.
> >> > > >
> >> > > > Thanks,
> >> > > > John
> >> > > >
> >> > > >
> >> > > > On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado - NOAA
Affiliate via
> >> RT <
> >> > > > met_help at ucar.edu> wrote:
> >> > > >
> >> > > > >
> >> > > > > Fri Mar 23 14:57:16 2018: Request 84536 was acted upon.
> >> > > > > Transaction: Ticket created by keren.rosado at noaa.gov
> >> > > > >        Queue: met_help
> >> > > > >      Subject: MET for smaller domain from global output
> >> > > > >        Owner: Nobody
> >> > > > >   Requestors: keren.rosado at noaa.gov
> >> > > > >       Status: new
> >> > > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> >> > Ticket/Display.html?id=84536
> >> > > >
> >> > > > >
> >> > > > >
> >> > > > > Hello!
> >> > > > >
> >> > > > > I have global FV3GFS forecast output  and global
observations
> from
> >> > > CMORPH
> >> > > > > on Theia. From the global output, I will like to analyze
a
> smaller
> >> > > domain
> >> > > > > e.g. 5N-30N 55W-85W. Is there a configure file where I
can set
> up
> >> Lat
> >> > > and
> >> > > > > Lon different than the input file?
> >> > > > >
> >> > > > > I saw the gen-vx-mask option in the tutorial but for what
I
> >> > understood
> >> > > > does
> >> > > > > files are pre made.
> >> > > > >
> >> > > > > Thanks,
> >> > > > >
> >> > > > > Keren
> >> > > > >
> >> > > > >
> >> > > >
> >> > > >
> >> > >
> >> > >
> >> >
> >> >
> >>
> >>
> >
>
>

------------------------------------------------
Subject: MET for smaller domain from global output
From: John Halley Gotway
Time: Mon Apr 02 09:21:40 2018

Keren,

OK, this should be pretty straight-forward to fix.  Since you're using
met-5.2, just run the the gen_vx_mask tool from version 5.2 to
generate the
mask fields.

When you run gen_vx_mask, the first argument is a gridded data file
which
specifies the grid you're using.  So just pass in that FV3 GRIB2 file
as
the first argument.

So please try rerunning gen_vx_mask to define a mask for the FV3
domain
you're evaluating and let me know if you have any issues.

Thanks,
John

On Thu, Mar 29, 2018 at 10:24 AM, Keren Rosado - NOAA Affiliate via RT
<
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
>
> Hi John,
>
> Thanks  for figuring out the error.
>
> Now, I am having the same error you got about the mask projection.
>
> The first mask I created was Matthew_Mask_NetCDF3.nc and I used
> pgrbq000.gfs.2016092900.grib2
> to create the mask following your instructions above.
>
> Today, I created a second mask called Matthew_Mask_0329_NetCDF3.nc.
This
> mask was created using gfs.t00z.pgrb2.0p25.f000
>
> In both cases I get the same error: (
>
/scratch3/BMC/fim/Keren.Rosado/MET/log/gf_Matthew_jan/2016092900/met/
> met_point_ua_gf_Matthew_jan_2016092900_096.log)
>
> ERROR  : parse_poly_mask() -> The masking and verification grids do
not
> match:
>
> ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000
lon_ll:
> -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
>
> ERROR  : Projection: Lat/Lon Nx: 360 Ny: 181 lat_ll: -90.000 lon_ll:
-0.000
> delta_lat: 1.000 delta_lon: 1.000
>
>
> P.S. These forecast output files are from FV3 I don't think that
should
> matter since they are grib2 format.
>
>
>
> Thanks,
>
>
> Keren
>
>
>
> ----
> Keren Rosado, Ph.D.
> NCAS-M Postdoctoral Fellow
> NOAA ESRL
> Office: (303) 497-5907
>
> On Wed, Mar 28, 2018 at 10:42 PM, John Halley Gotway via RT <
> met_help at ucar.edu> wrote:
>
> > Keren,
> >
> > It just occurred to me that you probably won’t get that error
message I
> got
> > in my last call to point-stat.  I was using a different set of
data for
> > testing... on a different domain. Presumably, you did define the
masks
> > correctly for your domain... and I only got that error because I
switched
> > input data.
> >
> > Please let me know if that doesn’t fix the issue.
> >
> > Thanks,
> > John
> >
> > On Wed, Mar 28, 2018 at 10:00 PM John Halley Gotway
<johnhg at ucar.edu>
> > wrote:
> >
> > > Keren,
> > >
> > > OK, I understand what's going on here.  This one was tricky!
First
> time
> > > I've seen this.
> > >
> > > The problem is caused by you mixing tools from MET versions 5.2
and
> 6.1.
> > > And more specifically, it's the version of NetCDF that's causing
the
> > > problem.  Prior to version 6.0, MET used NetCDF3 to read/write
NetCDF
> > > files.  Versions 6.0 and later use NetCDF4.
> > >
> > > Here's what's happening...
> > > - Running "ncdump -h" on your mask data files reveals that they
were
> > > created with MET version 6.1... meaning NetCDF4.
> > >    ncdump -h
/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > masks/Matthew_Mask.nc
> > >
> > >  :MET_version = "V6.1" ;
> > >
> > >
> > > - But in the workflow, you're running MET version 5.2... which
expects
> > > NetCDF3 files.
> > >
> > >
> > > - In "mask.poly" you can pass in either a gridded data file or
an ascii
> > > polyline file.  Point-Stat tries to process the input file first
as a
> > > gridded data file.  If that doesn't work, it assumes the input
file is
> > > ascii instead.
> > >
> > >
> > > - So it tries opening "Matthew_Mask.nc" as a gridded data file.
That
> > > fails because the NetCDF3 library doesn't know anything about
NetCDF4
> > > files.  So it tries to process it as ascii... which fails with
the
> error
> > > message you saw.
> > >
> > >
> > > Next, I ran the following commands to convert your mask file
from
> NetCDF4
> > > to 3:
> > >
> > >
> > >    module load nco
> > >
> > >    nccopy -k 1 masks/Matthew_Mask.nc
masks/Matthew_Mask_NetCDF3.nc
> > >
> > > And then I updated the Point-Stat config file to point to
> > > "Matthew_Mask_NetCDF3.nc".
> > >
> > >
> > > When I run Point-Stat, it still fails, but with a much more
useful
> error
> > > message.  Looks like you didn't generate the mask file for the
right
> > domain:
> > >
> > >
> > > ERROR  : parse_poly_mask() -> The masking and verification grids
do not
> > > match:
> > >
> > > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000
lon_ll:
> > > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> > >
> > > ERROR  : Projection: Lambert Conformal Nx: 614 Ny: 428 Lat_LL:
12.190
> > > Lon_LL: 133.459 Lon_orient: 95.000 Alpha: 1356.011 Cone: 0.423
Bx:
> > 346.6564
> > > By: 1189.0556
> > >
> > > In general, I'd recommend sticking with a single version of MET.
If
> your
> > > scripts/config files are set up to use met-5.2, use that version
of
> > > gen_vx_mask to define the input masks.
> > >
> > >
> > > Hope that helps clarify.
> > >
> > >
> > > Thanks,
> > > John
> > >
> > >
> > >
> > >
> > > On Mon, Mar 26, 2018 at 7:29 PM, Keren Rosado - NOAA Affiliate
via RT <
> > > met_help at ucar.edu> wrote:
> > >
> > >>
> > >> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> > >>
> > >> Hi John,
> > >>
> > >> I am using a GMTB package that runs MET using rocoto. I copied
the
> > entire
> > >> MET directory for the package to work.
> > >>
> > >> The xml file is
> > >> located
/scratch3/BMC/fim/Keren.Rosado/MET/xml/gf_matthew_jan.xml to
> > run
> > >> this xml I use runrocotoGFK.ksh
> > >> I found point stat script different that the one you metioned
above
> > >> at:
/scratch3/BMC/fim/Keren.Rosado/MET/bin/met_point_verf_sfc.ksh and
> > >> met_point_verf_ua.ksh
> > >>
> > >> The model output grib files are located
> > >> at:
/scratch3/BMC/fim/Keren.Rosado/MET/gf_Matthew_jan/2016092900
> > >>
> > >> Let me know if you need any other clarification.
> > >>
> > >> Thanks,
> > >>
> > >> Keren
> > >>
> > >>
> > >>
> > >>
> > >> ----
> > >> Keren Rosado, Ph.D.
> > >> NCAS-M Postdoctoral Fellow
> > >> NOAA ESRL
> > >> Office: (303) 497-5907
> > >>
> > >> On Mon, Mar 26, 2018 at 4:48 PM, John Halley Gotway via RT <
> > >> met_help at ucar.edu> wrote:
> > >>
> > >> > Keren,
> > >> >
> > >> > I went hunting around on theia, looking at your data.  I see
that
> > you're
> > >> > using either version 5.1 or 5.2 of MET.  The latest available
> version
> > on
> > >> > theia is 7.0.
> > >> >
> > >> > I'd like to replicate the error message you're getting, so I
can see
> > >> what
> > >> > is needed to fix it.  Are you able to send me a single call
to
> > >> Point-Stat
> > >> > that replicates this behavior?  Or are you calling it from a
long
> > script
> > >> > that's doing lots of other step?
> > >> >
> > >> > Here's a point-stat script I found in your area:
> > >> >
/scratch3/BMC/fim/Keren.Rosado/MET/scripts/run_point_stat.ksh
> > >> >
> > >> > Is that what you're running?
> > >> >
> > >> > Thanks,
> > >> > John
> > >> >
> > >> > On Mon, Mar 26, 2018 at 3:01 PM, Keren Rosado - NOAA
Affiliate via
> RT
> > <
> > >> > met_help at ucar.edu> wrote:
> > >> >
> > >> > >
> > >> > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> > >> > >
> > >> > > Hi John,
> > >> > >
> > >> > > I am using PointStatConfig_ADPUPA_REGRID_G3 to run point
stat
> > located
> > >> at
> > >> > > /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > >> > >
> > >> > > I added  Matthew_Mask.nc in the mask section as you
explained
> above
> > to
> > >> > > the PointStatConfig_ADPUPA_REGRID_G3.
> > >> > > Results from this gave me an error: ERROR  :
> > parse_latlon_poly_file()
> > >> ->
> > >> > > The polyline file supplied
> > >> > > (/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > >> > masks/Matthew_Mask.nc)
> > >> > > must contain at least 3 pairs of points to define a masking
> region.
> > >> > >
> > >> > > Trying to fix the error, I added the original mask files
and added
> > my
> > >> new
> > >> > > mask file (Matthew_Mask) and the error still the same.
> > >> > >
> > >> > > // Verification masking regions
> > >> > >
> > >> > > //
> > >> > >
> > >> > > mask = {
> > >> > >
> > >> > >    grid = [ "FULL" ];
> > >> > >
> > >> > >    poly = [ "${MASKS}/Matthew_Mask.nc",
> > >> > >
> > >> > >             "${MASKS}/gfs_NH_G3.nc",
> > >> > >
> > >> > >             "${MASKS}/gfs_SH_G3.nc",
> > >> > >
> > >> > >             "${MASKS}/gfs_TROP_G3.nc" ];
> > >> > >
> > >> > >    sid  = [];
> > >> > >
> > >> > > };
> > >> > >
> > >> > >
> > >> > >
> > >> > > Thanks,
> > >> > >
> > >> > > Keren
> > >> > >
> > >> > >
> > >> > > ----
> > >> > > Keren Rosado, Ph.D.
> > >> > > NCAS-M Postdoctoral Fellow
> > >> > > NOAA ESRL
> > >> > > Office: (303) 497-5907
> > >> > >
> > >> > > On Fri, Mar 23, 2018 at 3:14 PM, John Halley Gotway via RT
<
> > >> > > met_help at ucar.edu> wrote:
> > >> > >
> > >> > > > Keren,
> > >> > > >
> > >> > > > You have a couple of options here.  Since you're
comparing a
> > gridded
> > >> > > > forecast field to a gridded analysis, you'll be running a
> > >> grid-to-grid
> > >> > > > tool, like Grid-Stat or MODE.
> > >> > > >
> > >> > > > (1) You could use the "regrid" option in the config files
to
> > >> actually
> > >> > > > regrid your data to a smaller domain.  If you're input is
a
> > lat/lon
> > >> > grid
> > >> > > > and your output is really just a subset of that lat/lon
grid,
> then
> > >> > you'd
> > >> > > > define the "to_grid" so that the output grid points
coincide
> with
> > >> the
> > >> > > input
> > >> > > > ones.
> > >> > > >
> > >> > > > (2) A second (more common) option would be to just define
one
> (or
> > >> more)
> > >> > > > subregions over which to compute stats.  And yes, you can
> > definitely
> > >> > use
> > >> > > > gen_vx_mask to define that masking region.  Since you
want a
> range
> > >> of
> > >> > > > lat/lon values, I'd recommend using the "-type lat" and
"-type
> > lon"
> > >> > > masking
> > >> > > > types.
> > >> > > >
> > >> > > > Here's an example... looks to me like your mask is
approximately
> > the
> > >> > Gulf
> > >> > > > of Mexico.  So I named it "GOM_Mask":
> > >> > > >
> > >> > > > (1) Grab a GFS file for the example:
> > >> > > >  > wget
> > >> > > > http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.
> > >> > > > 2018032312/gfs.t12z.pgrb2.0p25.f012
> > >> > > >
> > >> > > > (2) Run gen_vx_mask to define latitude band:
> > >> > > >  > met-6.1/bin/gen_vx_mask gfs.t12z.pgrb2.0p25.f012
> > >> > > > gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type lat -thresh
> > 'ge5&&le30'
> > >> > > >
> > >> > > > (3) Run gen_vx_mask to intersect the longitude band
> > >> > > >  > met-6.1/bin/gen_vx_mask lat_band.nc lat_band.nc
GOM_Mask.nc
> > >> -type
> > >> > lon
> > >> > > > -thresh 'ge-85&&le-55' -intersection -name GOM_Mask
> > >> > > >
> > >> > > > (4) Plot the result using plot_data_plane
> > >> > > >  > met-6.1/bin/plot_data_plane GOM_Mask.nc GOM_Mask.ps
> > >> > 'name="GOM_Mask";
> > >> > > > level="(*,*)";'
> > >> > > >
> > >> > > > And I've attached a PNG version of that image.
> > >> > > >
> > >> > > > Then you'd list this mask file in your Grid-Stat config
file:
> > >> > > >
> > >> > > > mask = {
> > >> > > >    grid = [ "FULL" ];
> > >> > > >    poly = [ "path/to/GOM_Mask.nc" ];
> > >> > > > }
> > >> > > >
> > >> > > >
> > >> > > > Hope that helps get you going.
> > >> > > >
> > >> > > > Thanks,
> > >> > > > John
> > >> > > >
> > >> > > >
> > >> > > > On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado - NOAA
Affiliate
> via
> > >> RT <
> > >> > > > met_help at ucar.edu> wrote:
> > >> > > >
> > >> > > > >
> > >> > > > > Fri Mar 23 14:57:16 2018: Request 84536 was acted upon.
> > >> > > > > Transaction: Ticket created by keren.rosado at noaa.gov
> > >> > > > >        Queue: met_help
> > >> > > > >      Subject: MET for smaller domain from global output
> > >> > > > >        Owner: Nobody
> > >> > > > >   Requestors: keren.rosado at noaa.gov
> > >> > > > >       Status: new
> > >> > > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> > >> > Ticket/Display.html?id=84536
> > >> > > >
> > >> > > > >
> > >> > > > >
> > >> > > > > Hello!
> > >> > > > >
> > >> > > > > I have global FV3GFS forecast output  and global
observations
> > from
> > >> > > CMORPH
> > >> > > > > on Theia. From the global output, I will like to
analyze a
> > smaller
> > >> > > domain
> > >> > > > > e.g. 5N-30N 55W-85W. Is there a configure file where I
can set
> > up
> > >> Lat
> > >> > > and
> > >> > > > > Lon different than the input file?
> > >> > > > >
> > >> > > > > I saw the gen-vx-mask option in the tutorial but for
what I
> > >> > understood
> > >> > > > does
> > >> > > > > files are pre made.
> > >> > > > >
> > >> > > > > Thanks,
> > >> > > > >
> > >> > > > > Keren
> > >> > > > >
> > >> > > > >
> > >> > > >
> > >> > > >
> > >> > >
> > >> > >
> > >> >
> > >> >
> > >>
> > >>
> > >
> >
> >
>
>

------------------------------------------------
Subject: MET for smaller domain from global output
From: Keren Rosado - NOAA Affiliate
Time: Wed May 16 15:54:52 2018

John,

I am trying to run the gen_vx_mask with MET version 5.2 and I get an
error.

This is the command I am doing following what you explained in your
previous email and MET user guide 5.2.

gen_vx_mask pgrbq000.gfs.2016092900.grib2
pgrbq000.gfs.2016092900.grib2
lat_band.nc -type poly -thresh 'ge5&&le30'


DEBUG 1: Input File: pgrbq000.gfs.2016092900.grib2

DEBUG 1: Mask File: pgrbq000.gfs.2016092900.grib2

DEBUG 2: Parsed Data Grid: LatLon (1440 x 721)

DEBUG 2: Parsed Lat/Lon Mask File: (nul) containing 0 points

ERROR  :

ERROR  : NumArray::operator[](int) const -> range check error

ERROR  :

P.S. In the example above that you send me for version 6.1 the -type
'lat'
is used and that is not supported by version 5.2. That is why now I
have
-type 'poly'.


Thanks,

Keren

----
Keren Rosado, Ph.D.
NCAS-M Postdoctoral Fellow
NOAA ESRL
Office: (303) 497-5907

On Mon, Apr 2, 2018 at 9:21 AM, John Halley Gotway via RT
<met_help at ucar.edu
> wrote:

> Keren,
>
> OK, this should be pretty straight-forward to fix.  Since you're
using
> met-5.2, just run the the gen_vx_mask tool from version 5.2 to
generate the
> mask fields.
>
> When you run gen_vx_mask, the first argument is a gridded data file
which
> specifies the grid you're using.  So just pass in that FV3 GRIB2
file as
> the first argument.
>
> So please try rerunning gen_vx_mask to define a mask for the FV3
domain
> you're evaluating and let me know if you have any issues.
>
> Thanks,
> John
>
> On Thu, Mar 29, 2018 at 10:24 AM, Keren Rosado - NOAA Affiliate via
RT <
> met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> >
> > Hi John,
> >
> > Thanks  for figuring out the error.
> >
> > Now, I am having the same error you got about the mask projection.
> >
> > The first mask I created was Matthew_Mask_NetCDF3.nc and I used
> > pgrbq000.gfs.2016092900.grib2
> > to create the mask following your instructions above.
> >
> > Today, I created a second mask called
Matthew_Mask_0329_NetCDF3.nc. This
> > mask was created using gfs.t00z.pgrb2.0p25.f000
> >
> > In both cases I get the same error: (
> >
/scratch3/BMC/fim/Keren.Rosado/MET/log/gf_Matthew_jan/2016092900/met/
> > met_point_ua_gf_Matthew_jan_2016092900_096.log)
> >
> > ERROR  : parse_poly_mask() -> The masking and verification grids
do not
> > match:
> >
> > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000
lon_ll:
> > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> >
> > ERROR  : Projection: Lat/Lon Nx: 360 Ny: 181 lat_ll: -90.000
lon_ll:
> -0.000
> > delta_lat: 1.000 delta_lon: 1.000
> >
> >
> > P.S. These forecast output files are from FV3 I don't think that
should
> > matter since they are grib2 format.
> >
> >
> >
> > Thanks,
> >
> >
> > Keren
> >
> >
> >
> > ----
> > Keren Rosado, Ph.D.
> > NCAS-M Postdoctoral Fellow
> > NOAA ESRL
> > Office: (303) 497-5907
> >
> > On Wed, Mar 28, 2018 at 10:42 PM, John Halley Gotway via RT <
> > met_help at ucar.edu> wrote:
> >
> > > Keren,
> > >
> > > It just occurred to me that you probably won’t get that error
message I
> > got
> > > in my last call to point-stat.  I was using a different set of
data for
> > > testing... on a different domain. Presumably, you did define the
masks
> > > correctly for your domain... and I only got that error because I
> switched
> > > input data.
> > >
> > > Please let me know if that doesn’t fix the issue.
> > >
> > > Thanks,
> > > John
> > >
> > > On Wed, Mar 28, 2018 at 10:00 PM John Halley Gotway
<johnhg at ucar.edu>
> > > wrote:
> > >
> > > > Keren,
> > > >
> > > > OK, I understand what's going on here.  This one was tricky!
First
> > time
> > > > I've seen this.
> > > >
> > > > The problem is caused by you mixing tools from MET versions
5.2 and
> > 6.1.
> > > > And more specifically, it's the version of NetCDF that's
causing the
> > > > problem.  Prior to version 6.0, MET used NetCDF3 to read/write
NetCDF
> > > > files.  Versions 6.0 and later use NetCDF4.
> > > >
> > > > Here's what's happening...
> > > > - Running "ncdump -h" on your mask data files reveals that
they were
> > > > created with MET version 6.1... meaning NetCDF4.
> > > >    ncdump -h
/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > > masks/Matthew_Mask.nc
> > > >
> > > >  :MET_version = "V6.1" ;
> > > >
> > > >
> > > > - But in the workflow, you're running MET version 5.2... which
> expects
> > > > NetCDF3 files.
> > > >
> > > >
> > > > - In "mask.poly" you can pass in either a gridded data file or
an
> ascii
> > > > polyline file.  Point-Stat tries to process the input file
first as a
> > > > gridded data file.  If that doesn't work, it assumes the input
file
> is
> > > > ascii instead.
> > > >
> > > >
> > > > - So it tries opening "Matthew_Mask.nc" as a gridded data
file.  That
> > > > fails because the NetCDF3 library doesn't know anything about
NetCDF4
> > > > files.  So it tries to process it as ascii... which fails with
the
> > error
> > > > message you saw.
> > > >
> > > >
> > > > Next, I ran the following commands to convert your mask file
from
> > NetCDF4
> > > > to 3:
> > > >
> > > >
> > > >    module load nco
> > > >
> > > >    nccopy -k 1 masks/Matthew_Mask.nc
masks/Matthew_Mask_NetCDF3.nc
> > > >
> > > > And then I updated the Point-Stat config file to point to
> > > > "Matthew_Mask_NetCDF3.nc".
> > > >
> > > >
> > > > When I run Point-Stat, it still fails, but with a much more
useful
> > error
> > > > message.  Looks like you didn't generate the mask file for the
right
> > > domain:
> > > >
> > > >
> > > > ERROR  : parse_poly_mask() -> The masking and verification
grids do
> not
> > > > match:
> > > >
> > > > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000
lon_ll:
> > > > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> > > >
> > > > ERROR  : Projection: Lambert Conformal Nx: 614 Ny: 428 Lat_LL:
12.190
> > > > Lon_LL: 133.459 Lon_orient: 95.000 Alpha: 1356.011 Cone: 0.423
Bx:
> > > 346.6564
> > > > By: 1189.0556
> > > >
> > > > In general, I'd recommend sticking with a single version of
MET.  If
> > your
> > > > scripts/config files are set up to use met-5.2, use that
version of
> > > > gen_vx_mask to define the input masks.
> > > >
> > > >
> > > > Hope that helps clarify.
> > > >
> > > >
> > > > Thanks,
> > > > John
> > > >
> > > >
> > > >
> > > >
> > > > On Mon, Mar 26, 2018 at 7:29 PM, Keren Rosado - NOAA Affiliate
via
> RT <
> > > > met_help at ucar.edu> wrote:
> > > >
> > > >>
> > > >> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536
>
> > > >>
> > > >> Hi John,
> > > >>
> > > >> I am using a GMTB package that runs MET using rocoto. I
copied the
> > > entire
> > > >> MET directory for the package to work.
> > > >>
> > > >> The xml file is
> > > >> located
/scratch3/BMC/fim/Keren.Rosado/MET/xml/gf_matthew_jan.xml
> to
> > > run
> > > >> this xml I use runrocotoGFK.ksh
> > > >> I found point stat script different that the one you metioned
above
> > > >> at:
/scratch3/BMC/fim/Keren.Rosado/MET/bin/met_point_verf_sfc.ksh
> and
> > > >> met_point_verf_ua.ksh
> > > >>
> > > >> The model output grib files are located
> > > >> at:
/scratch3/BMC/fim/Keren.Rosado/MET/gf_Matthew_jan/2016092900
> > > >>
> > > >> Let me know if you need any other clarification.
> > > >>
> > > >> Thanks,
> > > >>
> > > >> Keren
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> ----
> > > >> Keren Rosado, Ph.D.
> > > >> NCAS-M Postdoctoral Fellow
> > > >> NOAA ESRL
> > > >> Office: (303) 497-5907
> > > >>
> > > >> On Mon, Mar 26, 2018 at 4:48 PM, John Halley Gotway via RT <
> > > >> met_help at ucar.edu> wrote:
> > > >>
> > > >> > Keren,
> > > >> >
> > > >> > I went hunting around on theia, looking at your data.  I
see that
> > > you're
> > > >> > using either version 5.1 or 5.2 of MET.  The latest
available
> > version
> > > on
> > > >> > theia is 7.0.
> > > >> >
> > > >> > I'd like to replicate the error message you're getting, so
I can
> see
> > > >> what
> > > >> > is needed to fix it.  Are you able to send me a single call
to
> > > >> Point-Stat
> > > >> > that replicates this behavior?  Or are you calling it from
a long
> > > script
> > > >> > that's doing lots of other step?
> > > >> >
> > > >> > Here's a point-stat script I found in your area:
> > > >> >
/scratch3/BMC/fim/Keren.Rosado/MET/scripts/run_point_stat.ksh
> > > >> >
> > > >> > Is that what you're running?
> > > >> >
> > > >> > Thanks,
> > > >> > John
> > > >> >
> > > >> > On Mon, Mar 26, 2018 at 3:01 PM, Keren Rosado - NOAA
Affiliate via
> > RT
> > > <
> > > >> > met_help at ucar.edu> wrote:
> > > >> >
> > > >> > >
> > > >> > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> > > >> > >
> > > >> > > Hi John,
> > > >> > >
> > > >> > > I am using PointStatConfig_ADPUPA_REGRID_G3 to run point
stat
> > > located
> > > >> at
> > > >> > > /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > >> > >
> > > >> > > I added  Matthew_Mask.nc in the mask section as you
explained
> > above
> > > to
> > > >> > > the PointStatConfig_ADPUPA_REGRID_G3.
> > > >> > > Results from this gave me an error: ERROR  :
> > > parse_latlon_poly_file()
> > > >> ->
> > > >> > > The polyline file supplied
> > > >> > > (/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > >> > masks/Matthew_Mask.nc)
> > > >> > > must contain at least 3 pairs of points to define a
masking
> > region.
> > > >> > >
> > > >> > > Trying to fix the error, I added the original mask files
and
> added
> > > my
> > > >> new
> > > >> > > mask file (Matthew_Mask) and the error still the same.
> > > >> > >
> > > >> > > // Verification masking regions
> > > >> > >
> > > >> > > //
> > > >> > >
> > > >> > > mask = {
> > > >> > >
> > > >> > >    grid = [ "FULL" ];
> > > >> > >
> > > >> > >    poly = [ "${MASKS}/Matthew_Mask.nc",
> > > >> > >
> > > >> > >             "${MASKS}/gfs_NH_G3.nc",
> > > >> > >
> > > >> > >             "${MASKS}/gfs_SH_G3.nc",
> > > >> > >
> > > >> > >             "${MASKS}/gfs_TROP_G3.nc" ];
> > > >> > >
> > > >> > >    sid  = [];
> > > >> > >
> > > >> > > };
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> > > Thanks,
> > > >> > >
> > > >> > > Keren
> > > >> > >
> > > >> > >
> > > >> > > ----
> > > >> > > Keren Rosado, Ph.D.
> > > >> > > NCAS-M Postdoctoral Fellow
> > > >> > > NOAA ESRL
> > > >> > > Office: (303) 497-5907
> > > >> > >
> > > >> > > On Fri, Mar 23, 2018 at 3:14 PM, John Halley Gotway via
RT <
> > > >> > > met_help at ucar.edu> wrote:
> > > >> > >
> > > >> > > > Keren,
> > > >> > > >
> > > >> > > > You have a couple of options here.  Since you're
comparing a
> > > gridded
> > > >> > > > forecast field to a gridded analysis, you'll be running
a
> > > >> grid-to-grid
> > > >> > > > tool, like Grid-Stat or MODE.
> > > >> > > >
> > > >> > > > (1) You could use the "regrid" option in the config
files to
> > > >> actually
> > > >> > > > regrid your data to a smaller domain.  If you're input
is a
> > > lat/lon
> > > >> > grid
> > > >> > > > and your output is really just a subset of that lat/lon
grid,
> > then
> > > >> > you'd
> > > >> > > > define the "to_grid" so that the output grid points
coincide
> > with
> > > >> the
> > > >> > > input
> > > >> > > > ones.
> > > >> > > >
> > > >> > > > (2) A second (more common) option would be to just
define one
> > (or
> > > >> more)
> > > >> > > > subregions over which to compute stats.  And yes, you
can
> > > definitely
> > > >> > use
> > > >> > > > gen_vx_mask to define that masking region.  Since you
want a
> > range
> > > >> of
> > > >> > > > lat/lon values, I'd recommend using the "-type lat" and
"-type
> > > lon"
> > > >> > > masking
> > > >> > > > types.
> > > >> > > >
> > > >> > > > Here's an example... looks to me like your mask is
> approximately
> > > the
> > > >> > Gulf
> > > >> > > > of Mexico.  So I named it "GOM_Mask":
> > > >> > > >
> > > >> > > > (1) Grab a GFS file for the example:
> > > >> > > >  > wget
> > > >> > > >
http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.
> > > >> > > > 2018032312/gfs.t12z.pgrb2.0p25.f012
> > > >> > > >
> > > >> > > > (2) Run gen_vx_mask to define latitude band:
> > > >> > > >  > met-6.1/bin/gen_vx_mask gfs.t12z.pgrb2.0p25.f012
> > > >> > > > gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type lat -thresh
> > > 'ge5&&le30'
> > > >> > > >
> > > >> > > > (3) Run gen_vx_mask to intersect the longitude band
> > > >> > > >  > met-6.1/bin/gen_vx_mask lat_band.nc lat_band.nc
> GOM_Mask.nc
> > > >> -type
> > > >> > lon
> > > >> > > > -thresh 'ge-85&&le-55' -intersection -name GOM_Mask
> > > >> > > >
> > > >> > > > (4) Plot the result using plot_data_plane
> > > >> > > >  > met-6.1/bin/plot_data_plane GOM_Mask.nc GOM_Mask.ps
> > > >> > 'name="GOM_Mask";
> > > >> > > > level="(*,*)";'
> > > >> > > >
> > > >> > > > And I've attached a PNG version of that image.
> > > >> > > >
> > > >> > > > Then you'd list this mask file in your Grid-Stat config
file:
> > > >> > > >
> > > >> > > > mask = {
> > > >> > > >    grid = [ "FULL" ];
> > > >> > > >    poly = [ "path/to/GOM_Mask.nc" ];
> > > >> > > > }
> > > >> > > >
> > > >> > > >
> > > >> > > > Hope that helps get you going.
> > > >> > > >
> > > >> > > > Thanks,
> > > >> > > > John
> > > >> > > >
> > > >> > > >
> > > >> > > > On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado - NOAA
Affiliate
> > via
> > > >> RT <
> > > >> > > > met_help at ucar.edu> wrote:
> > > >> > > >
> > > >> > > > >
> > > >> > > > > Fri Mar 23 14:57:16 2018: Request 84536 was acted
upon.
> > > >> > > > > Transaction: Ticket created by keren.rosado at noaa.gov
> > > >> > > > >        Queue: met_help
> > > >> > > > >      Subject: MET for smaller domain from global
output
> > > >> > > > >        Owner: Nobody
> > > >> > > > >   Requestors: keren.rosado at noaa.gov
> > > >> > > > >       Status: new
> > > >> > > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> > > >> > Ticket/Display.html?id=84536
> > > >> > > >
> > > >> > > > >
> > > >> > > > >
> > > >> > > > > Hello!
> > > >> > > > >
> > > >> > > > > I have global FV3GFS forecast output  and global
> observations
> > > from
> > > >> > > CMORPH
> > > >> > > > > on Theia. From the global output, I will like to
analyze a
> > > smaller
> > > >> > > domain
> > > >> > > > > e.g. 5N-30N 55W-85W. Is there a configure file where
I can
> set
> > > up
> > > >> Lat
> > > >> > > and
> > > >> > > > > Lon different than the input file?
> > > >> > > > >
> > > >> > > > > I saw the gen-vx-mask option in the tutorial but for
what I
> > > >> > understood
> > > >> > > > does
> > > >> > > > > files are pre made.
> > > >> > > > >
> > > >> > > > > Thanks,
> > > >> > > > >
> > > >> > > > > Keren
> > > >> > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > > >
> > > >> > >
> > > >> > >
> > > >> >
> > > >> >
> > > >>
> > > >>
> > > >
> > >
> > >
> >
> >
>
>

------------------------------------------------
Subject: MET for smaller domain from global output
From: John Halley Gotway
Time: Wed May 16 17:02:57 2018

Keren,

The "type" of masking that you want to apply is latitude masking.  So
you'd
use "-type lat" instead of "-type poly".  However, "-type lat" isn't
supported in met-5.2.  It was added in met-6.1.

If you can switch to using met-6.1 or met-7.0, I'd suggest doing so.
Judging by the fact that the dimensions are 1440x721, I'll assume that
this
is 0.25 degree global data.  To demonstrate, I created a test file
named
"gfs_grid_193.grib".  Here's the met-7.0 command you could run:

   met-7.0/bin/gen_vx_mask \
      gfs_grid_193.grib \
      gfs_grid_193.grib  \
      gfs_lat_mask.nc \
      -type lat -thresh 'ge5&&le30' -v 3

Running at verbosity level 3 tells you how many grid points were
included
in the mask:
   DEBUG 3: Latitude Masking:              145440 of 1038240 points
inside

Otherwise, if you're stuck using met-5.2, since you're operating on a
lat/lon grid, you could get the same result using the "box" masking
type.
It's just much less straight-forward.  We pick a lat/lon point that
we'd
want in the center of the box... and then specify the length and width
of
the box in grid units.

I'll pick my center point as lat = 17.5 and lon = -180 and write that
to an
ascii file:

box_center.poly
+++++++++
   box_mask
   17.5 -180
+++++++++

And then run this met-5.2 command:

   met-5.2/bin/gen_vx_mask \
      gfs_grid_193.grib \
      box_center.poly \
      gfs_box_mask.nc -type box -height 101 -width 1440 -v 3

At verbosity level 3, here's the number of point in this mask:
   DEBUG 3: Box Masking (101 x 1441):      145440 of 1038240 points
inside

And that matches what we got from met-7.0

Hope this helps.

Thanks,
John


On Wed, May 16, 2018 at 3:54 PM, Keren Rosado - NOAA Affiliate via RT
<
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
>
> John,
>
> I am trying to run the gen_vx_mask with MET version 5.2 and I get an
error.
>
> This is the command I am doing following what you explained in your
> previous email and MET user guide 5.2.
>
> gen_vx_mask pgrbq000.gfs.2016092900.grib2
pgrbq000.gfs.2016092900.grib2
> lat_band.nc -type poly -thresh 'ge5&&le30'
>
>
> DEBUG 1: Input File: pgrbq000.gfs.2016092900.grib2
>
> DEBUG 1: Mask File: pgrbq000.gfs.2016092900.grib2
>
> DEBUG 2: Parsed Data Grid: LatLon (1440 x 721)
>
> DEBUG 2: Parsed Lat/Lon Mask File: (nul) containing 0 points
>
> ERROR  :
>
> ERROR  : NumArray::operator[](int) const -> range check error
>
> ERROR  :
>
> P.S. In the example above that you send me for version 6.1 the -type
'lat'
> is used and that is not supported by version 5.2. That is why now I
have
> -type 'poly'.
>
>
> Thanks,
>
> Keren
>
> ----
> Keren Rosado, Ph.D.
> NCAS-M Postdoctoral Fellow
> NOAA ESRL
> Office: (303) 497-5907
>
> On Mon, Apr 2, 2018 at 9:21 AM, John Halley Gotway via RT <
> met_help at ucar.edu
> > wrote:
>
> > Keren,
> >
> > OK, this should be pretty straight-forward to fix.  Since you're
using
> > met-5.2, just run the the gen_vx_mask tool from version 5.2 to
generate
> the
> > mask fields.
> >
> > When you run gen_vx_mask, the first argument is a gridded data
file which
> > specifies the grid you're using.  So just pass in that FV3 GRIB2
file as
> > the first argument.
> >
> > So please try rerunning gen_vx_mask to define a mask for the FV3
domain
> > you're evaluating and let me know if you have any issues.
> >
> > Thanks,
> > John
> >
> > On Thu, Mar 29, 2018 at 10:24 AM, Keren Rosado - NOAA Affiliate
via RT <
> > met_help at ucar.edu> wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> > >
> > > Hi John,
> > >
> > > Thanks  for figuring out the error.
> > >
> > > Now, I am having the same error you got about the mask
projection.
> > >
> > > The first mask I created was Matthew_Mask_NetCDF3.nc and I used
> > > pgrbq000.gfs.2016092900.grib2
> > > to create the mask following your instructions above.
> > >
> > > Today, I created a second mask called
Matthew_Mask_0329_NetCDF3.nc.
> This
> > > mask was created using gfs.t00z.pgrb2.0p25.f000
> > >
> > > In both cases I get the same error: (
> > >
/scratch3/BMC/fim/Keren.Rosado/MET/log/gf_Matthew_jan/2016092900/met/
> > > met_point_ua_gf_Matthew_jan_2016092900_096.log)
> > >
> > > ERROR  : parse_poly_mask() -> The masking and verification grids
do not
> > > match:
> > >
> > > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000
lon_ll:
> > > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> > >
> > > ERROR  : Projection: Lat/Lon Nx: 360 Ny: 181 lat_ll: -90.000
lon_ll:
> > -0.000
> > > delta_lat: 1.000 delta_lon: 1.000
> > >
> > >
> > > P.S. These forecast output files are from FV3 I don't think that
should
> > > matter since they are grib2 format.
> > >
> > >
> > >
> > > Thanks,
> > >
> > >
> > > Keren
> > >
> > >
> > >
> > > ----
> > > Keren Rosado, Ph.D.
> > > NCAS-M Postdoctoral Fellow
> > > NOAA ESRL
> > > Office: (303) 497-5907
> > >
> > > On Wed, Mar 28, 2018 at 10:42 PM, John Halley Gotway via RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > > Keren,
> > > >
> > > > It just occurred to me that you probably won’t get that error
> message I
> > > got
> > > > in my last call to point-stat.  I was using a different set of
data
> for
> > > > testing... on a different domain. Presumably, you did define
the
> masks
> > > > correctly for your domain... and I only got that error because
I
> > switched
> > > > input data.
> > > >
> > > > Please let me know if that doesn’t fix the issue.
> > > >
> > > > Thanks,
> > > > John
> > > >
> > > > On Wed, Mar 28, 2018 at 10:00 PM John Halley Gotway
<johnhg at ucar.edu
> >
> > > > wrote:
> > > >
> > > > > Keren,
> > > > >
> > > > > OK, I understand what's going on here.  This one was tricky!
First
> > > time
> > > > > I've seen this.
> > > > >
> > > > > The problem is caused by you mixing tools from MET versions
5.2 and
> > > 6.1.
> > > > > And more specifically, it's the version of NetCDF that's
causing
> the
> > > > > problem.  Prior to version 6.0, MET used NetCDF3 to
read/write
> NetCDF
> > > > > files.  Versions 6.0 and later use NetCDF4.
> > > > >
> > > > > Here's what's happening...
> > > > > - Running "ncdump -h" on your mask data files reveals that
they
> were
> > > > > created with MET version 6.1... meaning NetCDF4.
> > > > >    ncdump -h
/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > > > masks/Matthew_Mask.nc
> > > > >
> > > > >  :MET_version = "V6.1" ;
> > > > >
> > > > >
> > > > > - But in the workflow, you're running MET version 5.2...
which
> > expects
> > > > > NetCDF3 files.
> > > > >
> > > > >
> > > > > - In "mask.poly" you can pass in either a gridded data file
or an
> > ascii
> > > > > polyline file.  Point-Stat tries to process the input file
first
> as a
> > > > > gridded data file.  If that doesn't work, it assumes the
input file
> > is
> > > > > ascii instead.
> > > > >
> > > > >
> > > > > - So it tries opening "Matthew_Mask.nc" as a gridded data
file.
> That
> > > > > fails because the NetCDF3 library doesn't know anything
about
> NetCDF4
> > > > > files.  So it tries to process it as ascii... which fails
with the
> > > error
> > > > > message you saw.
> > > > >
> > > > >
> > > > > Next, I ran the following commands to convert your mask file
from
> > > NetCDF4
> > > > > to 3:
> > > > >
> > > > >
> > > > >    module load nco
> > > > >
> > > > >    nccopy -k 1 masks/Matthew_Mask.nc
masks/Matthew_Mask_NetCDF3.nc
> > > > >
> > > > > And then I updated the Point-Stat config file to point to
> > > > > "Matthew_Mask_NetCDF3.nc".
> > > > >
> > > > >
> > > > > When I run Point-Stat, it still fails, but with a much more
useful
> > > error
> > > > > message.  Looks like you didn't generate the mask file for
the
> right
> > > > domain:
> > > > >
> > > > >
> > > > > ERROR  : parse_poly_mask() -> The masking and verification
grids do
> > not
> > > > > match:
> > > > >
> > > > > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll:
-90.000
> lon_ll:
> > > > > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> > > > >
> > > > > ERROR  : Projection: Lambert Conformal Nx: 614 Ny: 428
Lat_LL:
> 12.190
> > > > > Lon_LL: 133.459 Lon_orient: 95.000 Alpha: 1356.011 Cone:
0.423 Bx:
> > > > 346.6564
> > > > > By: 1189.0556
> > > > >
> > > > > In general, I'd recommend sticking with a single version of
MET.
> If
> > > your
> > > > > scripts/config files are set up to use met-5.2, use that
version of
> > > > > gen_vx_mask to define the input masks.
> > > > >
> > > > >
> > > > > Hope that helps clarify.
> > > > >
> > > > >
> > > > > Thanks,
> > > > > John
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Mon, Mar 26, 2018 at 7:29 PM, Keren Rosado - NOAA
Affiliate via
> > RT <
> > > > > met_help at ucar.edu> wrote:
> > > > >
> > > > >>
> > > > >> <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> > > > >>
> > > > >> Hi John,
> > > > >>
> > > > >> I am using a GMTB package that runs MET using rocoto. I
copied the
> > > > entire
> > > > >> MET directory for the package to work.
> > > > >>
> > > > >> The xml file is
> > > > >> located
/scratch3/BMC/fim/Keren.Rosado/MET/xml/gf_matthew_jan.xml
> > to
> > > > run
> > > > >> this xml I use runrocotoGFK.ksh
> > > > >> I found point stat script different that the one you
metioned
> above
> > > > >> at:
/scratch3/BMC/fim/Keren.Rosado/MET/bin/met_point_verf_sfc.ksh
> > and
> > > > >> met_point_verf_ua.ksh
> > > > >>
> > > > >> The model output grib files are located
> > > > >> at:
/scratch3/BMC/fim/Keren.Rosado/MET/gf_Matthew_jan/2016092900
> > > > >>
> > > > >> Let me know if you need any other clarification.
> > > > >>
> > > > >> Thanks,
> > > > >>
> > > > >> Keren
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >> ----
> > > > >> Keren Rosado, Ph.D.
> > > > >> NCAS-M Postdoctoral Fellow
> > > > >> NOAA ESRL
> > > > >> Office: (303) 497-5907
> > > > >>
> > > > >> On Mon, Mar 26, 2018 at 4:48 PM, John Halley Gotway via RT
<
> > > > >> met_help at ucar.edu> wrote:
> > > > >>
> > > > >> > Keren,
> > > > >> >
> > > > >> > I went hunting around on theia, looking at your data.  I
see
> that
> > > > you're
> > > > >> > using either version 5.1 or 5.2 of MET.  The latest
available
> > > version
> > > > on
> > > > >> > theia is 7.0.
> > > > >> >
> > > > >> > I'd like to replicate the error message you're getting,
so I can
> > see
> > > > >> what
> > > > >> > is needed to fix it.  Are you able to send me a single
call to
> > > > >> Point-Stat
> > > > >> > that replicates this behavior?  Or are you calling it
from a
> long
> > > > script
> > > > >> > that's doing lots of other step?
> > > > >> >
> > > > >> > Here's a point-stat script I found in your area:
> > > > >> >    /scratch3/BMC/fim/Keren.Rosado/MET/scripts/run_point_
> stat.ksh
> > > > >> >
> > > > >> > Is that what you're running?
> > > > >> >
> > > > >> > Thanks,
> > > > >> > John
> > > > >> >
> > > > >> > On Mon, Mar 26, 2018 at 3:01 PM, Keren Rosado - NOAA
Affiliate
> via
> > > RT
> > > > <
> > > > >> > met_help at ucar.edu> wrote:
> > > > >> >
> > > > >> > >
> > > > >> > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536
> >
> > > > >> > >
> > > > >> > > Hi John,
> > > > >> > >
> > > > >> > > I am using PointStatConfig_ADPUPA_REGRID_G3 to run
point stat
> > > > located
> > > > >> at
> > > > >> > > /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > > >> > >
> > > > >> > > I added  Matthew_Mask.nc in the mask section as you
explained
> > > above
> > > > to
> > > > >> > > the PointStatConfig_ADPUPA_REGRID_G3.
> > > > >> > > Results from this gave me an error: ERROR  :
> > > > parse_latlon_poly_file()
> > > > >> ->
> > > > >> > > The polyline file supplied
> > > > >> > > (/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > > >> > masks/Matthew_Mask.nc)
> > > > >> > > must contain at least 3 pairs of points to define a
masking
> > > region.
> > > > >> > >
> > > > >> > > Trying to fix the error, I added the original mask
files and
> > added
> > > > my
> > > > >> new
> > > > >> > > mask file (Matthew_Mask) and the error still the same.
> > > > >> > >
> > > > >> > > // Verification masking regions
> > > > >> > >
> > > > >> > > //
> > > > >> > >
> > > > >> > > mask = {
> > > > >> > >
> > > > >> > >    grid = [ "FULL" ];
> > > > >> > >
> > > > >> > >    poly = [ "${MASKS}/Matthew_Mask.nc",
> > > > >> > >
> > > > >> > >             "${MASKS}/gfs_NH_G3.nc",
> > > > >> > >
> > > > >> > >             "${MASKS}/gfs_SH_G3.nc",
> > > > >> > >
> > > > >> > >             "${MASKS}/gfs_TROP_G3.nc" ];
> > > > >> > >
> > > > >> > >    sid  = [];
> > > > >> > >
> > > > >> > > };
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> > > Thanks,
> > > > >> > >
> > > > >> > > Keren
> > > > >> > >
> > > > >> > >
> > > > >> > > ----
> > > > >> > > Keren Rosado, Ph.D.
> > > > >> > > NCAS-M Postdoctoral Fellow
> > > > >> > > NOAA ESRL
> > > > >> > > Office: (303) 497-5907
> > > > >> > >
> > > > >> > > On Fri, Mar 23, 2018 at 3:14 PM, John Halley Gotway via
RT <
> > > > >> > > met_help at ucar.edu> wrote:
> > > > >> > >
> > > > >> > > > Keren,
> > > > >> > > >
> > > > >> > > > You have a couple of options here.  Since you're
comparing a
> > > > gridded
> > > > >> > > > forecast field to a gridded analysis, you'll be
running a
> > > > >> grid-to-grid
> > > > >> > > > tool, like Grid-Stat or MODE.
> > > > >> > > >
> > > > >> > > > (1) You could use the "regrid" option in the config
files to
> > > > >> actually
> > > > >> > > > regrid your data to a smaller domain.  If you're
input is a
> > > > lat/lon
> > > > >> > grid
> > > > >> > > > and your output is really just a subset of that
lat/lon
> grid,
> > > then
> > > > >> > you'd
> > > > >> > > > define the "to_grid" so that the output grid points
coincide
> > > with
> > > > >> the
> > > > >> > > input
> > > > >> > > > ones.
> > > > >> > > >
> > > > >> > > > (2) A second (more common) option would be to just
define
> one
> > > (or
> > > > >> more)
> > > > >> > > > subregions over which to compute stats.  And yes, you
can
> > > > definitely
> > > > >> > use
> > > > >> > > > gen_vx_mask to define that masking region.  Since you
want a
> > > range
> > > > >> of
> > > > >> > > > lat/lon values, I'd recommend using the "-type lat"
and
> "-type
> > > > lon"
> > > > >> > > masking
> > > > >> > > > types.
> > > > >> > > >
> > > > >> > > > Here's an example... looks to me like your mask is
> > approximately
> > > > the
> > > > >> > Gulf
> > > > >> > > > of Mexico.  So I named it "GOM_Mask":
> > > > >> > > >
> > > > >> > > > (1) Grab a GFS file for the example:
> > > > >> > > >  > wget
> > > > >> > > >
http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.
> > > > >> > > > 2018032312/gfs.t12z.pgrb2.0p25.f012
> > > > >> > > >
> > > > >> > > > (2) Run gen_vx_mask to define latitude band:
> > > > >> > > >  > met-6.1/bin/gen_vx_mask gfs.t12z.pgrb2.0p25.f012
> > > > >> > > > gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type lat
-thresh
> > > > 'ge5&&le30'
> > > > >> > > >
> > > > >> > > > (3) Run gen_vx_mask to intersect the longitude band
> > > > >> > > >  > met-6.1/bin/gen_vx_mask lat_band.nc lat_band.nc
> > GOM_Mask.nc
> > > > >> -type
> > > > >> > lon
> > > > >> > > > -thresh 'ge-85&&le-55' -intersection -name GOM_Mask
> > > > >> > > >
> > > > >> > > > (4) Plot the result using plot_data_plane
> > > > >> > > >  > met-6.1/bin/plot_data_plane GOM_Mask.nc
GOM_Mask.ps
> > > > >> > 'name="GOM_Mask";
> > > > >> > > > level="(*,*)";'
> > > > >> > > >
> > > > >> > > > And I've attached a PNG version of that image.
> > > > >> > > >
> > > > >> > > > Then you'd list this mask file in your Grid-Stat
config
> file:
> > > > >> > > >
> > > > >> > > > mask = {
> > > > >> > > >    grid = [ "FULL" ];
> > > > >> > > >    poly = [ "path/to/GOM_Mask.nc" ];
> > > > >> > > > }
> > > > >> > > >
> > > > >> > > >
> > > > >> > > > Hope that helps get you going.
> > > > >> > > >
> > > > >> > > > Thanks,
> > > > >> > > > John
> > > > >> > > >
> > > > >> > > >
> > > > >> > > > On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado - NOAA
> Affiliate
> > > via
> > > > >> RT <
> > > > >> > > > met_help at ucar.edu> wrote:
> > > > >> > > >
> > > > >> > > > >
> > > > >> > > > > Fri Mar 23 14:57:16 2018: Request 84536 was acted
upon.
> > > > >> > > > > Transaction: Ticket created by
keren.rosado at noaa.gov
> > > > >> > > > >        Queue: met_help
> > > > >> > > > >      Subject: MET for smaller domain from global
output
> > > > >> > > > >        Owner: Nobody
> > > > >> > > > >   Requestors: keren.rosado at noaa.gov
> > > > >> > > > >       Status: new
> > > > >> > > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> > > > >> > Ticket/Display.html?id=84536
> > > > >> > > >
> > > > >> > > > >
> > > > >> > > > >
> > > > >> > > > > Hello!
> > > > >> > > > >
> > > > >> > > > > I have global FV3GFS forecast output  and global
> > observations
> > > > from
> > > > >> > > CMORPH
> > > > >> > > > > on Theia. From the global output, I will like to
analyze a
> > > > smaller
> > > > >> > > domain
> > > > >> > > > > e.g. 5N-30N 55W-85W. Is there a configure file
where I can
> > set
> > > > up
> > > > >> Lat
> > > > >> > > and
> > > > >> > > > > Lon different than the input file?
> > > > >> > > > >
> > > > >> > > > > I saw the gen-vx-mask option in the tutorial but
for what
> I
> > > > >> > understood
> > > > >> > > > does
> > > > >> > > > > files are pre made.
> > > > >> > > > >
> > > > >> > > > > Thanks,
> > > > >> > > > >
> > > > >> > > > > Keren
> > > > >> > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > >
> > > > >> > >
> > > > >> >
> > > > >> >
> > > > >>
> > > > >>
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

------------------------------------------------
Subject: MET for smaller domain from global output
From: Keren Rosado - NOAA Affiliate
Time: Thu May 17 11:20:22 2018

John,

I am getting exactly the same error as before.

Here is what I did using MET 5.2 and .25 grib2 files:

Created the box_center.poly

Center of the box (5-30N 55-85W)


box_mask

17.5 -70


then type mask gen_vx_maskgrb.file box_center.poly gfs_box_mask.nc
-type
box -height 101 -width 101 -v 3





DEBUG 1: Input File:     pgrbq000.gfs.2016092900.grib2

DEBUG 1: Mask File:   box_center.poly

DEBUG 3: Switching the GRIB2 radius of the earth value of 6371.23 km
to
6371.2 km for internal consistency.

DEBUG 2: Parsed Data Grid:LatLon (1440 x 721)

DEBUG 2: Parsed Lat/Lon Mask File:box_mask    containing 1 points

DEBUG 3: Box Masking (90 x 101):9090 of 1038240 points inside

DEBUG 1: Output File:    gfs_box_mask.nc



Ncview gfs_box_mask.nc to make sure mask is where I want (attached
figure).


Then I changed the config file with the new ".nc" file for the masking
/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
PointStatConfig_ADPUPA_REGRID_G3

 mask = {

   grid = [ "FULL" ];

   poly = [ "${MASKS}/gfs_box_mask.nc" ];

   sid  = [];


and run /scratch3/BMC/fim/Keren.Rosado/MET/xml/runrocotoGFK.ksh


The log file
error
/scratch3/BMC/fim/Keren.Rosado/MET/log/gf_Matthew_jan/2016092900/met
met_point_ua_gf_Matthew_jan_2016092900_000.log


ERROR  : parse_poly_mask() -> The masking and verification grids do
not
match:

ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000 lon_ll:
-0.000 delta_lat: 0.250 delta_lon: 0.250 !=

ERROR  : Projection: Lat/Lon Nx: 360 Ny: 181 lat_ll: -90.000 lon_ll:
-0.000
delta_lat: 1.000 delta_lon: 1.000

ERROR  :


Thanks,


Keren


----
Keren Rosado, Ph.D.
NCAS-M Postdoctoral Fellow
NOAA ESRL
Office: (303) 497-5907

On Wed, May 16, 2018 at 5:02 PM, John Halley Gotway via RT <
met_help at ucar.edu> wrote:

> Keren,
>
> The "type" of masking that you want to apply is latitude masking.
So you'd
> use "-type lat" instead of "-type poly".  However, "-type lat" isn't
> supported in met-5.2.  It was added in met-6.1.
>
> If you can switch to using met-6.1 or met-7.0, I'd suggest doing so.
> Judging by the fact that the dimensions are 1440x721, I'll assume
that this
> is 0.25 degree global data.  To demonstrate, I created a test file
named
> "gfs_grid_193.grib".  Here's the met-7.0 command you could run:
>
>    met-7.0/bin/gen_vx_mask \
>       gfs_grid_193.grib \
>       gfs_grid_193.grib  \
>       gfs_lat_mask.nc \
>       -type lat -thresh 'ge5&&le30' -v 3
>
> Running at verbosity level 3 tells you how many grid points were
included
> in the mask:
>    DEBUG 3: Latitude Masking:              145440 of 1038240 points
inside
>
> Otherwise, if you're stuck using met-5.2, since you're operating on
a
> lat/lon grid, you could get the same result using the "box" masking
type.
> It's just much less straight-forward.  We pick a lat/lon point that
we'd
> want in the center of the box... and then specify the length and
width of
> the box in grid units.
>
> I'll pick my center point as lat = 17.5 and lon = -180 and write
that to an
> ascii file:
>
> box_center.poly
> +++++++++
>    box_mask
>    17.5 -180
> +++++++++
>
> And then run this met-5.2 command:
>
>    met-5.2/bin/gen_vx_mask \
>       gfs_grid_193.grib \
>       box_center.poly \
>       gfs_box_mask.nc -type box -height 101 -width 1440 -v 3
>
> At verbosity level 3, here's the number of point in this mask:
>    DEBUG 3: Box Masking (101 x 1441):      145440 of 1038240 points
inside
>
> And that matches what we got from met-7.0
>
> Hope this helps.
>
> Thanks,
> John
>
>
> On Wed, May 16, 2018 at 3:54 PM, Keren Rosado - NOAA Affiliate via
RT <
> met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> >
> > John,
> >
> > I am trying to run the gen_vx_mask with MET version 5.2 and I get
an
> error.
> >
> > This is the command I am doing following what you explained in
your
> > previous email and MET user guide 5.2.
> >
> > gen_vx_mask pgrbq000.gfs.2016092900.grib2
pgrbq000.gfs.2016092900.grib2
> > lat_band.nc -type poly -thresh 'ge5&&le30'
> >
> >
> > DEBUG 1: Input File: pgrbq000.gfs.2016092900.grib2
> >
> > DEBUG 1: Mask File: pgrbq000.gfs.2016092900.grib2
> >
> > DEBUG 2: Parsed Data Grid: LatLon (1440 x 721)
> >
> > DEBUG 2: Parsed Lat/Lon Mask File: (nul) containing 0 points
> >
> > ERROR  :
> >
> > ERROR  : NumArray::operator[](int) const -> range check error
> >
> > ERROR  :
> >
> > P.S. In the example above that you send me for version 6.1 the
-type
> 'lat'
> > is used and that is not supported by version 5.2. That is why now
I have
> > -type 'poly'.
> >
> >
> > Thanks,
> >
> > Keren
> >
> > ----
> > Keren Rosado, Ph.D.
> > NCAS-M Postdoctoral Fellow
> > NOAA ESRL
> > Office: (303) 497-5907
> >
> > On Mon, Apr 2, 2018 at 9:21 AM, John Halley Gotway via RT <
> > met_help at ucar.edu
> > > wrote:
> >
> > > Keren,
> > >
> > > OK, this should be pretty straight-forward to fix.  Since you're
using
> > > met-5.2, just run the the gen_vx_mask tool from version 5.2 to
generate
> > the
> > > mask fields.
> > >
> > > When you run gen_vx_mask, the first argument is a gridded data
file
> which
> > > specifies the grid you're using.  So just pass in that FV3 GRIB2
file
> as
> > > the first argument.
> > >
> > > So please try rerunning gen_vx_mask to define a mask for the FV3
domain
> > > you're evaluating and let me know if you have any issues.
> > >
> > > Thanks,
> > > John
> > >
> > > On Thu, Mar 29, 2018 at 10:24 AM, Keren Rosado - NOAA Affiliate
via RT
> <
> > > met_help at ucar.edu> wrote:
> > >
> > > >
> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536
>
> > > >
> > > > Hi John,
> > > >
> > > > Thanks  for figuring out the error.
> > > >
> > > > Now, I am having the same error you got about the mask
projection.
> > > >
> > > > The first mask I created was Matthew_Mask_NetCDF3.nc and I
used
> > > > pgrbq000.gfs.2016092900.grib2
> > > > to create the mask following your instructions above.
> > > >
> > > > Today, I created a second mask called
Matthew_Mask_0329_NetCDF3.nc.
> > This
> > > > mask was created using gfs.t00z.pgrb2.0p25.f000
> > > >
> > > > In both cases I get the same error: (
> > > > /scratch3/BMC/fim/Keren.Rosado/MET/log/gf_Matthew_jan/
> 2016092900/met/
> > > > met_point_ua_gf_Matthew_jan_2016092900_096.log)
> > > >
> > > > ERROR  : parse_poly_mask() -> The masking and verification
grids do
> not
> > > > match:
> > > >
> > > > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000
lon_ll:
> > > > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> > > >
> > > > ERROR  : Projection: Lat/Lon Nx: 360 Ny: 181 lat_ll: -90.000
lon_ll:
> > > -0.000
> > > > delta_lat: 1.000 delta_lon: 1.000
> > > >
> > > >
> > > > P.S. These forecast output files are from FV3 I don't think
that
> should
> > > > matter since they are grib2 format.
> > > >
> > > >
> > > >
> > > > Thanks,
> > > >
> > > >
> > > > Keren
> > > >
> > > >
> > > >
> > > > ----
> > > > Keren Rosado, Ph.D.
> > > > NCAS-M Postdoctoral Fellow
> > > > NOAA ESRL
> > > > Office: (303) 497-5907
> > > >
> > > > On Wed, Mar 28, 2018 at 10:42 PM, John Halley Gotway via RT <
> > > > met_help at ucar.edu> wrote:
> > > >
> > > > > Keren,
> > > > >
> > > > > It just occurred to me that you probably won’t get that
error
> > message I
> > > > got
> > > > > in my last call to point-stat.  I was using a different set
of data
> > for
> > > > > testing... on a different domain. Presumably, you did define
the
> > masks
> > > > > correctly for your domain... and I only got that error
because I
> > > switched
> > > > > input data.
> > > > >
> > > > > Please let me know if that doesn’t fix the issue.
> > > > >
> > > > > Thanks,
> > > > > John
> > > > >
> > > > > On Wed, Mar 28, 2018 at 10:00 PM John Halley Gotway <
> johnhg at ucar.edu
> > >
> > > > > wrote:
> > > > >
> > > > > > Keren,
> > > > > >
> > > > > > OK, I understand what's going on here.  This one was
tricky!
> First
> > > > time
> > > > > > I've seen this.
> > > > > >
> > > > > > The problem is caused by you mixing tools from MET
versions 5.2
> and
> > > > 6.1.
> > > > > > And more specifically, it's the version of NetCDF that's
causing
> > the
> > > > > > problem.  Prior to version 6.0, MET used NetCDF3 to
read/write
> > NetCDF
> > > > > > files.  Versions 6.0 and later use NetCDF4.
> > > > > >
> > > > > > Here's what's happening...
> > > > > > - Running "ncdump -h" on your mask data files reveals that
they
> > were
> > > > > > created with MET version 6.1... meaning NetCDF4.
> > > > > >    ncdump -h  /scratch3/BMC/fim/Keren.
> Rosado/MET/parm/met_config/
> > > > > > masks/Matthew_Mask.nc
> > > > > >
> > > > > >  :MET_version = "V6.1" ;
> > > > > >
> > > > > >
> > > > > > - But in the workflow, you're running MET version 5.2...
which
> > > expects
> > > > > > NetCDF3 files.
> > > > > >
> > > > > >
> > > > > > - In "mask.poly" you can pass in either a gridded data
file or an
> > > ascii
> > > > > > polyline file.  Point-Stat tries to process the input file
first
> > as a
> > > > > > gridded data file.  If that doesn't work, it assumes the
input
> file
> > > is
> > > > > > ascii instead.
> > > > > >
> > > > > >
> > > > > > - So it tries opening "Matthew_Mask.nc" as a gridded data
file.
> > That
> > > > > > fails because the NetCDF3 library doesn't know anything
about
> > NetCDF4
> > > > > > files.  So it tries to process it as ascii... which fails
with
> the
> > > > error
> > > > > > message you saw.
> > > > > >
> > > > > >
> > > > > > Next, I ran the following commands to convert your mask
file from
> > > > NetCDF4
> > > > > > to 3:
> > > > > >
> > > > > >
> > > > > >    module load nco
> > > > > >
> > > > > >    nccopy -k 1 masks/Matthew_Mask.nc
> masks/Matthew_Mask_NetCDF3.nc
> > > > > >
> > > > > > And then I updated the Point-Stat config file to point to
> > > > > > "Matthew_Mask_NetCDF3.nc".
> > > > > >
> > > > > >
> > > > > > When I run Point-Stat, it still fails, but with a much
more
> useful
> > > > error
> > > > > > message.  Looks like you didn't generate the mask file for
the
> > right
> > > > > domain:
> > > > > >
> > > > > >
> > > > > > ERROR  : parse_poly_mask() -> The masking and verification
grids
> do
> > > not
> > > > > > match:
> > > > > >
> > > > > > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll:
-90.000
> > lon_ll:
> > > > > > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> > > > > >
> > > > > > ERROR  : Projection: Lambert Conformal Nx: 614 Ny: 428
Lat_LL:
> > 12.190
> > > > > > Lon_LL: 133.459 Lon_orient: 95.000 Alpha: 1356.011 Cone:
0.423
> Bx:
> > > > > 346.6564
> > > > > > By: 1189.0556
> > > > > >
> > > > > > In general, I'd recommend sticking with a single version
of MET.
> > If
> > > > your
> > > > > > scripts/config files are set up to use met-5.2, use that
version
> of
> > > > > > gen_vx_mask to define the input masks.
> > > > > >
> > > > > >
> > > > > > Hope that helps clarify.
> > > > > >
> > > > > >
> > > > > > Thanks,
> > > > > > John
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Mon, Mar 26, 2018 at 7:29 PM, Keren Rosado - NOAA
Affiliate
> via
> > > RT <
> > > > > > met_help at ucar.edu> wrote:
> > > > > >
> > > > > >>
> > > > > >> <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> > > > > >>
> > > > > >> Hi John,
> > > > > >>
> > > > > >> I am using a GMTB package that runs MET using rocoto. I
copied
> the
> > > > > entire
> > > > > >> MET directory for the package to work.
> > > > > >>
> > > > > >> The xml file is
> > > > > >> located
/scratch3/BMC/fim/Keren.Rosado/MET/xml/gf_matthew_jan.
> xml
> > > to
> > > > > run
> > > > > >> this xml I use runrocotoGFK.ksh
> > > > > >> I found point stat script different that the one you
metioned
> > above
> > > > > >> at:
/scratch3/BMC/fim/Keren.Rosado/MET/bin/met_point_verf_
> sfc.ksh
> > > and
> > > > > >> met_point_verf_ua.ksh
> > > > > >>
> > > > > >> The model output grib files are located
> > > > > >> at: /scratch3/BMC/fim/Keren.Rosado/MET/gf_Matthew_jan/
> 2016092900
> > > > > >>
> > > > > >> Let me know if you need any other clarification.
> > > > > >>
> > > > > >> Thanks,
> > > > > >>
> > > > > >> Keren
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >> ----
> > > > > >> Keren Rosado, Ph.D.
> > > > > >> NCAS-M Postdoctoral Fellow
> > > > > >> NOAA ESRL
> > > > > >> Office: (303) 497-5907
> > > > > >>
> > > > > >> On Mon, Mar 26, 2018 at 4:48 PM, John Halley Gotway via
RT <
> > > > > >> met_help at ucar.edu> wrote:
> > > > > >>
> > > > > >> > Keren,
> > > > > >> >
> > > > > >> > I went hunting around on theia, looking at your data.
I see
> > that
> > > > > you're
> > > > > >> > using either version 5.1 or 5.2 of MET.  The latest
available
> > > > version
> > > > > on
> > > > > >> > theia is 7.0.
> > > > > >> >
> > > > > >> > I'd like to replicate the error message you're getting,
so I
> can
> > > see
> > > > > >> what
> > > > > >> > is needed to fix it.  Are you able to send me a single
call to
> > > > > >> Point-Stat
> > > > > >> > that replicates this behavior?  Or are you calling it
from a
> > long
> > > > > script
> > > > > >> > that's doing lots of other step?
> > > > > >> >
> > > > > >> > Here's a point-stat script I found in your area:
> > > > > >> >
/scratch3/BMC/fim/Keren.Rosado/MET/scripts/run_point_
> > stat.ksh
> > > > > >> >
> > > > > >> > Is that what you're running?
> > > > > >> >
> > > > > >> > Thanks,
> > > > > >> > John
> > > > > >> >
> > > > > >> > On Mon, Mar 26, 2018 at 3:01 PM, Keren Rosado - NOAA
Affiliate
> > via
> > > > RT
> > > > > <
> > > > > >> > met_help at ucar.edu> wrote:
> > > > > >> >
> > > > > >> > >
> > > > > >> > > <URL: https://rt.rap.ucar.edu/rt/
> Ticket/Display.html?id=84536
> > >
> > > > > >> > >
> > > > > >> > > Hi John,
> > > > > >> > >
> > > > > >> > > I am using PointStatConfig_ADPUPA_REGRID_G3 to run
point
> stat
> > > > > located
> > > > > >> at
> > > > > >> > > /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > > > >> > >
> > > > > >> > > I added  Matthew_Mask.nc in the mask section as you
> explained
> > > > above
> > > > > to
> > > > > >> > > the PointStatConfig_ADPUPA_REGRID_G3.
> > > > > >> > > Results from this gave me an error: ERROR  :
> > > > > parse_latlon_poly_file()
> > > > > >> ->
> > > > > >> > > The polyline file supplied
> > > > > >> > > (/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > > > >> > masks/Matthew_Mask.nc)
> > > > > >> > > must contain at least 3 pairs of points to define a
masking
> > > > region.
> > > > > >> > >
> > > > > >> > > Trying to fix the error, I added the original mask
files and
> > > added
> > > > > my
> > > > > >> new
> > > > > >> > > mask file (Matthew_Mask) and the error still the
same.
> > > > > >> > >
> > > > > >> > > // Verification masking regions
> > > > > >> > >
> > > > > >> > > //
> > > > > >> > >
> > > > > >> > > mask = {
> > > > > >> > >
> > > > > >> > >    grid = [ "FULL" ];
> > > > > >> > >
> > > > > >> > >    poly = [ "${MASKS}/Matthew_Mask.nc",
> > > > > >> > >
> > > > > >> > >             "${MASKS}/gfs_NH_G3.nc",
> > > > > >> > >
> > > > > >> > >             "${MASKS}/gfs_SH_G3.nc",
> > > > > >> > >
> > > > > >> > >             "${MASKS}/gfs_TROP_G3.nc" ];
> > > > > >> > >
> > > > > >> > >    sid  = [];
> > > > > >> > >
> > > > > >> > > };
> > > > > >> > >
> > > > > >> > >
> > > > > >> > >
> > > > > >> > > Thanks,
> > > > > >> > >
> > > > > >> > > Keren
> > > > > >> > >
> > > > > >> > >
> > > > > >> > > ----
> > > > > >> > > Keren Rosado, Ph.D.
> > > > > >> > > NCAS-M Postdoctoral Fellow
> > > > > >> > > NOAA ESRL
> > > > > >> > > Office: (303) 497-5907
> > > > > >> > >
> > > > > >> > > On Fri, Mar 23, 2018 at 3:14 PM, John Halley Gotway
via RT <
> > > > > >> > > met_help at ucar.edu> wrote:
> > > > > >> > >
> > > > > >> > > > Keren,
> > > > > >> > > >
> > > > > >> > > > You have a couple of options here.  Since you're
> comparing a
> > > > > gridded
> > > > > >> > > > forecast field to a gridded analysis, you'll be
running a
> > > > > >> grid-to-grid
> > > > > >> > > > tool, like Grid-Stat or MODE.
> > > > > >> > > >
> > > > > >> > > > (1) You could use the "regrid" option in the config
files
> to
> > > > > >> actually
> > > > > >> > > > regrid your data to a smaller domain.  If you're
input is
> a
> > > > > lat/lon
> > > > > >> > grid
> > > > > >> > > > and your output is really just a subset of that
lat/lon
> > grid,
> > > > then
> > > > > >> > you'd
> > > > > >> > > > define the "to_grid" so that the output grid points
> coincide
> > > > with
> > > > > >> the
> > > > > >> > > input
> > > > > >> > > > ones.
> > > > > >> > > >
> > > > > >> > > > (2) A second (more common) option would be to just
define
> > one
> > > > (or
> > > > > >> more)
> > > > > >> > > > subregions over which to compute stats.  And yes,
you can
> > > > > definitely
> > > > > >> > use
> > > > > >> > > > gen_vx_mask to define that masking region.  Since
you
> want a
> > > > range
> > > > > >> of
> > > > > >> > > > lat/lon values, I'd recommend using the "-type lat"
and
> > "-type
> > > > > lon"
> > > > > >> > > masking
> > > > > >> > > > types.
> > > > > >> > > >
> > > > > >> > > > Here's an example... looks to me like your mask is
> > > approximately
> > > > > the
> > > > > >> > Gulf
> > > > > >> > > > of Mexico.  So I named it "GOM_Mask":
> > > > > >> > > >
> > > > > >> > > > (1) Grab a GFS file for the example:
> > > > > >> > > >  > wget
> > > > > >> > > >
http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.
> > > > > >> > > > 2018032312/gfs.t12z.pgrb2.0p25.f012
> > > > > >> > > >
> > > > > >> > > > (2) Run gen_vx_mask to define latitude band:
> > > > > >> > > >  > met-6.1/bin/gen_vx_mask gfs.t12z.pgrb2.0p25.f012
> > > > > >> > > > gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type lat
-thresh
> > > > > 'ge5&&le30'
> > > > > >> > > >
> > > > > >> > > > (3) Run gen_vx_mask to intersect the longitude band
> > > > > >> > > >  > met-6.1/bin/gen_vx_mask lat_band.nc lat_band.nc
> > > GOM_Mask.nc
> > > > > >> -type
> > > > > >> > lon
> > > > > >> > > > -thresh 'ge-85&&le-55' -intersection -name GOM_Mask
> > > > > >> > > >
> > > > > >> > > > (4) Plot the result using plot_data_plane
> > > > > >> > > >  > met-6.1/bin/plot_data_plane GOM_Mask.nc
GOM_Mask.ps
> > > > > >> > 'name="GOM_Mask";
> > > > > >> > > > level="(*,*)";'
> > > > > >> > > >
> > > > > >> > > > And I've attached a PNG version of that image.
> > > > > >> > > >
> > > > > >> > > > Then you'd list this mask file in your Grid-Stat
config
> > file:
> > > > > >> > > >
> > > > > >> > > > mask = {
> > > > > >> > > >    grid = [ "FULL" ];
> > > > > >> > > >    poly = [ "path/to/GOM_Mask.nc" ];
> > > > > >> > > > }
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > > Hope that helps get you going.
> > > > > >> > > >
> > > > > >> > > > Thanks,
> > > > > >> > > > John
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > > On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado -
NOAA
> > Affiliate
> > > > via
> > > > > >> RT <
> > > > > >> > > > met_help at ucar.edu> wrote:
> > > > > >> > > >
> > > > > >> > > > >
> > > > > >> > > > > Fri Mar 23 14:57:16 2018: Request 84536 was acted
upon.
> > > > > >> > > > > Transaction: Ticket created by
keren.rosado at noaa.gov
> > > > > >> > > > >        Queue: met_help
> > > > > >> > > > >      Subject: MET for smaller domain from global
output
> > > > > >> > > > >        Owner: Nobody
> > > > > >> > > > >   Requestors: keren.rosado at noaa.gov
> > > > > >> > > > >       Status: new
> > > > > >> > > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> > > > > >> > Ticket/Display.html?id=84536
> > > > > >> > > >
> > > > > >> > > > >
> > > > > >> > > > >
> > > > > >> > > > > Hello!
> > > > > >> > > > >
> > > > > >> > > > > I have global FV3GFS forecast output  and global
> > > observations
> > > > > from
> > > > > >> > > CMORPH
> > > > > >> > > > > on Theia. From the global output, I will like to
> analyze a
> > > > > smaller
> > > > > >> > > domain
> > > > > >> > > > > e.g. 5N-30N 55W-85W. Is there a configure file
where I
> can
> > > set
> > > > > up
> > > > > >> Lat
> > > > > >> > > and
> > > > > >> > > > > Lon different than the input file?
> > > > > >> > > > >
> > > > > >> > > > > I saw the gen-vx-mask option in the tutorial but
for
> what
> > I
> > > > > >> > understood
> > > > > >> > > > does
> > > > > >> > > > > files are pre made.
> > > > > >> > > > >
> > > > > >> > > > > Thanks,
> > > > > >> > > > >
> > > > > >> > > > > Keren
> > > > > >> > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> > >
> > > > > >> >
> > > > > >> >
> > > > > >>
> > > > > >>
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

------------------------------------------------
Subject: MET for smaller domain from global output
From: John Halley Gotway
Time: Thu May 17 13:09:46 2018

Keren,

Is see you're having trouble from Point-Stat getting your verification
grid
to match the masking grid.

The intention here is that you should use gen_vx_mask to define a
masking
region for the domain on which you're performing the verification.

If you're verification domain is 360x181 (i.e. 1 degree GFS), then you
should define a mask for that grid... not the 1/4 degree GFS grid.
All you
need to do is modify your call the gen_vx_mask by passing it a 1-
degree
input file instead of a 1/4-degree input file.

We did add a feature in MET version 6.1 (
https://dtcenter.org/met/users/support/release_notes/METv6.1_release_notes.php)
to automatically regrid masking regions to the verification domain
using
nearest neighbor interpolation.  And that logic would apply in this
case.
However, since you're using met-5.2, that feature isn't available.

Thanks,
John

On Thu, May 17, 2018 at 11:20 AM, Keren Rosado - NOAA Affiliate via RT
<
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
>
> John,
>
> I am getting exactly the same error as before.
>
> Here is what I did using MET 5.2 and .25 grib2 files:
>
> Created the box_center.poly
>
> Center of the box (5-30N 55-85W)
>
>
> box_mask
>
> 17.5 -70
>
>
> then type mask gen_vx_maskgrb.file box_center.poly gfs_box_mask.nc
-type
> box -height 101 -width 101 -v 3
>
>
>
>
>
> DEBUG 1: Input File:     pgrbq000.gfs.2016092900.grib2
>
> DEBUG 1: Mask File:   box_center.poly
>
> DEBUG 3: Switching the GRIB2 radius of the earth value of 6371.23 km
to
> 6371.2 km for internal consistency.
>
> DEBUG 2: Parsed Data Grid:LatLon (1440 x 721)
>
> DEBUG 2: Parsed Lat/Lon Mask File:box_mask    containing 1 points
>
> DEBUG 3: Box Masking (90 x 101):9090 of 1038240 points inside
>
> DEBUG 1: Output File:    gfs_box_mask.nc
>
>
>
> Ncview gfs_box_mask.nc to make sure mask is where I want (attached
> figure).
>
>
> Then I changed the config file with the new ".nc" file for the
masking
> /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> PointStatConfig_ADPUPA_REGRID_G3
>
>  mask = {
>
>    grid = [ "FULL" ];
>
>    poly = [ "${MASKS}/gfs_box_mask.nc" ];
>
>    sid  = [];
>
>
> and run /scratch3/BMC/fim/Keren.Rosado/MET/xml/runrocotoGFK.ksh
>
>
> The log file
> error
/scratch3/BMC/fim/Keren.Rosado/MET/log/gf_Matthew_jan/2016092900/met
> met_point_ua_gf_Matthew_jan_2016092900_000.log
>
>
> ERROR  : parse_poly_mask() -> The masking and verification grids do
not
> match:
>
> ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000
lon_ll:
> -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
>
> ERROR  : Projection: Lat/Lon Nx: 360 Ny: 181 lat_ll: -90.000 lon_ll:
-0.000
> delta_lat: 1.000 delta_lon: 1.000
>
> ERROR  :
>
>
> Thanks,
>
>
> Keren
>
>
> ----
> Keren Rosado, Ph.D.
> NCAS-M Postdoctoral Fellow
> NOAA ESRL
> Office: (303) 497-5907
>
> On Wed, May 16, 2018 at 5:02 PM, John Halley Gotway via RT <
> met_help at ucar.edu> wrote:
>
> > Keren,
> >
> > The "type" of masking that you want to apply is latitude masking.
So
> you'd
> > use "-type lat" instead of "-type poly".  However, "-type lat"
isn't
> > supported in met-5.2.  It was added in met-6.1.
> >
> > If you can switch to using met-6.1 or met-7.0, I'd suggest doing
so.
> > Judging by the fact that the dimensions are 1440x721, I'll assume
that
> this
> > is 0.25 degree global data.  To demonstrate, I created a test file
named
> > "gfs_grid_193.grib".  Here's the met-7.0 command you could run:
> >
> >    met-7.0/bin/gen_vx_mask \
> >       gfs_grid_193.grib \
> >       gfs_grid_193.grib  \
> >       gfs_lat_mask.nc \
> >       -type lat -thresh 'ge5&&le30' -v 3
> >
> > Running at verbosity level 3 tells you how many grid points were
included
> > in the mask:
> >    DEBUG 3: Latitude Masking:              145440 of 1038240
points
> inside
> >
> > Otherwise, if you're stuck using met-5.2, since you're operating
on a
> > lat/lon grid, you could get the same result using the "box"
masking type.
> > It's just much less straight-forward.  We pick a lat/lon point
that we'd
> > want in the center of the box... and then specify the length and
width of
> > the box in grid units.
> >
> > I'll pick my center point as lat = 17.5 and lon = -180 and write
that to
> an
> > ascii file:
> >
> > box_center.poly
> > +++++++++
> >    box_mask
> >    17.5 -180
> > +++++++++
> >
> > And then run this met-5.2 command:
> >
> >    met-5.2/bin/gen_vx_mask \
> >       gfs_grid_193.grib \
> >       box_center.poly \
> >       gfs_box_mask.nc -type box -height 101 -width 1440 -v 3
> >
> > At verbosity level 3, here's the number of point in this mask:
> >    DEBUG 3: Box Masking (101 x 1441):      145440 of 1038240
points
> inside
> >
> > And that matches what we got from met-7.0
> >
> > Hope this helps.
> >
> > Thanks,
> > John
> >
> >
> > On Wed, May 16, 2018 at 3:54 PM, Keren Rosado - NOAA Affiliate via
RT <
> > met_help at ucar.edu> wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> > >
> > > John,
> > >
> > > I am trying to run the gen_vx_mask with MET version 5.2 and I
get an
> > error.
> > >
> > > This is the command I am doing following what you explained in
your
> > > previous email and MET user guide 5.2.
> > >
> > > gen_vx_mask pgrbq000.gfs.2016092900.grib2
pgrbq000.gfs.2016092900.grib2
> > > lat_band.nc -type poly -thresh 'ge5&&le30'
> > >
> > >
> > > DEBUG 1: Input File: pgrbq000.gfs.2016092900.grib2
> > >
> > > DEBUG 1: Mask File: pgrbq000.gfs.2016092900.grib2
> > >
> > > DEBUG 2: Parsed Data Grid: LatLon (1440 x 721)
> > >
> > > DEBUG 2: Parsed Lat/Lon Mask File: (nul) containing 0 points
> > >
> > > ERROR  :
> > >
> > > ERROR  : NumArray::operator[](int) const -> range check error
> > >
> > > ERROR  :
> > >
> > > P.S. In the example above that you send me for version 6.1 the
-type
> > 'lat'
> > > is used and that is not supported by version 5.2. That is why
now I
> have
> > > -type 'poly'.
> > >
> > >
> > > Thanks,
> > >
> > > Keren
> > >
> > > ----
> > > Keren Rosado, Ph.D.
> > > NCAS-M Postdoctoral Fellow
> > > NOAA ESRL
> > > Office: (303) 497-5907
> > >
> > > On Mon, Apr 2, 2018 at 9:21 AM, John Halley Gotway via RT <
> > > met_help at ucar.edu
> > > > wrote:
> > >
> > > > Keren,
> > > >
> > > > OK, this should be pretty straight-forward to fix.  Since
you're
> using
> > > > met-5.2, just run the the gen_vx_mask tool from version 5.2 to
> generate
> > > the
> > > > mask fields.
> > > >
> > > > When you run gen_vx_mask, the first argument is a gridded data
file
> > which
> > > > specifies the grid you're using.  So just pass in that FV3
GRIB2 file
> > as
> > > > the first argument.
> > > >
> > > > So please try rerunning gen_vx_mask to define a mask for the
FV3
> domain
> > > > you're evaluating and let me know if you have any issues.
> > > >
> > > > Thanks,
> > > > John
> > > >
> > > > On Thu, Mar 29, 2018 at 10:24 AM, Keren Rosado - NOAA
Affiliate via
> RT
> > <
> > > > met_help at ucar.edu> wrote:
> > > >
> > > > >
> > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> > > > >
> > > > > Hi John,
> > > > >
> > > > > Thanks  for figuring out the error.
> > > > >
> > > > > Now, I am having the same error you got about the mask
projection.
> > > > >
> > > > > The first mask I created was Matthew_Mask_NetCDF3.nc and I
used
> > > > > pgrbq000.gfs.2016092900.grib2
> > > > > to create the mask following your instructions above.
> > > > >
> > > > > Today, I created a second mask called
Matthew_Mask_0329_NetCDF3.nc.
> > > This
> > > > > mask was created using gfs.t00z.pgrb2.0p25.f000
> > > > >
> > > > > In both cases I get the same error: (
> > > > > /scratch3/BMC/fim/Keren.Rosado/MET/log/gf_Matthew_jan/
> > 2016092900/met/
> > > > > met_point_ua_gf_Matthew_jan_2016092900_096.log)
> > > > >
> > > > > ERROR  : parse_poly_mask() -> The masking and verification
grids do
> > not
> > > > > match:
> > > > >
> > > > > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll:
-90.000
> lon_ll:
> > > > > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> > > > >
> > > > > ERROR  : Projection: Lat/Lon Nx: 360 Ny: 181 lat_ll: -90.000
> lon_ll:
> > > > -0.000
> > > > > delta_lat: 1.000 delta_lon: 1.000
> > > > >
> > > > >
> > > > > P.S. These forecast output files are from FV3 I don't think
that
> > should
> > > > > matter since they are grib2 format.
> > > > >
> > > > >
> > > > >
> > > > > Thanks,
> > > > >
> > > > >
> > > > > Keren
> > > > >
> > > > >
> > > > >
> > > > > ----
> > > > > Keren Rosado, Ph.D.
> > > > > NCAS-M Postdoctoral Fellow
> > > > > NOAA ESRL
> > > > > Office: (303) 497-5907
> > > > >
> > > > > On Wed, Mar 28, 2018 at 10:42 PM, John Halley Gotway via RT
<
> > > > > met_help at ucar.edu> wrote:
> > > > >
> > > > > > Keren,
> > > > > >
> > > > > > It just occurred to me that you probably won’t get that
error
> > > message I
> > > > > got
> > > > > > in my last call to point-stat.  I was using a different
set of
> data
> > > for
> > > > > > testing... on a different domain. Presumably, you did
define the
> > > masks
> > > > > > correctly for your domain... and I only got that error
because I
> > > > switched
> > > > > > input data.
> > > > > >
> > > > > > Please let me know if that doesn’t fix the issue.
> > > > > >
> > > > > > Thanks,
> > > > > > John
> > > > > >
> > > > > > On Wed, Mar 28, 2018 at 10:00 PM John Halley Gotway <
> > johnhg at ucar.edu
> > > >
> > > > > > wrote:
> > > > > >
> > > > > > > Keren,
> > > > > > >
> > > > > > > OK, I understand what's going on here.  This one was
tricky!
> > First
> > > > > time
> > > > > > > I've seen this.
> > > > > > >
> > > > > > > The problem is caused by you mixing tools from MET
versions 5.2
> > and
> > > > > 6.1.
> > > > > > > And more specifically, it's the version of NetCDF that's
> causing
> > > the
> > > > > > > problem.  Prior to version 6.0, MET used NetCDF3 to
read/write
> > > NetCDF
> > > > > > > files.  Versions 6.0 and later use NetCDF4.
> > > > > > >
> > > > > > > Here's what's happening...
> > > > > > > - Running "ncdump -h" on your mask data files reveals
that they
> > > were
> > > > > > > created with MET version 6.1... meaning NetCDF4.
> > > > > > >    ncdump -h  /scratch3/BMC/fim/Keren.
> > Rosado/MET/parm/met_config/
> > > > > > > masks/Matthew_Mask.nc
> > > > > > >
> > > > > > >  :MET_version = "V6.1" ;
> > > > > > >
> > > > > > >
> > > > > > > - But in the workflow, you're running MET version 5.2...
which
> > > > expects
> > > > > > > NetCDF3 files.
> > > > > > >
> > > > > > >
> > > > > > > - In "mask.poly" you can pass in either a gridded data
file or
> an
> > > > ascii
> > > > > > > polyline file.  Point-Stat tries to process the input
file
> first
> > > as a
> > > > > > > gridded data file.  If that doesn't work, it assumes the
input
> > file
> > > > is
> > > > > > > ascii instead.
> > > > > > >
> > > > > > >
> > > > > > > - So it tries opening "Matthew_Mask.nc" as a gridded
data file.
> > > That
> > > > > > > fails because the NetCDF3 library doesn't know anything
about
> > > NetCDF4
> > > > > > > files.  So it tries to process it as ascii... which
fails with
> > the
> > > > > error
> > > > > > > message you saw.
> > > > > > >
> > > > > > >
> > > > > > > Next, I ran the following commands to convert your mask
file
> from
> > > > > NetCDF4
> > > > > > > to 3:
> > > > > > >
> > > > > > >
> > > > > > >    module load nco
> > > > > > >
> > > > > > >    nccopy -k 1 masks/Matthew_Mask.nc
> > masks/Matthew_Mask_NetCDF3.nc
> > > > > > >
> > > > > > > And then I updated the Point-Stat config file to point
to
> > > > > > > "Matthew_Mask_NetCDF3.nc".
> > > > > > >
> > > > > > >
> > > > > > > When I run Point-Stat, it still fails, but with a much
more
> > useful
> > > > > error
> > > > > > > message.  Looks like you didn't generate the mask file
for the
> > > right
> > > > > > domain:
> > > > > > >
> > > > > > >
> > > > > > > ERROR  : parse_poly_mask() -> The masking and
verification
> grids
> > do
> > > > not
> > > > > > > match:
> > > > > > >
> > > > > > > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll:
-90.000
> > > lon_ll:
> > > > > > > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> > > > > > >
> > > > > > > ERROR  : Projection: Lambert Conformal Nx: 614 Ny: 428
Lat_LL:
> > > 12.190
> > > > > > > Lon_LL: 133.459 Lon_orient: 95.000 Alpha: 1356.011 Cone:
0.423
> > Bx:
> > > > > > 346.6564
> > > > > > > By: 1189.0556
> > > > > > >
> > > > > > > In general, I'd recommend sticking with a single version
of
> MET.
> > > If
> > > > > your
> > > > > > > scripts/config files are set up to use met-5.2, use that
> version
> > of
> > > > > > > gen_vx_mask to define the input masks.
> > > > > > >
> > > > > > >
> > > > > > > Hope that helps clarify.
> > > > > > >
> > > > > > >
> > > > > > > Thanks,
> > > > > > > John
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Mon, Mar 26, 2018 at 7:29 PM, Keren Rosado - NOAA
Affiliate
> > via
> > > > RT <
> > > > > > > met_help at ucar.edu> wrote:
> > > > > > >
> > > > > > >>
> > > > > > >> <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536
> >
> > > > > > >>
> > > > > > >> Hi John,
> > > > > > >>
> > > > > > >> I am using a GMTB package that runs MET using rocoto. I
copied
> > the
> > > > > > entire
> > > > > > >> MET directory for the package to work.
> > > > > > >>
> > > > > > >> The xml file is
> > > > > > >> located /scratch3/BMC/fim/Keren.
> Rosado/MET/xml/gf_matthew_jan.
> > xml
> > > > to
> > > > > > run
> > > > > > >> this xml I use runrocotoGFK.ksh
> > > > > > >> I found point stat script different that the one you
metioned
> > > above
> > > > > > >> at:
/scratch3/BMC/fim/Keren.Rosado/MET/bin/met_point_verf_
> > sfc.ksh
> > > > and
> > > > > > >> met_point_verf_ua.ksh
> > > > > > >>
> > > > > > >> The model output grib files are located
> > > > > > >> at: /scratch3/BMC/fim/Keren.Rosado/MET/gf_Matthew_jan/
> > 2016092900
> > > > > > >>
> > > > > > >> Let me know if you need any other clarification.
> > > > > > >>
> > > > > > >> Thanks,
> > > > > > >>
> > > > > > >> Keren
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >> ----
> > > > > > >> Keren Rosado, Ph.D.
> > > > > > >> NCAS-M Postdoctoral Fellow
> > > > > > >> NOAA ESRL
> > > > > > >> Office: (303) 497-5907
> > > > > > >>
> > > > > > >> On Mon, Mar 26, 2018 at 4:48 PM, John Halley Gotway via
RT <
> > > > > > >> met_help at ucar.edu> wrote:
> > > > > > >>
> > > > > > >> > Keren,
> > > > > > >> >
> > > > > > >> > I went hunting around on theia, looking at your data.
I see
> > > that
> > > > > > you're
> > > > > > >> > using either version 5.1 or 5.2 of MET.  The latest
> available
> > > > > version
> > > > > > on
> > > > > > >> > theia is 7.0.
> > > > > > >> >
> > > > > > >> > I'd like to replicate the error message you're
getting, so I
> > can
> > > > see
> > > > > > >> what
> > > > > > >> > is needed to fix it.  Are you able to send me a
single call
> to
> > > > > > >> Point-Stat
> > > > > > >> > that replicates this behavior?  Or are you calling it
from a
> > > long
> > > > > > script
> > > > > > >> > that's doing lots of other step?
> > > > > > >> >
> > > > > > >> > Here's a point-stat script I found in your area:
> > > > > > >> >
/scratch3/BMC/fim/Keren.Rosado/MET/scripts/run_point_
> > > stat.ksh
> > > > > > >> >
> > > > > > >> > Is that what you're running?
> > > > > > >> >
> > > > > > >> > Thanks,
> > > > > > >> > John
> > > > > > >> >
> > > > > > >> > On Mon, Mar 26, 2018 at 3:01 PM, Keren Rosado - NOAA
> Affiliate
> > > via
> > > > > RT
> > > > > > <
> > > > > > >> > met_help at ucar.edu> wrote:
> > > > > > >> >
> > > > > > >> > >
> > > > > > >> > > <URL: https://rt.rap.ucar.edu/rt/
> > Ticket/Display.html?id=84536
> > > >
> > > > > > >> > >
> > > > > > >> > > Hi John,
> > > > > > >> > >
> > > > > > >> > > I am using PointStatConfig_ADPUPA_REGRID_G3 to run
point
> > stat
> > > > > > located
> > > > > > >> at
> > > > > > >> > > /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > > > > >> > >
> > > > > > >> > > I added  Matthew_Mask.nc in the mask section as you
> > explained
> > > > > above
> > > > > > to
> > > > > > >> > > the PointStatConfig_ADPUPA_REGRID_G3.
> > > > > > >> > > Results from this gave me an error: ERROR  :
> > > > > > parse_latlon_poly_file()
> > > > > > >> ->
> > > > > > >> > > The polyline file supplied
> > > > > > >> > >
(/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > > > > >> > masks/Matthew_Mask.nc)
> > > > > > >> > > must contain at least 3 pairs of points to define a
> masking
> > > > > region.
> > > > > > >> > >
> > > > > > >> > > Trying to fix the error, I added the original mask
files
> and
> > > > added
> > > > > > my
> > > > > > >> new
> > > > > > >> > > mask file (Matthew_Mask) and the error still the
same.
> > > > > > >> > >
> > > > > > >> > > // Verification masking regions
> > > > > > >> > >
> > > > > > >> > > //
> > > > > > >> > >
> > > > > > >> > > mask = {
> > > > > > >> > >
> > > > > > >> > >    grid = [ "FULL" ];
> > > > > > >> > >
> > > > > > >> > >    poly = [ "${MASKS}/Matthew_Mask.nc",
> > > > > > >> > >
> > > > > > >> > >             "${MASKS}/gfs_NH_G3.nc",
> > > > > > >> > >
> > > > > > >> > >             "${MASKS}/gfs_SH_G3.nc",
> > > > > > >> > >
> > > > > > >> > >             "${MASKS}/gfs_TROP_G3.nc" ];
> > > > > > >> > >
> > > > > > >> > >    sid  = [];
> > > > > > >> > >
> > > > > > >> > > };
> > > > > > >> > >
> > > > > > >> > >
> > > > > > >> > >
> > > > > > >> > > Thanks,
> > > > > > >> > >
> > > > > > >> > > Keren
> > > > > > >> > >
> > > > > > >> > >
> > > > > > >> > > ----
> > > > > > >> > > Keren Rosado, Ph.D.
> > > > > > >> > > NCAS-M Postdoctoral Fellow
> > > > > > >> > > NOAA ESRL
> > > > > > >> > > Office: (303) 497-5907
> > > > > > >> > >
> > > > > > >> > > On Fri, Mar 23, 2018 at 3:14 PM, John Halley Gotway
via
> RT <
> > > > > > >> > > met_help at ucar.edu> wrote:
> > > > > > >> > >
> > > > > > >> > > > Keren,
> > > > > > >> > > >
> > > > > > >> > > > You have a couple of options here.  Since you're
> > comparing a
> > > > > > gridded
> > > > > > >> > > > forecast field to a gridded analysis, you'll be
running
> a
> > > > > > >> grid-to-grid
> > > > > > >> > > > tool, like Grid-Stat or MODE.
> > > > > > >> > > >
> > > > > > >> > > > (1) You could use the "regrid" option in the
config
> files
> > to
> > > > > > >> actually
> > > > > > >> > > > regrid your data to a smaller domain.  If you're
input
> is
> > a
> > > > > > lat/lon
> > > > > > >> > grid
> > > > > > >> > > > and your output is really just a subset of that
lat/lon
> > > grid,
> > > > > then
> > > > > > >> > you'd
> > > > > > >> > > > define the "to_grid" so that the output grid
points
> > coincide
> > > > > with
> > > > > > >> the
> > > > > > >> > > input
> > > > > > >> > > > ones.
> > > > > > >> > > >
> > > > > > >> > > > (2) A second (more common) option would be to
just
> define
> > > one
> > > > > (or
> > > > > > >> more)
> > > > > > >> > > > subregions over which to compute stats.  And yes,
you
> can
> > > > > > definitely
> > > > > > >> > use
> > > > > > >> > > > gen_vx_mask to define that masking region.  Since
you
> > want a
> > > > > range
> > > > > > >> of
> > > > > > >> > > > lat/lon values, I'd recommend using the "-type
lat" and
> > > "-type
> > > > > > lon"
> > > > > > >> > > masking
> > > > > > >> > > > types.
> > > > > > >> > > >
> > > > > > >> > > > Here's an example... looks to me like your mask
is
> > > > approximately
> > > > > > the
> > > > > > >> > Gulf
> > > > > > >> > > > of Mexico.  So I named it "GOM_Mask":
> > > > > > >> > > >
> > > > > > >> > > > (1) Grab a GFS file for the example:
> > > > > > >> > > >  > wget
> > > > > > >> > > >
http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs
> .
> > > > > > >> > > > 2018032312/gfs.t12z.pgrb2.0p25.f012
> > > > > > >> > > >
> > > > > > >> > > > (2) Run gen_vx_mask to define latitude band:
> > > > > > >> > > >  > met-6.1/bin/gen_vx_mask
gfs.t12z.pgrb2.0p25.f012
> > > > > > >> > > > gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type lat
-thresh
> > > > > > 'ge5&&le30'
> > > > > > >> > > >
> > > > > > >> > > > (3) Run gen_vx_mask to intersect the longitude
band
> > > > > > >> > > >  > met-6.1/bin/gen_vx_mask lat_band.nc
lat_band.nc
> > > > GOM_Mask.nc
> > > > > > >> -type
> > > > > > >> > lon
> > > > > > >> > > > -thresh 'ge-85&&le-55' -intersection -name
GOM_Mask
> > > > > > >> > > >
> > > > > > >> > > > (4) Plot the result using plot_data_plane
> > > > > > >> > > >  > met-6.1/bin/plot_data_plane GOM_Mask.nc
GOM_Mask.ps
> > > > > > >> > 'name="GOM_Mask";
> > > > > > >> > > > level="(*,*)";'
> > > > > > >> > > >
> > > > > > >> > > > And I've attached a PNG version of that image.
> > > > > > >> > > >
> > > > > > >> > > > Then you'd list this mask file in your Grid-Stat
config
> > > file:
> > > > > > >> > > >
> > > > > > >> > > > mask = {
> > > > > > >> > > >    grid = [ "FULL" ];
> > > > > > >> > > >    poly = [ "path/to/GOM_Mask.nc" ];
> > > > > > >> > > > }
> > > > > > >> > > >
> > > > > > >> > > >
> > > > > > >> > > > Hope that helps get you going.
> > > > > > >> > > >
> > > > > > >> > > > Thanks,
> > > > > > >> > > > John
> > > > > > >> > > >
> > > > > > >> > > >
> > > > > > >> > > > On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado -
NOAA
> > > Affiliate
> > > > > via
> > > > > > >> RT <
> > > > > > >> > > > met_help at ucar.edu> wrote:
> > > > > > >> > > >
> > > > > > >> > > > >
> > > > > > >> > > > > Fri Mar 23 14:57:16 2018: Request 84536 was
acted
> upon.
> > > > > > >> > > > > Transaction: Ticket created by
keren.rosado at noaa.gov
> > > > > > >> > > > >        Queue: met_help
> > > > > > >> > > > >      Subject: MET for smaller domain from
global
> output
> > > > > > >> > > > >        Owner: Nobody
> > > > > > >> > > > >   Requestors: keren.rosado at noaa.gov
> > > > > > >> > > > >       Status: new
> > > > > > >> > > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> > > > > > >> > Ticket/Display.html?id=84536
> > > > > > >> > > >
> > > > > > >> > > > >
> > > > > > >> > > > >
> > > > > > >> > > > > Hello!
> > > > > > >> > > > >
> > > > > > >> > > > > I have global FV3GFS forecast output  and
global
> > > > observations
> > > > > > from
> > > > > > >> > > CMORPH
> > > > > > >> > > > > on Theia. From the global output, I will like
to
> > analyze a
> > > > > > smaller
> > > > > > >> > > domain
> > > > > > >> > > > > e.g. 5N-30N 55W-85W. Is there a configure file
where I
> > can
> > > > set
> > > > > > up
> > > > > > >> Lat
> > > > > > >> > > and
> > > > > > >> > > > > Lon different than the input file?
> > > > > > >> > > > >
> > > > > > >> > > > > I saw the gen-vx-mask option in the tutorial
but for
> > what
> > > I
> > > > > > >> > understood
> > > > > > >> > > > does
> > > > > > >> > > > > files are pre made.
> > > > > > >> > > > >
> > > > > > >> > > > > Thanks,
> > > > > > >> > > > >
> > > > > > >> > > > > Keren
> > > > > > >> > > > >
> > > > > > >> > > > >
> > > > > > >> > > >
> > > > > > >> > > >
> > > > > > >> > >
> > > > > > >> > >
> > > > > > >> >
> > > > > > >> >
> > > > > > >>
> > > > > > >>
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

------------------------------------------------
Subject: MET for smaller domain from global output
From: Keren Rosado - NOAA Affiliate
Time: Thu Jun 21 15:41:42 2018

Hi John,

I think MET is now working with the mask area that I want e.g. I don't
see
any error on the log files.

Is there a way that I can double check that what is written in
grid_stat_gf_Matthew_jan_0p25_G3_F000_500hPa_000000L_20160929_000000V.stat
was calculated for the masked area?


Thanks,

Keren

----
Keren Rosado, Ph.D.
NCAS-M Postdoctoral Fellow
NOAA ESRL
Office: (303) 497-5907

On Thu, May 17, 2018 at 1:09 PM, John Halley Gotway via RT <
met_help at ucar.edu> wrote:

> Keren,
>
> Is see you're having trouble from Point-Stat getting your
verification grid
> to match the masking grid.
>
> The intention here is that you should use gen_vx_mask to define a
masking
> region for the domain on which you're performing the verification.
>
> If you're verification domain is 360x181 (i.e. 1 degree GFS), then
you
> should define a mask for that grid... not the 1/4 degree GFS grid.
All you
> need to do is modify your call the gen_vx_mask by passing it a 1-
degree
> input file instead of a 1/4-degree input file.
>
> We did add a feature in MET version 6.1 (
> https://dtcenter.org/met/users/support/release_notes/
> METv6.1_release_notes.php)
> to automatically regrid masking regions to the verification domain
using
> nearest neighbor interpolation.  And that logic would apply in this
case.
> However, since you're using met-5.2, that feature isn't available.
>
> Thanks,
> John
>
> On Thu, May 17, 2018 at 11:20 AM, Keren Rosado - NOAA Affiliate via
RT <
> met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> >
> > John,
> >
> > I am getting exactly the same error as before.
> >
> > Here is what I did using MET 5.2 and .25 grib2 files:
> >
> > Created the box_center.poly
> >
> > Center of the box (5-30N 55-85W)
> >
> >
> > box_mask
> >
> > 17.5 -70
> >
> >
> > then type mask gen_vx_maskgrb.file box_center.poly gfs_box_mask.nc
-type
> > box -height 101 -width 101 -v 3
> >
> >
> >
> >
> >
> > DEBUG 1: Input File:     pgrbq000.gfs.2016092900.grib2
> >
> > DEBUG 1: Mask File:   box_center.poly
> >
> > DEBUG 3: Switching the GRIB2 radius of the earth value of 6371.23
km to
> > 6371.2 km for internal consistency.
> >
> > DEBUG 2: Parsed Data Grid:LatLon (1440 x 721)
> >
> > DEBUG 2: Parsed Lat/Lon Mask File:box_mask    containing 1 points
> >
> > DEBUG 3: Box Masking (90 x 101):9090 of 1038240 points inside
> >
> > DEBUG 1: Output File:    gfs_box_mask.nc
> >
> >
> >
> > Ncview gfs_box_mask.nc to make sure mask is where I want (attached
> > figure).
> >
> >
> > Then I changed the config file with the new ".nc" file for the
masking
> > /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > PointStatConfig_ADPUPA_REGRID_G3
> >
> >  mask = {
> >
> >    grid = [ "FULL" ];
> >
> >    poly = [ "${MASKS}/gfs_box_mask.nc" ];
> >
> >    sid  = [];
> >
> >
> > and run /scratch3/BMC/fim/Keren.Rosado/MET/xml/runrocotoGFK.ksh
> >
> >
> > The log file
> > error /scratch3/BMC/fim/Keren.Rosado/MET/log/gf_Matthew_jan/
> 2016092900/met
> > met_point_ua_gf_Matthew_jan_2016092900_000.log
> >
> >
> > ERROR  : parse_poly_mask() -> The masking and verification grids
do not
> > match:
> >
> > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000
lon_ll:
> > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> >
> > ERROR  : Projection: Lat/Lon Nx: 360 Ny: 181 lat_ll: -90.000
lon_ll:
> -0.000
> > delta_lat: 1.000 delta_lon: 1.000
> >
> > ERROR  :
> >
> >
> > Thanks,
> >
> >
> > Keren
> >
> >
> > ----
> > Keren Rosado, Ph.D.
> > NCAS-M Postdoctoral Fellow
> > NOAA ESRL
> > Office: (303) 497-5907
> >
> > On Wed, May 16, 2018 at 5:02 PM, John Halley Gotway via RT <
> > met_help at ucar.edu> wrote:
> >
> > > Keren,
> > >
> > > The "type" of masking that you want to apply is latitude
masking.  So
> > you'd
> > > use "-type lat" instead of "-type poly".  However, "-type lat"
isn't
> > > supported in met-5.2.  It was added in met-6.1.
> > >
> > > If you can switch to using met-6.1 or met-7.0, I'd suggest doing
so.
> > > Judging by the fact that the dimensions are 1440x721, I'll
assume that
> > this
> > > is 0.25 degree global data.  To demonstrate, I created a test
file
> named
> > > "gfs_grid_193.grib".  Here's the met-7.0 command you could run:
> > >
> > >    met-7.0/bin/gen_vx_mask \
> > >       gfs_grid_193.grib \
> > >       gfs_grid_193.grib  \
> > >       gfs_lat_mask.nc \
> > >       -type lat -thresh 'ge5&&le30' -v 3
> > >
> > > Running at verbosity level 3 tells you how many grid points were
> included
> > > in the mask:
> > >    DEBUG 3: Latitude Masking:              145440 of 1038240
points
> > inside
> > >
> > > Otherwise, if you're stuck using met-5.2, since you're operating
on a
> > > lat/lon grid, you could get the same result using the "box"
masking
> type.
> > > It's just much less straight-forward.  We pick a lat/lon point
that
> we'd
> > > want in the center of the box... and then specify the length and
width
> of
> > > the box in grid units.
> > >
> > > I'll pick my center point as lat = 17.5 and lon = -180 and write
that
> to
> > an
> > > ascii file:
> > >
> > > box_center.poly
> > > +++++++++
> > >    box_mask
> > >    17.5 -180
> > > +++++++++
> > >
> > > And then run this met-5.2 command:
> > >
> > >    met-5.2/bin/gen_vx_mask \
> > >       gfs_grid_193.grib \
> > >       box_center.poly \
> > >       gfs_box_mask.nc -type box -height 101 -width 1440 -v 3
> > >
> > > At verbosity level 3, here's the number of point in this mask:
> > >    DEBUG 3: Box Masking (101 x 1441):      145440 of 1038240
points
> > inside
> > >
> > > And that matches what we got from met-7.0
> > >
> > > Hope this helps.
> > >
> > > Thanks,
> > > John
> > >
> > >
> > > On Wed, May 16, 2018 at 3:54 PM, Keren Rosado - NOAA Affiliate
via RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > >
> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536
>
> > > >
> > > > John,
> > > >
> > > > I am trying to run the gen_vx_mask with MET version 5.2 and I
get an
> > > error.
> > > >
> > > > This is the command I am doing following what you explained in
your
> > > > previous email and MET user guide 5.2.
> > > >
> > > > gen_vx_mask pgrbq000.gfs.2016092900.grib2
> pgrbq000.gfs.2016092900.grib2
> > > > lat_band.nc -type poly -thresh 'ge5&&le30'
> > > >
> > > >
> > > > DEBUG 1: Input File: pgrbq000.gfs.2016092900.grib2
> > > >
> > > > DEBUG 1: Mask File: pgrbq000.gfs.2016092900.grib2
> > > >
> > > > DEBUG 2: Parsed Data Grid: LatLon (1440 x 721)
> > > >
> > > > DEBUG 2: Parsed Lat/Lon Mask File: (nul) containing 0 points
> > > >
> > > > ERROR  :
> > > >
> > > > ERROR  : NumArray::operator[](int) const -> range check error
> > > >
> > > > ERROR  :
> > > >
> > > > P.S. In the example above that you send me for version 6.1 the
-type
> > > 'lat'
> > > > is used and that is not supported by version 5.2. That is why
now I
> > have
> > > > -type 'poly'.
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > Keren
> > > >
> > > > ----
> > > > Keren Rosado, Ph.D.
> > > > NCAS-M Postdoctoral Fellow
> > > > NOAA ESRL
> > > > Office: (303) 497-5907
> > > >
> > > > On Mon, Apr 2, 2018 at 9:21 AM, John Halley Gotway via RT <
> > > > met_help at ucar.edu
> > > > > wrote:
> > > >
> > > > > Keren,
> > > > >
> > > > > OK, this should be pretty straight-forward to fix.  Since
you're
> > using
> > > > > met-5.2, just run the the gen_vx_mask tool from version 5.2
to
> > generate
> > > > the
> > > > > mask fields.
> > > > >
> > > > > When you run gen_vx_mask, the first argument is a gridded
data file
> > > which
> > > > > specifies the grid you're using.  So just pass in that FV3
GRIB2
> file
> > > as
> > > > > the first argument.
> > > > >
> > > > > So please try rerunning gen_vx_mask to define a mask for the
FV3
> > domain
> > > > > you're evaluating and let me know if you have any issues.
> > > > >
> > > > > Thanks,
> > > > > John
> > > > >
> > > > > On Thu, Mar 29, 2018 at 10:24 AM, Keren Rosado - NOAA
Affiliate via
> > RT
> > > <
> > > > > met_help at ucar.edu> wrote:
> > > > >
> > > > > >
> > > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> > > > > >
> > > > > > Hi John,
> > > > > >
> > > > > > Thanks  for figuring out the error.
> > > > > >
> > > > > > Now, I am having the same error you got about the mask
> projection.
> > > > > >
> > > > > > The first mask I created was Matthew_Mask_NetCDF3.nc and I
used
> > > > > > pgrbq000.gfs.2016092900.grib2
> > > > > > to create the mask following your instructions above.
> > > > > >
> > > > > > Today, I created a second mask called
> Matthew_Mask_0329_NetCDF3.nc.
> > > > This
> > > > > > mask was created using gfs.t00z.pgrb2.0p25.f000
> > > > > >
> > > > > > In both cases I get the same error: (
> > > > > > /scratch3/BMC/fim/Keren.Rosado/MET/log/gf_Matthew_jan/
> > > 2016092900/met/
> > > > > > met_point_ua_gf_Matthew_jan_2016092900_096.log)
> > > > > >
> > > > > > ERROR  : parse_poly_mask() -> The masking and verification
grids
> do
> > > not
> > > > > > match:
> > > > > >
> > > > > > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll:
-90.000
> > lon_ll:
> > > > > > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> > > > > >
> > > > > > ERROR  : Projection: Lat/Lon Nx: 360 Ny: 181 lat_ll:
-90.000
> > lon_ll:
> > > > > -0.000
> > > > > > delta_lat: 1.000 delta_lon: 1.000
> > > > > >
> > > > > >
> > > > > > P.S. These forecast output files are from FV3 I don't
think that
> > > should
> > > > > > matter since they are grib2 format.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > >
> > > > > > Keren
> > > > > >
> > > > > >
> > > > > >
> > > > > > ----
> > > > > > Keren Rosado, Ph.D.
> > > > > > NCAS-M Postdoctoral Fellow
> > > > > > NOAA ESRL
> > > > > > Office: (303) 497-5907
> > > > > >
> > > > > > On Wed, Mar 28, 2018 at 10:42 PM, John Halley Gotway via
RT <
> > > > > > met_help at ucar.edu> wrote:
> > > > > >
> > > > > > > Keren,
> > > > > > >
> > > > > > > It just occurred to me that you probably won’t get that
error
> > > > message I
> > > > > > got
> > > > > > > in my last call to point-stat.  I was using a different
set of
> > data
> > > > for
> > > > > > > testing... on a different domain. Presumably, you did
define
> the
> > > > masks
> > > > > > > correctly for your domain... and I only got that error
because
> I
> > > > > switched
> > > > > > > input data.
> > > > > > >
> > > > > > > Please let me know if that doesn’t fix the issue.
> > > > > > >
> > > > > > > Thanks,
> > > > > > > John
> > > > > > >
> > > > > > > On Wed, Mar 28, 2018 at 10:00 PM John Halley Gotway <
> > > johnhg at ucar.edu
> > > > >
> > > > > > > wrote:
> > > > > > >
> > > > > > > > Keren,
> > > > > > > >
> > > > > > > > OK, I understand what's going on here.  This one was
tricky!
> > > First
> > > > > > time
> > > > > > > > I've seen this.
> > > > > > > >
> > > > > > > > The problem is caused by you mixing tools from MET
versions
> 5.2
> > > and
> > > > > > 6.1.
> > > > > > > > And more specifically, it's the version of NetCDF
that's
> > causing
> > > > the
> > > > > > > > problem.  Prior to version 6.0, MET used NetCDF3 to
> read/write
> > > > NetCDF
> > > > > > > > files.  Versions 6.0 and later use NetCDF4.
> > > > > > > >
> > > > > > > > Here's what's happening...
> > > > > > > > - Running "ncdump -h" on your mask data files reveals
that
> they
> > > > were
> > > > > > > > created with MET version 6.1... meaning NetCDF4.
> > > > > > > >    ncdump -h  /scratch3/BMC/fim/Keren.
> > > Rosado/MET/parm/met_config/
> > > > > > > > masks/Matthew_Mask.nc
> > > > > > > >
> > > > > > > >  :MET_version = "V6.1" ;
> > > > > > > >
> > > > > > > >
> > > > > > > > - But in the workflow, you're running MET version
5.2...
> which
> > > > > expects
> > > > > > > > NetCDF3 files.
> > > > > > > >
> > > > > > > >
> > > > > > > > - In "mask.poly" you can pass in either a gridded data
file
> or
> > an
> > > > > ascii
> > > > > > > > polyline file.  Point-Stat tries to process the input
file
> > first
> > > > as a
> > > > > > > > gridded data file.  If that doesn't work, it assumes
the
> input
> > > file
> > > > > is
> > > > > > > > ascii instead.
> > > > > > > >
> > > > > > > >
> > > > > > > > - So it tries opening "Matthew_Mask.nc" as a gridded
data
> file.
> > > > That
> > > > > > > > fails because the NetCDF3 library doesn't know
anything about
> > > > NetCDF4
> > > > > > > > files.  So it tries to process it as ascii... which
fails
> with
> > > the
> > > > > > error
> > > > > > > > message you saw.
> > > > > > > >
> > > > > > > >
> > > > > > > > Next, I ran the following commands to convert your
mask file
> > from
> > > > > > NetCDF4
> > > > > > > > to 3:
> > > > > > > >
> > > > > > > >
> > > > > > > >    module load nco
> > > > > > > >
> > > > > > > >    nccopy -k 1 masks/Matthew_Mask.nc
> > > masks/Matthew_Mask_NetCDF3.nc
> > > > > > > >
> > > > > > > > And then I updated the Point-Stat config file to point
to
> > > > > > > > "Matthew_Mask_NetCDF3.nc".
> > > > > > > >
> > > > > > > >
> > > > > > > > When I run Point-Stat, it still fails, but with a much
more
> > > useful
> > > > > > error
> > > > > > > > message.  Looks like you didn't generate the mask file
for
> the
> > > > right
> > > > > > > domain:
> > > > > > > >
> > > > > > > >
> > > > > > > > ERROR  : parse_poly_mask() -> The masking and
verification
> > grids
> > > do
> > > > > not
> > > > > > > > match:
> > > > > > > >
> > > > > > > > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll:
-90.000
> > > > lon_ll:
> > > > > > > > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> > > > > > > >
> > > > > > > > ERROR  : Projection: Lambert Conformal Nx: 614 Ny: 428
> Lat_LL:
> > > > 12.190
> > > > > > > > Lon_LL: 133.459 Lon_orient: 95.000 Alpha: 1356.011
Cone:
> 0.423
> > > Bx:
> > > > > > > 346.6564
> > > > > > > > By: 1189.0556
> > > > > > > >
> > > > > > > > In general, I'd recommend sticking with a single
version of
> > MET.
> > > > If
> > > > > > your
> > > > > > > > scripts/config files are set up to use met-5.2, use
that
> > version
> > > of
> > > > > > > > gen_vx_mask to define the input masks.
> > > > > > > >
> > > > > > > >
> > > > > > > > Hope that helps clarify.
> > > > > > > >
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > John
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Mon, Mar 26, 2018 at 7:29 PM, Keren Rosado - NOAA
> Affiliate
> > > via
> > > > > RT <
> > > > > > > > met_help at ucar.edu> wrote:
> > > > > > > >
> > > > > > > >>
> > > > > > > >> <URL: https://rt.rap.ucar.edu/rt/
> Ticket/Display.html?id=84536
> > >
> > > > > > > >>
> > > > > > > >> Hi John,
> > > > > > > >>
> > > > > > > >> I am using a GMTB package that runs MET using rocoto.
I
> copied
> > > the
> > > > > > > entire
> > > > > > > >> MET directory for the package to work.
> > > > > > > >>
> > > > > > > >> The xml file is
> > > > > > > >> located /scratch3/BMC/fim/Keren.
> > Rosado/MET/xml/gf_matthew_jan.
> > > xml
> > > > > to
> > > > > > > run
> > > > > > > >> this xml I use runrocotoGFK.ksh
> > > > > > > >> I found point stat script different that the one you
> metioned
> > > > above
> > > > > > > >> at:
/scratch3/BMC/fim/Keren.Rosado/MET/bin/met_point_verf_
> > > sfc.ksh
> > > > > and
> > > > > > > >> met_point_verf_ua.ksh
> > > > > > > >>
> > > > > > > >> The model output grib files are located
> > > > > > > >> at:
/scratch3/BMC/fim/Keren.Rosado/MET/gf_Matthew_jan/
> > > 2016092900
> > > > > > > >>
> > > > > > > >> Let me know if you need any other clarification.
> > > > > > > >>
> > > > > > > >> Thanks,
> > > > > > > >>
> > > > > > > >> Keren
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> ----
> > > > > > > >> Keren Rosado, Ph.D.
> > > > > > > >> NCAS-M Postdoctoral Fellow
> > > > > > > >> NOAA ESRL
> > > > > > > >> Office: (303) 497-5907
> > > > > > > >>
> > > > > > > >> On Mon, Mar 26, 2018 at 4:48 PM, John Halley Gotway
via RT <
> > > > > > > >> met_help at ucar.edu> wrote:
> > > > > > > >>
> > > > > > > >> > Keren,
> > > > > > > >> >
> > > > > > > >> > I went hunting around on theia, looking at your
data.  I
> see
> > > > that
> > > > > > > you're
> > > > > > > >> > using either version 5.1 or 5.2 of MET.  The latest
> > available
> > > > > > version
> > > > > > > on
> > > > > > > >> > theia is 7.0.
> > > > > > > >> >
> > > > > > > >> > I'd like to replicate the error message you're
getting,
> so I
> > > can
> > > > > see
> > > > > > > >> what
> > > > > > > >> > is needed to fix it.  Are you able to send me a
single
> call
> > to
> > > > > > > >> Point-Stat
> > > > > > > >> > that replicates this behavior?  Or are you calling
it
> from a
> > > > long
> > > > > > > script
> > > > > > > >> > that's doing lots of other step?
> > > > > > > >> >
> > > > > > > >> > Here's a point-stat script I found in your area:
> > > > > > > >> >
/scratch3/BMC/fim/Keren.Rosado/MET/scripts/run_point_
> > > > stat.ksh
> > > > > > > >> >
> > > > > > > >> > Is that what you're running?
> > > > > > > >> >
> > > > > > > >> > Thanks,
> > > > > > > >> > John
> > > > > > > >> >
> > > > > > > >> > On Mon, Mar 26, 2018 at 3:01 PM, Keren Rosado -
NOAA
> > Affiliate
> > > > via
> > > > > > RT
> > > > > > > <
> > > > > > > >> > met_help at ucar.edu> wrote:
> > > > > > > >> >
> > > > > > > >> > >
> > > > > > > >> > > <URL: https://rt.rap.ucar.edu/rt/
> > > Ticket/Display.html?id=84536
> > > > >
> > > > > > > >> > >
> > > > > > > >> > > Hi John,
> > > > > > > >> > >
> > > > > > > >> > > I am using PointStatConfig_ADPUPA_REGRID_G3 to
run
> point
> > > stat
> > > > > > > located
> > > > > > > >> at
> > > > > > > >> > >
/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > > > > > >> > >
> > > > > > > >> > > I added  Matthew_Mask.nc in the mask section as
you
> > > explained
> > > > > > above
> > > > > > > to
> > > > > > > >> > > the PointStatConfig_ADPUPA_REGRID_G3.
> > > > > > > >> > > Results from this gave me an error: ERROR  :
> > > > > > > parse_latlon_poly_file()
> > > > > > > >> ->
> > > > > > > >> > > The polyline file supplied
> > > > > > > >> > >
(/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > > > > > >> > masks/Matthew_Mask.nc)
> > > > > > > >> > > must contain at least 3 pairs of points to define
a
> > masking
> > > > > > region.
> > > > > > > >> > >
> > > > > > > >> > > Trying to fix the error, I added the original
mask files
> > and
> > > > > added
> > > > > > > my
> > > > > > > >> new
> > > > > > > >> > > mask file (Matthew_Mask) and the error still the
same.
> > > > > > > >> > >
> > > > > > > >> > > // Verification masking regions
> > > > > > > >> > >
> > > > > > > >> > > //
> > > > > > > >> > >
> > > > > > > >> > > mask = {
> > > > > > > >> > >
> > > > > > > >> > >    grid = [ "FULL" ];
> > > > > > > >> > >
> > > > > > > >> > >    poly = [ "${MASKS}/Matthew_Mask.nc",
> > > > > > > >> > >
> > > > > > > >> > >             "${MASKS}/gfs_NH_G3.nc",
> > > > > > > >> > >
> > > > > > > >> > >             "${MASKS}/gfs_SH_G3.nc",
> > > > > > > >> > >
> > > > > > > >> > >             "${MASKS}/gfs_TROP_G3.nc" ];
> > > > > > > >> > >
> > > > > > > >> > >    sid  = [];
> > > > > > > >> > >
> > > > > > > >> > > };
> > > > > > > >> > >
> > > > > > > >> > >
> > > > > > > >> > >
> > > > > > > >> > > Thanks,
> > > > > > > >> > >
> > > > > > > >> > > Keren
> > > > > > > >> > >
> > > > > > > >> > >
> > > > > > > >> > > ----
> > > > > > > >> > > Keren Rosado, Ph.D.
> > > > > > > >> > > NCAS-M Postdoctoral Fellow
> > > > > > > >> > > NOAA ESRL
> > > > > > > >> > > Office: (303) 497-5907
> > > > > > > >> > >
> > > > > > > >> > > On Fri, Mar 23, 2018 at 3:14 PM, John Halley
Gotway via
> > RT <
> > > > > > > >> > > met_help at ucar.edu> wrote:
> > > > > > > >> > >
> > > > > > > >> > > > Keren,
> > > > > > > >> > > >
> > > > > > > >> > > > You have a couple of options here.  Since
you're
> > > comparing a
> > > > > > > gridded
> > > > > > > >> > > > forecast field to a gridded analysis, you'll be
> running
> > a
> > > > > > > >> grid-to-grid
> > > > > > > >> > > > tool, like Grid-Stat or MODE.
> > > > > > > >> > > >
> > > > > > > >> > > > (1) You could use the "regrid" option in the
config
> > files
> > > to
> > > > > > > >> actually
> > > > > > > >> > > > regrid your data to a smaller domain.  If
you're input
> > is
> > > a
> > > > > > > lat/lon
> > > > > > > >> > grid
> > > > > > > >> > > > and your output is really just a subset of that
> lat/lon
> > > > grid,
> > > > > > then
> > > > > > > >> > you'd
> > > > > > > >> > > > define the "to_grid" so that the output grid
points
> > > coincide
> > > > > > with
> > > > > > > >> the
> > > > > > > >> > > input
> > > > > > > >> > > > ones.
> > > > > > > >> > > >
> > > > > > > >> > > > (2) A second (more common) option would be to
just
> > define
> > > > one
> > > > > > (or
> > > > > > > >> more)
> > > > > > > >> > > > subregions over which to compute stats.  And
yes, you
> > can
> > > > > > > definitely
> > > > > > > >> > use
> > > > > > > >> > > > gen_vx_mask to define that masking region.
Since you
> > > want a
> > > > > > range
> > > > > > > >> of
> > > > > > > >> > > > lat/lon values, I'd recommend using the "-type
lat"
> and
> > > > "-type
> > > > > > > lon"
> > > > > > > >> > > masking
> > > > > > > >> > > > types.
> > > > > > > >> > > >
> > > > > > > >> > > > Here's an example... looks to me like your mask
is
> > > > > approximately
> > > > > > > the
> > > > > > > >> > Gulf
> > > > > > > >> > > > of Mexico.  So I named it "GOM_Mask":
> > > > > > > >> > > >
> > > > > > > >> > > > (1) Grab a GFS file for the example:
> > > > > > > >> > > >  > wget
> > > > > > > >> > > > http://www.ftp.ncep.noaa.gov/
> data/nccf/com/gfs/prod/gfs
> > .
> > > > > > > >> > > > 2018032312/gfs.t12z.pgrb2.0p25.f012
> > > > > > > >> > > >
> > > > > > > >> > > > (2) Run gen_vx_mask to define latitude band:
> > > > > > > >> > > >  > met-6.1/bin/gen_vx_mask
gfs.t12z.pgrb2.0p25.f012
> > > > > > > >> > > > gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type lat
> -thresh
> > > > > > > 'ge5&&le30'
> > > > > > > >> > > >
> > > > > > > >> > > > (3) Run gen_vx_mask to intersect the longitude
band
> > > > > > > >> > > >  > met-6.1/bin/gen_vx_mask lat_band.nc
lat_band.nc
> > > > > GOM_Mask.nc
> > > > > > > >> -type
> > > > > > > >> > lon
> > > > > > > >> > > > -thresh 'ge-85&&le-55' -intersection -name
GOM_Mask
> > > > > > > >> > > >
> > > > > > > >> > > > (4) Plot the result using plot_data_plane
> > > > > > > >> > > >  > met-6.1/bin/plot_data_plane GOM_Mask.nc
GOM_Mask.ps
> > > > > > > >> > 'name="GOM_Mask";
> > > > > > > >> > > > level="(*,*)";'
> > > > > > > >> > > >
> > > > > > > >> > > > And I've attached a PNG version of that image.
> > > > > > > >> > > >
> > > > > > > >> > > > Then you'd list this mask file in your Grid-
Stat
> config
> > > > file:
> > > > > > > >> > > >
> > > > > > > >> > > > mask = {
> > > > > > > >> > > >    grid = [ "FULL" ];
> > > > > > > >> > > >    poly = [ "path/to/GOM_Mask.nc" ];
> > > > > > > >> > > > }
> > > > > > > >> > > >
> > > > > > > >> > > >
> > > > > > > >> > > > Hope that helps get you going.
> > > > > > > >> > > >
> > > > > > > >> > > > Thanks,
> > > > > > > >> > > > John
> > > > > > > >> > > >
> > > > > > > >> > > >
> > > > > > > >> > > > On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado -
NOAA
> > > > Affiliate
> > > > > > via
> > > > > > > >> RT <
> > > > > > > >> > > > met_help at ucar.edu> wrote:
> > > > > > > >> > > >
> > > > > > > >> > > > >
> > > > > > > >> > > > > Fri Mar 23 14:57:16 2018: Request 84536 was
acted
> > upon.
> > > > > > > >> > > > > Transaction: Ticket created by
> keren.rosado at noaa.gov
> > > > > > > >> > > > >        Queue: met_help
> > > > > > > >> > > > >      Subject: MET for smaller domain from
global
> > output
> > > > > > > >> > > > >        Owner: Nobody
> > > > > > > >> > > > >   Requestors: keren.rosado at noaa.gov
> > > > > > > >> > > > >       Status: new
> > > > > > > >> > > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> > > > > > > >> > Ticket/Display.html?id=84536
> > > > > > > >> > > >
> > > > > > > >> > > > >
> > > > > > > >> > > > >
> > > > > > > >> > > > > Hello!
> > > > > > > >> > > > >
> > > > > > > >> > > > > I have global FV3GFS forecast output  and
global
> > > > > observations
> > > > > > > from
> > > > > > > >> > > CMORPH
> > > > > > > >> > > > > on Theia. From the global output, I will like
to
> > > analyze a
> > > > > > > smaller
> > > > > > > >> > > domain
> > > > > > > >> > > > > e.g. 5N-30N 55W-85W. Is there a configure
file
> where I
> > > can
> > > > > set
> > > > > > > up
> > > > > > > >> Lat
> > > > > > > >> > > and
> > > > > > > >> > > > > Lon different than the input file?
> > > > > > > >> > > > >
> > > > > > > >> > > > > I saw the gen-vx-mask option in the tutorial
but for
> > > what
> > > > I
> > > > > > > >> > understood
> > > > > > > >> > > > does
> > > > > > > >> > > > > files are pre made.
> > > > > > > >> > > > >
> > > > > > > >> > > > > Thanks,
> > > > > > > >> > > > >
> > > > > > > >> > > > > Keren
> > > > > > > >> > > > >
> > > > > > > >> > > > >
> > > > > > > >> > > >
> > > > > > > >> > > >
> > > > > > > >> > >
> > > > > > > >> > >
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >>
> > > > > > > >>
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

------------------------------------------------
Subject: MET for smaller domain from global output
From: John Halley Gotway
Time: Fri Jun 22 10:29:15 2018

Hi Keren,

Glad to hear you've made progress.  I see that you want to confirm
that
Grid-Stat really is computing stats over the requested masking region.
There are 3 things that come to mind:

(1) The default verbosity level is 2 and when you run Grid-Stat that
produces log messages which are similar to this:

DEBUG 2: Processing APCP/A24 versus APCP_24(*,*), for smoothing method
NBRHD_SQUARE(9), raw thresholds of >0.0 and >0.0, over region CONUS,
using
524 pairs.

You could configure Grid-Stat to compute stats over the "FULL" model
domain
and over your masking region.  Then compare the log messages.  The
masking
region should use fewer matched pairs than the "FULL" domain.  So
you'd set
the config file like this:

mask = {
   grid = [ "FULL" ];
   poly = [ "/path/to/your/mask/file" ];
}

(2) Grid-Stat can write out a NetCDF file which contains the
forecast/observation pair values.  You could turn on this output, and
then
just use ncview to display the data.  So you'd set the config file
like
this:

nc_pairs_flag   = {
   latlon     = TRUE;
   raw        = FALSE;
   diff         = TRUE;
   climo      = FALSE;
   weight     = FALSE;
   nbrhd      = FALSE;
   fourier    = FALSE;
   gradient   = FALES;
   apply_mask = TRUE;
}

The output NetCDF file should now contain the difference field for
each
combination of variable/masking region you've defined.

(3) Lastly, look at the ASCII output files from Grid-Stat.  The column
just
after the LINE_TYPE specifies the number of matched pairs that were
used to
compute those stats.  That number should match the count from the log
messages I described in (1).

Hope this helps.

Thanks,
John

On Thu, Jun 21, 2018 at 3:42 PM Keren Rosado - NOAA Affiliate via RT <
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
>
> Hi John,
>
> I think MET is now working with the mask area that I want e.g. I
don't see
> any error on the log files.
>
> Is there a way that I can double check that what is written in
>
grid_stat_gf_Matthew_jan_0p25_G3_F000_500hPa_000000L_20160929_000000V.stat
> was calculated for the masked area?
>
>
> Thanks,
>
> Keren
>
> ----
> Keren Rosado, Ph.D.
> NCAS-M Postdoctoral Fellow
> NOAA ESRL
> Office: (303) 497-5907
>
> On Thu, May 17, 2018 at 1:09 PM, John Halley Gotway via RT <
> met_help at ucar.edu> wrote:
>
> > Keren,
> >
> > Is see you're having trouble from Point-Stat getting your
verification
> grid
> > to match the masking grid.
> >
> > The intention here is that you should use gen_vx_mask to define a
masking
> > region for the domain on which you're performing the verification.
> >
> > If you're verification domain is 360x181 (i.e. 1 degree GFS), then
you
> > should define a mask for that grid... not the 1/4 degree GFS grid.
All
> you
> > need to do is modify your call the gen_vx_mask by passing it a 1-
degree
> > input file instead of a 1/4-degree input file.
> >
> > We did add a feature in MET version 6.1 (
> > https://dtcenter.org/met/users/support/release_notes/
> > METv6.1_release_notes.php)
> > to automatically regrid masking regions to the verification domain
using
> > nearest neighbor interpolation.  And that logic would apply in
this case.
> > However, since you're using met-5.2, that feature isn't available.
> >
> > Thanks,
> > John
> >
> > On Thu, May 17, 2018 at 11:20 AM, Keren Rosado - NOAA Affiliate
via RT <
> > met_help at ucar.edu> wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> > >
> > > John,
> > >
> > > I am getting exactly the same error as before.
> > >
> > > Here is what I did using MET 5.2 and .25 grib2 files:
> > >
> > > Created the box_center.poly
> > >
> > > Center of the box (5-30N 55-85W)
> > >
> > >
> > > box_mask
> > >
> > > 17.5 -70
> > >
> > >
> > > then type mask gen_vx_maskgrb.file box_center.poly
gfs_box_mask.nc
> -type
> > > box -height 101 -width 101 -v 3
> > >
> > >
> > >
> > >
> > >
> > > DEBUG 1: Input File:     pgrbq000.gfs.2016092900.grib2
> > >
> > > DEBUG 1: Mask File:   box_center.poly
> > >
> > > DEBUG 3: Switching the GRIB2 radius of the earth value of
6371.23 km to
> > > 6371.2 km for internal consistency.
> > >
> > > DEBUG 2: Parsed Data Grid:LatLon (1440 x 721)
> > >
> > > DEBUG 2: Parsed Lat/Lon Mask File:box_mask    containing 1
points
> > >
> > > DEBUG 3: Box Masking (90 x 101):9090 of 1038240 points inside
> > >
> > > DEBUG 1: Output File:    gfs_box_mask.nc
> > >
> > >
> > >
> > > Ncview gfs_box_mask.nc to make sure mask is where I want
(attached
> > > figure).
> > >
> > >
> > > Then I changed the config file with the new ".nc" file for the
masking
> > > /scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > PointStatConfig_ADPUPA_REGRID_G3
> > >
> > >  mask = {
> > >
> > >    grid = [ "FULL" ];
> > >
> > >    poly = [ "${MASKS}/gfs_box_mask.nc" ];
> > >
> > >    sid  = [];
> > >
> > >
> > > and run /scratch3/BMC/fim/Keren.Rosado/MET/xml/runrocotoGFK.ksh
> > >
> > >
> > > The log file
> > > error /scratch3/BMC/fim/Keren.Rosado/MET/log/gf_Matthew_jan/
> > 2016092900/met
> > > met_point_ua_gf_Matthew_jan_2016092900_000.log
> > >
> > >
> > > ERROR  : parse_poly_mask() -> The masking and verification grids
do not
> > > match:
> > >
> > > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll: -90.000
lon_ll:
> > > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> > >
> > > ERROR  : Projection: Lat/Lon Nx: 360 Ny: 181 lat_ll: -90.000
lon_ll:
> > -0.000
> > > delta_lat: 1.000 delta_lon: 1.000
> > >
> > > ERROR  :
> > >
> > >
> > > Thanks,
> > >
> > >
> > > Keren
> > >
> > >
> > > ----
> > > Keren Rosado, Ph.D.
> > > NCAS-M Postdoctoral Fellow
> > > NOAA ESRL
> > > Office: (303) 497-5907
> > >
> > > On Wed, May 16, 2018 at 5:02 PM, John Halley Gotway via RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > > Keren,
> > > >
> > > > The "type" of masking that you want to apply is latitude
masking.  So
> > > you'd
> > > > use "-type lat" instead of "-type poly".  However, "-type lat"
isn't
> > > > supported in met-5.2.  It was added in met-6.1.
> > > >
> > > > If you can switch to using met-6.1 or met-7.0, I'd suggest
doing so.
> > > > Judging by the fact that the dimensions are 1440x721, I'll
assume
> that
> > > this
> > > > is 0.25 degree global data.  To demonstrate, I created a test
file
> > named
> > > > "gfs_grid_193.grib".  Here's the met-7.0 command you could
run:
> > > >
> > > >    met-7.0/bin/gen_vx_mask \
> > > >       gfs_grid_193.grib \
> > > >       gfs_grid_193.grib  \
> > > >       gfs_lat_mask.nc \
> > > >       -type lat -thresh 'ge5&&le30' -v 3
> > > >
> > > > Running at verbosity level 3 tells you how many grid points
were
> > included
> > > > in the mask:
> > > >    DEBUG 3: Latitude Masking:              145440 of 1038240
points
> > > inside
> > > >
> > > > Otherwise, if you're stuck using met-5.2, since you're
operating on a
> > > > lat/lon grid, you could get the same result using the "box"
masking
> > type.
> > > > It's just much less straight-forward.  We pick a lat/lon point
that
> > we'd
> > > > want in the center of the box... and then specify the length
and
> width
> > of
> > > > the box in grid units.
> > > >
> > > > I'll pick my center point as lat = 17.5 and lon = -180 and
write that
> > to
> > > an
> > > > ascii file:
> > > >
> > > > box_center.poly
> > > > +++++++++
> > > >    box_mask
> > > >    17.5 -180
> > > > +++++++++
> > > >
> > > > And then run this met-5.2 command:
> > > >
> > > >    met-5.2/bin/gen_vx_mask \
> > > >       gfs_grid_193.grib \
> > > >       box_center.poly \
> > > >       gfs_box_mask.nc -type box -height 101 -width 1440 -v 3
> > > >
> > > > At verbosity level 3, here's the number of point in this mask:
> > > >    DEBUG 3: Box Masking (101 x 1441):      145440 of 1038240
points
> > > inside
> > > >
> > > > And that matches what we got from met-7.0
> > > >
> > > > Hope this helps.
> > > >
> > > > Thanks,
> > > > John
> > > >
> > > >
> > > > On Wed, May 16, 2018 at 3:54 PM, Keren Rosado - NOAA Affiliate
via
> RT <
> > > > met_help at ucar.edu> wrote:
> > > >
> > > > >
> > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536 >
> > > > >
> > > > > John,
> > > > >
> > > > > I am trying to run the gen_vx_mask with MET version 5.2 and
I get
> an
> > > > error.
> > > > >
> > > > > This is the command I am doing following what you explained
in your
> > > > > previous email and MET user guide 5.2.
> > > > >
> > > > > gen_vx_mask pgrbq000.gfs.2016092900.grib2
> > pgrbq000.gfs.2016092900.grib2
> > > > > lat_band.nc -type poly -thresh 'ge5&&le30'
> > > > >
> > > > >
> > > > > DEBUG 1: Input File: pgrbq000.gfs.2016092900.grib2
> > > > >
> > > > > DEBUG 1: Mask File: pgrbq000.gfs.2016092900.grib2
> > > > >
> > > > > DEBUG 2: Parsed Data Grid: LatLon (1440 x 721)
> > > > >
> > > > > DEBUG 2: Parsed Lat/Lon Mask File: (nul) containing 0 points
> > > > >
> > > > > ERROR  :
> > > > >
> > > > > ERROR  : NumArray::operator[](int) const -> range check
error
> > > > >
> > > > > ERROR  :
> > > > >
> > > > > P.S. In the example above that you send me for version 6.1
the
> -type
> > > > 'lat'
> > > > > is used and that is not supported by version 5.2. That is
why now I
> > > have
> > > > > -type 'poly'.
> > > > >
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Keren
> > > > >
> > > > > ----
> > > > > Keren Rosado, Ph.D.
> > > > > NCAS-M Postdoctoral Fellow
> > > > > NOAA ESRL
> > > > > Office: (303) 497-5907
> > > > >
> > > > > On Mon, Apr 2, 2018 at 9:21 AM, John Halley Gotway via RT <
> > > > > met_help at ucar.edu
> > > > > > wrote:
> > > > >
> > > > > > Keren,
> > > > > >
> > > > > > OK, this should be pretty straight-forward to fix.  Since
you're
> > > using
> > > > > > met-5.2, just run the the gen_vx_mask tool from version
5.2 to
> > > generate
> > > > > the
> > > > > > mask fields.
> > > > > >
> > > > > > When you run gen_vx_mask, the first argument is a gridded
data
> file
> > > > which
> > > > > > specifies the grid you're using.  So just pass in that FV3
GRIB2
> > file
> > > > as
> > > > > > the first argument.
> > > > > >
> > > > > > So please try rerunning gen_vx_mask to define a mask for
the FV3
> > > domain
> > > > > > you're evaluating and let me know if you have any issues.
> > > > > >
> > > > > > Thanks,
> > > > > > John
> > > > > >
> > > > > > On Thu, Mar 29, 2018 at 10:24 AM, Keren Rosado - NOAA
Affiliate
> via
> > > RT
> > > > <
> > > > > > met_help at ucar.edu> wrote:
> > > > > >
> > > > > > >
> > > > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=84536
> >
> > > > > > >
> > > > > > > Hi John,
> > > > > > >
> > > > > > > Thanks  for figuring out the error.
> > > > > > >
> > > > > > > Now, I am having the same error you got about the mask
> > projection.
> > > > > > >
> > > > > > > The first mask I created was Matthew_Mask_NetCDF3.nc and
I used
> > > > > > > pgrbq000.gfs.2016092900.grib2
> > > > > > > to create the mask following your instructions above.
> > > > > > >
> > > > > > > Today, I created a second mask called
> > Matthew_Mask_0329_NetCDF3.nc.
> > > > > This
> > > > > > > mask was created using gfs.t00z.pgrb2.0p25.f000
> > > > > > >
> > > > > > > In both cases I get the same error: (
> > > > > > > /scratch3/BMC/fim/Keren.Rosado/MET/log/gf_Matthew_jan/
> > > > 2016092900/met/
> > > > > > > met_point_ua_gf_Matthew_jan_2016092900_096.log)
> > > > > > >
> > > > > > > ERROR  : parse_poly_mask() -> The masking and
verification
> grids
> > do
> > > > not
> > > > > > > match:
> > > > > > >
> > > > > > > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721 lat_ll:
-90.000
> > > lon_ll:
> > > > > > > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> > > > > > >
> > > > > > > ERROR  : Projection: Lat/Lon Nx: 360 Ny: 181 lat_ll:
-90.000
> > > lon_ll:
> > > > > > -0.000
> > > > > > > delta_lat: 1.000 delta_lon: 1.000
> > > > > > >
> > > > > > >
> > > > > > > P.S. These forecast output files are from FV3 I don't
think
> that
> > > > should
> > > > > > > matter since they are grib2 format.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > >
> > > > > > > Keren
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ----
> > > > > > > Keren Rosado, Ph.D.
> > > > > > > NCAS-M Postdoctoral Fellow
> > > > > > > NOAA ESRL
> > > > > > > Office: (303) 497-5907
> > > > > > >
> > > > > > > On Wed, Mar 28, 2018 at 10:42 PM, John Halley Gotway via
RT <
> > > > > > > met_help at ucar.edu> wrote:
> > > > > > >
> > > > > > > > Keren,
> > > > > > > >
> > > > > > > > It just occurred to me that you probably won’t get
that error
> > > > > message I
> > > > > > > got
> > > > > > > > in my last call to point-stat.  I was using a
different set
> of
> > > data
> > > > > for
> > > > > > > > testing... on a different domain. Presumably, you did
define
> > the
> > > > > masks
> > > > > > > > correctly for your domain... and I only got that error
> because
> > I
> > > > > > switched
> > > > > > > > input data.
> > > > > > > >
> > > > > > > > Please let me know if that doesn’t fix the issue.
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > John
> > > > > > > >
> > > > > > > > On Wed, Mar 28, 2018 at 10:00 PM John Halley Gotway <
> > > > johnhg at ucar.edu
> > > > > >
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Keren,
> > > > > > > > >
> > > > > > > > > OK, I understand what's going on here.  This one was
> tricky!
> > > > First
> > > > > > > time
> > > > > > > > > I've seen this.
> > > > > > > > >
> > > > > > > > > The problem is caused by you mixing tools from MET
versions
> > 5.2
> > > > and
> > > > > > > 6.1.
> > > > > > > > > And more specifically, it's the version of NetCDF
that's
> > > causing
> > > > > the
> > > > > > > > > problem.  Prior to version 6.0, MET used NetCDF3 to
> > read/write
> > > > > NetCDF
> > > > > > > > > files.  Versions 6.0 and later use NetCDF4.
> > > > > > > > >
> > > > > > > > > Here's what's happening...
> > > > > > > > > - Running "ncdump -h" on your mask data files
reveals that
> > they
> > > > > were
> > > > > > > > > created with MET version 6.1... meaning NetCDF4.
> > > > > > > > >    ncdump -h  /scratch3/BMC/fim/Keren.
> > > > Rosado/MET/parm/met_config/
> > > > > > > > > masks/Matthew_Mask.nc
> > > > > > > > >
> > > > > > > > >  :MET_version = "V6.1" ;
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > - But in the workflow, you're running MET version
5.2...
> > which
> > > > > > expects
> > > > > > > > > NetCDF3 files.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > - In "mask.poly" you can pass in either a gridded
data file
> > or
> > > an
> > > > > > ascii
> > > > > > > > > polyline file.  Point-Stat tries to process the
input file
> > > first
> > > > > as a
> > > > > > > > > gridded data file.  If that doesn't work, it assumes
the
> > input
> > > > file
> > > > > > is
> > > > > > > > > ascii instead.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > - So it tries opening "Matthew_Mask.nc" as a gridded
data
> > file.
> > > > > That
> > > > > > > > > fails because the NetCDF3 library doesn't know
anything
> about
> > > > > NetCDF4
> > > > > > > > > files.  So it tries to process it as ascii... which
fails
> > with
> > > > the
> > > > > > > error
> > > > > > > > > message you saw.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Next, I ran the following commands to convert your
mask
> file
> > > from
> > > > > > > NetCDF4
> > > > > > > > > to 3:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >    module load nco
> > > > > > > > >
> > > > > > > > >    nccopy -k 1 masks/Matthew_Mask.nc
> > > > masks/Matthew_Mask_NetCDF3.nc
> > > > > > > > >
> > > > > > > > > And then I updated the Point-Stat config file to
point to
> > > > > > > > > "Matthew_Mask_NetCDF3.nc".
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > When I run Point-Stat, it still fails, but with a
much more
> > > > useful
> > > > > > > error
> > > > > > > > > message.  Looks like you didn't generate the mask
file for
> > the
> > > > > right
> > > > > > > > domain:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ERROR  : parse_poly_mask() -> The masking and
verification
> > > grids
> > > > do
> > > > > > not
> > > > > > > > > match:
> > > > > > > > >
> > > > > > > > > ERROR  : Projection: Lat/Lon Nx: 1440 Ny: 721
lat_ll:
> -90.000
> > > > > lon_ll:
> > > > > > > > > -0.000 delta_lat: 0.250 delta_lon: 0.250 !=
> > > > > > > > >
> > > > > > > > > ERROR  : Projection: Lambert Conformal Nx: 614 Ny:
428
> > Lat_LL:
> > > > > 12.190
> > > > > > > > > Lon_LL: 133.459 Lon_orient: 95.000 Alpha: 1356.011
Cone:
> > 0.423
> > > > Bx:
> > > > > > > > 346.6564
> > > > > > > > > By: 1189.0556
> > > > > > > > >
> > > > > > > > > In general, I'd recommend sticking with a single
version of
> > > MET.
> > > > > If
> > > > > > > your
> > > > > > > > > scripts/config files are set up to use met-5.2, use
that
> > > version
> > > > of
> > > > > > > > > gen_vx_mask to define the input masks.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Hope that helps clarify.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > > John
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Mon, Mar 26, 2018 at 7:29 PM, Keren Rosado - NOAA
> > Affiliate
> > > > via
> > > > > > RT <
> > > > > > > > > met_help at ucar.edu> wrote:
> > > > > > > > >
> > > > > > > > >>
> > > > > > > > >> <URL: https://rt.rap.ucar.edu/rt/
> > Ticket/Display.html?id=84536
> > > >
> > > > > > > > >>
> > > > > > > > >> Hi John,
> > > > > > > > >>
> > > > > > > > >> I am using a GMTB package that runs MET using
rocoto. I
> > copied
> > > > the
> > > > > > > > entire
> > > > > > > > >> MET directory for the package to work.
> > > > > > > > >>
> > > > > > > > >> The xml file is
> > > > > > > > >> located /scratch3/BMC/fim/Keren.
> > > Rosado/MET/xml/gf_matthew_jan.
> > > > xml
> > > > > > to
> > > > > > > > run
> > > > > > > > >> this xml I use runrocotoGFK.ksh
> > > > > > > > >> I found point stat script different that the one
you
> > metioned
> > > > > above
> > > > > > > > >> at:
/scratch3/BMC/fim/Keren.Rosado/MET/bin/met_point_verf_
> > > > sfc.ksh
> > > > > > and
> > > > > > > > >> met_point_verf_ua.ksh
> > > > > > > > >>
> > > > > > > > >> The model output grib files are located
> > > > > > > > >> at:
/scratch3/BMC/fim/Keren.Rosado/MET/gf_Matthew_jan/
> > > > 2016092900
> > > > > > > > >>
> > > > > > > > >> Let me know if you need any other clarification.
> > > > > > > > >>
> > > > > > > > >> Thanks,
> > > > > > > > >>
> > > > > > > > >> Keren
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >> ----
> > > > > > > > >> Keren Rosado, Ph.D.
> > > > > > > > >> NCAS-M Postdoctoral Fellow
> > > > > > > > >> NOAA ESRL
> > > > > > > > >> Office: (303) 497-5907
> > > > > > > > >>
> > > > > > > > >> On Mon, Mar 26, 2018 at 4:48 PM, John Halley Gotway
via
> RT <
> > > > > > > > >> met_help at ucar.edu> wrote:
> > > > > > > > >>
> > > > > > > > >> > Keren,
> > > > > > > > >> >
> > > > > > > > >> > I went hunting around on theia, looking at your
data.  I
> > see
> > > > > that
> > > > > > > > you're
> > > > > > > > >> > using either version 5.1 or 5.2 of MET.  The
latest
> > > available
> > > > > > > version
> > > > > > > > on
> > > > > > > > >> > theia is 7.0.
> > > > > > > > >> >
> > > > > > > > >> > I'd like to replicate the error message you're
getting,
> > so I
> > > > can
> > > > > > see
> > > > > > > > >> what
> > > > > > > > >> > is needed to fix it.  Are you able to send me a
single
> > call
> > > to
> > > > > > > > >> Point-Stat
> > > > > > > > >> > that replicates this behavior?  Or are you
calling it
> > from a
> > > > > long
> > > > > > > > script
> > > > > > > > >> > that's doing lots of other step?
> > > > > > > > >> >
> > > > > > > > >> > Here's a point-stat script I found in your area:
> > > > > > > > >> >
/scratch3/BMC/fim/Keren.Rosado/MET/scripts/run_point_
> > > > > stat.ksh
> > > > > > > > >> >
> > > > > > > > >> > Is that what you're running?
> > > > > > > > >> >
> > > > > > > > >> > Thanks,
> > > > > > > > >> > John
> > > > > > > > >> >
> > > > > > > > >> > On Mon, Mar 26, 2018 at 3:01 PM, Keren Rosado -
NOAA
> > > Affiliate
> > > > > via
> > > > > > > RT
> > > > > > > > <
> > > > > > > > >> > met_help at ucar.edu> wrote:
> > > > > > > > >> >
> > > > > > > > >> > >
> > > > > > > > >> > > <URL: https://rt.rap.ucar.edu/rt/
> > > > Ticket/Display.html?id=84536
> > > > > >
> > > > > > > > >> > >
> > > > > > > > >> > > Hi John,
> > > > > > > > >> > >
> > > > > > > > >> > > I am using PointStatConfig_ADPUPA_REGRID_G3 to
run
> > point
> > > > stat
> > > > > > > > located
> > > > > > > > >> at
> > > > > > > > >> > >
/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > > > > > > >> > >
> > > > > > > > >> > > I added  Matthew_Mask.nc in the mask section as
you
> > > > explained
> > > > > > > above
> > > > > > > > to
> > > > > > > > >> > > the PointStatConfig_ADPUPA_REGRID_G3.
> > > > > > > > >> > > Results from this gave me an error: ERROR  :
> > > > > > > > parse_latlon_poly_file()
> > > > > > > > >> ->
> > > > > > > > >> > > The polyline file supplied
> > > > > > > > >> > >
(/scratch3/BMC/fim/Keren.Rosado/MET/parm/met_config/
> > > > > > > > >> > masks/Matthew_Mask.nc)
> > > > > > > > >> > > must contain at least 3 pairs of points to
define a
> > > masking
> > > > > > > region.
> > > > > > > > >> > >
> > > > > > > > >> > > Trying to fix the error, I added the original
mask
> files
> > > and
> > > > > > added
> > > > > > > > my
> > > > > > > > >> new
> > > > > > > > >> > > mask file (Matthew_Mask) and the error still
the same.
> > > > > > > > >> > >
> > > > > > > > >> > > // Verification masking regions
> > > > > > > > >> > >
> > > > > > > > >> > > //
> > > > > > > > >> > >
> > > > > > > > >> > > mask = {
> > > > > > > > >> > >
> > > > > > > > >> > >    grid = [ "FULL" ];
> > > > > > > > >> > >
> > > > > > > > >> > >    poly = [ "${MASKS}/Matthew_Mask.nc",
> > > > > > > > >> > >
> > > > > > > > >> > >             "${MASKS}/gfs_NH_G3.nc",
> > > > > > > > >> > >
> > > > > > > > >> > >             "${MASKS}/gfs_SH_G3.nc",
> > > > > > > > >> > >
> > > > > > > > >> > >             "${MASKS}/gfs_TROP_G3.nc" ];
> > > > > > > > >> > >
> > > > > > > > >> > >    sid  = [];
> > > > > > > > >> > >
> > > > > > > > >> > > };
> > > > > > > > >> > >
> > > > > > > > >> > >
> > > > > > > > >> > >
> > > > > > > > >> > > Thanks,
> > > > > > > > >> > >
> > > > > > > > >> > > Keren
> > > > > > > > >> > >
> > > > > > > > >> > >
> > > > > > > > >> > > ----
> > > > > > > > >> > > Keren Rosado, Ph.D.
> > > > > > > > >> > > NCAS-M Postdoctoral Fellow
> > > > > > > > >> > > NOAA ESRL
> > > > > > > > >> > > Office: (303) 497-5907
> > > > > > > > >> > >
> > > > > > > > >> > > On Fri, Mar 23, 2018 at 3:14 PM, John Halley
Gotway
> via
> > > RT <
> > > > > > > > >> > > met_help at ucar.edu> wrote:
> > > > > > > > >> > >
> > > > > > > > >> > > > Keren,
> > > > > > > > >> > > >
> > > > > > > > >> > > > You have a couple of options here.  Since
you're
> > > > comparing a
> > > > > > > > gridded
> > > > > > > > >> > > > forecast field to a gridded analysis, you'll
be
> > running
> > > a
> > > > > > > > >> grid-to-grid
> > > > > > > > >> > > > tool, like Grid-Stat or MODE.
> > > > > > > > >> > > >
> > > > > > > > >> > > > (1) You could use the "regrid" option in the
config
> > > files
> > > > to
> > > > > > > > >> actually
> > > > > > > > >> > > > regrid your data to a smaller domain.  If
you're
> input
> > > is
> > > > a
> > > > > > > > lat/lon
> > > > > > > > >> > grid
> > > > > > > > >> > > > and your output is really just a subset of
that
> > lat/lon
> > > > > grid,
> > > > > > > then
> > > > > > > > >> > you'd
> > > > > > > > >> > > > define the "to_grid" so that the output grid
points
> > > > coincide
> > > > > > > with
> > > > > > > > >> the
> > > > > > > > >> > > input
> > > > > > > > >> > > > ones.
> > > > > > > > >> > > >
> > > > > > > > >> > > > (2) A second (more common) option would be to
just
> > > define
> > > > > one
> > > > > > > (or
> > > > > > > > >> more)
> > > > > > > > >> > > > subregions over which to compute stats.  And
yes,
> you
> > > can
> > > > > > > > definitely
> > > > > > > > >> > use
> > > > > > > > >> > > > gen_vx_mask to define that masking region.
Since
> you
> > > > want a
> > > > > > > range
> > > > > > > > >> of
> > > > > > > > >> > > > lat/lon values, I'd recommend using the "-
type lat"
> > and
> > > > > "-type
> > > > > > > > lon"
> > > > > > > > >> > > masking
> > > > > > > > >> > > > types.
> > > > > > > > >> > > >
> > > > > > > > >> > > > Here's an example... looks to me like your
mask is
> > > > > > approximately
> > > > > > > > the
> > > > > > > > >> > Gulf
> > > > > > > > >> > > > of Mexico.  So I named it "GOM_Mask":
> > > > > > > > >> > > >
> > > > > > > > >> > > > (1) Grab a GFS file for the example:
> > > > > > > > >> > > >  > wget
> > > > > > > > >> > > > http://www.ftp.ncep.noaa.gov/
> > data/nccf/com/gfs/prod/gfs
> > > .
> > > > > > > > >> > > > 2018032312/gfs.t12z.pgrb2.0p25.f012
> > > > > > > > >> > > >
> > > > > > > > >> > > > (2) Run gen_vx_mask to define latitude band:
> > > > > > > > >> > > >  > met-6.1/bin/gen_vx_mask
gfs.t12z.pgrb2.0p25.f012
> > > > > > > > >> > > > gfs.t12z.pgrb2.0p25.f012 lat_band.nc -type
lat
> > -thresh
> > > > > > > > 'ge5&&le30'
> > > > > > > > >> > > >
> > > > > > > > >> > > > (3) Run gen_vx_mask to intersect the
longitude band
> > > > > > > > >> > > >  > met-6.1/bin/gen_vx_mask lat_band.nc
lat_band.nc
> > > > > > GOM_Mask.nc
> > > > > > > > >> -type
> > > > > > > > >> > lon
> > > > > > > > >> > > > -thresh 'ge-85&&le-55' -intersection -name
GOM_Mask
> > > > > > > > >> > > >
> > > > > > > > >> > > > (4) Plot the result using plot_data_plane
> > > > > > > > >> > > >  > met-6.1/bin/plot_data_plane GOM_Mask.nc
> GOM_Mask.ps
> > > > > > > > >> > 'name="GOM_Mask";
> > > > > > > > >> > > > level="(*,*)";'
> > > > > > > > >> > > >
> > > > > > > > >> > > > And I've attached a PNG version of that
image.
> > > > > > > > >> > > >
> > > > > > > > >> > > > Then you'd list this mask file in your Grid-
Stat
> > config
> > > > > file:
> > > > > > > > >> > > >
> > > > > > > > >> > > > mask = {
> > > > > > > > >> > > >    grid = [ "FULL" ];
> > > > > > > > >> > > >    poly = [ "path/to/GOM_Mask.nc" ];
> > > > > > > > >> > > > }
> > > > > > > > >> > > >
> > > > > > > > >> > > >
> > > > > > > > >> > > > Hope that helps get you going.
> > > > > > > > >> > > >
> > > > > > > > >> > > > Thanks,
> > > > > > > > >> > > > John
> > > > > > > > >> > > >
> > > > > > > > >> > > >
> > > > > > > > >> > > > On Fri, Mar 23, 2018 at 2:57 PM, Keren Rosado
- NOAA
> > > > > Affiliate
> > > > > > > via
> > > > > > > > >> RT <
> > > > > > > > >> > > > met_help at ucar.edu> wrote:
> > > > > > > > >> > > >
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > Fri Mar 23 14:57:16 2018: Request 84536 was
acted
> > > upon.
> > > > > > > > >> > > > > Transaction: Ticket created by
> > keren.rosado at noaa.gov
> > > > > > > > >> > > > >        Queue: met_help
> > > > > > > > >> > > > >      Subject: MET for smaller domain from
global
> > > output
> > > > > > > > >> > > > >        Owner: Nobody
> > > > > > > > >> > > > >   Requestors: keren.rosado at noaa.gov
> > > > > > > > >> > > > >       Status: new
> > > > > > > > >> > > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> > > > > > > > >> > Ticket/Display.html?id=84536
> > > > > > > > >> > > >
> > > > > > > > >> > > > >
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > Hello!
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > I have global FV3GFS forecast output  and
global
> > > > > > observations
> > > > > > > > from
> > > > > > > > >> > > CMORPH
> > > > > > > > >> > > > > on Theia. From the global output, I will
like to
> > > > analyze a
> > > > > > > > smaller
> > > > > > > > >> > > domain
> > > > > > > > >> > > > > e.g. 5N-30N 55W-85W. Is there a configure
file
> > where I
> > > > can
> > > > > > set
> > > > > > > > up
> > > > > > > > >> Lat
> > > > > > > > >> > > and
> > > > > > > > >> > > > > Lon different than the input file?
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > I saw the gen-vx-mask option in the
tutorial but
> for
> > > > what
> > > > > I
> > > > > > > > >> > understood
> > > > > > > > >> > > > does
> > > > > > > > >> > > > > files are pre made.
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > Thanks,
> > > > > > > > >> > > > >
> > > > > > > > >> > > > > Keren
> > > > > > > > >> > > > >
> > > > > > > > >> > > > >
> > > > > > > > >> > > >
> > > > > > > > >> > > >
> > > > > > > > >> > >
> > > > > > > > >> > >
> > > > > > > > >> >
> > > > > > > > >> >
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

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


More information about the Met_help mailing list