[Met_help] [rt.rap.ucar.edu #38921] History for question regarding using poly mask in grid stat

RAL HelpDesk {for Paul Oldenburg} met_help at ucar.edu
Tue Jun 29 11:22:44 MDT 2010


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

Hi,

I am trying to run grid stat with some output files from pcp_combine over both the full domain and also the masked domain that is laid out by MDW.poly.  The relevant lines of my config file are below along with the error that I am getting when I try and run grid_stat.  Isn't the point of the mask to run the statistics over a subset of the data?  That is why I am confused about the grid dimension error.

FROM CONFIG FILE:

// Specify a comma-separated list of grids to be used in masking the data over
// which to perform scoring.  An empty list indicates that no masking grid
// should be performed.  The standard NCEP grids are named "GNNN" where NNN
// indicates the three digit grid number.  Enter "FULL" to score over the
// entire domain.
// http://www.nco.ncep.noaa.gov/pmb/docs/on388/tableb.html
//
// e.g. mask_grid[] = [ "FULL" ];
//
mask_grid[] = [ "FULL" ];

//
// Specify a comma-separated list of masking regions to be applied.
// An empty list indicates that no additional masks should be used.
// The masking regions may be defined in one of 4 ways:
//
// (1) An ASCII file containing a lat/lon polygon.
//     Latitude in degrees north and longitude in degrees east.
//     By default, the first and last polygon points are connected.
//     e.g. "MET_BASE/data/poly/EAST.poly" which consists of n points:
//          "poly_name lat1 lon1 lat2 lon2... latn lonn"
//
// (2) The NetCDF output of the gen_poly_mask tool.
//
// (3) A NetCDF data file, followed by the name of the NetCDF variable
//     to be used, and optionally, a threshold to be applied to the field.
//     e.g. "sample.nc var_name gt0.00"
//
// (4) A GRIB data file, followed by a description of the field
//     to be used, and optionally, a threshold to be applied to the field.
//     e.g. "sample.grb APCP/A3 gt0.00"
//
// Any NetCDF or GRIB file used must have the same grid dimensions as the
// data being verified.
//
// MET_BASE may be used in the path for the files above.
//
// e.g. mask_poly[] = [ "MET_BASE/data/poly/EAST.poly",
//                      "poly_mask.ncf",
//                      "sample.nc APCP",
//                      "sample.grb HGT/Z0 gt100.0" ];
//
mask_poly[] = [ "MET_BASE/out/gen_poly_mask/CONUS_poly.nc",
                "MET_BASE/data/poly/MDW.poly" ];

READOUT RUNTIME ERROR:

*** Running Grid-Stat on APCP using netCDF input for both forecast and observation ***
GSL_RNG_TYPE=mt19937
GSL_RNG_SEED=18446744072066837068
Forecast File: /home/dhartung/METv2.0/conv/out/pcp_combine/conv_12L_2008010812V_12A.nc
Observation File: /home/dhartung/METv2.0/obs/out/pcp_combine/truth_12L_2008010812V_12A.nc
Configuration File: /home/dhartung/METv2.0/conv/config/GridStatConfig_APCP_12


ERROR: parse_poly_mask() -> the dimensions of the masking region (185, 129) must match the dimensions of the data (265, 171).


Thanks for the help!
Dan




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

Subject: Re: [rt.rap.ucar.edu #38921] question regarding using poly mask in grid stat
From: Paul Oldenburg
Time: Tue Jun 29 10:54:57 2010

Dan,

It looks like you are trying to apply the NetCDF output of
gen_poly_mask, called
CONUS_poly.nc, to your data.  That file was generated by applying the
polygon
mask MET_BASE/data/poly/CONUS.poly to the MET test data, not to your
own data.
That is why the size of CONUS_poly.nc does not match the size of your
own data
file.  The easiest approach to fixing this problem is probably to use
MET_BASE/data/poly/CONUS.poly directly, like so:

mask_poly[] = [ "MET_BASE/data/poly/CONUS.poly",
                "MET_BASE/data/poly/MDW.poly" ];

The other option is to run gen_poly_mask using CONUS.poly and your own
forecast
data file to generate a new CONUS_poly.nc file.  This might be the
better route
if you intend to apply the CONUS mask to a large number of forecast
data files.

MET_BASE/bin/gen_poly_mask \
  /home/dhartung/METv2.0/conv/out/pcp_combine/conv_12L_2008010812V_12A.nc
\
  MET_BASE/data/poly/CONUS.poly \
  MET_BASE/out/gen_poly_mask/CONUS_poly.nc

Please let us know if you have any other questions.

Thanks,

Paul


RAL HelpDesk {for Dan Hartung} wrote:
> Tue Jun 29 10:05:03 2010: Request 38921 was acted upon.
> Transaction: Ticket created by daniel.hartung at ssec.wisc.edu
>        Queue: met_help
>      Subject: question regarding using poly mask in grid stat
>        Owner: Nobody
>   Requestors: daniel.hartung at ssec.wisc.edu
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=38921 >
>
>
> Hi,
>
> I am trying to run grid stat with some output files from pcp_combine
over both the full domain and also the masked domain that is laid out
by MDW.poly.  The relevant lines of my config file are below along
with the error that I am getting when I try and run grid_stat.  Isn't
the point of the mask to run the statistics over a subset of the data?
That is why I am confused about the grid dimension error.
>
> FROM CONFIG FILE:
>
> // Specify a comma-separated list of grids to be used in masking the
data over
> // which to perform scoring.  An empty list indicates that no
masking grid
> // should be performed.  The standard NCEP grids are named "GNNN"
where NNN
> // indicates the three digit grid number.  Enter "FULL" to score
over the
> // entire domain.
> // http://www.nco.ncep.noaa.gov/pmb/docs/on388/tableb.html
> //
> // e.g. mask_grid[] = [ "FULL" ];
> //
> mask_grid[] = [ "FULL" ];
>
> //
> // Specify a comma-separated list of masking regions to be applied.
> // An empty list indicates that no additional masks should be used.
> // The masking regions may be defined in one of 4 ways:
> //
> // (1) An ASCII file containing a lat/lon polygon.
> //     Latitude in degrees north and longitude in degrees east.
> //     By default, the first and last polygon points are connected.
> //     e.g. "MET_BASE/data/poly/EAST.poly" which consists of n
points:
> //          "poly_name lat1 lon1 lat2 lon2... latn lonn"
> //
> // (2) The NetCDF output of the gen_poly_mask tool.
> //
> // (3) A NetCDF data file, followed by the name of the NetCDF
variable
> //     to be used, and optionally, a threshold to be applied to the
field.
> //     e.g. "sample.nc var_name gt0.00"
> //
> // (4) A GRIB data file, followed by a description of the field
> //     to be used, and optionally, a threshold to be applied to the
field.
> //     e.g. "sample.grb APCP/A3 gt0.00"
> //
> // Any NetCDF or GRIB file used must have the same grid dimensions
as the
> // data being verified.
> //
> // MET_BASE may be used in the path for the files above.
> //
> // e.g. mask_poly[] = [ "MET_BASE/data/poly/EAST.poly",
> //                      "poly_mask.ncf",
> //                      "sample.nc APCP",
> //                      "sample.grb HGT/Z0 gt100.0" ];
> //
> mask_poly[] = [ "MET_BASE/out/gen_poly_mask/CONUS_poly.nc",
>                 "MET_BASE/data/poly/MDW.poly" ];
>
> READOUT RUNTIME ERROR:
>
> *** Running Grid-Stat on APCP using netCDF input for both forecast
and observation ***
> GSL_RNG_TYPE=mt19937
> GSL_RNG_SEED=18446744072066837068
> Forecast File:
/home/dhartung/METv2.0/conv/out/pcp_combine/conv_12L_2008010812V_12A.nc
> Observation File:
/home/dhartung/METv2.0/obs/out/pcp_combine/truth_12L_2008010812V_12A.nc
> Configuration File:
/home/dhartung/METv2.0/conv/config/GridStatConfig_APCP_12
>
>
> ERROR: parse_poly_mask() -> the dimensions of the masking region
(185, 129) must match the dimensions of the data (265, 171).
>
>
> Thanks for the help!
> Dan
>
>


------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #38921] question regarding using poly mask in grid stat
From: Dan Hartung
Time: Tue Jun 29 11:02:04 2010

Thanks Paul, that did the trick!

-Dan

On Jun 29, 2010, at 11:54 AM, RAL HelpDesk {for Paul Oldenburg} wrote:

> Dan,
>
> It looks like you are trying to apply the NetCDF output of
gen_poly_mask, called
> CONUS_poly.nc, to your data.  That file was generated by applying
the polygon
> mask MET_BASE/data/poly/CONUS.poly to the MET test data, not to your
own data.
> That is why the size of CONUS_poly.nc does not match the size of
your own data
> file.  The easiest approach to fixing this problem is probably to
use
> MET_BASE/data/poly/CONUS.poly directly, like so:
>
> mask_poly[] = [ "MET_BASE/data/poly/CONUS.poly",
>                "MET_BASE/data/poly/MDW.poly" ];
>
> The other option is to run gen_poly_mask using CONUS.poly and your
own forecast
> data file to generate a new CONUS_poly.nc file.  This might be the
better route
> if you intend to apply the CONUS mask to a large number of forecast
data files.
>
> MET_BASE/bin/gen_poly_mask \
>
/home/dhartung/METv2.0/conv/out/pcp_combine/conv_12L_2008010812V_12A.nc
\
>  MET_BASE/data/poly/CONUS.poly \
>  MET_BASE/out/gen_poly_mask/CONUS_poly.nc
>
> Please let us know if you have any other questions.
>
> Thanks,
>
> Paul
>
>
> RAL HelpDesk {for Dan Hartung} wrote:
>> Tue Jun 29 10:05:03 2010: Request 38921 was acted upon.
>> Transaction: Ticket created by daniel.hartung at ssec.wisc.edu
>>       Queue: met_help
>>     Subject: question regarding using poly mask in grid stat
>>       Owner: Nobody
>>  Requestors: daniel.hartung at ssec.wisc.edu
>>      Status: new
>> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=38921 >
>>
>>
>> Hi,
>>
>> I am trying to run grid stat with some output files from
pcp_combine over both the full domain and also the masked domain that
is laid out by MDW.poly.  The relevant lines of my config file are
below along with the error that I am getting when I try and run
grid_stat.  Isn't the point of the mask to run the statistics over a
subset of the data?  That is why I am confused about the grid
dimension error.
>>
>> FROM CONFIG FILE:
>>
>> // Specify a comma-separated list of grids to be used in masking
the data over
>> // which to perform scoring.  An empty list indicates that no
masking grid
>> // should be performed.  The standard NCEP grids are named "GNNN"
where NNN
>> // indicates the three digit grid number.  Enter "FULL" to score
over the
>> // entire domain.
>> // http://www.nco.ncep.noaa.gov/pmb/docs/on388/tableb.html
>> //
>> // e.g. mask_grid[] = [ "FULL" ];
>> //
>> mask_grid[] = [ "FULL" ];
>>
>> //
>> // Specify a comma-separated list of masking regions to be applied.
>> // An empty list indicates that no additional masks should be used.
>> // The masking regions may be defined in one of 4 ways:
>> //
>> // (1) An ASCII file containing a lat/lon polygon.
>> //     Latitude in degrees north and longitude in degrees east.
>> //     By default, the first and last polygon points are connected.
>> //     e.g. "MET_BASE/data/poly/EAST.poly" which consists of n
points:
>> //          "poly_name lat1 lon1 lat2 lon2... latn lonn"
>> //
>> // (2) The NetCDF output of the gen_poly_mask tool.
>> //
>> // (3) A NetCDF data file, followed by the name of the NetCDF
variable
>> //     to be used, and optionally, a threshold to be applied to the
field.
>> //     e.g. "sample.nc var_name gt0.00"
>> //
>> // (4) A GRIB data file, followed by a description of the field
>> //     to be used, and optionally, a threshold to be applied to the
field.
>> //     e.g. "sample.grb APCP/A3 gt0.00"
>> //
>> // Any NetCDF or GRIB file used must have the same grid dimensions
as the
>> // data being verified.
>> //
>> // MET_BASE may be used in the path for the files above.
>> //
>> // e.g. mask_poly[] = [ "MET_BASE/data/poly/EAST.poly",
>> //                      "poly_mask.ncf",
>> //                      "sample.nc APCP",
>> //                      "sample.grb HGT/Z0 gt100.0" ];
>> //
>> mask_poly[] = [ "MET_BASE/out/gen_poly_mask/CONUS_poly.nc",
>>                "MET_BASE/data/poly/MDW.poly" ];
>>
>> READOUT RUNTIME ERROR:
>>
>> *** Running Grid-Stat on APCP using netCDF input for both forecast
and observation ***
>> GSL_RNG_TYPE=mt19937
>> GSL_RNG_SEED=18446744072066837068
>> Forecast File:
/home/dhartung/METv2.0/conv/out/pcp_combine/conv_12L_2008010812V_12A.nc
>> Observation File:
/home/dhartung/METv2.0/obs/out/pcp_combine/truth_12L_2008010812V_12A.nc
>> Configuration File:
/home/dhartung/METv2.0/conv/config/GridStatConfig_APCP_12
>>
>>
>> ERROR: parse_poly_mask() -> the dimensions of the masking region
(185, 129) must match the dimensions of the data (265, 171).
>>
>>
>> Thanks for the help!
>> Dan
>>
>>
>
>


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


More information about the Met_help mailing list