[Met_help] [rt.rap.ucar.edu #93532] History for point stat questions

John Halley Gotway via RT met_help at ucar.edu
Wed Feb 17 10:48:36 MST 2021


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

Hi John, 

 

A few questions about point stat:

1.         Are grid relative winds automatically converted to Earth relative
winds?

2.        For observation that fall below the model surface, are model
fields interpolated to observation location?  If so, how?

 

Thanks!

Liz

 

 




 

Elizabeth Satterfield
Editor, Monthly Weather Review

Chair, AMS Committee on Probability and Statistics

Meteorologist, Code 7531
Marine Meteorology Division
U.S. Naval Research Laboratory
T 831.656.4056  F 831.656.4026
 <http://www.nrl.navy.mil/> www.nrl.navy.mil

__________________________________________________________________
FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
Any misuse or unauthorized disclosure may result in both civil and criminal
penalties.

 

 



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

Subject: point stat questions
From: John Halley Gotway
Time: Thu Dec 19 07:04:54 2019

Liz,

(1) When reading data from GRIB1 and GRIB2 files, MET automatically
checks
the flag in the header indicating whether winds are defined as grid or
earth-relative.  If grid relative, it searches the file for the
correspond
U or V pair and uses both U and V to rotate them to be earth-relative.

That logic does NOT work for python embedding.  I have some ideas
about how
to make it work but those changes are not slated for the met-9.0
release.

I assume you’d like to see this enhancement?  And perhaps we’ve
already
talked about this?

(2) Config options were added in met-8.1 for the Air Force which
address
this issue.  By default this logic is disabled but can be enabled
using the
“topo_mask” config file dictionary.  FYI, the “land_mask” dictionary
was
also added at the same time.  Below is a link to the default point-
stat
config file followed by an excerpt from it.

John

https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default

// Topography
// For SURFACE message types, only use observations where the topo -
station
// elevation difference meets the use_obs_thresh threshold.
// For the observations kept, when interpolating forecast data to the
// observation location, only use forecast grid points where the topo
-
station
// difference meets the interp_fcst_thresh threshold.
// topo_mask.flag may be set separately in each "obs.field" entry.
//
topo_mask = {
flag = FALSE;
file_name = [];
field = { name = "TOPO"; level = "L0"; }
regrid = { method = BILIN; width = 2; }
use_obs_thresh = ge-100&&le100;
interp_fcst_thresh = ge-50&&le50;
}

On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via RT <
met_help at ucar.edu> wrote:

>
> Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> Transaction: Ticket created by Elizabeth.Satterfield at nrlmry.navy.mil
>        Queue: met_help
>      Subject: point stat questions
>        Owner: Nobody
>   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
>
> Hi John,
>
>
>
> A few questions about point stat:
>
> 1.         Are grid relative winds automatically converted to Earth
> relative
> winds?
>
> 2.        For observation that fall below the model surface, are
model
> fields interpolated to observation location?  If so, how?
>
>
>
> Thanks!
>
> Liz
>
>
>
>
>
>
>
>
>
>
> Elizabeth Satterfield
> Editor, Monthly Weather Review
>
> Chair, AMS Committee on Probability and Statistics
>
> Meteorologist, Code 7531
> Marine Meteorology Division
> U.S. Naval Research Laboratory
> T 831.656.4056  F 831.656.4026
>  <http://www.nrl.navy.mil/> www.nrl.navy.mil
>
> __________________________________________________________________
> FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> Any misuse or unauthorized disclosure may result in both civil and
criminal
> penalties.
>
>
>
>
>
>
>

------------------------------------------------
Subject: point stat questions
From: Tsu, Mr. Justin
Time: Fri Dec 20 17:18:07 2019

Thanks John,

When using topo_mask,  will point_Stat understand a python embedded
file?  The files we use are named '
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
These are projection gridded data of terrain heights.   Would this
look something like this?

topo_mask = {
   flag               = FALSE;
   file_name          = ["./read_NRL_binary
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
   field              = { name = "TOPO"; level = "L0"; }
   regrid             = { method = BILIN; width = 2; }
   use_obs_thresh     = ge-100&&le100;
   interp_fcst_thresh = ge-50&&le50;
}
And how does point_stat know which HDF5 varible to use as the point of
comparison to the model terrain height?

Happy holidays!
Justin
-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Thursday, December 19, 2019 6:05 AM
To: Satterfield, Dr. Elizabeth
Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
Subject: Re: [rt.rap.ucar.edu #93532] point stat questions

Liz,

(1) When reading data from GRIB1 and GRIB2 files, MET automatically
checks
the flag in the header indicating whether winds are defined as grid or
earth-relative.  If grid relative, it searches the file for the
correspond
U or V pair and uses both U and V to rotate them to be earth-relative.

That logic does NOT work for python embedding.  I have some ideas
about how
to make it work but those changes are not slated for the met-9.0
release.

I assume you’d like to see this enhancement?  And perhaps we’ve
already
talked about this?

(2) Config options were added in met-8.1 for the Air Force which
address
this issue.  By default this logic is disabled but can be enabled
using the
“topo_mask” config file dictionary.  FYI, the “land_mask” dictionary
was
also added at the same time.  Below is a link to the default point-
stat
config file followed by an excerpt from it.

John

https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default

// Topography
// For SURFACE message types, only use observations where the topo -
station
// elevation difference meets the use_obs_thresh threshold.
// For the observations kept, when interpolating forecast data to the
// observation location, only use forecast grid points where the topo
-
station
// difference meets the interp_fcst_thresh threshold.
// topo_mask.flag may be set separately in each "obs.field" entry.
//
topo_mask = {
flag = FALSE;
file_name = [];
field = { name = "TOPO"; level = "L0"; }
regrid = { method = BILIN; width = 2; }
use_obs_thresh = ge-100&&le100;
interp_fcst_thresh = ge-50&&le50;
}

On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via RT <
met_help at ucar.edu> wrote:

>
> Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> Transaction: Ticket created by Elizabeth.Satterfield at nrlmry.navy.mil
>        Queue: met_help
>      Subject: point stat questions
>        Owner: Nobody
>   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
>
> Hi John,
>
>
>
> A few questions about point stat:
>
> 1.         Are grid relative winds automatically converted to Earth
> relative
> winds?
>
> 2.        For observation that fall below the model surface, are
model
> fields interpolated to observation location?  If so, how?
>
>
>
> Thanks!
>
> Liz
>
>
>
>
>
>
>
>
>
>
> Elizabeth Satterfield
> Editor, Monthly Weather Review
>
> Chair, AMS Committee on Probability and Statistics
>
> Meteorologist, Code 7531
> Marine Meteorology Division
> U.S. Naval Research Laboratory
> T 831.656.4056  F 831.656.4026
>  <http://www.nrl.navy.mil/> www.nrl.navy.mil
>
> __________________________________________________________________
> FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> Any misuse or unauthorized disclosure may result in both civil and
criminal
> penalties.
>
>
>
>
>
>
>


------------------------------------------------
Subject: point stat questions
From: Tsu, Mr. Justin
Time: Wed Jan 08 14:32:18 2020

Hey John,

This email probably got lost during the holidays.  Let me know if you
can get around to helping me out with this problem!

Thanks and happy new year!
Justin

-----Original Message-----
From: Tsu, Mr. Justin
Sent: Friday, December 20, 2019 4:18 PM
To: 'met_help at ucar.edu'
Subject: RE: [rt.rap.ucar.edu #93532] point stat questions

Thanks John,

When using topo_mask,  will point_Stat understand a python embedded
file?  The files we use are named '
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
These are projection gridded data of terrain heights.   Would this
look something like this?

topo_mask = {
   flag               = FALSE;
   file_name          = ["./read_NRL_binary
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
   field              = { name = "TOPO"; level = "L0"; }
   regrid             = { method = BILIN; width = 2; }
   use_obs_thresh     = ge-100&&le100;
   interp_fcst_thresh = ge-50&&le50;
}
And how does point_stat know which HDF5 varible to use as the point of
comparison to the model terrain height?

Happy holidays!
Justin
-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Thursday, December 19, 2019 6:05 AM
To: Satterfield, Dr. Elizabeth
Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
Subject: Re: [rt.rap.ucar.edu #93532] point stat questions

Liz,

(1) When reading data from GRIB1 and GRIB2 files, MET automatically
checks
the flag in the header indicating whether winds are defined as grid or
earth-relative.  If grid relative, it searches the file for the
correspond
U or V pair and uses both U and V to rotate them to be earth-relative.

That logic does NOT work for python embedding.  I have some ideas
about how
to make it work but those changes are not slated for the met-9.0
release.

I assume you’d like to see this enhancement?  And perhaps we’ve
already
talked about this?

(2) Config options were added in met-8.1 for the Air Force which
address
this issue.  By default this logic is disabled but can be enabled
using the
“topo_mask” config file dictionary.  FYI, the “land_mask” dictionary
was
also added at the same time.  Below is a link to the default point-
stat
config file followed by an excerpt from it.

John

https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default

// Topography
// For SURFACE message types, only use observations where the topo -
station
// elevation difference meets the use_obs_thresh threshold.
// For the observations kept, when interpolating forecast data to the
// observation location, only use forecast grid points where the topo
-
station
// difference meets the interp_fcst_thresh threshold.
// topo_mask.flag may be set separately in each "obs.field" entry.
//
topo_mask = {
flag = FALSE;
file_name = [];
field = { name = "TOPO"; level = "L0"; }
regrid = { method = BILIN; width = 2; }
use_obs_thresh = ge-100&&le100;
interp_fcst_thresh = ge-50&&le50;
}

On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via RT <
met_help at ucar.edu> wrote:

>
> Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> Transaction: Ticket created by Elizabeth.Satterfield at nrlmry.navy.mil
>        Queue: met_help
>      Subject: point stat questions
>        Owner: Nobody
>   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
>
> Hi John,
>
>
>
> A few questions about point stat:
>
> 1.         Are grid relative winds automatically converted to Earth
> relative
> winds?
>
> 2.        For observation that fall below the model surface, are
model
> fields interpolated to observation location?  If so, how?
>
>
>
> Thanks!
>
> Liz
>
>
>
>
>
>
>
>
>
>
> Elizabeth Satterfield
> Editor, Monthly Weather Review
>
> Chair, AMS Committee on Probability and Statistics
>
> Meteorologist, Code 7531
> Marine Meteorology Division
> U.S. Naval Research Laboratory
> T 831.656.4056  F 831.656.4026
>  <http://www.nrl.navy.mil/> www.nrl.navy.mil
>
> __________________________________________________________________
> FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> Any misuse or unauthorized disclosure may result in both civil and
criminal
> penalties.
>
>
>
>
>
>
>


------------------------------------------------
Subject: point stat questions
From: John Halley Gotway
Time: Thu Jan 09 11:26:35 2020

Justin,

Sorry for losing this in the shuffle.  It's a hectic time of year.

So your question is whether or not Python-embedding will work when
setting
the "topo_mask" dictionary in the Point-Stat config file.  I just
tested
this out (albeit with the development version of the code) and it
seems to
have worked fine, just as expected.  Remember though that for
python-embedding you set the file_name to the constant string
"PYTHON_NUMPY" and the field "name" to the python command you want to
execute to read the data.

It looks like you were setting file_name = python command, and that
won't
work.

Thanks,
John

//
// Topography
//
topo_mask = {
   flag               = FALSE;
   file_name          = [ "PYTHON_NUMPY" ];
   field              = { name = "read_NRL_binary.py
trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld"; }
   regrid             = { method = BILIN; width = 2; }
   use_obs_thresh     = ge-100&&le100;
   interp_fcst_thresh = ge-50&&le50;
}



On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Hey John,
>
> This email probably got lost during the holidays.  Let me know if
you can
> get around to helping me out with this problem!
>
> Thanks and happy new year!
> Justin
>
> -----Original Message-----
> From: Tsu, Mr. Justin
> Sent: Friday, December 20, 2019 4:18 PM
> To: 'met_help at ucar.edu'
> Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
>
> Thanks John,
>
> When using topo_mask,  will point_Stat understand a python embedded
file?
> The files we use are named '
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> These are projection gridded data of terrain heights.   Would this
look
> something like this?
>
> topo_mask = {
>    flag               = FALSE;
>    file_name          = ["./read_NRL_binary
> terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
>    field              = { name = "TOPO"; level = "L0"; }
>    regrid             = { method = BILIN; width = 2; }
>    use_obs_thresh     = ge-100&&le100;
>    interp_fcst_thresh = ge-50&&le50;
> }
> And how does point_stat know which HDF5 varible to use as the point
of
> comparison to the model terrain height?
>
> Happy holidays!
> Justin
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, December 19, 2019 6:05 AM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>
> Liz,
>
> (1) When reading data from GRIB1 and GRIB2 files, MET automatically
checks
> the flag in the header indicating whether winds are defined as grid
or
> earth-relative.  If grid relative, it searches the file for the
correspond
> U or V pair and uses both U and V to rotate them to be earth-
relative.
>
> That logic does NOT work for python embedding.  I have some ideas
about how
> to make it work but those changes are not slated for the met-9.0
release.
>
> I assume you’d like to see this enhancement?  And perhaps we’ve
already
> talked about this?
>
> (2) Config options were added in met-8.1 for the Air Force which
address
> this issue.  By default this logic is disabled but can be enabled
using the
> “topo_mask” config file dictionary.  FYI, the “land_mask” dictionary
was
> also added at the same time.  Below is a link to the default point-
stat
> config file followed by an excerpt from it.
>
> John
>
>
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
>
> // Topography
> // For SURFACE message types, only use observations where the topo -
> station
> // elevation difference meets the use_obs_thresh threshold.
> // For the observations kept, when interpolating forecast data to
the
> // observation location, only use forecast grid points where the
topo -
> station
> // difference meets the interp_fcst_thresh threshold.
> // topo_mask.flag may be set separately in each "obs.field" entry.
> //
> topo_mask = {
> flag = FALSE;
> file_name = [];
> field = { name = "TOPO"; level = "L0"; }
> regrid = { method = BILIN; width = 2; }
> use_obs_thresh = ge-100&&le100;
> interp_fcst_thresh = ge-50&&le50;
> }
>
> On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via RT <
> met_help at ucar.edu> wrote:
>
> >
> > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > Transaction: Ticket created by
Elizabeth.Satterfield at nrlmry.navy.mil
> >        Queue: met_help
> >      Subject: point stat questions
> >        Owner: Nobody
> >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> >
> > Hi John,
> >
> >
> >
> > A few questions about point stat:
> >
> > 1.         Are grid relative winds automatically converted to
Earth
> > relative
> > winds?
> >
> > 2.        For observation that fall below the model surface, are
model
> > fields interpolated to observation location?  If so, how?
> >
> >
> >
> > Thanks!
> >
> > Liz
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Elizabeth Satterfield
> > Editor, Monthly Weather Review
> >
> > Chair, AMS Committee on Probability and Statistics
> >
> > Meteorologist, Code 7531
> > Marine Meteorology Division
> > U.S. Naval Research Laboratory
> > T 831.656.4056  F 831.656.4026
> >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> >
> > __________________________________________________________________
> > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > Any misuse or unauthorized disclosure may result in both civil and
> criminal
> > penalties.
> >
> >
> >
> >
> >
> >
> >
>
>
>

------------------------------------------------
Subject: point stat questions
From: Tsu, Mr. Justin
Time: Fri Jan 17 11:26:01 2020

Thanks John,

I just implemented your changes for a simple point_stat case verifying
wind direction.   The point_stat debugging output looks exactly the
same as if I hadn't used topo_mask... how do I know if it actually
worked and terrain height got into point_stat?

Also, how does point_stat know what netCDF variable to check terrht
against?
Justin

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Thursday, January 9, 2020 10:27 AM
To: Satterfield, Dr. Elizabeth
Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
Subject: Re: [rt.rap.ucar.edu #93532] point stat questions

Justin,

Sorry for losing this in the shuffle.  It's a hectic time of year.

So your question is whether or not Python-embedding will work when
setting
the "topo_mask" dictionary in the Point-Stat config file.  I just
tested
this out (albeit with the development version of the code) and it
seems to
have worked fine, just as expected.  Remember though that for
python-embedding you set the file_name to the constant string
"PYTHON_NUMPY" and the field "name" to the python command you want to
execute to read the data.

It looks like you were setting file_name = python command, and that
won't
work.

Thanks,
John

//
// Topography
//
topo_mask = {
   flag               = FALSE;
   file_name          = [ "PYTHON_NUMPY" ];
   field              = { name = "read_NRL_binary.py
trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld"; }
   regrid             = { method = BILIN; width = 2; }
   use_obs_thresh     = ge-100&&le100;
   interp_fcst_thresh = ge-50&&le50;
}



On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Hey John,
>
> This email probably got lost during the holidays.  Let me know if
you can
> get around to helping me out with this problem!
>
> Thanks and happy new year!
> Justin
>
> -----Original Message-----
> From: Tsu, Mr. Justin
> Sent: Friday, December 20, 2019 4:18 PM
> To: 'met_help at ucar.edu'
> Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
>
> Thanks John,
>
> When using topo_mask,  will point_Stat understand a python embedded
file?
> The files we use are named '
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> These are projection gridded data of terrain heights.   Would this
look
> something like this?
>
> topo_mask = {
>    flag               = FALSE;
>    file_name          = ["./read_NRL_binary
> terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
>    field              = { name = "TOPO"; level = "L0"; }
>    regrid             = { method = BILIN; width = 2; }
>    use_obs_thresh     = ge-100&&le100;
>    interp_fcst_thresh = ge-50&&le50;
> }
> And how does point_stat know which HDF5 varible to use as the point
of
> comparison to the model terrain height?
>
> Happy holidays!
> Justin
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, December 19, 2019 6:05 AM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>
> Liz,
>
> (1) When reading data from GRIB1 and GRIB2 files, MET automatically
checks
> the flag in the header indicating whether winds are defined as grid
or
> earth-relative.  If grid relative, it searches the file for the
correspond
> U or V pair and uses both U and V to rotate them to be earth-
relative.
>
> That logic does NOT work for python embedding.  I have some ideas
about how
> to make it work but those changes are not slated for the met-9.0
release.
>
> I assume you’d like to see this enhancement?  And perhaps we’ve
already
> talked about this?
>
> (2) Config options were added in met-8.1 for the Air Force which
address
> this issue.  By default this logic is disabled but can be enabled
using the
> “topo_mask” config file dictionary.  FYI, the “land_mask” dictionary
was
> also added at the same time.  Below is a link to the default point-
stat
> config file followed by an excerpt from it.
>
> John
>
>
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
>
> // Topography
> // For SURFACE message types, only use observations where the topo -
> station
> // elevation difference meets the use_obs_thresh threshold.
> // For the observations kept, when interpolating forecast data to
the
> // observation location, only use forecast grid points where the
topo -
> station
> // difference meets the interp_fcst_thresh threshold.
> // topo_mask.flag may be set separately in each "obs.field" entry.
> //
> topo_mask = {
> flag = FALSE;
> file_name = [];
> field = { name = "TOPO"; level = "L0"; }
> regrid = { method = BILIN; width = 2; }
> use_obs_thresh = ge-100&&le100;
> interp_fcst_thresh = ge-50&&le50;
> }
>
> On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via RT <
> met_help at ucar.edu> wrote:
>
> >
> > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > Transaction: Ticket created by
Elizabeth.Satterfield at nrlmry.navy.mil
> >        Queue: met_help
> >      Subject: point stat questions
> >        Owner: Nobody
> >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> >
> > Hi John,
> >
> >
> >
> > A few questions about point stat:
> >
> > 1.         Are grid relative winds automatically converted to
Earth
> > relative
> > winds?
> >
> > 2.        For observation that fall below the model surface, are
model
> > fields interpolated to observation location?  If so, how?
> >
> >
> >
> > Thanks!
> >
> > Liz
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Elizabeth Satterfield
> > Editor, Monthly Weather Review
> >
> > Chair, AMS Committee on Probability and Statistics
> >
> > Meteorologist, Code 7531
> > Marine Meteorology Division
> > U.S. Naval Research Laboratory
> > T 831.656.4056  F 831.656.4026
> >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> >
> > __________________________________________________________________
> > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > Any misuse or unauthorized disclosure may result in both civil and
> criminal
> > penalties.
> >
> >
> >
> >
> >
> >
> >
>
>
>


------------------------------------------------
Subject: point stat questions
From: John Halley Gotway
Time: Fri Jan 17 12:05:55 2020

Justin,

Running Point-stat and verbosity level 3 causes these types of log
messages
to be printed:

DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type ADPSFC,
over
region FULL, for interpolation method GEOG_MATCH_SQUARE(9), using 3779
matched pairs.
DEBUG 3: Number of matched pairs  = 3779
DEBUG 3: Observations processed   = 116861
DEBUG 3: Rejected: SID exclusion  = 0
DEBUG 3: Rejected: obs type       = 103809
DEBUG 3: Rejected: valid time     = 0
DEBUG 3: Rejected: bad obs value  = 0
DEBUG 3: Rejected: off the grid   = 21
DEBUG 3: Rejected: topography     = 548
DEBUG 3: Rejected: level mismatch = 7675
DEBUG 3: Rejected: quality marker = 0
DEBUG 3: Rejected: message type   = 809
DEBUG 3: Rejected: masking region = 0
DEBUG 3: Rejected: bad fcst value = 220
DEBUG 3: Rejected: duplicates     = 0

The "topography" line indicates the number of point observations which
were
skipped due to the topography logic.  And they are skipped when...
(1) the model topo value or point obs elevation value are bad data.
(2) their difference exceeds the "use_obs_thresh" threshold

And we also write a DEBUG(4) log message about it:

DEBUG 4: Skipping observation for topography difference since 119.598
is
not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
[ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.

So please try rerunning with verbosity level 4 (-v 4) and check for
log
messages about "topography" or "geography".

Your next question...
   Also, how does point_stat know what netCDF variable to check terrht
against?

Point-Stat is comparing the model "terrht" against the observation
station
elevation, which is the 6th column of the 11-column point observation
format:

        The "met_point" ASCII format consists of 11 columns:
               Message_Type Station_ID Valid_Time(YYYYMMDD_HHMMSS)
               Lat(Deg North) Lon(Deg East) Elevation(msl)
               Var_Name(or GRIB_Code) Level Height(msl or agl)
               QC_String Observation_Value

This logic is used to discard point obs with large differences from
the
model elevation.

John

On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Thanks John,
>
> I just implemented your changes for a simple point_stat case
verifying
> wind direction.   The point_stat debugging output looks exactly the
same as
> if I hadn't used topo_mask... how do I know if it actually worked
and
> terrain height got into point_stat?
>
> Also, how does point_stat know what netCDF variable to check terrht
> against?
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, January 9, 2020 10:27 AM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>
> Justin,
>
> Sorry for losing this in the shuffle.  It's a hectic time of year.
>
> So your question is whether or not Python-embedding will work when
setting
> the "topo_mask" dictionary in the Point-Stat config file.  I just
tested
> this out (albeit with the development version of the code) and it
seems to
> have worked fine, just as expected.  Remember though that for
> python-embedding you set the file_name to the constant string
> "PYTHON_NUMPY" and the field "name" to the python command you want
to
> execute to read the data.
>
> It looks like you were setting file_name = python command, and that
won't
> work.
>
> Thanks,
> John
>
> //
> // Topography
> //
> topo_mask = {
>    flag               = FALSE;
>    file_name          = [ "PYTHON_NUMPY" ];
>    field              = { name = "read_NRL_binary.py
> trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld"; }
>    regrid             = { method = BILIN; width = 2; }
>    use_obs_thresh     = ge-100&&le100;
>    interp_fcst_thresh = ge-50&&le50;
> }
>
>
>
> On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Hey John,
> >
> > This email probably got lost during the holidays.  Let me know if
you can
> > get around to helping me out with this problem!
> >
> > Thanks and happy new year!
> > Justin
> >
> > -----Original Message-----
> > From: Tsu, Mr. Justin
> > Sent: Friday, December 20, 2019 4:18 PM
> > To: 'met_help at ucar.edu'
> > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Thanks John,
> >
> > When using topo_mask,  will point_Stat understand a python
embedded file?
> > The files we use are named '
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > These are projection gridded data of terrain heights.   Would this
look
> > something like this?
> >
> > topo_mask = {
> >    flag               = FALSE;
> >    file_name          = ["./read_NRL_binary
> >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> >    field              = { name = "TOPO"; level = "L0"; }
> >    regrid             = { method = BILIN; width = 2; }
> >    use_obs_thresh     = ge-100&&le100;
> >    interp_fcst_thresh = ge-50&&le50;
> > }
> > And how does point_stat know which HDF5 varible to use as the
point of
> > comparison to the model terrain height?
> >
> > Happy holidays!
> > Justin
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Thursday, December 19, 2019 6:05 AM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Liz,
> >
> > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> checks
> > the flag in the header indicating whether winds are defined as
grid or
> > earth-relative.  If grid relative, it searches the file for the
> correspond
> > U or V pair and uses both U and V to rotate them to be earth-
relative.
> >
> > That logic does NOT work for python embedding.  I have some ideas
about
> how
> > to make it work but those changes are not slated for the met-9.0
release.
> >
> > I assume you’d like to see this enhancement?  And perhaps we’ve
already
> > talked about this?
> >
> > (2) Config options were added in met-8.1 for the Air Force which
address
> > this issue.  By default this logic is disabled but can be enabled
using
> the
> > “topo_mask” config file dictionary.  FYI, the “land_mask”
dictionary was
> > also added at the same time.  Below is a link to the default
point-stat
> > config file followed by an excerpt from it.
> >
> > John
> >
> >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> >
> > // Topography
> > // For SURFACE message types, only use observations where the topo
-
> > station
> > // elevation difference meets the use_obs_thresh threshold.
> > // For the observations kept, when interpolating forecast data to
the
> > // observation location, only use forecast grid points where the
topo -
> > station
> > // difference meets the interp_fcst_thresh threshold.
> > // topo_mask.flag may be set separately in each "obs.field" entry.
> > //
> > topo_mask = {
> > flag = FALSE;
> > file_name = [];
> > field = { name = "TOPO"; level = "L0"; }
> > regrid = { method = BILIN; width = 2; }
> > use_obs_thresh = ge-100&&le100;
> > interp_fcst_thresh = ge-50&&le50;
> > }
> >
> > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via RT
<
> > met_help at ucar.edu> wrote:
> >
> > >
> > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > Transaction: Ticket created by
Elizabeth.Satterfield at nrlmry.navy.mil
> > >        Queue: met_help
> > >      Subject: point stat questions
> > >        Owner: Nobody
> > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > >       Status: new
> > >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> >
> > >
> > >
> > > Hi John,
> > >
> > >
> > >
> > > A few questions about point stat:
> > >
> > > 1.         Are grid relative winds automatically converted to
Earth
> > > relative
> > > winds?
> > >
> > > 2.        For observation that fall below the model surface, are
model
> > > fields interpolated to observation location?  If so, how?
> > >
> > >
> > >
> > > Thanks!
> > >
> > > Liz
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Elizabeth Satterfield
> > > Editor, Monthly Weather Review
> > >
> > > Chair, AMS Committee on Probability and Statistics
> > >
> > > Meteorologist, Code 7531
> > > Marine Meteorology Division
> > > U.S. Naval Research Laboratory
> > > T 831.656.4056  F 831.656.4026
> > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > >
> > >
__________________________________________________________________
> > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > Any misuse or unauthorized disclosure may result in both civil
and
> > criminal
> > > penalties.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
>
>
>

------------------------------------------------
Subject: point stat questions
From: Tsu, Mr. Justin
Time: Fri Jan 17 12:15:02 2020

Thanks for the quick reply.  Okay, I set it to verbosity 4 and got
nothing in the way of topography. I just saw the line for rejected
topography and see that it's 0:


[tsu at lorenz 02_POINT_STAT_WORK]$ point_stat PYTHON_NUMPY
sfc_2019072100.nc testConfig -v 4
DEBUG 1: Default Config File: /software/depot/met-8.1a/met-
8.1a/share/met//config/PointStatConfig_default
DEBUG 1: User Config File: testConfig
DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
Met2dDataFile object of type "FileType_Python_Numpy".
DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object
of type "FileType_Python_Numpy".
DEBUG 4: parse_conf_sid_exc() -> Station ID exclusion list contains 0
entries.
GSL_RNG_TYPE=mt19937
GSL_RNG_SEED=18446744071898014302
DEBUG 1: Forecast File: PYTHON_NUMPY
DEBUG 1: Observation File: sfc_2019072100.nc
DEBUG 2:
DEBUG 2:
--------------------------------------------------------------------------------
DEBUG 2:
DEBUG 2: Reading data for uuwind/zht_000010.
DEBUG 3: Use the observation grid.
DEBUG 3: Grid Definition: Projection: Mercator Nx: 127 Ny: 127
Lat_LL_radians: 0.0354 Lon_LL_radians: 1.9401 Lat_UR_radians: 0.8649
Lon_UR_radians: 0.9768 Mx: 130.8075 My: 130.8067 Bx: 253.7739 By:
-4.6309
DEBUG 2: Processing masking regions.
DEBUG 3: Processing grid mask: FULL
DEBUG 4: parse_grid_mask() -> parsing grid mask "FULL"
DEBUG 2: Processing geography data.
DEBUG 2: For uuwind/zht_000010 found 1 forecast levels, 0 climatology
mean levels, and 0 climatology standard deviation levels.
DEBUG 2:
DEBUG 2:
--------------------------------------------------------------------------------
DEBUG 2:
DEBUG 2: Searching 18034 observations from 18034 messages.
DEBUG 2:
DEBUG 2:
--------------------------------------------------------------------------------
DEBUG 2:
DEBUG 4: set FCST_UNITS:UNKNOWN
DEBUG 4: set OBS_UNITS:NA
DEBUG 2: Processing uuwind/zht_000010 versus wdir/Z2, for observation
type SYNOP, over region FULL, for interpolation method
BEST_SQUARE(10000), using 3238 pairs.
DEBUG 3: Number of matched pairs  = 3238
DEBUG 3: Observations processed   = 18034
DEBUG 3: Rejected: SID exclusion  = 0
DEBUG 3: Rejected: obs type       = 14718
DEBUG 3: Rejected: valid time     = 0
DEBUG 3: Rejected: bad obs value  = 0
DEBUG 3: Rejected: off the grid   = 78
DEBUG 3: Rejected: topography     = 0
DEBUG 3: Rejected: level mismatch = 0
DEBUG 3: Rejected: quality marker = 0
DEBUG 3: Rejected: message type   = 0
DEBUG 3: Rejected: masking region = 0
DEBUG 3: Rejected: bad fcst value = 0
DEBUG 3: Rejected: duplicates     = 0
DEBUG 2: Computing Continuous Statistics.

Would a hail mary way to see if this works to set my use_obs_thresh
and interp_fcst_thresh to equal 0? That way the ob has to be exactly
at the vertical level to pass the topography mask?  Ultimately I just
want to see if I am implementing the topo mask correctly

Justin


-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Friday, January 17, 2020 11:06 AM
To: Satterfield, Dr. Elizabeth
Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
Subject: Re: [rt.rap.ucar.edu #93532] point stat questions

Justin,

Running Point-stat and verbosity level 3 causes these types of log
messages
to be printed:

DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type ADPSFC,
over
region FULL, for interpolation method GEOG_MATCH_SQUARE(9), using 3779
matched pairs.
DEBUG 3: Number of matched pairs  = 3779
DEBUG 3: Observations processed   = 116861
DEBUG 3: Rejected: SID exclusion  = 0
DEBUG 3: Rejected: obs type       = 103809
DEBUG 3: Rejected: valid time     = 0
DEBUG 3: Rejected: bad obs value  = 0
DEBUG 3: Rejected: off the grid   = 21
DEBUG 3: Rejected: topography     = 548
DEBUG 3: Rejected: level mismatch = 7675
DEBUG 3: Rejected: quality marker = 0
DEBUG 3: Rejected: message type   = 809
DEBUG 3: Rejected: masking region = 0
DEBUG 3: Rejected: bad fcst value = 220
DEBUG 3: Rejected: duplicates     = 0

The "topography" line indicates the number of point observations which
were
skipped due to the topography logic.  And they are skipped when...
(1) the model topo value or point obs elevation value are bad data.
(2) their difference exceeds the "use_obs_thresh" threshold

And we also write a DEBUG(4) log message about it:

DEBUG 4: Skipping observation for topography difference since 119.598
is
not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
[ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.

So please try rerunning with verbosity level 4 (-v 4) and check for
log
messages about "topography" or "geography".

Your next question...
   Also, how does point_stat know what netCDF variable to check terrht
against?

Point-Stat is comparing the model "terrht" against the observation
station
elevation, which is the 6th column of the 11-column point observation
format:

        The "met_point" ASCII format consists of 11 columns:
               Message_Type Station_ID Valid_Time(YYYYMMDD_HHMMSS)
               Lat(Deg North) Lon(Deg East) Elevation(msl)
               Var_Name(or GRIB_Code) Level Height(msl or agl)
               QC_String Observation_Value

This logic is used to discard point obs with large differences from
the
model elevation.

John

On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Thanks John,
>
> I just implemented your changes for a simple point_stat case
verifying
> wind direction.   The point_stat debugging output looks exactly the
same as
> if I hadn't used topo_mask... how do I know if it actually worked
and
> terrain height got into point_stat?
>
> Also, how does point_stat know what netCDF variable to check terrht
> against?
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, January 9, 2020 10:27 AM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>
> Justin,
>
> Sorry for losing this in the shuffle.  It's a hectic time of year.
>
> So your question is whether or not Python-embedding will work when
setting
> the "topo_mask" dictionary in the Point-Stat config file.  I just
tested
> this out (albeit with the development version of the code) and it
seems to
> have worked fine, just as expected.  Remember though that for
> python-embedding you set the file_name to the constant string
> "PYTHON_NUMPY" and the field "name" to the python command you want
to
> execute to read the data.
>
> It looks like you were setting file_name = python command, and that
won't
> work.
>
> Thanks,
> John
>
> //
> // Topography
> //
> topo_mask = {
>    flag               = FALSE;
>    file_name          = [ "PYTHON_NUMPY" ];
>    field              = { name = "read_NRL_binary.py
> trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld"; }
>    regrid             = { method = BILIN; width = 2; }
>    use_obs_thresh     = ge-100&&le100;
>    interp_fcst_thresh = ge-50&&le50;
> }
>
>
>
> On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Hey John,
> >
> > This email probably got lost during the holidays.  Let me know if
you can
> > get around to helping me out with this problem!
> >
> > Thanks and happy new year!
> > Justin
> >
> > -----Original Message-----
> > From: Tsu, Mr. Justin
> > Sent: Friday, December 20, 2019 4:18 PM
> > To: 'met_help at ucar.edu'
> > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Thanks John,
> >
> > When using topo_mask,  will point_Stat understand a python
embedded file?
> > The files we use are named '
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > These are projection gridded data of terrain heights.   Would this
look
> > something like this?
> >
> > topo_mask = {
> >    flag               = FALSE;
> >    file_name          = ["./read_NRL_binary
> >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> >    field              = { name = "TOPO"; level = "L0"; }
> >    regrid             = { method = BILIN; width = 2; }
> >    use_obs_thresh     = ge-100&&le100;
> >    interp_fcst_thresh = ge-50&&le50;
> > }
> > And how does point_stat know which HDF5 varible to use as the
point of
> > comparison to the model terrain height?
> >
> > Happy holidays!
> > Justin
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Thursday, December 19, 2019 6:05 AM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Liz,
> >
> > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> checks
> > the flag in the header indicating whether winds are defined as
grid or
> > earth-relative.  If grid relative, it searches the file for the
> correspond
> > U or V pair and uses both U and V to rotate them to be earth-
relative.
> >
> > That logic does NOT work for python embedding.  I have some ideas
about
> how
> > to make it work but those changes are not slated for the met-9.0
release.
> >
> > I assume you’d like to see this enhancement?  And perhaps we’ve
already
> > talked about this?
> >
> > (2) Config options were added in met-8.1 for the Air Force which
address
> > this issue.  By default this logic is disabled but can be enabled
using
> the
> > “topo_mask” config file dictionary.  FYI, the “land_mask”
dictionary was
> > also added at the same time.  Below is a link to the default
point-stat
> > config file followed by an excerpt from it.
> >
> > John
> >
> >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> >
> > // Topography
> > // For SURFACE message types, only use observations where the topo
-
> > station
> > // elevation difference meets the use_obs_thresh threshold.
> > // For the observations kept, when interpolating forecast data to
the
> > // observation location, only use forecast grid points where the
topo -
> > station
> > // difference meets the interp_fcst_thresh threshold.
> > // topo_mask.flag may be set separately in each "obs.field" entry.
> > //
> > topo_mask = {
> > flag = FALSE;
> > file_name = [];
> > field = { name = "TOPO"; level = "L0"; }
> > regrid = { method = BILIN; width = 2; }
> > use_obs_thresh = ge-100&&le100;
> > interp_fcst_thresh = ge-50&&le50;
> > }
> >
> > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via RT
<
> > met_help at ucar.edu> wrote:
> >
> > >
> > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > Transaction: Ticket created by
Elizabeth.Satterfield at nrlmry.navy.mil
> > >        Queue: met_help
> > >      Subject: point stat questions
> > >        Owner: Nobody
> > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > >       Status: new
> > >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> >
> > >
> > >
> > > Hi John,
> > >
> > >
> > >
> > > A few questions about point stat:
> > >
> > > 1.         Are grid relative winds automatically converted to
Earth
> > > relative
> > > winds?
> > >
> > > 2.        For observation that fall below the model surface, are
model
> > > fields interpolated to observation location?  If so, how?
> > >
> > >
> > >
> > > Thanks!
> > >
> > > Liz
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Elizabeth Satterfield
> > > Editor, Monthly Weather Review
> > >
> > > Chair, AMS Committee on Probability and Statistics
> > >
> > > Meteorologist, Code 7531
> > > Marine Meteorology Division
> > > U.S. Naval Research Laboratory
> > > T 831.656.4056  F 831.656.4026
> > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > >
> > >
__________________________________________________________________
> > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > Any misuse or unauthorized disclosure may result in both civil
and
> > criminal
> > > penalties.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
>
>
>


------------------------------------------------
Subject: point stat questions
From: John Halley Gotway
Time: Fri Jan 17 12:25:02 2020

Yeah definitely.  You could try setting the thresholds that way.  FYI,
you
should also see a "DEBUG 2" statement like this:
DEBUG 2: Processing geography data.

Feel free to send along your latest Point-Stat config file and I could
look
for issues in your settings.

Thanks,
John

On Fri, Jan 17, 2020 at 12:15 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Thanks for the quick reply.  Okay, I set it to verbosity 4 and got
nothing
> in the way of topography. I just saw the line for rejected
topography and
> see that it's 0:
>
>
> [tsu at lorenz 02_POINT_STAT_WORK]$ point_stat PYTHON_NUMPY
sfc_2019072100.nc
> testConfig -v 4
> DEBUG 1: Default Config File:
> /software/depot/met-8.1a/met-
8.1a/share/met//config/PointStatConfig_default
> DEBUG 1: User Config File: testConfig
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_Python_Numpy".
> DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo
object of
> type "FileType_Python_Numpy".
> DEBUG 4: parse_conf_sid_exc() -> Station ID exclusion list contains
0
> entries.
> GSL_RNG_TYPE=mt19937
> GSL_RNG_SEED=18446744071898014302
> DEBUG 1: Forecast File: PYTHON_NUMPY
> DEBUG 1: Observation File: sfc_2019072100.nc
> DEBUG 2:
> DEBUG 2:
>
--------------------------------------------------------------------------------
> DEBUG 2:
> DEBUG 2: Reading data for uuwind/zht_000010.
> DEBUG 3: Use the observation grid.
> DEBUG 3: Grid Definition: Projection: Mercator Nx: 127 Ny: 127
> Lat_LL_radians: 0.0354 Lon_LL_radians: 1.9401 Lat_UR_radians: 0.8649
> Lon_UR_radians: 0.9768 Mx: 130.8075 My: 130.8067 Bx: 253.7739 By:
-4.6309
> DEBUG 2: Processing masking regions.
> DEBUG 3: Processing grid mask: FULL
> DEBUG 4: parse_grid_mask() -> parsing grid mask "FULL"
> DEBUG 2: Processing geography data.
> DEBUG 2: For uuwind/zht_000010 found 1 forecast levels, 0
climatology mean
> levels, and 0 climatology standard deviation levels.
> DEBUG 2:
> DEBUG 2:
>
--------------------------------------------------------------------------------
> DEBUG 2:
> DEBUG 2: Searching 18034 observations from 18034 messages.
> DEBUG 2:
> DEBUG 2:
>
--------------------------------------------------------------------------------
> DEBUG 2:
> DEBUG 4: set FCST_UNITS:UNKNOWN
> DEBUG 4: set OBS_UNITS:NA
> DEBUG 2: Processing uuwind/zht_000010 versus wdir/Z2, for
observation type
> SYNOP, over region FULL, for interpolation method
BEST_SQUARE(10000), using
> 3238 pairs.
> DEBUG 3: Number of matched pairs  = 3238
> DEBUG 3: Observations processed   = 18034
> DEBUG 3: Rejected: SID exclusion  = 0
> DEBUG 3: Rejected: obs type       = 14718
> DEBUG 3: Rejected: valid time     = 0
> DEBUG 3: Rejected: bad obs value  = 0
> DEBUG 3: Rejected: off the grid   = 78
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: level mismatch = 0
> DEBUG 3: Rejected: quality marker = 0
> DEBUG 3: Rejected: message type   = 0
> DEBUG 3: Rejected: masking region = 0
> DEBUG 3: Rejected: bad fcst value = 0
> DEBUG 3: Rejected: duplicates     = 0
> DEBUG 2: Computing Continuous Statistics.
>
> Would a hail mary way to see if this works to set my use_obs_thresh
and
> interp_fcst_thresh to equal 0? That way the ob has to be exactly at
the
> vertical level to pass the topography mask?  Ultimately I just want
to see
> if I am implementing the topo mask correctly
>
> Justin
>
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Friday, January 17, 2020 11:06 AM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>
> Justin,
>
> Running Point-stat and verbosity level 3 causes these types of log
messages
> to be printed:
>
> DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type
ADPSFC, over
> region FULL, for interpolation method GEOG_MATCH_SQUARE(9), using
3779
> matched pairs.
> DEBUG 3: Number of matched pairs  = 3779
> DEBUG 3: Observations processed   = 116861
> DEBUG 3: Rejected: SID exclusion  = 0
> DEBUG 3: Rejected: obs type       = 103809
> DEBUG 3: Rejected: valid time     = 0
> DEBUG 3: Rejected: bad obs value  = 0
> DEBUG 3: Rejected: off the grid   = 21
> DEBUG 3: Rejected: topography     = 548
> DEBUG 3: Rejected: level mismatch = 7675
> DEBUG 3: Rejected: quality marker = 0
> DEBUG 3: Rejected: message type   = 809
> DEBUG 3: Rejected: masking region = 0
> DEBUG 3: Rejected: bad fcst value = 220
> DEBUG 3: Rejected: duplicates     = 0
>
> The "topography" line indicates the number of point observations
which were
> skipped due to the topography logic.  And they are skipped when...
> (1) the model topo value or point obs elevation value are bad data.
> (2) their difference exceeds the "use_obs_thresh" threshold
>
> And we also write a DEBUG(4) log message about it:
>
> DEBUG 4: Skipping observation for topography difference since
119.598 is
> not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> [ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.
>
> So please try rerunning with verbosity level 4 (-v 4) and check for
log
> messages about "topography" or "geography".
>
> Your next question...
>    Also, how does point_stat know what netCDF variable to check
terrht
> against?
>
> Point-Stat is comparing the model "terrht" against the observation
station
> elevation, which is the 6th column of the 11-column point
observation
> format:
>
>         The "met_point" ASCII format consists of 11 columns:
>                Message_Type Station_ID Valid_Time(YYYYMMDD_HHMMSS)
>                Lat(Deg North) Lon(Deg East) Elevation(msl)
>                Var_Name(or GRIB_Code) Level Height(msl or agl)
>                QC_String Observation_Value
>
> This logic is used to discard point obs with large differences from
the
> model elevation.
>
> John
>
> On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Thanks John,
> >
> > I just implemented your changes for a simple point_stat case
verifying
> > wind direction.   The point_stat debugging output looks exactly
the same
> as
> > if I hadn't used topo_mask... how do I know if it actually worked
and
> > terrain height got into point_stat?
> >
> > Also, how does point_stat know what netCDF variable to check
terrht
> > against?
> > Justin
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Thursday, January 9, 2020 10:27 AM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Justin,
> >
> > Sorry for losing this in the shuffle.  It's a hectic time of year.
> >
> > So your question is whether or not Python-embedding will work when
> setting
> > the "topo_mask" dictionary in the Point-Stat config file.  I just
tested
> > this out (albeit with the development version of the code) and it
seems
> to
> > have worked fine, just as expected.  Remember though that for
> > python-embedding you set the file_name to the constant string
> > "PYTHON_NUMPY" and the field "name" to the python command you want
to
> > execute to read the data.
> >
> > It looks like you were setting file_name = python command, and
that won't
> > work.
> >
> > Thanks,
> > John
> >
> > //
> > // Topography
> > //
> > topo_mask = {
> >    flag               = FALSE;
> >    file_name          = [ "PYTHON_NUMPY" ];
> >    field              = { name = "read_NRL_binary.py
> > trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld";
}
> >    regrid             = { method = BILIN; width = 2; }
> >    use_obs_thresh     = ge-100&&le100;
> >    interp_fcst_thresh = ge-50&&le50;
> > }
> >
> >
> >
> > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > Hey John,
> > >
> > > This email probably got lost during the holidays.  Let me know
if you
> can
> > > get around to helping me out with this problem!
> > >
> > > Thanks and happy new year!
> > > Justin
> > >
> > > -----Original Message-----
> > > From: Tsu, Mr. Justin
> > > Sent: Friday, December 20, 2019 4:18 PM
> > > To: 'met_help at ucar.edu'
> > > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Thanks John,
> > >
> > > When using topo_mask,  will point_Stat understand a python
embedded
> file?
> > > The files we use are named '
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > These are projection gridded data of terrain heights.   Would
this look
> > > something like this?
> > >
> > > topo_mask = {
> > >    flag               = FALSE;
> > >    file_name          = ["./read_NRL_binary
> > >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > >    field              = { name = "TOPO"; level = "L0"; }
> > >    regrid             = { method = BILIN; width = 2; }
> > >    use_obs_thresh     = ge-100&&le100;
> > >    interp_fcst_thresh = ge-50&&le50;
> > > }
> > > And how does point_stat know which HDF5 varible to use as the
point of
> > > comparison to the model terrain height?
> > >
> > > Happy holidays!
> > > Justin
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Thursday, December 19, 2019 6:05 AM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Liz,
> > >
> > > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> > checks
> > > the flag in the header indicating whether winds are defined as
grid or
> > > earth-relative.  If grid relative, it searches the file for the
> > correspond
> > > U or V pair and uses both U and V to rotate them to be earth-
relative.
> > >
> > > That logic does NOT work for python embedding.  I have some
ideas about
> > how
> > > to make it work but those changes are not slated for the met-9.0
> release.
> > >
> > > I assume you’d like to see this enhancement?  And perhaps we’ve
already
> > > talked about this?
> > >
> > > (2) Config options were added in met-8.1 for the Air Force which
> address
> > > this issue.  By default this logic is disabled but can be
enabled using
> > the
> > > “topo_mask” config file dictionary.  FYI, the “land_mask”
dictionary
> was
> > > also added at the same time.  Below is a link to the default
point-stat
> > > config file followed by an excerpt from it.
> > >
> > > John
> > >
> > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > >
> > > // Topography
> > > // For SURFACE message types, only use observations where the
topo -
> > > station
> > > // elevation difference meets the use_obs_thresh threshold.
> > > // For the observations kept, when interpolating forecast data
to the
> > > // observation location, only use forecast grid points where the
topo -
> > > station
> > > // difference meets the interp_fcst_thresh threshold.
> > > // topo_mask.flag may be set separately in each "obs.field"
entry.
> > > //
> > > topo_mask = {
> > > flag = FALSE;
> > > file_name = [];
> > > field = { name = "TOPO"; level = "L0"; }
> > > regrid = { method = BILIN; width = 2; }
> > > use_obs_thresh = ge-100&&le100;
> > > interp_fcst_thresh = ge-50&&le50;
> > > }
> > >
> > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via
RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > >
> > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > > Transaction: Ticket created by
Elizabeth.Satterfield at nrlmry.navy.mil
> > > >        Queue: met_help
> > > >      Subject: point stat questions
> > > >        Owner: Nobody
> > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > >       Status: new
> > > >  Ticket <URL:
> https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > >
> > > >
> > > >
> > > > Hi John,
> > > >
> > > >
> > > >
> > > > A few questions about point stat:
> > > >
> > > > 1.         Are grid relative winds automatically converted to
Earth
> > > > relative
> > > > winds?
> > > >
> > > > 2.        For observation that fall below the model surface,
are
> model
> > > > fields interpolated to observation location?  If so, how?
> > > >
> > > >
> > > >
> > > > Thanks!
> > > >
> > > > Liz
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Elizabeth Satterfield
> > > > Editor, Monthly Weather Review
> > > >
> > > > Chair, AMS Committee on Probability and Statistics
> > > >
> > > > Meteorologist, Code 7531
> > > > Marine Meteorology Division
> > > > U.S. Naval Research Laboratory
> > > > T 831.656.4056  F 831.656.4026
> > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > >
> > > >
__________________________________________________________________
> > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > Any misuse or unauthorized disclosure may result in both civil
and
> > > criminal
> > > > penalties.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
>
>
>

------------------------------------------------
Subject: point stat questions
From: Tsu, Mr. Justin
Time: Fri Jan 17 13:01:13 2020

Ive put all the files you need to run (USE testConfig2) what I'm
running with point-stat in "/incoming/irap/met_help/test"

I am still getting 0 rejected topography, which I find hard to believe
especially since I set my thresholds to 0.

I do see the processing geography data, but I am not sure if it's
reading in my model terrain height correctly

Justin

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Friday, January 17, 2020 11:25 AM
To: Satterfield, Dr. Elizabeth
Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
Subject: Re: [rt.rap.ucar.edu #93532] point stat questions

Yeah definitely.  You could try setting the thresholds that way.  FYI,
you
should also see a "DEBUG 2" statement like this:
DEBUG 2: Processing geography data.

Feel free to send along your latest Point-Stat config file and I could
look
for issues in your settings.

Thanks,
John

On Fri, Jan 17, 2020 at 12:15 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Thanks for the quick reply.  Okay, I set it to verbosity 4 and got
nothing
> in the way of topography. I just saw the line for rejected
topography and
> see that it's 0:
>
>
> [tsu at lorenz 02_POINT_STAT_WORK]$ point_stat PYTHON_NUMPY
sfc_2019072100.nc
> testConfig -v 4
> DEBUG 1: Default Config File:
> /software/depot/met-8.1a/met-
8.1a/share/met//config/PointStatConfig_default
> DEBUG 1: User Config File: testConfig
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_Python_Numpy".
> DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo
object of
> type "FileType_Python_Numpy".
> DEBUG 4: parse_conf_sid_exc() -> Station ID exclusion list contains
0
> entries.
> GSL_RNG_TYPE=mt19937
> GSL_RNG_SEED=18446744071898014302
> DEBUG 1: Forecast File: PYTHON_NUMPY
> DEBUG 1: Observation File: sfc_2019072100.nc
> DEBUG 2:
> DEBUG 2:
>
--------------------------------------------------------------------------------
> DEBUG 2:
> DEBUG 2: Reading data for uuwind/zht_000010.
> DEBUG 3: Use the observation grid.
> DEBUG 3: Grid Definition: Projection: Mercator Nx: 127 Ny: 127
> Lat_LL_radians: 0.0354 Lon_LL_radians: 1.9401 Lat_UR_radians: 0.8649
> Lon_UR_radians: 0.9768 Mx: 130.8075 My: 130.8067 Bx: 253.7739 By:
-4.6309
> DEBUG 2: Processing masking regions.
> DEBUG 3: Processing grid mask: FULL
> DEBUG 4: parse_grid_mask() -> parsing grid mask "FULL"
> DEBUG 2: Processing geography data.
> DEBUG 2: For uuwind/zht_000010 found 1 forecast levels, 0
climatology mean
> levels, and 0 climatology standard deviation levels.
> DEBUG 2:
> DEBUG 2:
>
--------------------------------------------------------------------------------
> DEBUG 2:
> DEBUG 2: Searching 18034 observations from 18034 messages.
> DEBUG 2:
> DEBUG 2:
>
--------------------------------------------------------------------------------
> DEBUG 2:
> DEBUG 4: set FCST_UNITS:UNKNOWN
> DEBUG 4: set OBS_UNITS:NA
> DEBUG 2: Processing uuwind/zht_000010 versus wdir/Z2, for
observation type
> SYNOP, over region FULL, for interpolation method
BEST_SQUARE(10000), using
> 3238 pairs.
> DEBUG 3: Number of matched pairs  = 3238
> DEBUG 3: Observations processed   = 18034
> DEBUG 3: Rejected: SID exclusion  = 0
> DEBUG 3: Rejected: obs type       = 14718
> DEBUG 3: Rejected: valid time     = 0
> DEBUG 3: Rejected: bad obs value  = 0
> DEBUG 3: Rejected: off the grid   = 78
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: level mismatch = 0
> DEBUG 3: Rejected: quality marker = 0
> DEBUG 3: Rejected: message type   = 0
> DEBUG 3: Rejected: masking region = 0
> DEBUG 3: Rejected: bad fcst value = 0
> DEBUG 3: Rejected: duplicates     = 0
> DEBUG 2: Computing Continuous Statistics.
>
> Would a hail mary way to see if this works to set my use_obs_thresh
and
> interp_fcst_thresh to equal 0? That way the ob has to be exactly at
the
> vertical level to pass the topography mask?  Ultimately I just want
to see
> if I am implementing the topo mask correctly
>
> Justin
>
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Friday, January 17, 2020 11:06 AM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>
> Justin,
>
> Running Point-stat and verbosity level 3 causes these types of log
messages
> to be printed:
>
> DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type
ADPSFC, over
> region FULL, for interpolation method GEOG_MATCH_SQUARE(9), using
3779
> matched pairs.
> DEBUG 3: Number of matched pairs  = 3779
> DEBUG 3: Observations processed   = 116861
> DEBUG 3: Rejected: SID exclusion  = 0
> DEBUG 3: Rejected: obs type       = 103809
> DEBUG 3: Rejected: valid time     = 0
> DEBUG 3: Rejected: bad obs value  = 0
> DEBUG 3: Rejected: off the grid   = 21
> DEBUG 3: Rejected: topography     = 548
> DEBUG 3: Rejected: level mismatch = 7675
> DEBUG 3: Rejected: quality marker = 0
> DEBUG 3: Rejected: message type   = 809
> DEBUG 3: Rejected: masking region = 0
> DEBUG 3: Rejected: bad fcst value = 220
> DEBUG 3: Rejected: duplicates     = 0
>
> The "topography" line indicates the number of point observations
which were
> skipped due to the topography logic.  And they are skipped when...
> (1) the model topo value or point obs elevation value are bad data.
> (2) their difference exceeds the "use_obs_thresh" threshold
>
> And we also write a DEBUG(4) log message about it:
>
> DEBUG 4: Skipping observation for topography difference since
119.598 is
> not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> [ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.
>
> So please try rerunning with verbosity level 4 (-v 4) and check for
log
> messages about "topography" or "geography".
>
> Your next question...
>    Also, how does point_stat know what netCDF variable to check
terrht
> against?
>
> Point-Stat is comparing the model "terrht" against the observation
station
> elevation, which is the 6th column of the 11-column point
observation
> format:
>
>         The "met_point" ASCII format consists of 11 columns:
>                Message_Type Station_ID Valid_Time(YYYYMMDD_HHMMSS)
>                Lat(Deg North) Lon(Deg East) Elevation(msl)
>                Var_Name(or GRIB_Code) Level Height(msl or agl)
>                QC_String Observation_Value
>
> This logic is used to discard point obs with large differences from
the
> model elevation.
>
> John
>
> On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Thanks John,
> >
> > I just implemented your changes for a simple point_stat case
verifying
> > wind direction.   The point_stat debugging output looks exactly
the same
> as
> > if I hadn't used topo_mask... how do I know if it actually worked
and
> > terrain height got into point_stat?
> >
> > Also, how does point_stat know what netCDF variable to check
terrht
> > against?
> > Justin
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Thursday, January 9, 2020 10:27 AM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Justin,
> >
> > Sorry for losing this in the shuffle.  It's a hectic time of year.
> >
> > So your question is whether or not Python-embedding will work when
> setting
> > the "topo_mask" dictionary in the Point-Stat config file.  I just
tested
> > this out (albeit with the development version of the code) and it
seems
> to
> > have worked fine, just as expected.  Remember though that for
> > python-embedding you set the file_name to the constant string
> > "PYTHON_NUMPY" and the field "name" to the python command you want
to
> > execute to read the data.
> >
> > It looks like you were setting file_name = python command, and
that won't
> > work.
> >
> > Thanks,
> > John
> >
> > //
> > // Topography
> > //
> > topo_mask = {
> >    flag               = FALSE;
> >    file_name          = [ "PYTHON_NUMPY" ];
> >    field              = { name = "read_NRL_binary.py
> > trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld";
}
> >    regrid             = { method = BILIN; width = 2; }
> >    use_obs_thresh     = ge-100&&le100;
> >    interp_fcst_thresh = ge-50&&le50;
> > }
> >
> >
> >
> > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > Hey John,
> > >
> > > This email probably got lost during the holidays.  Let me know
if you
> can
> > > get around to helping me out with this problem!
> > >
> > > Thanks and happy new year!
> > > Justin
> > >
> > > -----Original Message-----
> > > From: Tsu, Mr. Justin
> > > Sent: Friday, December 20, 2019 4:18 PM
> > > To: 'met_help at ucar.edu'
> > > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Thanks John,
> > >
> > > When using topo_mask,  will point_Stat understand a python
embedded
> file?
> > > The files we use are named '
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > These are projection gridded data of terrain heights.   Would
this look
> > > something like this?
> > >
> > > topo_mask = {
> > >    flag               = FALSE;
> > >    file_name          = ["./read_NRL_binary
> > >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > >    field              = { name = "TOPO"; level = "L0"; }
> > >    regrid             = { method = BILIN; width = 2; }
> > >    use_obs_thresh     = ge-100&&le100;
> > >    interp_fcst_thresh = ge-50&&le50;
> > > }
> > > And how does point_stat know which HDF5 varible to use as the
point of
> > > comparison to the model terrain height?
> > >
> > > Happy holidays!
> > > Justin
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Thursday, December 19, 2019 6:05 AM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Liz,
> > >
> > > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> > checks
> > > the flag in the header indicating whether winds are defined as
grid or
> > > earth-relative.  If grid relative, it searches the file for the
> > correspond
> > > U or V pair and uses both U and V to rotate them to be earth-
relative.
> > >
> > > That logic does NOT work for python embedding.  I have some
ideas about
> > how
> > > to make it work but those changes are not slated for the met-9.0
> release.
> > >
> > > I assume you’d like to see this enhancement?  And perhaps we’ve
already
> > > talked about this?
> > >
> > > (2) Config options were added in met-8.1 for the Air Force which
> address
> > > this issue.  By default this logic is disabled but can be
enabled using
> > the
> > > “topo_mask” config file dictionary.  FYI, the “land_mask”
dictionary
> was
> > > also added at the same time.  Below is a link to the default
point-stat
> > > config file followed by an excerpt from it.
> > >
> > > John
> > >
> > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > >
> > > // Topography
> > > // For SURFACE message types, only use observations where the
topo -
> > > station
> > > // elevation difference meets the use_obs_thresh threshold.
> > > // For the observations kept, when interpolating forecast data
to the
> > > // observation location, only use forecast grid points where the
topo -
> > > station
> > > // difference meets the interp_fcst_thresh threshold.
> > > // topo_mask.flag may be set separately in each "obs.field"
entry.
> > > //
> > > topo_mask = {
> > > flag = FALSE;
> > > file_name = [];
> > > field = { name = "TOPO"; level = "L0"; }
> > > regrid = { method = BILIN; width = 2; }
> > > use_obs_thresh = ge-100&&le100;
> > > interp_fcst_thresh = ge-50&&le50;
> > > }
> > >
> > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via
RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > >
> > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > > Transaction: Ticket created by
Elizabeth.Satterfield at nrlmry.navy.mil
> > > >        Queue: met_help
> > > >      Subject: point stat questions
> > > >        Owner: Nobody
> > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > >       Status: new
> > > >  Ticket <URL:
> https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > >
> > > >
> > > >
> > > > Hi John,
> > > >
> > > >
> > > >
> > > > A few questions about point stat:
> > > >
> > > > 1.         Are grid relative winds automatically converted to
Earth
> > > > relative
> > > > winds?
> > > >
> > > > 2.        For observation that fall below the model surface,
are
> model
> > > > fields interpolated to observation location?  If so, how?
> > > >
> > > >
> > > >
> > > > Thanks!
> > > >
> > > > Liz
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Elizabeth Satterfield
> > > > Editor, Monthly Weather Review
> > > >
> > > > Chair, AMS Committee on Probability and Statistics
> > > >
> > > > Meteorologist, Code 7531
> > > > Marine Meteorology Division
> > > > U.S. Naval Research Laboratory
> > > > T 831.656.4056  F 831.656.4026
> > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > >
> > > >
__________________________________________________________________
> > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > Any misuse or unauthorized disclosure may result in both civil
and
> > > criminal
> > > > penalties.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
>
>
>


------------------------------------------------
Subject: point stat questions
From: John Halley Gotway
Time: Fri Jan 17 13:11:01 2020

Justin,

Thanks for sending the config file.  You currently have the topography
logic disabled in the config file:

topo_mask = {
   flag = FALSE;
...
}

The flag must be set to TRUE to enable the application of this logic:
topo_mask = {
   flag = TRUE;
...
}

Thanks,
John

On Fri, Jan 17, 2020 at 1:04 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Ive put all the files you need to run (USE testConfig2) what I'm
running
> with point-stat in "/incoming/irap/met_help/test"
>
> I am still getting 0 rejected topography, which I find hard to
believe
> especially since I set my thresholds to 0.
>
> I do see the processing geography data, but I am not sure if it's
reading
> in my model terrain height correctly
>
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Friday, January 17, 2020 11:25 AM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>
> Yeah definitely.  You could try setting the thresholds that way.
FYI, you
> should also see a "DEBUG 2" statement like this:
> DEBUG 2: Processing geography data.
>
> Feel free to send along your latest Point-Stat config file and I
could look
> for issues in your settings.
>
> Thanks,
> John
>
> On Fri, Jan 17, 2020 at 12:15 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Thanks for the quick reply.  Okay, I set it to verbosity 4 and got
> nothing
> > in the way of topography. I just saw the line for rejected
topography and
> > see that it's 0:
> >
> >
> > [tsu at lorenz 02_POINT_STAT_WORK]$ point_stat PYTHON_NUMPY
> sfc_2019072100.nc
> > testConfig -v 4
> > DEBUG 1: Default Config File:
> >
> /software/depot/met-8.1a/met-
8.1a/share/met//config/PointStatConfig_default
> > DEBUG 1: User Config File: testConfig
> > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > Met2dDataFile object of type "FileType_Python_Numpy".
> > DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo
object of
> > type "FileType_Python_Numpy".
> > DEBUG 4: parse_conf_sid_exc() -> Station ID exclusion list
contains 0
> > entries.
> > GSL_RNG_TYPE=mt19937
> > GSL_RNG_SEED=18446744071898014302
> > DEBUG 1: Forecast File: PYTHON_NUMPY
> > DEBUG 1: Observation File: sfc_2019072100.nc
> > DEBUG 2:
> > DEBUG 2:
> >
>
--------------------------------------------------------------------------------
> > DEBUG 2:
> > DEBUG 2: Reading data for uuwind/zht_000010.
> > DEBUG 3: Use the observation grid.
> > DEBUG 3: Grid Definition: Projection: Mercator Nx: 127 Ny: 127
> > Lat_LL_radians: 0.0354 Lon_LL_radians: 1.9401 Lat_UR_radians:
0.8649
> > Lon_UR_radians: 0.9768 Mx: 130.8075 My: 130.8067 Bx: 253.7739 By:
-4.6309
> > DEBUG 2: Processing masking regions.
> > DEBUG 3: Processing grid mask: FULL
> > DEBUG 4: parse_grid_mask() -> parsing grid mask "FULL"
> > DEBUG 2: Processing geography data.
> > DEBUG 2: For uuwind/zht_000010 found 1 forecast levels, 0
climatology
> mean
> > levels, and 0 climatology standard deviation levels.
> > DEBUG 2:
> > DEBUG 2:
> >
>
--------------------------------------------------------------------------------
> > DEBUG 2:
> > DEBUG 2: Searching 18034 observations from 18034 messages.
> > DEBUG 2:
> > DEBUG 2:
> >
>
--------------------------------------------------------------------------------
> > DEBUG 2:
> > DEBUG 4: set FCST_UNITS:UNKNOWN
> > DEBUG 4: set OBS_UNITS:NA
> > DEBUG 2: Processing uuwind/zht_000010 versus wdir/Z2, for
observation
> type
> > SYNOP, over region FULL, for interpolation method
BEST_SQUARE(10000),
> using
> > 3238 pairs.
> > DEBUG 3: Number of matched pairs  = 3238
> > DEBUG 3: Observations processed   = 18034
> > DEBUG 3: Rejected: SID exclusion  = 0
> > DEBUG 3: Rejected: obs type       = 14718
> > DEBUG 3: Rejected: valid time     = 0
> > DEBUG 3: Rejected: bad obs value  = 0
> > DEBUG 3: Rejected: off the grid   = 78
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: level mismatch = 0
> > DEBUG 3: Rejected: quality marker = 0
> > DEBUG 3: Rejected: message type   = 0
> > DEBUG 3: Rejected: masking region = 0
> > DEBUG 3: Rejected: bad fcst value = 0
> > DEBUG 3: Rejected: duplicates     = 0
> > DEBUG 2: Computing Continuous Statistics.
> >
> > Would a hail mary way to see if this works to set my
use_obs_thresh and
> > interp_fcst_thresh to equal 0? That way the ob has to be exactly
at the
> > vertical level to pass the topography mask?  Ultimately I just
want to
> see
> > if I am implementing the topo mask correctly
> >
> > Justin
> >
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Friday, January 17, 2020 11:06 AM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Justin,
> >
> > Running Point-stat and verbosity level 3 causes these types of log
> messages
> > to be printed:
> >
> > DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type
ADPSFC,
> over
> > region FULL, for interpolation method GEOG_MATCH_SQUARE(9), using
3779
> > matched pairs.
> > DEBUG 3: Number of matched pairs  = 3779
> > DEBUG 3: Observations processed   = 116861
> > DEBUG 3: Rejected: SID exclusion  = 0
> > DEBUG 3: Rejected: obs type       = 103809
> > DEBUG 3: Rejected: valid time     = 0
> > DEBUG 3: Rejected: bad obs value  = 0
> > DEBUG 3: Rejected: off the grid   = 21
> > DEBUG 3: Rejected: topography     = 548
> > DEBUG 3: Rejected: level mismatch = 7675
> > DEBUG 3: Rejected: quality marker = 0
> > DEBUG 3: Rejected: message type   = 809
> > DEBUG 3: Rejected: masking region = 0
> > DEBUG 3: Rejected: bad fcst value = 220
> > DEBUG 3: Rejected: duplicates     = 0
> >
> > The "topography" line indicates the number of point observations
which
> were
> > skipped due to the topography logic.  And they are skipped when...
> > (1) the model topo value or point obs elevation value are bad
data.
> > (2) their difference exceeds the "use_obs_thresh" threshold
> >
> > And we also write a DEBUG(4) log message about it:
> >
> > DEBUG 4: Skipping observation for topography difference since
119.598 is
> > not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> > [ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.
> >
> > So please try rerunning with verbosity level 4 (-v 4) and check
for log
> > messages about "topography" or "geography".
> >
> > Your next question...
> >    Also, how does point_stat know what netCDF variable to check
terrht
> > against?
> >
> > Point-Stat is comparing the model "terrht" against the observation
> station
> > elevation, which is the 6th column of the 11-column point
observation
> > format:
> >
> >         The "met_point" ASCII format consists of 11 columns:
> >                Message_Type Station_ID Valid_Time(YYYYMMDD_HHMMSS)
> >                Lat(Deg North) Lon(Deg East) Elevation(msl)
> >                Var_Name(or GRIB_Code) Level Height(msl or agl)
> >                QC_String Observation_Value
> >
> > This logic is used to discard point obs with large differences
from the
> > model elevation.
> >
> > John
> >
> > On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT <
> met_help at ucar.edu
> > >
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > Thanks John,
> > >
> > > I just implemented your changes for a simple point_stat case
verifying
> > > wind direction.   The point_stat debugging output looks exactly
the
> same
> > as
> > > if I hadn't used topo_mask... how do I know if it actually
worked and
> > > terrain height got into point_stat?
> > >
> > > Also, how does point_stat know what netCDF variable to check
terrht
> > > against?
> > > Justin
> > >
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Thursday, January 9, 2020 10:27 AM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Justin,
> > >
> > > Sorry for losing this in the shuffle.  It's a hectic time of
year.
> > >
> > > So your question is whether or not Python-embedding will work
when
> > setting
> > > the "topo_mask" dictionary in the Point-Stat config file.  I
just
> tested
> > > this out (albeit with the development version of the code) and
it seems
> > to
> > > have worked fine, just as expected.  Remember though that for
> > > python-embedding you set the file_name to the constant string
> > > "PYTHON_NUMPY" and the field "name" to the python command you
want to
> > > execute to read the data.
> > >
> > > It looks like you were setting file_name = python command, and
that
> won't
> > > work.
> > >
> > > Thanks,
> > > John
> > >
> > > //
> > > // Topography
> > > //
> > > topo_mask = {
> > >    flag               = FALSE;
> > >    file_name          = [ "PYTHON_NUMPY" ];
> > >    field              = { name = "read_NRL_binary.py
> > >
trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld"; }
> > >    regrid             = { method = BILIN; width = 2; }
> > >    use_obs_thresh     = ge-100&&le100;
> > >    interp_fcst_thresh = ge-50&&le50;
> > > }
> > >
> > >
> > >
> > > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT <
> met_help at ucar.edu
> > >
> > > wrote:
> > >
> > > >
> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>
> > > >
> > > > Hey John,
> > > >
> > > > This email probably got lost during the holidays.  Let me know
if you
> > can
> > > > get around to helping me out with this problem!
> > > >
> > > > Thanks and happy new year!
> > > > Justin
> > > >
> > > > -----Original Message-----
> > > > From: Tsu, Mr. Justin
> > > > Sent: Friday, December 20, 2019 4:18 PM
> > > > To: 'met_help at ucar.edu'
> > > > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Thanks John,
> > > >
> > > > When using topo_mask,  will point_Stat understand a python
embedded
> > file?
> > > > The files we use are named '
> > > >
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > > These are projection gridded data of terrain heights.   Would
this
> look
> > > > something like this?
> > > >
> > > > topo_mask = {
> > > >    flag               = FALSE;
> > > >    file_name          = ["./read_NRL_binary
> > > >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > > >    field              = { name = "TOPO"; level = "L0"; }
> > > >    regrid             = { method = BILIN; width = 2; }
> > > >    use_obs_thresh     = ge-100&&le100;
> > > >    interp_fcst_thresh = ge-50&&le50;
> > > > }
> > > > And how does point_stat know which HDF5 varible to use as the
point
> of
> > > > comparison to the model terrain height?
> > > >
> > > > Happy holidays!
> > > > Justin
> > > > -----Original Message-----
> > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > Sent: Thursday, December 19, 2019 6:05 AM
> > > > To: Satterfield, Dr. Elizabeth
> > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Liz,
> > > >
> > > > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> > > checks
> > > > the flag in the header indicating whether winds are defined as
grid
> or
> > > > earth-relative.  If grid relative, it searches the file for
the
> > > correspond
> > > > U or V pair and uses both U and V to rotate them to be
> earth-relative.
> > > >
> > > > That logic does NOT work for python embedding.  I have some
ideas
> about
> > > how
> > > > to make it work but those changes are not slated for the met-
9.0
> > release.
> > > >
> > > > I assume you’d like to see this enhancement?  And perhaps
we’ve
> already
> > > > talked about this?
> > > >
> > > > (2) Config options were added in met-8.1 for the Air Force
which
> > address
> > > > this issue.  By default this logic is disabled but can be
enabled
> using
> > > the
> > > > “topo_mask” config file dictionary.  FYI, the “land_mask”
dictionary
> > was
> > > > also added at the same time.  Below is a link to the default
> point-stat
> > > > config file followed by an excerpt from it.
> > > >
> > > > John
> > > >
> > > >
> > > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > > >
> > > > // Topography
> > > > // For SURFACE message types, only use observations where the
topo -
> > > > station
> > > > // elevation difference meets the use_obs_thresh threshold.
> > > > // For the observations kept, when interpolating forecast data
to the
> > > > // observation location, only use forecast grid points where
the
> topo -
> > > > station
> > > > // difference meets the interp_fcst_thresh threshold.
> > > > // topo_mask.flag may be set separately in each "obs.field"
entry.
> > > > //
> > > > topo_mask = {
> > > > flag = FALSE;
> > > > file_name = [];
> > > > field = { name = "TOPO"; level = "L0"; }
> > > > regrid = { method = BILIN; width = 2; }
> > > > use_obs_thresh = ge-100&&le100;
> > > > interp_fcst_thresh = ge-50&&le50;
> > > > }
> > > >
> > > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via
RT <
> > > > met_help at ucar.edu> wrote:
> > > >
> > > > >
> > > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > > > Transaction: Ticket created by
> Elizabeth.Satterfield at nrlmry.navy.mil
> > > > >        Queue: met_help
> > > > >      Subject: point stat questions
> > > > >        Owner: Nobody
> > > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > > >       Status: new
> > > > >  Ticket <URL:
> > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > > >
> > > > >
> > > > >
> > > > > Hi John,
> > > > >
> > > > >
> > > > >
> > > > > A few questions about point stat:
> > > > >
> > > > > 1.         Are grid relative winds automatically converted
to Earth
> > > > > relative
> > > > > winds?
> > > > >
> > > > > 2.        For observation that fall below the model surface,
are
> > model
> > > > > fields interpolated to observation location?  If so, how?
> > > > >
> > > > >
> > > > >
> > > > > Thanks!
> > > > >
> > > > > Liz
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Elizabeth Satterfield
> > > > > Editor, Monthly Weather Review
> > > > >
> > > > > Chair, AMS Committee on Probability and Statistics
> > > > >
> > > > > Meteorologist, Code 7531
> > > > > Marine Meteorology Division
> > > > > U.S. Naval Research Laboratory
> > > > > T 831.656.4056  F 831.656.4026
> > > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > > >
> > > > >
__________________________________________________________________
> > > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > > Any misuse or unauthorized disclosure may result in both
civil and
> > > > criminal
> > > > > penalties.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
>
>
>

------------------------------------------------
Subject: point stat questions
From: Tsu, Mr. Justin
Time: Fri Jan 17 13:13:37 2020

Awesome,

It is working now.  Thanks a bunch John!

Justin

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Friday, January 17, 2020 12:11 PM
To: Satterfield, Dr. Elizabeth
Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
Subject: Re: [rt.rap.ucar.edu #93532] point stat questions

Justin,

Thanks for sending the config file.  You currently have the topography
logic disabled in the config file:

topo_mask = {
   flag = FALSE;
...
}

The flag must be set to TRUE to enable the application of this logic:
topo_mask = {
   flag = TRUE;
...
}

Thanks,
John

On Fri, Jan 17, 2020 at 1:04 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Ive put all the files you need to run (USE testConfig2) what I'm
running
> with point-stat in "/incoming/irap/met_help/test"
>
> I am still getting 0 rejected topography, which I find hard to
believe
> especially since I set my thresholds to 0.
>
> I do see the processing geography data, but I am not sure if it's
reading
> in my model terrain height correctly
>
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Friday, January 17, 2020 11:25 AM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>
> Yeah definitely.  You could try setting the thresholds that way.
FYI, you
> should also see a "DEBUG 2" statement like this:
> DEBUG 2: Processing geography data.
>
> Feel free to send along your latest Point-Stat config file and I
could look
> for issues in your settings.
>
> Thanks,
> John
>
> On Fri, Jan 17, 2020 at 12:15 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Thanks for the quick reply.  Okay, I set it to verbosity 4 and got
> nothing
> > in the way of topography. I just saw the line for rejected
topography and
> > see that it's 0:
> >
> >
> > [tsu at lorenz 02_POINT_STAT_WORK]$ point_stat PYTHON_NUMPY
> sfc_2019072100.nc
> > testConfig -v 4
> > DEBUG 1: Default Config File:
> >
> /software/depot/met-8.1a/met-
8.1a/share/met//config/PointStatConfig_default
> > DEBUG 1: User Config File: testConfig
> > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > Met2dDataFile object of type "FileType_Python_Numpy".
> > DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo
object of
> > type "FileType_Python_Numpy".
> > DEBUG 4: parse_conf_sid_exc() -> Station ID exclusion list
contains 0
> > entries.
> > GSL_RNG_TYPE=mt19937
> > GSL_RNG_SEED=18446744071898014302
> > DEBUG 1: Forecast File: PYTHON_NUMPY
> > DEBUG 1: Observation File: sfc_2019072100.nc
> > DEBUG 2:
> > DEBUG 2:
> >
>
--------------------------------------------------------------------------------
> > DEBUG 2:
> > DEBUG 2: Reading data for uuwind/zht_000010.
> > DEBUG 3: Use the observation grid.
> > DEBUG 3: Grid Definition: Projection: Mercator Nx: 127 Ny: 127
> > Lat_LL_radians: 0.0354 Lon_LL_radians: 1.9401 Lat_UR_radians:
0.8649
> > Lon_UR_radians: 0.9768 Mx: 130.8075 My: 130.8067 Bx: 253.7739 By:
-4.6309
> > DEBUG 2: Processing masking regions.
> > DEBUG 3: Processing grid mask: FULL
> > DEBUG 4: parse_grid_mask() -> parsing grid mask "FULL"
> > DEBUG 2: Processing geography data.
> > DEBUG 2: For uuwind/zht_000010 found 1 forecast levels, 0
climatology
> mean
> > levels, and 0 climatology standard deviation levels.
> > DEBUG 2:
> > DEBUG 2:
> >
>
--------------------------------------------------------------------------------
> > DEBUG 2:
> > DEBUG 2: Searching 18034 observations from 18034 messages.
> > DEBUG 2:
> > DEBUG 2:
> >
>
--------------------------------------------------------------------------------
> > DEBUG 2:
> > DEBUG 4: set FCST_UNITS:UNKNOWN
> > DEBUG 4: set OBS_UNITS:NA
> > DEBUG 2: Processing uuwind/zht_000010 versus wdir/Z2, for
observation
> type
> > SYNOP, over region FULL, for interpolation method
BEST_SQUARE(10000),
> using
> > 3238 pairs.
> > DEBUG 3: Number of matched pairs  = 3238
> > DEBUG 3: Observations processed   = 18034
> > DEBUG 3: Rejected: SID exclusion  = 0
> > DEBUG 3: Rejected: obs type       = 14718
> > DEBUG 3: Rejected: valid time     = 0
> > DEBUG 3: Rejected: bad obs value  = 0
> > DEBUG 3: Rejected: off the grid   = 78
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: level mismatch = 0
> > DEBUG 3: Rejected: quality marker = 0
> > DEBUG 3: Rejected: message type   = 0
> > DEBUG 3: Rejected: masking region = 0
> > DEBUG 3: Rejected: bad fcst value = 0
> > DEBUG 3: Rejected: duplicates     = 0
> > DEBUG 2: Computing Continuous Statistics.
> >
> > Would a hail mary way to see if this works to set my
use_obs_thresh and
> > interp_fcst_thresh to equal 0? That way the ob has to be exactly
at the
> > vertical level to pass the topography mask?  Ultimately I just
want to
> see
> > if I am implementing the topo mask correctly
> >
> > Justin
> >
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Friday, January 17, 2020 11:06 AM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Justin,
> >
> > Running Point-stat and verbosity level 3 causes these types of log
> messages
> > to be printed:
> >
> > DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type
ADPSFC,
> over
> > region FULL, for interpolation method GEOG_MATCH_SQUARE(9), using
3779
> > matched pairs.
> > DEBUG 3: Number of matched pairs  = 3779
> > DEBUG 3: Observations processed   = 116861
> > DEBUG 3: Rejected: SID exclusion  = 0
> > DEBUG 3: Rejected: obs type       = 103809
> > DEBUG 3: Rejected: valid time     = 0
> > DEBUG 3: Rejected: bad obs value  = 0
> > DEBUG 3: Rejected: off the grid   = 21
> > DEBUG 3: Rejected: topography     = 548
> > DEBUG 3: Rejected: level mismatch = 7675
> > DEBUG 3: Rejected: quality marker = 0
> > DEBUG 3: Rejected: message type   = 809
> > DEBUG 3: Rejected: masking region = 0
> > DEBUG 3: Rejected: bad fcst value = 220
> > DEBUG 3: Rejected: duplicates     = 0
> >
> > The "topography" line indicates the number of point observations
which
> were
> > skipped due to the topography logic.  And they are skipped when...
> > (1) the model topo value or point obs elevation value are bad
data.
> > (2) their difference exceeds the "use_obs_thresh" threshold
> >
> > And we also write a DEBUG(4) log message about it:
> >
> > DEBUG 4: Skipping observation for topography difference since
119.598 is
> > not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> > [ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.
> >
> > So please try rerunning with verbosity level 4 (-v 4) and check
for log
> > messages about "topography" or "geography".
> >
> > Your next question...
> >    Also, how does point_stat know what netCDF variable to check
terrht
> > against?
> >
> > Point-Stat is comparing the model "terrht" against the observation
> station
> > elevation, which is the 6th column of the 11-column point
observation
> > format:
> >
> >         The "met_point" ASCII format consists of 11 columns:
> >                Message_Type Station_ID Valid_Time(YYYYMMDD_HHMMSS)
> >                Lat(Deg North) Lon(Deg East) Elevation(msl)
> >                Var_Name(or GRIB_Code) Level Height(msl or agl)
> >                QC_String Observation_Value
> >
> > This logic is used to discard point obs with large differences
from the
> > model elevation.
> >
> > John
> >
> > On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT <
> met_help at ucar.edu
> > >
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > Thanks John,
> > >
> > > I just implemented your changes for a simple point_stat case
verifying
> > > wind direction.   The point_stat debugging output looks exactly
the
> same
> > as
> > > if I hadn't used topo_mask... how do I know if it actually
worked and
> > > terrain height got into point_stat?
> > >
> > > Also, how does point_stat know what netCDF variable to check
terrht
> > > against?
> > > Justin
> > >
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Thursday, January 9, 2020 10:27 AM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Justin,
> > >
> > > Sorry for losing this in the shuffle.  It's a hectic time of
year.
> > >
> > > So your question is whether or not Python-embedding will work
when
> > setting
> > > the "topo_mask" dictionary in the Point-Stat config file.  I
just
> tested
> > > this out (albeit with the development version of the code) and
it seems
> > to
> > > have worked fine, just as expected.  Remember though that for
> > > python-embedding you set the file_name to the constant string
> > > "PYTHON_NUMPY" and the field "name" to the python command you
want to
> > > execute to read the data.
> > >
> > > It looks like you were setting file_name = python command, and
that
> won't
> > > work.
> > >
> > > Thanks,
> > > John
> > >
> > > //
> > > // Topography
> > > //
> > > topo_mask = {
> > >    flag               = FALSE;
> > >    file_name          = [ "PYTHON_NUMPY" ];
> > >    field              = { name = "read_NRL_binary.py
> > >
trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld"; }
> > >    regrid             = { method = BILIN; width = 2; }
> > >    use_obs_thresh     = ge-100&&le100;
> > >    interp_fcst_thresh = ge-50&&le50;
> > > }
> > >
> > >
> > >
> > > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT <
> met_help at ucar.edu
> > >
> > > wrote:
> > >
> > > >
> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>
> > > >
> > > > Hey John,
> > > >
> > > > This email probably got lost during the holidays.  Let me know
if you
> > can
> > > > get around to helping me out with this problem!
> > > >
> > > > Thanks and happy new year!
> > > > Justin
> > > >
> > > > -----Original Message-----
> > > > From: Tsu, Mr. Justin
> > > > Sent: Friday, December 20, 2019 4:18 PM
> > > > To: 'met_help at ucar.edu'
> > > > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Thanks John,
> > > >
> > > > When using topo_mask,  will point_Stat understand a python
embedded
> > file?
> > > > The files we use are named '
> > > >
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > > These are projection gridded data of terrain heights.   Would
this
> look
> > > > something like this?
> > > >
> > > > topo_mask = {
> > > >    flag               = FALSE;
> > > >    file_name          = ["./read_NRL_binary
> > > >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > > >    field              = { name = "TOPO"; level = "L0"; }
> > > >    regrid             = { method = BILIN; width = 2; }
> > > >    use_obs_thresh     = ge-100&&le100;
> > > >    interp_fcst_thresh = ge-50&&le50;
> > > > }
> > > > And how does point_stat know which HDF5 varible to use as the
point
> of
> > > > comparison to the model terrain height?
> > > >
> > > > Happy holidays!
> > > > Justin
> > > > -----Original Message-----
> > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > Sent: Thursday, December 19, 2019 6:05 AM
> > > > To: Satterfield, Dr. Elizabeth
> > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Liz,
> > > >
> > > > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> > > checks
> > > > the flag in the header indicating whether winds are defined as
grid
> or
> > > > earth-relative.  If grid relative, it searches the file for
the
> > > correspond
> > > > U or V pair and uses both U and V to rotate them to be
> earth-relative.
> > > >
> > > > That logic does NOT work for python embedding.  I have some
ideas
> about
> > > how
> > > > to make it work but those changes are not slated for the met-
9.0
> > release.
> > > >
> > > > I assume you’d like to see this enhancement?  And perhaps
we’ve
> already
> > > > talked about this?
> > > >
> > > > (2) Config options were added in met-8.1 for the Air Force
which
> > address
> > > > this issue.  By default this logic is disabled but can be
enabled
> using
> > > the
> > > > “topo_mask” config file dictionary.  FYI, the “land_mask”
dictionary
> > was
> > > > also added at the same time.  Below is a link to the default
> point-stat
> > > > config file followed by an excerpt from it.
> > > >
> > > > John
> > > >
> > > >
> > > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > > >
> > > > // Topography
> > > > // For SURFACE message types, only use observations where the
topo -
> > > > station
> > > > // elevation difference meets the use_obs_thresh threshold.
> > > > // For the observations kept, when interpolating forecast data
to the
> > > > // observation location, only use forecast grid points where
the
> topo -
> > > > station
> > > > // difference meets the interp_fcst_thresh threshold.
> > > > // topo_mask.flag may be set separately in each "obs.field"
entry.
> > > > //
> > > > topo_mask = {
> > > > flag = FALSE;
> > > > file_name = [];
> > > > field = { name = "TOPO"; level = "L0"; }
> > > > regrid = { method = BILIN; width = 2; }
> > > > use_obs_thresh = ge-100&&le100;
> > > > interp_fcst_thresh = ge-50&&le50;
> > > > }
> > > >
> > > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via
RT <
> > > > met_help at ucar.edu> wrote:
> > > >
> > > > >
> > > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > > > Transaction: Ticket created by
> Elizabeth.Satterfield at nrlmry.navy.mil
> > > > >        Queue: met_help
> > > > >      Subject: point stat questions
> > > > >        Owner: Nobody
> > > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > > >       Status: new
> > > > >  Ticket <URL:
> > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > > >
> > > > >
> > > > >
> > > > > Hi John,
> > > > >
> > > > >
> > > > >
> > > > > A few questions about point stat:
> > > > >
> > > > > 1.         Are grid relative winds automatically converted
to Earth
> > > > > relative
> > > > > winds?
> > > > >
> > > > > 2.        For observation that fall below the model surface,
are
> > model
> > > > > fields interpolated to observation location?  If so, how?
> > > > >
> > > > >
> > > > >
> > > > > Thanks!
> > > > >
> > > > > Liz
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Elizabeth Satterfield
> > > > > Editor, Monthly Weather Review
> > > > >
> > > > > Chair, AMS Committee on Probability and Statistics
> > > > >
> > > > > Meteorologist, Code 7531
> > > > > Marine Meteorology Division
> > > > > U.S. Naval Research Laboratory
> > > > > T 831.656.4056  F 831.656.4026
> > > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > > >
> > > > >
__________________________________________________________________
> > > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > > Any misuse or unauthorized disclosure may result in both
civil and
> > > > criminal
> > > > > penalties.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
>
>
>


------------------------------------------------
Subject: point stat questions
From: John Halley Gotway
Time: Fri Jan 17 14:11:01 2020

Glad to hear it!

John

On Fri, Jan 17, 2020 at 1:14 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Awesome,
>
> It is working now.  Thanks a bunch John!
>
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Friday, January 17, 2020 12:11 PM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>
> Justin,
>
> Thanks for sending the config file.  You currently have the
topography
> logic disabled in the config file:
>
> topo_mask = {
>    flag = FALSE;
> ...
> }
>
> The flag must be set to TRUE to enable the application of this
logic:
> topo_mask = {
>    flag = TRUE;
> ...
> }
>
> Thanks,
> John
>
> On Fri, Jan 17, 2020 at 1:04 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Ive put all the files you need to run (USE testConfig2) what I'm
running
> > with point-stat in "/incoming/irap/met_help/test"
> >
> > I am still getting 0 rejected topography, which I find hard to
believe
> > especially since I set my thresholds to 0.
> >
> > I do see the processing geography data, but I am not sure if it's
reading
> > in my model terrain height correctly
> >
> > Justin
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Friday, January 17, 2020 11:25 AM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Yeah definitely.  You could try setting the thresholds that way.
FYI,
> you
> > should also see a "DEBUG 2" statement like this:
> > DEBUG 2: Processing geography data.
> >
> > Feel free to send along your latest Point-Stat config file and I
could
> look
> > for issues in your settings.
> >
> > Thanks,
> > John
> >
> > On Fri, Jan 17, 2020 at 12:15 PM Tsu, Mr. Justin via RT <
> met_help at ucar.edu
> > >
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > Thanks for the quick reply.  Okay, I set it to verbosity 4 and
got
> > nothing
> > > in the way of topography. I just saw the line for rejected
topography
> and
> > > see that it's 0:
> > >
> > >
> > > [tsu at lorenz 02_POINT_STAT_WORK]$ point_stat PYTHON_NUMPY
> > sfc_2019072100.nc
> > > testConfig -v 4
> > > DEBUG 1: Default Config File:
> > >
> >
> /software/depot/met-8.1a/met-
8.1a/share/met//config/PointStatConfig_default
> > > DEBUG 1: User Config File: testConfig
> > > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > > Met2dDataFile object of type "FileType_Python_Numpy".
> > > DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo
object
> of
> > > type "FileType_Python_Numpy".
> > > DEBUG 4: parse_conf_sid_exc() -> Station ID exclusion list
contains 0
> > > entries.
> > > GSL_RNG_TYPE=mt19937
> > > GSL_RNG_SEED=18446744071898014302
> > > DEBUG 1: Forecast File: PYTHON_NUMPY
> > > DEBUG 1: Observation File: sfc_2019072100.nc
> > > DEBUG 2:
> > > DEBUG 2:
> > >
> >
>
--------------------------------------------------------------------------------
> > > DEBUG 2:
> > > DEBUG 2: Reading data for uuwind/zht_000010.
> > > DEBUG 3: Use the observation grid.
> > > DEBUG 3: Grid Definition: Projection: Mercator Nx: 127 Ny: 127
> > > Lat_LL_radians: 0.0354 Lon_LL_radians: 1.9401 Lat_UR_radians:
0.8649
> > > Lon_UR_radians: 0.9768 Mx: 130.8075 My: 130.8067 Bx: 253.7739
By:
> -4.6309
> > > DEBUG 2: Processing masking regions.
> > > DEBUG 3: Processing grid mask: FULL
> > > DEBUG 4: parse_grid_mask() -> parsing grid mask "FULL"
> > > DEBUG 2: Processing geography data.
> > > DEBUG 2: For uuwind/zht_000010 found 1 forecast levels, 0
climatology
> > mean
> > > levels, and 0 climatology standard deviation levels.
> > > DEBUG 2:
> > > DEBUG 2:
> > >
> >
>
--------------------------------------------------------------------------------
> > > DEBUG 2:
> > > DEBUG 2: Searching 18034 observations from 18034 messages.
> > > DEBUG 2:
> > > DEBUG 2:
> > >
> >
>
--------------------------------------------------------------------------------
> > > DEBUG 2:
> > > DEBUG 4: set FCST_UNITS:UNKNOWN
> > > DEBUG 4: set OBS_UNITS:NA
> > > DEBUG 2: Processing uuwind/zht_000010 versus wdir/Z2, for
observation
> > type
> > > SYNOP, over region FULL, for interpolation method
BEST_SQUARE(10000),
> > using
> > > 3238 pairs.
> > > DEBUG 3: Number of matched pairs  = 3238
> > > DEBUG 3: Observations processed   = 18034
> > > DEBUG 3: Rejected: SID exclusion  = 0
> > > DEBUG 3: Rejected: obs type       = 14718
> > > DEBUG 3: Rejected: valid time     = 0
> > > DEBUG 3: Rejected: bad obs value  = 0
> > > DEBUG 3: Rejected: off the grid   = 78
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: level mismatch = 0
> > > DEBUG 3: Rejected: quality marker = 0
> > > DEBUG 3: Rejected: message type   = 0
> > > DEBUG 3: Rejected: masking region = 0
> > > DEBUG 3: Rejected: bad fcst value = 0
> > > DEBUG 3: Rejected: duplicates     = 0
> > > DEBUG 2: Computing Continuous Statistics.
> > >
> > > Would a hail mary way to see if this works to set my
use_obs_thresh and
> > > interp_fcst_thresh to equal 0? That way the ob has to be exactly
at the
> > > vertical level to pass the topography mask?  Ultimately I just
want to
> > see
> > > if I am implementing the topo mask correctly
> > >
> > > Justin
> > >
> > >
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Friday, January 17, 2020 11:06 AM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Justin,
> > >
> > > Running Point-stat and verbosity level 3 causes these types of
log
> > messages
> > > to be printed:
> > >
> > > DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type
ADPSFC,
> > over
> > > region FULL, for interpolation method GEOG_MATCH_SQUARE(9),
using 3779
> > > matched pairs.
> > > DEBUG 3: Number of matched pairs  = 3779
> > > DEBUG 3: Observations processed   = 116861
> > > DEBUG 3: Rejected: SID exclusion  = 0
> > > DEBUG 3: Rejected: obs type       = 103809
> > > DEBUG 3: Rejected: valid time     = 0
> > > DEBUG 3: Rejected: bad obs value  = 0
> > > DEBUG 3: Rejected: off the grid   = 21
> > > DEBUG 3: Rejected: topography     = 548
> > > DEBUG 3: Rejected: level mismatch = 7675
> > > DEBUG 3: Rejected: quality marker = 0
> > > DEBUG 3: Rejected: message type   = 809
> > > DEBUG 3: Rejected: masking region = 0
> > > DEBUG 3: Rejected: bad fcst value = 220
> > > DEBUG 3: Rejected: duplicates     = 0
> > >
> > > The "topography" line indicates the number of point observations
which
> > were
> > > skipped due to the topography logic.  And they are skipped
when...
> > > (1) the model topo value or point obs elevation value are bad
data.
> > > (2) their difference exceeds the "use_obs_thresh" threshold
> > >
> > > And we also write a DEBUG(4) log message about it:
> > >
> > > DEBUG 4: Skipping observation for topography difference since
119.598
> is
> > > not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> > > [ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.
> > >
> > > So please try rerunning with verbosity level 4 (-v 4) and check
for log
> > > messages about "topography" or "geography".
> > >
> > > Your next question...
> > >    Also, how does point_stat know what netCDF variable to check
terrht
> > > against?
> > >
> > > Point-Stat is comparing the model "terrht" against the
observation
> > station
> > > elevation, which is the 6th column of the 11-column point
observation
> > > format:
> > >
> > >         The "met_point" ASCII format consists of 11 columns:
> > >                Message_Type Station_ID
Valid_Time(YYYYMMDD_HHMMSS)
> > >                Lat(Deg North) Lon(Deg East) Elevation(msl)
> > >                Var_Name(or GRIB_Code) Level Height(msl or agl)
> > >                QC_String Observation_Value
> > >
> > > This logic is used to discard point obs with large differences
from the
> > > model elevation.
> > >
> > > John
> > >
> > > On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT <
> > met_help at ucar.edu
> > > >
> > > wrote:
> > >
> > > >
> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>
> > > >
> > > > Thanks John,
> > > >
> > > > I just implemented your changes for a simple point_stat case
> verifying
> > > > wind direction.   The point_stat debugging output looks
exactly the
> > same
> > > as
> > > > if I hadn't used topo_mask... how do I know if it actually
worked and
> > > > terrain height got into point_stat?
> > > >
> > > > Also, how does point_stat know what netCDF variable to check
terrht
> > > > against?
> > > > Justin
> > > >
> > > > -----Original Message-----
> > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > Sent: Thursday, January 9, 2020 10:27 AM
> > > > To: Satterfield, Dr. Elizabeth
> > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Justin,
> > > >
> > > > Sorry for losing this in the shuffle.  It's a hectic time of
year.
> > > >
> > > > So your question is whether or not Python-embedding will work
when
> > > setting
> > > > the "topo_mask" dictionary in the Point-Stat config file.  I
just
> > tested
> > > > this out (albeit with the development version of the code) and
it
> seems
> > > to
> > > > have worked fine, just as expected.  Remember though that for
> > > > python-embedding you set the file_name to the constant string
> > > > "PYTHON_NUMPY" and the field "name" to the python command you
want to
> > > > execute to read the data.
> > > >
> > > > It looks like you were setting file_name = python command, and
that
> > won't
> > > > work.
> > > >
> > > > Thanks,
> > > > John
> > > >
> > > > //
> > > > // Topography
> > > > //
> > > > topo_mask = {
> > > >    flag               = FALSE;
> > > >    file_name          = [ "PYTHON_NUMPY" ];
> > > >    field              = { name = "read_NRL_binary.py
> > > >
trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld"; }
> > > >    regrid             = { method = BILIN; width = 2; }
> > > >    use_obs_thresh     = ge-100&&le100;
> > > >    interp_fcst_thresh = ge-50&&le50;
> > > > }
> > > >
> > > >
> > > >
> > > > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT <
> > met_help at ucar.edu
> > > >
> > > > wrote:
> > > >
> > > > >
> > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > > > >
> > > > > Hey John,
> > > > >
> > > > > This email probably got lost during the holidays.  Let me
know if
> you
> > > can
> > > > > get around to helping me out with this problem!
> > > > >
> > > > > Thanks and happy new year!
> > > > > Justin
> > > > >
> > > > > -----Original Message-----
> > > > > From: Tsu, Mr. Justin
> > > > > Sent: Friday, December 20, 2019 4:18 PM
> > > > > To: 'met_help at ucar.edu'
> > > > > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> > > > >
> > > > > Thanks John,
> > > > >
> > > > > When using topo_mask,  will point_Stat understand a python
embedded
> > > file?
> > > > > The files we use are named '
> > > > >
> > > >
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > > > These are projection gridded data of terrain heights.
Would this
> > look
> > > > > something like this?
> > > > >
> > > > > topo_mask = {
> > > > >    flag               = FALSE;
> > > > >    file_name          = ["./read_NRL_binary
> > > > >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > > > >    field              = { name = "TOPO"; level = "L0"; }
> > > > >    regrid             = { method = BILIN; width = 2; }
> > > > >    use_obs_thresh     = ge-100&&le100;
> > > > >    interp_fcst_thresh = ge-50&&le50;
> > > > > }
> > > > > And how does point_stat know which HDF5 varible to use as
the point
> > of
> > > > > comparison to the model terrain height?
> > > > >
> > > > > Happy holidays!
> > > > > Justin
> > > > > -----Original Message-----
> > > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > > Sent: Thursday, December 19, 2019 6:05 AM
> > > > > To: Satterfield, Dr. Elizabeth
> > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > > >
> > > > > Liz,
> > > > >
> > > > > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> > > > checks
> > > > > the flag in the header indicating whether winds are defined
as grid
> > or
> > > > > earth-relative.  If grid relative, it searches the file for
the
> > > > correspond
> > > > > U or V pair and uses both U and V to rotate them to be
> > earth-relative.
> > > > >
> > > > > That logic does NOT work for python embedding.  I have some
ideas
> > about
> > > > how
> > > > > to make it work but those changes are not slated for the
met-9.0
> > > release.
> > > > >
> > > > > I assume you’d like to see this enhancement?  And perhaps
we’ve
> > already
> > > > > talked about this?
> > > > >
> > > > > (2) Config options were added in met-8.1 for the Air Force
which
> > > address
> > > > > this issue.  By default this logic is disabled but can be
enabled
> > using
> > > > the
> > > > > “topo_mask” config file dictionary.  FYI, the “land_mask”
> dictionary
> > > was
> > > > > also added at the same time.  Below is a link to the default
> > point-stat
> > > > > config file followed by an excerpt from it.
> > > > >
> > > > > John
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > > > >
> > > > > // Topography
> > > > > // For SURFACE message types, only use observations where
the topo
> -
> > > > > station
> > > > > // elevation difference meets the use_obs_thresh threshold.
> > > > > // For the observations kept, when interpolating forecast
data to
> the
> > > > > // observation location, only use forecast grid points where
the
> > topo -
> > > > > station
> > > > > // difference meets the interp_fcst_thresh threshold.
> > > > > // topo_mask.flag may be set separately in each "obs.field"
entry.
> > > > > //
> > > > > topo_mask = {
> > > > > flag = FALSE;
> > > > > file_name = [];
> > > > > field = { name = "TOPO"; level = "L0"; }
> > > > > regrid = { method = BILIN; width = 2; }
> > > > > use_obs_thresh = ge-100&&le100;
> > > > > interp_fcst_thresh = ge-50&&le50;
> > > > > }
> > > > >
> > > > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth
via RT <
> > > > > met_help at ucar.edu> wrote:
> > > > >
> > > > > >
> > > > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > > > > Transaction: Ticket created by
> > Elizabeth.Satterfield at nrlmry.navy.mil
> > > > > >        Queue: met_help
> > > > > >      Subject: point stat questions
> > > > > >        Owner: Nobody
> > > > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > > > >       Status: new
> > > > > >  Ticket <URL:
> > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > > > >
> > > > > >
> > > > > >
> > > > > > Hi John,
> > > > > >
> > > > > >
> > > > > >
> > > > > > A few questions about point stat:
> > > > > >
> > > > > > 1.         Are grid relative winds automatically converted
to
> Earth
> > > > > > relative
> > > > > > winds?
> > > > > >
> > > > > > 2.        For observation that fall below the model
surface, are
> > > model
> > > > > > fields interpolated to observation location?  If so, how?
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks!
> > > > > >
> > > > > > Liz
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Elizabeth Satterfield
> > > > > > Editor, Monthly Weather Review
> > > > > >
> > > > > > Chair, AMS Committee on Probability and Statistics
> > > > > >
> > > > > > Meteorologist, Code 7531
> > > > > > Marine Meteorology Division
> > > > > > U.S. Naval Research Laboratory
> > > > > > T 831.656.4056  F 831.656.4026
> > > > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > > > >
> > > > > >
> __________________________________________________________________
> > > > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > > > Any misuse or unauthorized disclosure may result in both
civil
> and
> > > > > criminal
> > > > > > penalties.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
>
>
>

------------------------------------------------
Subject: FW: [rt.rap.ucar.edu #93532] point stat questions
From: Tsu, Mr. Justin
Time: Thu Feb 04 17:55:55 2021

Hi John,

I'd like to revisit an old question about topography, specifically
topo_mask.  When comparing geopotential height for a specific time,
our NRL statistic program had some rejects due to ob height being
below simulated ground (the stations in question were in Denver).
However, I had 0 rejects for the same cmparison in MET.  My topo_mask
looks like this:

82 topo_mask = {
 83     flag = TRUE;
 84     FILE_NAME = ["PYTHON_NUMPY"];
 85     field = { name = "${READ_MODEL}
${DATA_DIR}/terrht_sfc_000000_000000_${NEST}_${START_TIME}_00000000_fcstfld";}
 86     regrid = { method = BILIN; width=2;}
 87     use_obs_thresh = ge-100&&le100;
 88     interp_fcst_thresh = ge-50&&le50;
 89 }

Since use_obs_thresh can have a negative threshold, what is the order
of the difference, model height - ob height or ob height - model
height?

Justin

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Friday, January 17, 2020 11:06 AM
To: Satterfield, Dr. Elizabeth
Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
Subject: Re: [rt.rap.ucar.edu #93532] point stat questions

Justin,

Running Point-stat and verbosity level 3 causes these types of log
messages
to be printed:

DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type ADPSFC,
over
region FULL, for interpolation method GEOG_MATCH_SQUARE(9), using 3779
matched pairs.
DEBUG 3: Number of matched pairs  = 3779
DEBUG 3: Observations processed   = 116861
DEBUG 3: Rejected: SID exclusion  = 0
DEBUG 3: Rejected: obs type       = 103809
DEBUG 3: Rejected: valid time     = 0
DEBUG 3: Rejected: bad obs value  = 0
DEBUG 3: Rejected: off the grid   = 21
DEBUG 3: Rejected: topography     = 548
DEBUG 3: Rejected: level mismatch = 7675
DEBUG 3: Rejected: quality marker = 0
DEBUG 3: Rejected: message type   = 809
DEBUG 3: Rejected: masking region = 0
DEBUG 3: Rejected: bad fcst value = 220
DEBUG 3: Rejected: duplicates     = 0

The "topography" line indicates the number of point observations which
were
skipped due to the topography logic.  And they are skipped when...
(1) the model topo value or point obs elevation value are bad data.
(2) their difference exceeds the "use_obs_thresh" threshold

And we also write a DEBUG(4) log message about it:

DEBUG 4: Skipping observation for topography difference since 119.598
is
not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
[ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.

So please try rerunning with verbosity level 4 (-v 4) and check for
log
messages about "topography" or "geography".

Your next question...
   Also, how does point_stat know what netCDF variable to check terrht
against?

Point-Stat is comparing the model "terrht" against the observation
station
elevation, which is the 6th column of the 11-column point observation
format:

        The "met_point" ASCII format consists of 11 columns:
               Message_Type Station_ID Valid_Time(YYYYMMDD_HHMMSS)
               Lat(Deg North) Lon(Deg East) Elevation(msl)
               Var_Name(or GRIB_Code) Level Height(msl or agl)
               QC_String Observation_Value

This logic is used to discard point obs with large differences from
the
model elevation.

John

On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Thanks John,
>
> I just implemented your changes for a simple point_stat case
verifying
> wind direction.   The point_stat debugging output looks exactly the
same as
> if I hadn't used topo_mask... how do I know if it actually worked
and
> terrain height got into point_stat?
>
> Also, how does point_stat know what netCDF variable to check terrht
> against?
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, January 9, 2020 10:27 AM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>
> Justin,
>
> Sorry for losing this in the shuffle.  It's a hectic time of year.
>
> So your question is whether or not Python-embedding will work when
setting
> the "topo_mask" dictionary in the Point-Stat config file.  I just
tested
> this out (albeit with the development version of the code) and it
seems to
> have worked fine, just as expected.  Remember though that for
> python-embedding you set the file_name to the constant string
> "PYTHON_NUMPY" and the field "name" to the python command you want
to
> execute to read the data.
>
> It looks like you were setting file_name = python command, and that
won't
> work.
>
> Thanks,
> John
>
> //
> // Topography
> //
> topo_mask = {
>    flag               = FALSE;
>    file_name          = [ "PYTHON_NUMPY" ];
>    field              = { name = "read_NRL_binary.py
> trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld"; }
>    regrid             = { method = BILIN; width = 2; }
>    use_obs_thresh     = ge-100&&le100;
>    interp_fcst_thresh = ge-50&&le50;
> }
>
>
>
> On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Hey John,
> >
> > This email probably got lost during the holidays.  Let me know if
you can
> > get around to helping me out with this problem!
> >
> > Thanks and happy new year!
> > Justin
> >
> > -----Original Message-----
> > From: Tsu, Mr. Justin
> > Sent: Friday, December 20, 2019 4:18 PM
> > To: 'met_help at ucar.edu'
> > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Thanks John,
> >
> > When using topo_mask,  will point_Stat understand a python
embedded file?
> > The files we use are named '
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > These are projection gridded data of terrain heights.   Would this
look
> > something like this?
> >
> > topo_mask = {
> >    flag               = FALSE;
> >    file_name          = ["./read_NRL_binary
> >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> >    field              = { name = "TOPO"; level = "L0"; }
> >    regrid             = { method = BILIN; width = 2; }
> >    use_obs_thresh     = ge-100&&le100;
> >    interp_fcst_thresh = ge-50&&le50;
> > }
> > And how does point_stat know which HDF5 varible to use as the
point of
> > comparison to the model terrain height?
> >
> > Happy holidays!
> > Justin
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Thursday, December 19, 2019 6:05 AM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Liz,
> >
> > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> checks
> > the flag in the header indicating whether winds are defined as
grid or
> > earth-relative.  If grid relative, it searches the file for the
> correspond
> > U or V pair and uses both U and V to rotate them to be earth-
relative.
> >
> > That logic does NOT work for python embedding.  I have some ideas
about
> how
> > to make it work but those changes are not slated for the met-9.0
release.
> >
> > I assume you’d like to see this enhancement?  And perhaps we’ve
already
> > talked about this?
> >
> > (2) Config options were added in met-8.1 for the Air Force which
address
> > this issue.  By default this logic is disabled but can be enabled
using
> the
> > “topo_mask” config file dictionary.  FYI, the “land_mask”
dictionary was
> > also added at the same time.  Below is a link to the default
point-stat
> > config file followed by an excerpt from it.
> >
> > John
> >
> >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> >
> > // Topography
> > // For SURFACE message types, only use observations where the topo
-
> > station
> > // elevation difference meets the use_obs_thresh threshold.
> > // For the observations kept, when interpolating forecast data to
the
> > // observation location, only use forecast grid points where the
topo -
> > station
> > // difference meets the interp_fcst_thresh threshold.
> > // topo_mask.flag may be set separately in each "obs.field" entry.
> > //
> > topo_mask = {
> > flag = FALSE;
> > file_name = [];
> > field = { name = "TOPO"; level = "L0"; }
> > regrid = { method = BILIN; width = 2; }
> > use_obs_thresh = ge-100&&le100;
> > interp_fcst_thresh = ge-50&&le50;
> > }
> >
> > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via RT
<
> > met_help at ucar.edu> wrote:
> >
> > >
> > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > Transaction: Ticket created by
Elizabeth.Satterfield at nrlmry.navy.mil
> > >        Queue: met_help
> > >      Subject: point stat questions
> > >        Owner: Nobody
> > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > >       Status: new
> > >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> >
> > >
> > >
> > > Hi John,
> > >
> > >
> > >
> > > A few questions about point stat:
> > >
> > > 1.         Are grid relative winds automatically converted to
Earth
> > > relative
> > > winds?
> > >
> > > 2.        For observation that fall below the model surface, are
model
> > > fields interpolated to observation location?  If so, how?
> > >
> > >
> > >
> > > Thanks!
> > >
> > > Liz
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Elizabeth Satterfield
> > > Editor, Monthly Weather Review
> > >
> > > Chair, AMS Committee on Probability and Statistics
> > >
> > > Meteorologist, Code 7531
> > > Marine Meteorology Division
> > > U.S. Naval Research Laboratory
> > > T 831.656.4056  F 831.656.4026
> > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > >
> > >
__________________________________________________________________
> > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > Any misuse or unauthorized disclosure may result in both civil
and
> > criminal
> > > penalties.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
>
>
>



------------------------------------------------
Subject: point stat questions
From: John Halley Gotway
Time: Thu Feb 04 18:28:02 2021

Justin,

Here’s the relevant line of code:

https://github.com/dtcenter/MET/blob/0fe2e42609120df236f74ae23c07f3fa4b930247/met/src/libcode/vx_statistics/pair_data_point.cc#L875

The difference is computed as model topography - observation station
elevation. So this assumes that those two quantities are the same
units.
And note that at verbosity level 4 it prints a detailed log message.
So you
could play around with the threshold, run at -v 4, and you should see
useful log messages.

John

On Thu, Feb 4, 2021 at 5:56 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Hi John,
>
> I'd like to revisit an old question about topography, specifically
> topo_mask.  When comparing geopotential height for a specific time,
our NRL
> statistic program had some rejects due to ob height being below
simulated
> ground (the stations in question were in Denver).  However, I had 0
rejects
> for the same cmparison in MET.  My topo_mask looks like this:
>
> 82 topo_mask = {
>  83     flag = TRUE;
>  84     FILE_NAME = ["PYTHON_NUMPY"];
>  85     field = { name = "${READ_MODEL}
>
${DATA_DIR}/terrht_sfc_000000_000000_${NEST}_${START_TIME}_00000000_fcstfld";}
>  86     regrid = { method = BILIN; width=2;}
>  87     use_obs_thresh = ge-100&&le100;
>  88     interp_fcst_thresh = ge-50&&le50;
>  89 }
>
> Since use_obs_thresh can have a negative threshold, what is the
order of
> the difference, model height - ob height or ob height - model
height?
>
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Friday, January 17, 2020 11:06 AM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>
> Justin,
>
> Running Point-stat and verbosity level 3 causes these types of log
messages
> to be printed:
>
> DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type
ADPSFC, over
> region FULL, for interpolation method GEOG_MATCH_SQUARE(9), using
3779
> matched pairs.
> DEBUG 3: Number of matched pairs  = 3779
> DEBUG 3: Observations processed   = 116861
> DEBUG 3: Rejected: SID exclusion  = 0
> DEBUG 3: Rejected: obs type       = 103809
> DEBUG 3: Rejected: valid time     = 0
> DEBUG 3: Rejected: bad obs value  = 0
> DEBUG 3: Rejected: off the grid   = 21
> DEBUG 3: Rejected: topography     = 548
> DEBUG 3: Rejected: level mismatch = 7675
> DEBUG 3: Rejected: quality marker = 0
> DEBUG 3: Rejected: message type   = 809
> DEBUG 3: Rejected: masking region = 0
> DEBUG 3: Rejected: bad fcst value = 220
> DEBUG 3: Rejected: duplicates     = 0
>
> The "topography" line indicates the number of point observations
which were
> skipped due to the topography logic.  And they are skipped when...
> (1) the model topo value or point obs elevation value are bad data.
> (2) their difference exceeds the "use_obs_thresh" threshold
>
> And we also write a DEBUG(4) log message about it:
>
> DEBUG 4: Skipping observation for topography difference since
119.598 is
> not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> [ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.
>
> So please try rerunning with verbosity level 4 (-v 4) and check for
log
> messages about "topography" or "geography".
>
> Your next question...
>    Also, how does point_stat know what netCDF variable to check
terrht
> against?
>
> Point-Stat is comparing the model "terrht" against the observation
station
> elevation, which is the 6th column of the 11-column point
observation
> format:
>
>         The "met_point" ASCII format consists of 11 columns:
>                Message_Type Station_ID Valid_Time(YYYYMMDD_HHMMSS)
>                Lat(Deg North) Lon(Deg East) Elevation(msl)
>                Var_Name(or GRIB_Code) Level Height(msl or agl)
>                QC_String Observation_Value
>
> This logic is used to discard point obs with large differences from
the
> model elevation.
>
> John
>
> On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Thanks John,
> >
> > I just implemented your changes for a simple point_stat case
verifying
> > wind direction.   The point_stat debugging output looks exactly
the same
> as
> > if I hadn't used topo_mask... how do I know if it actually worked
and
> > terrain height got into point_stat?
> >
> > Also, how does point_stat know what netCDF variable to check
terrht
> > against?
> > Justin
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Thursday, January 9, 2020 10:27 AM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Justin,
> >
> > Sorry for losing this in the shuffle.  It's a hectic time of year.
> >
> > So your question is whether or not Python-embedding will work when
> setting
> > the "topo_mask" dictionary in the Point-Stat config file.  I just
tested
> > this out (albeit with the development version of the code) and it
seems
> to
> > have worked fine, just as expected.  Remember though that for
> > python-embedding you set the file_name to the constant string
> > "PYTHON_NUMPY" and the field "name" to the python command you want
to
> > execute to read the data.
> >
> > It looks like you were setting file_name = python command, and
that won't
> > work.
> >
> > Thanks,
> > John
> >
> > //
> > // Topography
> > //
> > topo_mask = {
> >    flag               = FALSE;
> >    file_name          = [ "PYTHON_NUMPY" ];
> >    field              = { name = "read_NRL_binary.py
> > trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld";
}
> >    regrid             = { method = BILIN; width = 2; }
> >    use_obs_thresh     = ge-100&&le100;
> >    interp_fcst_thresh = ge-50&&le50;
> > }
> >
> >
> >
> > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > Hey John,
> > >
> > > This email probably got lost during the holidays.  Let me know
if you
> can
> > > get around to helping me out with this problem!
> > >
> > > Thanks and happy new year!
> > > Justin
> > >
> > > -----Original Message-----
> > > From: Tsu, Mr. Justin
> > > Sent: Friday, December 20, 2019 4:18 PM
> > > To: 'met_help at ucar.edu'
> > > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Thanks John,
> > >
> > > When using topo_mask,  will point_Stat understand a python
embedded
> file?
> > > The files we use are named '
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > These are projection gridded data of terrain heights.   Would
this look
> > > something like this?
> > >
> > > topo_mask = {
> > >    flag               = FALSE;
> > >    file_name          = ["./read_NRL_binary
> > >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > >    field              = { name = "TOPO"; level = "L0"; }
> > >    regrid             = { method = BILIN; width = 2; }
> > >    use_obs_thresh     = ge-100&&le100;
> > >    interp_fcst_thresh = ge-50&&le50;
> > > }
> > > And how does point_stat know which HDF5 varible to use as the
point of
> > > comparison to the model terrain height?
> > >
> > > Happy holidays!
> > > Justin
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Thursday, December 19, 2019 6:05 AM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Liz,
> > >
> > > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> > checks
> > > the flag in the header indicating whether winds are defined as
grid or
> > > earth-relative.  If grid relative, it searches the file for the
> > correspond
> > > U or V pair and uses both U and V to rotate them to be earth-
relative.
> > >
> > > That logic does NOT work for python embedding.  I have some
ideas about
> > how
> > > to make it work but those changes are not slated for the met-9.0
> release.
> > >
> > > I assume you’d like to see this enhancement?  And perhaps we’ve
already
> > > talked about this?
> > >
> > > (2) Config options were added in met-8.1 for the Air Force which
> address
> > > this issue.  By default this logic is disabled but can be
enabled using
> > the
> > > “topo_mask” config file dictionary.  FYI, the “land_mask”
dictionary
> was
> > > also added at the same time.  Below is a link to the default
point-stat
> > > config file followed by an excerpt from it.
> > >
> > > John
> > >
> > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > >
> > > // Topography
> > > // For SURFACE message types, only use observations where the
topo -
> > > station
> > > // elevation difference meets the use_obs_thresh threshold.
> > > // For the observations kept, when interpolating forecast data
to the
> > > // observation location, only use forecast grid points where the
topo -
> > > station
> > > // difference meets the interp_fcst_thresh threshold.
> > > // topo_mask.flag may be set separately in each "obs.field"
entry.
> > > //
> > > topo_mask = {
> > > flag = FALSE;
> > > file_name = [];
> > > field = { name = "TOPO"; level = "L0"; }
> > > regrid = { method = BILIN; width = 2; }
> > > use_obs_thresh = ge-100&&le100;
> > > interp_fcst_thresh = ge-50&&le50;
> > > }
> > >
> > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via
RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > >
> > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > > Transaction: Ticket created by
Elizabeth.Satterfield at nrlmry.navy.mil
> > > >        Queue: met_help
> > > >      Subject: point stat questions
> > > >        Owner: Nobody
> > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > >       Status: new
> > > >  Ticket <URL:
> https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > >
> > > >
> > > >
> > > > Hi John,
> > > >
> > > >
> > > >
> > > > A few questions about point stat:
> > > >
> > > > 1.         Are grid relative winds automatically converted to
Earth
> > > > relative
> > > > winds?
> > > >
> > > > 2.        For observation that fall below the model surface,
are
> model
> > > > fields interpolated to observation location?  If so, how?
> > > >
> > > >
> > > >
> > > > Thanks!
> > > >
> > > > Liz
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Elizabeth Satterfield
> > > > Editor, Monthly Weather Review
> > > >
> > > > Chair, AMS Committee on Probability and Statistics
> > > >
> > > > Meteorologist, Code 7531
> > > > Marine Meteorology Division
> > > > U.S. Naval Research Laboratory
> > > > T 831.656.4056  F 831.656.4026
> > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > >
> > > >
__________________________________________________________________
> > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > Any misuse or unauthorized disclosure may result in both civil
and
> > > criminal
> > > > penalties.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
>
>
>
>

------------------------------------------------
Subject: RE: FW: [rt.rap.ucar.edu #93532] point stat questions
From: Tsu, Mr. Justin
Time: Fri Feb 05 17:48:24 2021

I don't think my topo mask is working.  I just set use_ob_thresh to
le-9999:

104 topo_mask = {
105     flag = TRUE;
106     FILE_NAME = ["PYTHON_NUMPY"];
107     field = { name = "${READ_MODEL}
${DATA_DIR}/terrht_sfc_000000_000000_${N
EST}_${START_TIME}_00000000_fcstfld";}
108     regrid = { method = BILIN; width=2;}
109     use_obs_thresh = le-9999;
110     interp_fcst_thresh = ge-50&&le50;

Which should theoretically reject every single matched pair.

But:

[tsu at lorenz raob]$ grep 'topography'
PointStat2019072300NEST1a0127x0127.log
DEBUG 3: Rejected: topography     = 0
DEBUG 3: Rejected: topography     = 0
DEBUG 3: Rejected: topography     = 0
DEBUG 3: Rejected: topography     = 0
DEBUG 3: Rejected: topography     = 0
DEBUG 3: Rejected: topography     = 0
DEBUG 3: Rejected: topography     = 0
DEBUG 3: Rejected: topography     = 0
DEBUG 3: Rejected: topography     = 0
DEBUG 3: Rejected: topography     = 0
DEBUG 3: Rejected: topography     = 0

I also read in a terrain height file and an observation file for a
particular station to see if they are comparable and they check out.
Not sure what is going on, but any guidance would be appreciated.

Justin

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Thursday, February 4, 2021 5:28 PM
To: Satterfield, Dr. Elizabeth
Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions

Justin,

Here’s the relevant line of code:

https://github.com/dtcenter/MET/blob/0fe2e42609120df236f74ae23c07f3fa4b930247/met/src/libcode/vx_statistics/pair_data_point.cc#L875

The difference is computed as model topography - observation station
elevation. So this assumes that those two quantities are the same
units.
And note that at verbosity level 4 it prints a detailed log message.
So you
could play around with the threshold, run at -v 4, and you should see
useful log messages.

John

On Thu, Feb 4, 2021 at 5:56 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Hi John,
>
> I'd like to revisit an old question about topography, specifically
> topo_mask.  When comparing geopotential height for a specific time,
our NRL
> statistic program had some rejects due to ob height being below
simulated
> ground (the stations in question were in Denver).  However, I had 0
rejects
> for the same cmparison in MET.  My topo_mask looks like this:
>
> 82 topo_mask = {
>  83     flag = TRUE;
>  84     FILE_NAME = ["PYTHON_NUMPY"];
>  85     field = { name = "${READ_MODEL}
>
${DATA_DIR}/terrht_sfc_000000_000000_${NEST}_${START_TIME}_00000000_fcstfld";}
>  86     regrid = { method = BILIN; width=2;}
>  87     use_obs_thresh = ge-100&&le100;
>  88     interp_fcst_thresh = ge-50&&le50;
>  89 }
>
> Since use_obs_thresh can have a negative threshold, what is the
order of
> the difference, model height - ob height or ob height - model
height?
>
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Friday, January 17, 2020 11:06 AM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>
> Justin,
>
> Running Point-stat and verbosity level 3 causes these types of log
messages
> to be printed:
>
> DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type
ADPSFC, over
> region FULL, for interpolation method GEOG_MATCH_SQUARE(9), using
3779
> matched pairs.
> DEBUG 3: Number of matched pairs  = 3779
> DEBUG 3: Observations processed   = 116861
> DEBUG 3: Rejected: SID exclusion  = 0
> DEBUG 3: Rejected: obs type       = 103809
> DEBUG 3: Rejected: valid time     = 0
> DEBUG 3: Rejected: bad obs value  = 0
> DEBUG 3: Rejected: off the grid   = 21
> DEBUG 3: Rejected: topography     = 548
> DEBUG 3: Rejected: level mismatch = 7675
> DEBUG 3: Rejected: quality marker = 0
> DEBUG 3: Rejected: message type   = 809
> DEBUG 3: Rejected: masking region = 0
> DEBUG 3: Rejected: bad fcst value = 220
> DEBUG 3: Rejected: duplicates     = 0
>
> The "topography" line indicates the number of point observations
which were
> skipped due to the topography logic.  And they are skipped when...
> (1) the model topo value or point obs elevation value are bad data.
> (2) their difference exceeds the "use_obs_thresh" threshold
>
> And we also write a DEBUG(4) log message about it:
>
> DEBUG 4: Skipping observation for topography difference since
119.598 is
> not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> [ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.
>
> So please try rerunning with verbosity level 4 (-v 4) and check for
log
> messages about "topography" or "geography".
>
> Your next question...
>    Also, how does point_stat know what netCDF variable to check
terrht
> against?
>
> Point-Stat is comparing the model "terrht" against the observation
station
> elevation, which is the 6th column of the 11-column point
observation
> format:
>
>         The "met_point" ASCII format consists of 11 columns:
>                Message_Type Station_ID Valid_Time(YYYYMMDD_HHMMSS)
>                Lat(Deg North) Lon(Deg East) Elevation(msl)
>                Var_Name(or GRIB_Code) Level Height(msl or agl)
>                QC_String Observation_Value
>
> This logic is used to discard point obs with large differences from
the
> model elevation.
>
> John
>
> On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Thanks John,
> >
> > I just implemented your changes for a simple point_stat case
verifying
> > wind direction.   The point_stat debugging output looks exactly
the same
> as
> > if I hadn't used topo_mask... how do I know if it actually worked
and
> > terrain height got into point_stat?
> >
> > Also, how does point_stat know what netCDF variable to check
terrht
> > against?
> > Justin
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Thursday, January 9, 2020 10:27 AM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Justin,
> >
> > Sorry for losing this in the shuffle.  It's a hectic time of year.
> >
> > So your question is whether or not Python-embedding will work when
> setting
> > the "topo_mask" dictionary in the Point-Stat config file.  I just
tested
> > this out (albeit with the development version of the code) and it
seems
> to
> > have worked fine, just as expected.  Remember though that for
> > python-embedding you set the file_name to the constant string
> > "PYTHON_NUMPY" and the field "name" to the python command you want
to
> > execute to read the data.
> >
> > It looks like you were setting file_name = python command, and
that won't
> > work.
> >
> > Thanks,
> > John
> >
> > //
> > // Topography
> > //
> > topo_mask = {
> >    flag               = FALSE;
> >    file_name          = [ "PYTHON_NUMPY" ];
> >    field              = { name = "read_NRL_binary.py
> > trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld";
}
> >    regrid             = { method = BILIN; width = 2; }
> >    use_obs_thresh     = ge-100&&le100;
> >    interp_fcst_thresh = ge-50&&le50;
> > }
> >
> >
> >
> > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > Hey John,
> > >
> > > This email probably got lost during the holidays.  Let me know
if you
> can
> > > get around to helping me out with this problem!
> > >
> > > Thanks and happy new year!
> > > Justin
> > >
> > > -----Original Message-----
> > > From: Tsu, Mr. Justin
> > > Sent: Friday, December 20, 2019 4:18 PM
> > > To: 'met_help at ucar.edu'
> > > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Thanks John,
> > >
> > > When using topo_mask,  will point_Stat understand a python
embedded
> file?
> > > The files we use are named '
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > These are projection gridded data of terrain heights.   Would
this look
> > > something like this?
> > >
> > > topo_mask = {
> > >    flag               = FALSE;
> > >    file_name          = ["./read_NRL_binary
> > >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > >    field              = { name = "TOPO"; level = "L0"; }
> > >    regrid             = { method = BILIN; width = 2; }
> > >    use_obs_thresh     = ge-100&&le100;
> > >    interp_fcst_thresh = ge-50&&le50;
> > > }
> > > And how does point_stat know which HDF5 varible to use as the
point of
> > > comparison to the model terrain height?
> > >
> > > Happy holidays!
> > > Justin
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Thursday, December 19, 2019 6:05 AM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Liz,
> > >
> > > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> > checks
> > > the flag in the header indicating whether winds are defined as
grid or
> > > earth-relative.  If grid relative, it searches the file for the
> > correspond
> > > U or V pair and uses both U and V to rotate them to be earth-
relative.
> > >
> > > That logic does NOT work for python embedding.  I have some
ideas about
> > how
> > > to make it work but those changes are not slated for the met-9.0
> release.
> > >
> > > I assume you’d like to see this enhancement?  And perhaps we’ve
already
> > > talked about this?
> > >
> > > (2) Config options were added in met-8.1 for the Air Force which
> address
> > > this issue.  By default this logic is disabled but can be
enabled using
> > the
> > > “topo_mask” config file dictionary.  FYI, the “land_mask”
dictionary
> was
> > > also added at the same time.  Below is a link to the default
point-stat
> > > config file followed by an excerpt from it.
> > >
> > > John
> > >
> > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > >
> > > // Topography
> > > // For SURFACE message types, only use observations where the
topo -
> > > station
> > > // elevation difference meets the use_obs_thresh threshold.
> > > // For the observations kept, when interpolating forecast data
to the
> > > // observation location, only use forecast grid points where the
topo -
> > > station
> > > // difference meets the interp_fcst_thresh threshold.
> > > // topo_mask.flag may be set separately in each "obs.field"
entry.
> > > //
> > > topo_mask = {
> > > flag = FALSE;
> > > file_name = [];
> > > field = { name = "TOPO"; level = "L0"; }
> > > regrid = { method = BILIN; width = 2; }
> > > use_obs_thresh = ge-100&&le100;
> > > interp_fcst_thresh = ge-50&&le50;
> > > }
> > >
> > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via
RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > >
> > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > > Transaction: Ticket created by
Elizabeth.Satterfield at nrlmry.navy.mil
> > > >        Queue: met_help
> > > >      Subject: point stat questions
> > > >        Owner: Nobody
> > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > >       Status: new
> > > >  Ticket <URL:
> https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > >
> > > >
> > > >
> > > > Hi John,
> > > >
> > > >
> > > >
> > > > A few questions about point stat:
> > > >
> > > > 1.         Are grid relative winds automatically converted to
Earth
> > > > relative
> > > > winds?
> > > >
> > > > 2.        For observation that fall below the model surface,
are
> model
> > > > fields interpolated to observation location?  If so, how?
> > > >
> > > >
> > > >
> > > > Thanks!
> > > >
> > > > Liz
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Elizabeth Satterfield
> > > > Editor, Monthly Weather Review
> > > >
> > > > Chair, AMS Committee on Probability and Statistics
> > > >
> > > > Meteorologist, Code 7531
> > > > Marine Meteorology Division
> > > > U.S. Naval Research Laboratory
> > > > T 831.656.4056  F 831.656.4026
> > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > >
> > > >
__________________________________________________________________
> > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > Any misuse or unauthorized disclosure may result in both civil
and
> > > criminal
> > > > penalties.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
>
>
>
>



------------------------------------------------
Subject: point stat questions
From: John Halley Gotway
Time: Fri Feb 05 20:44:35 2021

Justin,

If you’re able to send me sample data to replicate your case, I could
take
a closer look.

John

On Fri, Feb 5, 2021 at 5:48 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> I don't think my topo mask is working.  I just set use_ob_thresh to
> le-9999:
>
> 104 topo_mask = {
> 105     flag = TRUE;
> 106     FILE_NAME = ["PYTHON_NUMPY"];
> 107     field = { name = "${READ_MODEL}
> ${DATA_DIR}/terrht_sfc_000000_000000_${N
> EST}_${START_TIME}_00000000_fcstfld";}
> 108     regrid = { method = BILIN; width=2;}
> 109     use_obs_thresh = le-9999;
> 110     interp_fcst_thresh = ge-50&&le50;
>
> Which should theoretically reject every single matched pair.
>
> But:
>
> [tsu at lorenz raob]$ grep 'topography'
> PointStat2019072300NEST1a0127x0127.log
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
>
> I also read in a terrain height file and an observation file for a
> particular station to see if they are comparable and they check out.
Not
> sure what is going on, but any guidance would be appreciated.
>
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, February 4, 2021 5:28 PM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
>
> Justin,
>
> Here’s the relevant line of code:
>
>
>
https://github.com/dtcenter/MET/blob/0fe2e42609120df236f74ae23c07f3fa4b930247/met/src/libcode/vx_statistics/pair_data_point.cc#L875
>
> The difference is computed as model topography - observation station
> elevation. So this assumes that those two quantities are the same
units.
> And note that at verbosity level 4 it prints a detailed log message.
So you
> could play around with the threshold, run at -v 4, and you should
see
> useful log messages.
>
> John
>
> On Thu, Feb 4, 2021 at 5:56 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Hi John,
> >
> > I'd like to revisit an old question about topography, specifically
> > topo_mask.  When comparing geopotential height for a specific
time, our
> NRL
> > statistic program had some rejects due to ob height being below
simulated
> > ground (the stations in question were in Denver).  However, I had
0
> rejects
> > for the same cmparison in MET.  My topo_mask looks like this:
> >
> > 82 topo_mask = {
> >  83     flag = TRUE;
> >  84     FILE_NAME = ["PYTHON_NUMPY"];
> >  85     field = { name = "${READ_MODEL}
> >
>
${DATA_DIR}/terrht_sfc_000000_000000_${NEST}_${START_TIME}_00000000_fcstfld";}
> >  86     regrid = { method = BILIN; width=2;}
> >  87     use_obs_thresh = ge-100&&le100;
> >  88     interp_fcst_thresh = ge-50&&le50;
> >  89 }
> >
> > Since use_obs_thresh can have a negative threshold, what is the
order of
> > the difference, model height - ob height or ob height - model
height?
> >
> > Justin
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Friday, January 17, 2020 11:06 AM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Justin,
> >
> > Running Point-stat and verbosity level 3 causes these types of log
> messages
> > to be printed:
> >
> > DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type
ADPSFC,
> over
> > region FULL, for interpolation method GEOG_MATCH_SQUARE(9), using
3779
> > matched pairs.
> > DEBUG 3: Number of matched pairs  = 3779
> > DEBUG 3: Observations processed   = 116861
> > DEBUG 3: Rejected: SID exclusion  = 0
> > DEBUG 3: Rejected: obs type       = 103809
> > DEBUG 3: Rejected: valid time     = 0
> > DEBUG 3: Rejected: bad obs value  = 0
> > DEBUG 3: Rejected: off the grid   = 21
> > DEBUG 3: Rejected: topography     = 548
> > DEBUG 3: Rejected: level mismatch = 7675
> > DEBUG 3: Rejected: quality marker = 0
> > DEBUG 3: Rejected: message type   = 809
> > DEBUG 3: Rejected: masking region = 0
> > DEBUG 3: Rejected: bad fcst value = 220
> > DEBUG 3: Rejected: duplicates     = 0
> >
> > The "topography" line indicates the number of point observations
which
> were
> > skipped due to the topography logic.  And they are skipped when...
> > (1) the model topo value or point obs elevation value are bad
data.
> > (2) their difference exceeds the "use_obs_thresh" threshold
> >
> > And we also write a DEBUG(4) log message about it:
> >
> > DEBUG 4: Skipping observation for topography difference since
119.598 is
> > not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> > [ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.
> >
> > So please try rerunning with verbosity level 4 (-v 4) and check
for log
> > messages about "topography" or "geography".
> >
> > Your next question...
> >    Also, how does point_stat know what netCDF variable to check
terrht
> > against?
> >
> > Point-Stat is comparing the model "terrht" against the observation
> station
> > elevation, which is the 6th column of the 11-column point
observation
> > format:
> >
> >         The "met_point" ASCII format consists of 11 columns:
> >                Message_Type Station_ID Valid_Time(YYYYMMDD_HHMMSS)
> >                Lat(Deg North) Lon(Deg East) Elevation(msl)
> >                Var_Name(or GRIB_Code) Level Height(msl or agl)
> >                QC_String Observation_Value
> >
> > This logic is used to discard point obs with large differences
from the
> > model elevation.
> >
> > John
> >
> > On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT <
> met_help at ucar.edu
> > >
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > Thanks John,
> > >
> > > I just implemented your changes for a simple point_stat case
verifying
> > > wind direction.   The point_stat debugging output looks exactly
the
> same
> > as
> > > if I hadn't used topo_mask... how do I know if it actually
worked and
> > > terrain height got into point_stat?
> > >
> > > Also, how does point_stat know what netCDF variable to check
terrht
> > > against?
> > > Justin
> > >
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Thursday, January 9, 2020 10:27 AM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Justin,
> > >
> > > Sorry for losing this in the shuffle.  It's a hectic time of
year.
> > >
> > > So your question is whether or not Python-embedding will work
when
> > setting
> > > the "topo_mask" dictionary in the Point-Stat config file.  I
just
> tested
> > > this out (albeit with the development version of the code) and
it seems
> > to
> > > have worked fine, just as expected.  Remember though that for
> > > python-embedding you set the file_name to the constant string
> > > "PYTHON_NUMPY" and the field "name" to the python command you
want to
> > > execute to read the data.
> > >
> > > It looks like you were setting file_name = python command, and
that
> won't
> > > work.
> > >
> > > Thanks,
> > > John
> > >
> > > //
> > > // Topography
> > > //
> > > topo_mask = {
> > >    flag               = FALSE;
> > >    file_name          = [ "PYTHON_NUMPY" ];
> > >    field              = { name = "read_NRL_binary.py
> > >
trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld"; }
> > >    regrid             = { method = BILIN; width = 2; }
> > >    use_obs_thresh     = ge-100&&le100;
> > >    interp_fcst_thresh = ge-50&&le50;
> > > }
> > >
> > >
> > >
> > > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT <
> met_help at ucar.edu
> > >
> > > wrote:
> > >
> > > >
> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>
> > > >
> > > > Hey John,
> > > >
> > > > This email probably got lost during the holidays.  Let me know
if you
> > can
> > > > get around to helping me out with this problem!
> > > >
> > > > Thanks and happy new year!
> > > > Justin
> > > >
> > > > -----Original Message-----
> > > > From: Tsu, Mr. Justin
> > > > Sent: Friday, December 20, 2019 4:18 PM
> > > > To: 'met_help at ucar.edu'
> > > > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Thanks John,
> > > >
> > > > When using topo_mask,  will point_Stat understand a python
embedded
> > file?
> > > > The files we use are named '
> > > >
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > > These are projection gridded data of terrain heights.   Would
this
> look
> > > > something like this?
> > > >
> > > > topo_mask = {
> > > >    flag               = FALSE;
> > > >    file_name          = ["./read_NRL_binary
> > > >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > > >    field              = { name = "TOPO"; level = "L0"; }
> > > >    regrid             = { method = BILIN; width = 2; }
> > > >    use_obs_thresh     = ge-100&&le100;
> > > >    interp_fcst_thresh = ge-50&&le50;
> > > > }
> > > > And how does point_stat know which HDF5 varible to use as the
point
> of
> > > > comparison to the model terrain height?
> > > >
> > > > Happy holidays!
> > > > Justin
> > > > -----Original Message-----
> > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > Sent: Thursday, December 19, 2019 6:05 AM
> > > > To: Satterfield, Dr. Elizabeth
> > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Liz,
> > > >
> > > > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> > > checks
> > > > the flag in the header indicating whether winds are defined as
grid
> or
> > > > earth-relative.  If grid relative, it searches the file for
the
> > > correspond
> > > > U or V pair and uses both U and V to rotate them to be
> earth-relative.
> > > >
> > > > That logic does NOT work for python embedding.  I have some
ideas
> about
> > > how
> > > > to make it work but those changes are not slated for the met-
9.0
> > release.
> > > >
> > > > I assume you’d like to see this enhancement?  And perhaps
we’ve
> already
> > > > talked about this?
> > > >
> > > > (2) Config options were added in met-8.1 for the Air Force
which
> > address
> > > > this issue.  By default this logic is disabled but can be
enabled
> using
> > > the
> > > > “topo_mask” config file dictionary.  FYI, the “land_mask”
dictionary
> > was
> > > > also added at the same time.  Below is a link to the default
> point-stat
> > > > config file followed by an excerpt from it.
> > > >
> > > > John
> > > >
> > > >
> > > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > > >
> > > > // Topography
> > > > // For SURFACE message types, only use observations where the
topo -
> > > > station
> > > > // elevation difference meets the use_obs_thresh threshold.
> > > > // For the observations kept, when interpolating forecast data
to the
> > > > // observation location, only use forecast grid points where
the
> topo -
> > > > station
> > > > // difference meets the interp_fcst_thresh threshold.
> > > > // topo_mask.flag may be set separately in each "obs.field"
entry.
> > > > //
> > > > topo_mask = {
> > > > flag = FALSE;
> > > > file_name = [];
> > > > field = { name = "TOPO"; level = "L0"; }
> > > > regrid = { method = BILIN; width = 2; }
> > > > use_obs_thresh = ge-100&&le100;
> > > > interp_fcst_thresh = ge-50&&le50;
> > > > }
> > > >
> > > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via
RT <
> > > > met_help at ucar.edu> wrote:
> > > >
> > > > >
> > > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > > > Transaction: Ticket created by
> Elizabeth.Satterfield at nrlmry.navy.mil
> > > > >        Queue: met_help
> > > > >      Subject: point stat questions
> > > > >        Owner: Nobody
> > > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > > >       Status: new
> > > > >  Ticket <URL:
> > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > > >
> > > > >
> > > > >
> > > > > Hi John,
> > > > >
> > > > >
> > > > >
> > > > > A few questions about point stat:
> > > > >
> > > > > 1.         Are grid relative winds automatically converted
to Earth
> > > > > relative
> > > > > winds?
> > > > >
> > > > > 2.        For observation that fall below the model surface,
are
> > model
> > > > > fields interpolated to observation location?  If so, how?
> > > > >
> > > > >
> > > > >
> > > > > Thanks!
> > > > >
> > > > > Liz
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Elizabeth Satterfield
> > > > > Editor, Monthly Weather Review
> > > > >
> > > > > Chair, AMS Committee on Probability and Statistics
> > > > >
> > > > > Meteorologist, Code 7531
> > > > > Marine Meteorology Division
> > > > > U.S. Naval Research Laboratory
> > > > > T 831.656.4056  F 831.656.4026
> > > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > > >
> > > > >
__________________________________________________________________
> > > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > > Any misuse or unauthorized disclosure may result in both
civil and
> > > > criminal
> > > > > penalties.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>

------------------------------------------------
Subject: RE: FW: [rt.rap.ucar.edu #93532] point stat questions
From: Tsu, Mr. Justin
Time: Mon Feb 08 11:36:23 2021

Thanks John,

I have all the data ready to ship.   Do I need to upload it to the ftp
like last time?

Justin

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Friday, February 5, 2021 7:45 PM
To: Satterfield, Dr. Elizabeth
Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions

Justin,

If you’re able to send me sample data to replicate your case, I could
take
a closer look.

John

On Fri, Feb 5, 2021 at 5:48 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> I don't think my topo mask is working.  I just set use_ob_thresh to
> le-9999:
>
> 104 topo_mask = {
> 105     flag = TRUE;
> 106     FILE_NAME = ["PYTHON_NUMPY"];
> 107     field = { name = "${READ_MODEL}
> ${DATA_DIR}/terrht_sfc_000000_000000_${N
> EST}_${START_TIME}_00000000_fcstfld";}
> 108     regrid = { method = BILIN; width=2;}
> 109     use_obs_thresh = le-9999;
> 110     interp_fcst_thresh = ge-50&&le50;
>
> Which should theoretically reject every single matched pair.
>
> But:
>
> [tsu at lorenz raob]$ grep 'topography'
> PointStat2019072300NEST1a0127x0127.log
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
> DEBUG 3: Rejected: topography     = 0
>
> I also read in a terrain height file and an observation file for a
> particular station to see if they are comparable and they check out.
Not
> sure what is going on, but any guidance would be appreciated.
>
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, February 4, 2021 5:28 PM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
>
> Justin,
>
> Here’s the relevant line of code:
>
>
>
https://github.com/dtcenter/MET/blob/0fe2e42609120df236f74ae23c07f3fa4b930247/met/src/libcode/vx_statistics/pair_data_point.cc#L875
>
> The difference is computed as model topography - observation station
> elevation. So this assumes that those two quantities are the same
units.
> And note that at verbosity level 4 it prints a detailed log message.
So you
> could play around with the threshold, run at -v 4, and you should
see
> useful log messages.
>
> John
>
> On Thu, Feb 4, 2021 at 5:56 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Hi John,
> >
> > I'd like to revisit an old question about topography, specifically
> > topo_mask.  When comparing geopotential height for a specific
time, our
> NRL
> > statistic program had some rejects due to ob height being below
simulated
> > ground (the stations in question were in Denver).  However, I had
0
> rejects
> > for the same cmparison in MET.  My topo_mask looks like this:
> >
> > 82 topo_mask = {
> >  83     flag = TRUE;
> >  84     FILE_NAME = ["PYTHON_NUMPY"];
> >  85     field = { name = "${READ_MODEL}
> >
>
${DATA_DIR}/terrht_sfc_000000_000000_${NEST}_${START_TIME}_00000000_fcstfld";}
> >  86     regrid = { method = BILIN; width=2;}
> >  87     use_obs_thresh = ge-100&&le100;
> >  88     interp_fcst_thresh = ge-50&&le50;
> >  89 }
> >
> > Since use_obs_thresh can have a negative threshold, what is the
order of
> > the difference, model height - ob height or ob height - model
height?
> >
> > Justin
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Friday, January 17, 2020 11:06 AM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Justin,
> >
> > Running Point-stat and verbosity level 3 causes these types of log
> messages
> > to be printed:
> >
> > DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type
ADPSFC,
> over
> > region FULL, for interpolation method GEOG_MATCH_SQUARE(9), using
3779
> > matched pairs.
> > DEBUG 3: Number of matched pairs  = 3779
> > DEBUG 3: Observations processed   = 116861
> > DEBUG 3: Rejected: SID exclusion  = 0
> > DEBUG 3: Rejected: obs type       = 103809
> > DEBUG 3: Rejected: valid time     = 0
> > DEBUG 3: Rejected: bad obs value  = 0
> > DEBUG 3: Rejected: off the grid   = 21
> > DEBUG 3: Rejected: topography     = 548
> > DEBUG 3: Rejected: level mismatch = 7675
> > DEBUG 3: Rejected: quality marker = 0
> > DEBUG 3: Rejected: message type   = 809
> > DEBUG 3: Rejected: masking region = 0
> > DEBUG 3: Rejected: bad fcst value = 220
> > DEBUG 3: Rejected: duplicates     = 0
> >
> > The "topography" line indicates the number of point observations
which
> were
> > skipped due to the topography logic.  And they are skipped when...
> > (1) the model topo value or point obs elevation value are bad
data.
> > (2) their difference exceeds the "use_obs_thresh" threshold
> >
> > And we also write a DEBUG(4) log message about it:
> >
> > DEBUG 4: Skipping observation for topography difference since
119.598 is
> > not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> > [ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.
> >
> > So please try rerunning with verbosity level 4 (-v 4) and check
for log
> > messages about "topography" or "geography".
> >
> > Your next question...
> >    Also, how does point_stat know what netCDF variable to check
terrht
> > against?
> >
> > Point-Stat is comparing the model "terrht" against the observation
> station
> > elevation, which is the 6th column of the 11-column point
observation
> > format:
> >
> >         The "met_point" ASCII format consists of 11 columns:
> >                Message_Type Station_ID Valid_Time(YYYYMMDD_HHMMSS)
> >                Lat(Deg North) Lon(Deg East) Elevation(msl)
> >                Var_Name(or GRIB_Code) Level Height(msl or agl)
> >                QC_String Observation_Value
> >
> > This logic is used to discard point obs with large differences
from the
> > model elevation.
> >
> > John
> >
> > On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT <
> met_help at ucar.edu
> > >
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > Thanks John,
> > >
> > > I just implemented your changes for a simple point_stat case
verifying
> > > wind direction.   The point_stat debugging output looks exactly
the
> same
> > as
> > > if I hadn't used topo_mask... how do I know if it actually
worked and
> > > terrain height got into point_stat?
> > >
> > > Also, how does point_stat know what netCDF variable to check
terrht
> > > against?
> > > Justin
> > >
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Thursday, January 9, 2020 10:27 AM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Justin,
> > >
> > > Sorry for losing this in the shuffle.  It's a hectic time of
year.
> > >
> > > So your question is whether or not Python-embedding will work
when
> > setting
> > > the "topo_mask" dictionary in the Point-Stat config file.  I
just
> tested
> > > this out (albeit with the development version of the code) and
it seems
> > to
> > > have worked fine, just as expected.  Remember though that for
> > > python-embedding you set the file_name to the constant string
> > > "PYTHON_NUMPY" and the field "name" to the python command you
want to
> > > execute to read the data.
> > >
> > > It looks like you were setting file_name = python command, and
that
> won't
> > > work.
> > >
> > > Thanks,
> > > John
> > >
> > > //
> > > // Topography
> > > //
> > > topo_mask = {
> > >    flag               = FALSE;
> > >    file_name          = [ "PYTHON_NUMPY" ];
> > >    field              = { name = "read_NRL_binary.py
> > >
trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld"; }
> > >    regrid             = { method = BILIN; width = 2; }
> > >    use_obs_thresh     = ge-100&&le100;
> > >    interp_fcst_thresh = ge-50&&le50;
> > > }
> > >
> > >
> > >
> > > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT <
> met_help at ucar.edu
> > >
> > > wrote:
> > >
> > > >
> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>
> > > >
> > > > Hey John,
> > > >
> > > > This email probably got lost during the holidays.  Let me know
if you
> > can
> > > > get around to helping me out with this problem!
> > > >
> > > > Thanks and happy new year!
> > > > Justin
> > > >
> > > > -----Original Message-----
> > > > From: Tsu, Mr. Justin
> > > > Sent: Friday, December 20, 2019 4:18 PM
> > > > To: 'met_help at ucar.edu'
> > > > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Thanks John,
> > > >
> > > > When using topo_mask,  will point_Stat understand a python
embedded
> > file?
> > > > The files we use are named '
> > > >
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > > These are projection gridded data of terrain heights.   Would
this
> look
> > > > something like this?
> > > >
> > > > topo_mask = {
> > > >    flag               = FALSE;
> > > >    file_name          = ["./read_NRL_binary
> > > >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > > >    field              = { name = "TOPO"; level = "L0"; }
> > > >    regrid             = { method = BILIN; width = 2; }
> > > >    use_obs_thresh     = ge-100&&le100;
> > > >    interp_fcst_thresh = ge-50&&le50;
> > > > }
> > > > And how does point_stat know which HDF5 varible to use as the
point
> of
> > > > comparison to the model terrain height?
> > > >
> > > > Happy holidays!
> > > > Justin
> > > > -----Original Message-----
> > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > Sent: Thursday, December 19, 2019 6:05 AM
> > > > To: Satterfield, Dr. Elizabeth
> > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Liz,
> > > >
> > > > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> > > checks
> > > > the flag in the header indicating whether winds are defined as
grid
> or
> > > > earth-relative.  If grid relative, it searches the file for
the
> > > correspond
> > > > U or V pair and uses both U and V to rotate them to be
> earth-relative.
> > > >
> > > > That logic does NOT work for python embedding.  I have some
ideas
> about
> > > how
> > > > to make it work but those changes are not slated for the met-
9.0
> > release.
> > > >
> > > > I assume you’d like to see this enhancement?  And perhaps
we’ve
> already
> > > > talked about this?
> > > >
> > > > (2) Config options were added in met-8.1 for the Air Force
which
> > address
> > > > this issue.  By default this logic is disabled but can be
enabled
> using
> > > the
> > > > “topo_mask” config file dictionary.  FYI, the “land_mask”
dictionary
> > was
> > > > also added at the same time.  Below is a link to the default
> point-stat
> > > > config file followed by an excerpt from it.
> > > >
> > > > John
> > > >
> > > >
> > > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > > >
> > > > // Topography
> > > > // For SURFACE message types, only use observations where the
topo -
> > > > station
> > > > // elevation difference meets the use_obs_thresh threshold.
> > > > // For the observations kept, when interpolating forecast data
to the
> > > > // observation location, only use forecast grid points where
the
> topo -
> > > > station
> > > > // difference meets the interp_fcst_thresh threshold.
> > > > // topo_mask.flag may be set separately in each "obs.field"
entry.
> > > > //
> > > > topo_mask = {
> > > > flag = FALSE;
> > > > file_name = [];
> > > > field = { name = "TOPO"; level = "L0"; }
> > > > regrid = { method = BILIN; width = 2; }
> > > > use_obs_thresh = ge-100&&le100;
> > > > interp_fcst_thresh = ge-50&&le50;
> > > > }
> > > >
> > > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth via
RT <
> > > > met_help at ucar.edu> wrote:
> > > >
> > > > >
> > > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > > > Transaction: Ticket created by
> Elizabeth.Satterfield at nrlmry.navy.mil
> > > > >        Queue: met_help
> > > > >      Subject: point stat questions
> > > > >        Owner: Nobody
> > > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > > >       Status: new
> > > > >  Ticket <URL:
> > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > > >
> > > > >
> > > > >
> > > > > Hi John,
> > > > >
> > > > >
> > > > >
> > > > > A few questions about point stat:
> > > > >
> > > > > 1.         Are grid relative winds automatically converted
to Earth
> > > > > relative
> > > > > winds?
> > > > >
> > > > > 2.        For observation that fall below the model surface,
are
> > model
> > > > > fields interpolated to observation location?  If so, how?
> > > > >
> > > > >
> > > > >
> > > > > Thanks!
> > > > >
> > > > > Liz
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Elizabeth Satterfield
> > > > > Editor, Monthly Weather Review
> > > > >
> > > > > Chair, AMS Committee on Probability and Statistics
> > > > >
> > > > > Meteorologist, Code 7531
> > > > > Marine Meteorology Division
> > > > > U.S. Naval Research Laboratory
> > > > > T 831.656.4056  F 831.656.4026
> > > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > > >
> > > > >
__________________________________________________________________
> > > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > > Any misuse or unauthorized disclosure may result in both
civil and
> > > > criminal
> > > > > penalties.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>



------------------------------------------------
Subject: point stat questions
From: John Halley Gotway
Time: Mon Feb 08 13:02:27 2021

Jason,

If they're small and email doesn't complain, you could send as an
attachment. If not, the ftp site is the way to go.

Thanks,
John

On Mon, Feb 8, 2021 at 11:36 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Thanks John,
>
> I have all the data ready to ship.   Do I need to upload it to the
ftp
> like last time?
>
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Friday, February 5, 2021 7:45 PM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
>
> Justin,
>
> If you’re able to send me sample data to replicate your case, I
could take
> a closer look.
>
> John
>
> On Fri, Feb 5, 2021 at 5:48 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > I don't think my topo mask is working.  I just set use_ob_thresh
to
> > le-9999:
> >
> > 104 topo_mask = {
> > 105     flag = TRUE;
> > 106     FILE_NAME = ["PYTHON_NUMPY"];
> > 107     field = { name = "${READ_MODEL}
> > ${DATA_DIR}/terrht_sfc_000000_000000_${N
> > EST}_${START_TIME}_00000000_fcstfld";}
> > 108     regrid = { method = BILIN; width=2;}
> > 109     use_obs_thresh = le-9999;
> > 110     interp_fcst_thresh = ge-50&&le50;
> >
> > Which should theoretically reject every single matched pair.
> >
> > But:
> >
> > [tsu at lorenz raob]$ grep 'topography'
> > PointStat2019072300NEST1a0127x0127.log
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> >
> > I also read in a terrain height file and an observation file for a
> > particular station to see if they are comparable and they check
out.  Not
> > sure what is going on, but any guidance would be appreciated.
> >
> > Justin
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Thursday, February 4, 2021 5:28 PM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Justin,
> >
> > Here’s the relevant line of code:
> >
> >
> >
>
https://github.com/dtcenter/MET/blob/0fe2e42609120df236f74ae23c07f3fa4b930247/met/src/libcode/vx_statistics/pair_data_point.cc#L875
> >
> > The difference is computed as model topography - observation
station
> > elevation. So this assumes that those two quantities are the same
units.
> > And note that at verbosity level 4 it prints a detailed log
message. So
> you
> > could play around with the threshold, run at -v 4, and you should
see
> > useful log messages.
> >
> > John
> >
> > On Thu, Feb 4, 2021 at 5:56 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > Hi John,
> > >
> > > I'd like to revisit an old question about topography,
specifically
> > > topo_mask.  When comparing geopotential height for a specific
time, our
> > NRL
> > > statistic program had some rejects due to ob height being below
> simulated
> > > ground (the stations in question were in Denver).  However, I
had 0
> > rejects
> > > for the same cmparison in MET.  My topo_mask looks like this:
> > >
> > > 82 topo_mask = {
> > >  83     flag = TRUE;
> > >  84     FILE_NAME = ["PYTHON_NUMPY"];
> > >  85     field = { name = "${READ_MODEL}
> > >
> >
>
${DATA_DIR}/terrht_sfc_000000_000000_${NEST}_${START_TIME}_00000000_fcstfld";}
> > >  86     regrid = { method = BILIN; width=2;}
> > >  87     use_obs_thresh = ge-100&&le100;
> > >  88     interp_fcst_thresh = ge-50&&le50;
> > >  89 }
> > >
> > > Since use_obs_thresh can have a negative threshold, what is the
order
> of
> > > the difference, model height - ob height or ob height - model
height?
> > >
> > > Justin
> > >
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Friday, January 17, 2020 11:06 AM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Justin,
> > >
> > > Running Point-stat and verbosity level 3 causes these types of
log
> > messages
> > > to be printed:
> > >
> > > DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type
ADPSFC,
> > over
> > > region FULL, for interpolation method GEOG_MATCH_SQUARE(9),
using 3779
> > > matched pairs.
> > > DEBUG 3: Number of matched pairs  = 3779
> > > DEBUG 3: Observations processed   = 116861
> > > DEBUG 3: Rejected: SID exclusion  = 0
> > > DEBUG 3: Rejected: obs type       = 103809
> > > DEBUG 3: Rejected: valid time     = 0
> > > DEBUG 3: Rejected: bad obs value  = 0
> > > DEBUG 3: Rejected: off the grid   = 21
> > > DEBUG 3: Rejected: topography     = 548
> > > DEBUG 3: Rejected: level mismatch = 7675
> > > DEBUG 3: Rejected: quality marker = 0
> > > DEBUG 3: Rejected: message type   = 809
> > > DEBUG 3: Rejected: masking region = 0
> > > DEBUG 3: Rejected: bad fcst value = 220
> > > DEBUG 3: Rejected: duplicates     = 0
> > >
> > > The "topography" line indicates the number of point observations
which
> > were
> > > skipped due to the topography logic.  And they are skipped
when...
> > > (1) the model topo value or point obs elevation value are bad
data.
> > > (2) their difference exceeds the "use_obs_thresh" threshold
> > >
> > > And we also write a DEBUG(4) log message about it:
> > >
> > > DEBUG 4: Skipping observation for topography difference since
119.598
> is
> > > not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> > > [ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.
> > >
> > > So please try rerunning with verbosity level 4 (-v 4) and check
for log
> > > messages about "topography" or "geography".
> > >
> > > Your next question...
> > >    Also, how does point_stat know what netCDF variable to check
terrht
> > > against?
> > >
> > > Point-Stat is comparing the model "terrht" against the
observation
> > station
> > > elevation, which is the 6th column of the 11-column point
observation
> > > format:
> > >
> > >         The "met_point" ASCII format consists of 11 columns:
> > >                Message_Type Station_ID
Valid_Time(YYYYMMDD_HHMMSS)
> > >                Lat(Deg North) Lon(Deg East) Elevation(msl)
> > >                Var_Name(or GRIB_Code) Level Height(msl or agl)
> > >                QC_String Observation_Value
> > >
> > > This logic is used to discard point obs with large differences
from the
> > > model elevation.
> > >
> > > John
> > >
> > > On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT <
> > met_help at ucar.edu
> > > >
> > > wrote:
> > >
> > > >
> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>
> > > >
> > > > Thanks John,
> > > >
> > > > I just implemented your changes for a simple point_stat case
> verifying
> > > > wind direction.   The point_stat debugging output looks
exactly the
> > same
> > > as
> > > > if I hadn't used topo_mask... how do I know if it actually
worked and
> > > > terrain height got into point_stat?
> > > >
> > > > Also, how does point_stat know what netCDF variable to check
terrht
> > > > against?
> > > > Justin
> > > >
> > > > -----Original Message-----
> > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > Sent: Thursday, January 9, 2020 10:27 AM
> > > > To: Satterfield, Dr. Elizabeth
> > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Justin,
> > > >
> > > > Sorry for losing this in the shuffle.  It's a hectic time of
year.
> > > >
> > > > So your question is whether or not Python-embedding will work
when
> > > setting
> > > > the "topo_mask" dictionary in the Point-Stat config file.  I
just
> > tested
> > > > this out (albeit with the development version of the code) and
it
> seems
> > > to
> > > > have worked fine, just as expected.  Remember though that for
> > > > python-embedding you set the file_name to the constant string
> > > > "PYTHON_NUMPY" and the field "name" to the python command you
want to
> > > > execute to read the data.
> > > >
> > > > It looks like you were setting file_name = python command, and
that
> > won't
> > > > work.
> > > >
> > > > Thanks,
> > > > John
> > > >
> > > > //
> > > > // Topography
> > > > //
> > > > topo_mask = {
> > > >    flag               = FALSE;
> > > >    file_name          = [ "PYTHON_NUMPY" ];
> > > >    field              = { name = "read_NRL_binary.py
> > > >
trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld"; }
> > > >    regrid             = { method = BILIN; width = 2; }
> > > >    use_obs_thresh     = ge-100&&le100;
> > > >    interp_fcst_thresh = ge-50&&le50;
> > > > }
> > > >
> > > >
> > > >
> > > > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT <
> > met_help at ucar.edu
> > > >
> > > > wrote:
> > > >
> > > > >
> > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > > > >
> > > > > Hey John,
> > > > >
> > > > > This email probably got lost during the holidays.  Let me
know if
> you
> > > can
> > > > > get around to helping me out with this problem!
> > > > >
> > > > > Thanks and happy new year!
> > > > > Justin
> > > > >
> > > > > -----Original Message-----
> > > > > From: Tsu, Mr. Justin
> > > > > Sent: Friday, December 20, 2019 4:18 PM
> > > > > To: 'met_help at ucar.edu'
> > > > > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> > > > >
> > > > > Thanks John,
> > > > >
> > > > > When using topo_mask,  will point_Stat understand a python
embedded
> > > file?
> > > > > The files we use are named '
> > > > >
> > > >
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > > > These are projection gridded data of terrain heights.
Would this
> > look
> > > > > something like this?
> > > > >
> > > > > topo_mask = {
> > > > >    flag               = FALSE;
> > > > >    file_name          = ["./read_NRL_binary
> > > > >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > > > >    field              = { name = "TOPO"; level = "L0"; }
> > > > >    regrid             = { method = BILIN; width = 2; }
> > > > >    use_obs_thresh     = ge-100&&le100;
> > > > >    interp_fcst_thresh = ge-50&&le50;
> > > > > }
> > > > > And how does point_stat know which HDF5 varible to use as
the point
> > of
> > > > > comparison to the model terrain height?
> > > > >
> > > > > Happy holidays!
> > > > > Justin
> > > > > -----Original Message-----
> > > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > > Sent: Thursday, December 19, 2019 6:05 AM
> > > > > To: Satterfield, Dr. Elizabeth
> > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > > >
> > > > > Liz,
> > > > >
> > > > > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> > > > checks
> > > > > the flag in the header indicating whether winds are defined
as grid
> > or
> > > > > earth-relative.  If grid relative, it searches the file for
the
> > > > correspond
> > > > > U or V pair and uses both U and V to rotate them to be
> > earth-relative.
> > > > >
> > > > > That logic does NOT work for python embedding.  I have some
ideas
> > about
> > > > how
> > > > > to make it work but those changes are not slated for the
met-9.0
> > > release.
> > > > >
> > > > > I assume you’d like to see this enhancement?  And perhaps
we’ve
> > already
> > > > > talked about this?
> > > > >
> > > > > (2) Config options were added in met-8.1 for the Air Force
which
> > > address
> > > > > this issue.  By default this logic is disabled but can be
enabled
> > using
> > > > the
> > > > > “topo_mask” config file dictionary.  FYI, the “land_mask”
> dictionary
> > > was
> > > > > also added at the same time.  Below is a link to the default
> > point-stat
> > > > > config file followed by an excerpt from it.
> > > > >
> > > > > John
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > > > >
> > > > > // Topography
> > > > > // For SURFACE message types, only use observations where
the topo
> -
> > > > > station
> > > > > // elevation difference meets the use_obs_thresh threshold.
> > > > > // For the observations kept, when interpolating forecast
data to
> the
> > > > > // observation location, only use forecast grid points where
the
> > topo -
> > > > > station
> > > > > // difference meets the interp_fcst_thresh threshold.
> > > > > // topo_mask.flag may be set separately in each "obs.field"
entry.
> > > > > //
> > > > > topo_mask = {
> > > > > flag = FALSE;
> > > > > file_name = [];
> > > > > field = { name = "TOPO"; level = "L0"; }
> > > > > regrid = { method = BILIN; width = 2; }
> > > > > use_obs_thresh = ge-100&&le100;
> > > > > interp_fcst_thresh = ge-50&&le50;
> > > > > }
> > > > >
> > > > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth
via RT <
> > > > > met_help at ucar.edu> wrote:
> > > > >
> > > > > >
> > > > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > > > > Transaction: Ticket created by
> > Elizabeth.Satterfield at nrlmry.navy.mil
> > > > > >        Queue: met_help
> > > > > >      Subject: point stat questions
> > > > > >        Owner: Nobody
> > > > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > > > >       Status: new
> > > > > >  Ticket <URL:
> > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > > > >
> > > > > >
> > > > > >
> > > > > > Hi John,
> > > > > >
> > > > > >
> > > > > >
> > > > > > A few questions about point stat:
> > > > > >
> > > > > > 1.         Are grid relative winds automatically converted
to
> Earth
> > > > > > relative
> > > > > > winds?
> > > > > >
> > > > > > 2.        For observation that fall below the model
surface, are
> > > model
> > > > > > fields interpolated to observation location?  If so, how?
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks!
> > > > > >
> > > > > > Liz
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Elizabeth Satterfield
> > > > > > Editor, Monthly Weather Review
> > > > > >
> > > > > > Chair, AMS Committee on Probability and Statistics
> > > > > >
> > > > > > Meteorologist, Code 7531
> > > > > > Marine Meteorology Division
> > > > > > U.S. Naval Research Laboratory
> > > > > > T 831.656.4056  F 831.656.4026
> > > > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > > > >
> > > > > >
> __________________________________________________________________
> > > > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > > > Any misuse or unauthorized disclosure may result in both
civil
> and
> > > > > criminal
> > > > > > penalties.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>

------------------------------------------------
Subject: RE: FW: [rt.rap.ucar.edu #93532] point stat questions
From: Tsu, Mr. Justin
Time: Mon Feb 08 13:25:58 2021

Thanks John,

I've uploaded a tar file in incoming/irap/met_help/tsu/

Justin

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Monday, February 8, 2021 12:02 PM
To: Satterfield, Dr. Elizabeth
Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions

Jason,

If they're small and email doesn't complain, you could send as an
attachment. If not, the ftp site is the way to go.

Thanks,
John

On Mon, Feb 8, 2021 at 11:36 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Thanks John,
>
> I have all the data ready to ship.   Do I need to upload it to the
ftp
> like last time?
>
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Friday, February 5, 2021 7:45 PM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
>
> Justin,
>
> If you’re able to send me sample data to replicate your case, I
could take
> a closer look.
>
> John
>
> On Fri, Feb 5, 2021 at 5:48 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > I don't think my topo mask is working.  I just set use_ob_thresh
to
> > le-9999:
> >
> > 104 topo_mask = {
> > 105     flag = TRUE;
> > 106     FILE_NAME = ["PYTHON_NUMPY"];
> > 107     field = { name = "${READ_MODEL}
> > ${DATA_DIR}/terrht_sfc_000000_000000_${N
> > EST}_${START_TIME}_00000000_fcstfld";}
> > 108     regrid = { method = BILIN; width=2;}
> > 109     use_obs_thresh = le-9999;
> > 110     interp_fcst_thresh = ge-50&&le50;
> >
> > Which should theoretically reject every single matched pair.
> >
> > But:
> >
> > [tsu at lorenz raob]$ grep 'topography'
> > PointStat2019072300NEST1a0127x0127.log
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> > DEBUG 3: Rejected: topography     = 0
> >
> > I also read in a terrain height file and an observation file for a
> > particular station to see if they are comparable and they check
out.  Not
> > sure what is going on, but any guidance would be appreciated.
> >
> > Justin
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Thursday, February 4, 2021 5:28 PM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Justin,
> >
> > Here’s the relevant line of code:
> >
> >
> >
>
https://github.com/dtcenter/MET/blob/0fe2e42609120df236f74ae23c07f3fa4b930247/met/src/libcode/vx_statistics/pair_data_point.cc#L875
> >
> > The difference is computed as model topography - observation
station
> > elevation. So this assumes that those two quantities are the same
units.
> > And note that at verbosity level 4 it prints a detailed log
message. So
> you
> > could play around with the threshold, run at -v 4, and you should
see
> > useful log messages.
> >
> > John
> >
> > On Thu, Feb 4, 2021 at 5:56 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > Hi John,
> > >
> > > I'd like to revisit an old question about topography,
specifically
> > > topo_mask.  When comparing geopotential height for a specific
time, our
> > NRL
> > > statistic program had some rejects due to ob height being below
> simulated
> > > ground (the stations in question were in Denver).  However, I
had 0
> > rejects
> > > for the same cmparison in MET.  My topo_mask looks like this:
> > >
> > > 82 topo_mask = {
> > >  83     flag = TRUE;
> > >  84     FILE_NAME = ["PYTHON_NUMPY"];
> > >  85     field = { name = "${READ_MODEL}
> > >
> >
>
${DATA_DIR}/terrht_sfc_000000_000000_${NEST}_${START_TIME}_00000000_fcstfld";}
> > >  86     regrid = { method = BILIN; width=2;}
> > >  87     use_obs_thresh = ge-100&&le100;
> > >  88     interp_fcst_thresh = ge-50&&le50;
> > >  89 }
> > >
> > > Since use_obs_thresh can have a negative threshold, what is the
order
> of
> > > the difference, model height - ob height or ob height - model
height?
> > >
> > > Justin
> > >
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Friday, January 17, 2020 11:06 AM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Justin,
> > >
> > > Running Point-stat and verbosity level 3 causes these types of
log
> > messages
> > > to be printed:
> > >
> > > DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type
ADPSFC,
> > over
> > > region FULL, for interpolation method GEOG_MATCH_SQUARE(9),
using 3779
> > > matched pairs.
> > > DEBUG 3: Number of matched pairs  = 3779
> > > DEBUG 3: Observations processed   = 116861
> > > DEBUG 3: Rejected: SID exclusion  = 0
> > > DEBUG 3: Rejected: obs type       = 103809
> > > DEBUG 3: Rejected: valid time     = 0
> > > DEBUG 3: Rejected: bad obs value  = 0
> > > DEBUG 3: Rejected: off the grid   = 21
> > > DEBUG 3: Rejected: topography     = 548
> > > DEBUG 3: Rejected: level mismatch = 7675
> > > DEBUG 3: Rejected: quality marker = 0
> > > DEBUG 3: Rejected: message type   = 809
> > > DEBUG 3: Rejected: masking region = 0
> > > DEBUG 3: Rejected: bad fcst value = 220
> > > DEBUG 3: Rejected: duplicates     = 0
> > >
> > > The "topography" line indicates the number of point observations
which
> > were
> > > skipped due to the topography logic.  And they are skipped
when...
> > > (1) the model topo value or point obs elevation value are bad
data.
> > > (2) their difference exceeds the "use_obs_thresh" threshold
> > >
> > > And we also write a DEBUG(4) log message about it:
> > >
> > > DEBUG 4: Skipping observation for topography difference since
119.598
> is
> > > not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> > > [ADPSFC:71069:55.28:114.78:581] and model topography = 700.598.
> > >
> > > So please try rerunning with verbosity level 4 (-v 4) and check
for log
> > > messages about "topography" or "geography".
> > >
> > > Your next question...
> > >    Also, how does point_stat know what netCDF variable to check
terrht
> > > against?
> > >
> > > Point-Stat is comparing the model "terrht" against the
observation
> > station
> > > elevation, which is the 6th column of the 11-column point
observation
> > > format:
> > >
> > >         The "met_point" ASCII format consists of 11 columns:
> > >                Message_Type Station_ID
Valid_Time(YYYYMMDD_HHMMSS)
> > >                Lat(Deg North) Lon(Deg East) Elevation(msl)
> > >                Var_Name(or GRIB_Code) Level Height(msl or agl)
> > >                QC_String Observation_Value
> > >
> > > This logic is used to discard point obs with large differences
from the
> > > model elevation.
> > >
> > > John
> > >
> > > On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT <
> > met_help at ucar.edu
> > > >
> > > wrote:
> > >
> > > >
> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>
> > > >
> > > > Thanks John,
> > > >
> > > > I just implemented your changes for a simple point_stat case
> verifying
> > > > wind direction.   The point_stat debugging output looks
exactly the
> > same
> > > as
> > > > if I hadn't used topo_mask... how do I know if it actually
worked and
> > > > terrain height got into point_stat?
> > > >
> > > > Also, how does point_stat know what netCDF variable to check
terrht
> > > > against?
> > > > Justin
> > > >
> > > > -----Original Message-----
> > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > Sent: Thursday, January 9, 2020 10:27 AM
> > > > To: Satterfield, Dr. Elizabeth
> > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Justin,
> > > >
> > > > Sorry for losing this in the shuffle.  It's a hectic time of
year.
> > > >
> > > > So your question is whether or not Python-embedding will work
when
> > > setting
> > > > the "topo_mask" dictionary in the Point-Stat config file.  I
just
> > tested
> > > > this out (albeit with the development version of the code) and
it
> seems
> > > to
> > > > have worked fine, just as expected.  Remember though that for
> > > > python-embedding you set the file_name to the constant string
> > > > "PYTHON_NUMPY" and the field "name" to the python command you
want to
> > > > execute to read the data.
> > > >
> > > > It looks like you were setting file_name = python command, and
that
> > won't
> > > > work.
> > > >
> > > > Thanks,
> > > > John
> > > >
> > > > //
> > > > // Topography
> > > > //
> > > > topo_mask = {
> > > >    flag               = FALSE;
> > > >    file_name          = [ "PYTHON_NUMPY" ];
> > > >    field              = { name = "read_NRL_binary.py
> > > >
trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld"; }
> > > >    regrid             = { method = BILIN; width = 2; }
> > > >    use_obs_thresh     = ge-100&&le100;
> > > >    interp_fcst_thresh = ge-50&&le50;
> > > > }
> > > >
> > > >
> > > >
> > > > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT <
> > met_help at ucar.edu
> > > >
> > > > wrote:
> > > >
> > > > >
> > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > > > >
> > > > > Hey John,
> > > > >
> > > > > This email probably got lost during the holidays.  Let me
know if
> you
> > > can
> > > > > get around to helping me out with this problem!
> > > > >
> > > > > Thanks and happy new year!
> > > > > Justin
> > > > >
> > > > > -----Original Message-----
> > > > > From: Tsu, Mr. Justin
> > > > > Sent: Friday, December 20, 2019 4:18 PM
> > > > > To: 'met_help at ucar.edu'
> > > > > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> > > > >
> > > > > Thanks John,
> > > > >
> > > > > When using topo_mask,  will point_Stat understand a python
embedded
> > > file?
> > > > > The files we use are named '
> > > > >
> > > >
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > > > These are projection gridded data of terrain heights.
Would this
> > look
> > > > > something like this?
> > > > >
> > > > > topo_mask = {
> > > > >    flag               = FALSE;
> > > > >    file_name          = ["./read_NRL_binary
> > > > >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > > > >    field              = { name = "TOPO"; level = "L0"; }
> > > > >    regrid             = { method = BILIN; width = 2; }
> > > > >    use_obs_thresh     = ge-100&&le100;
> > > > >    interp_fcst_thresh = ge-50&&le50;
> > > > > }
> > > > > And how does point_stat know which HDF5 varible to use as
the point
> > of
> > > > > comparison to the model terrain height?
> > > > >
> > > > > Happy holidays!
> > > > > Justin
> > > > > -----Original Message-----
> > > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > > Sent: Thursday, December 19, 2019 6:05 AM
> > > > > To: Satterfield, Dr. Elizabeth
> > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > > >
> > > > > Liz,
> > > > >
> > > > > (1) When reading data from GRIB1 and GRIB2 files, MET
automatically
> > > > checks
> > > > > the flag in the header indicating whether winds are defined
as grid
> > or
> > > > > earth-relative.  If grid relative, it searches the file for
the
> > > > correspond
> > > > > U or V pair and uses both U and V to rotate them to be
> > earth-relative.
> > > > >
> > > > > That logic does NOT work for python embedding.  I have some
ideas
> > about
> > > > how
> > > > > to make it work but those changes are not slated for the
met-9.0
> > > release.
> > > > >
> > > > > I assume you’d like to see this enhancement?  And perhaps
we’ve
> > already
> > > > > talked about this?
> > > > >
> > > > > (2) Config options were added in met-8.1 for the Air Force
which
> > > address
> > > > > this issue.  By default this logic is disabled but can be
enabled
> > using
> > > > the
> > > > > “topo_mask” config file dictionary.  FYI, the “land_mask”
> dictionary
> > > was
> > > > > also added at the same time.  Below is a link to the default
> > point-stat
> > > > > config file followed by an excerpt from it.
> > > > >
> > > > > John
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > > > >
> > > > > // Topography
> > > > > // For SURFACE message types, only use observations where
the topo
> -
> > > > > station
> > > > > // elevation difference meets the use_obs_thresh threshold.
> > > > > // For the observations kept, when interpolating forecast
data to
> the
> > > > > // observation location, only use forecast grid points where
the
> > topo -
> > > > > station
> > > > > // difference meets the interp_fcst_thresh threshold.
> > > > > // topo_mask.flag may be set separately in each "obs.field"
entry.
> > > > > //
> > > > > topo_mask = {
> > > > > flag = FALSE;
> > > > > file_name = [];
> > > > > field = { name = "TOPO"; level = "L0"; }
> > > > > regrid = { method = BILIN; width = 2; }
> > > > > use_obs_thresh = ge-100&&le100;
> > > > > interp_fcst_thresh = ge-50&&le50;
> > > > > }
> > > > >
> > > > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth
via RT <
> > > > > met_help at ucar.edu> wrote:
> > > > >
> > > > > >
> > > > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > > > > Transaction: Ticket created by
> > Elizabeth.Satterfield at nrlmry.navy.mil
> > > > > >        Queue: met_help
> > > > > >      Subject: point stat questions
> > > > > >        Owner: Nobody
> > > > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > > > >       Status: new
> > > > > >  Ticket <URL:
> > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > > > >
> > > > > >
> > > > > >
> > > > > > Hi John,
> > > > > >
> > > > > >
> > > > > >
> > > > > > A few questions about point stat:
> > > > > >
> > > > > > 1.         Are grid relative winds automatically converted
to
> Earth
> > > > > > relative
> > > > > > winds?
> > > > > >
> > > > > > 2.        For observation that fall below the model
surface, are
> > > model
> > > > > > fields interpolated to observation location?  If so, how?
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks!
> > > > > >
> > > > > > Liz
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Elizabeth Satterfield
> > > > > > Editor, Monthly Weather Review
> > > > > >
> > > > > > Chair, AMS Committee on Probability and Statistics
> > > > > >
> > > > > > Meteorologist, Code 7531
> > > > > > Marine Meteorology Division
> > > > > > U.S. Naval Research Laboratory
> > > > > > T 831.656.4056  F 831.656.4026
> > > > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > > > >
> > > > > >
> __________________________________________________________________
> > > > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > > > Any misuse or unauthorized disclosure may result in both
civil
> and
> > > > > criminal
> > > > > > penalties.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>



------------------------------------------------
Subject: point stat questions
From: John Halley Gotway
Time: Mon Feb 08 13:56:54 2021

Justin,

OK, I grabbed the data you sent. I'm trying to piece together an
actual run
to replicate the behavior you describe.

But I'm getting this error about missing files for the python
embedding
script:
   datahd_sfc_000000_000000_1a2000x0001_2019072300_00000000_infofld

Are you able to send me that file(s)?

I believe you're using MET version 8.1. I do see that that feature was
added for met-8.1:
https://github.com/dtcenter/MET/issues/527

But I'm sure I didn't test that using python embedding. So it'll be
interesting to see what I find. It may be the case that python
embedding
isn't working yet in that context. But there definitely should be log
messages tell you about that if that's the case.

Thanks,
John

On Mon, Feb 8, 2021 at 1:26 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Thanks John,
>
> I've uploaded a tar file in incoming/irap/met_help/tsu/
>
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Monday, February 8, 2021 12:02 PM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
>
> Jason,
>
> If they're small and email doesn't complain, you could send as an
> attachment. If not, the ftp site is the way to go.
>
> Thanks,
> John
>
> On Mon, Feb 8, 2021 at 11:36 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Thanks John,
> >
> > I have all the data ready to ship.   Do I need to upload it to the
ftp
> > like last time?
> >
> > Justin
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Friday, February 5, 2021 7:45 PM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Justin,
> >
> > If you’re able to send me sample data to replicate your case, I
could
> take
> > a closer look.
> >
> > John
> >
> > On Fri, Feb 5, 2021 at 5:48 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > I don't think my topo mask is working.  I just set use_ob_thresh
to
> > > le-9999:
> > >
> > > 104 topo_mask = {
> > > 105     flag = TRUE;
> > > 106     FILE_NAME = ["PYTHON_NUMPY"];
> > > 107     field = { name = "${READ_MODEL}
> > > ${DATA_DIR}/terrht_sfc_000000_000000_${N
> > > EST}_${START_TIME}_00000000_fcstfld";}
> > > 108     regrid = { method = BILIN; width=2;}
> > > 109     use_obs_thresh = le-9999;
> > > 110     interp_fcst_thresh = ge-50&&le50;
> > >
> > > Which should theoretically reject every single matched pair.
> > >
> > > But:
> > >
> > > [tsu at lorenz raob]$ grep 'topography'
> > > PointStat2019072300NEST1a0127x0127.log
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > >
> > > I also read in a terrain height file and an observation file for
a
> > > particular station to see if they are comparable and they check
out.
> Not
> > > sure what is going on, but any guidance would be appreciated.
> > >
> > > Justin
> > >
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Thursday, February 4, 2021 5:28 PM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Justin,
> > >
> > > Here’s the relevant line of code:
> > >
> > >
> > >
> >
>
https://github.com/dtcenter/MET/blob/0fe2e42609120df236f74ae23c07f3fa4b930247/met/src/libcode/vx_statistics/pair_data_point.cc#L875
> > >
> > > The difference is computed as model topography - observation
station
> > > elevation. So this assumes that those two quantities are the
same
> units.
> > > And note that at verbosity level 4 it prints a detailed log
message. So
> > you
> > > could play around with the threshold, run at -v 4, and you
should see
> > > useful log messages.
> > >
> > > John
> > >
> > > On Thu, Feb 4, 2021 at 5:56 PM Tsu, Mr. Justin via RT <
> met_help at ucar.edu
> > >
> > > wrote:
> > >
> > > >
> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>
> > > >
> > > > Hi John,
> > > >
> > > > I'd like to revisit an old question about topography,
specifically
> > > > topo_mask.  When comparing geopotential height for a specific
time,
> our
> > > NRL
> > > > statistic program had some rejects due to ob height being
below
> > simulated
> > > > ground (the stations in question were in Denver).  However, I
had 0
> > > rejects
> > > > for the same cmparison in MET.  My topo_mask looks like this:
> > > >
> > > > 82 topo_mask = {
> > > >  83     flag = TRUE;
> > > >  84     FILE_NAME = ["PYTHON_NUMPY"];
> > > >  85     field = { name = "${READ_MODEL}
> > > >
> > >
> >
>
${DATA_DIR}/terrht_sfc_000000_000000_${NEST}_${START_TIME}_00000000_fcstfld";}
> > > >  86     regrid = { method = BILIN; width=2;}
> > > >  87     use_obs_thresh = ge-100&&le100;
> > > >  88     interp_fcst_thresh = ge-50&&le50;
> > > >  89 }
> > > >
> > > > Since use_obs_thresh can have a negative threshold, what is
the order
> > of
> > > > the difference, model height - ob height or ob height - model
height?
> > > >
> > > > Justin
> > > >
> > > > -----Original Message-----
> > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > Sent: Friday, January 17, 2020 11:06 AM
> > > > To: Satterfield, Dr. Elizabeth
> > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Justin,
> > > >
> > > > Running Point-stat and verbosity level 3 causes these types of
log
> > > messages
> > > > to be printed:
> > > >
> > > > DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type
> ADPSFC,
> > > over
> > > > region FULL, for interpolation method GEOG_MATCH_SQUARE(9),
using
> 3779
> > > > matched pairs.
> > > > DEBUG 3: Number of matched pairs  = 3779
> > > > DEBUG 3: Observations processed   = 116861
> > > > DEBUG 3: Rejected: SID exclusion  = 0
> > > > DEBUG 3: Rejected: obs type       = 103809
> > > > DEBUG 3: Rejected: valid time     = 0
> > > > DEBUG 3: Rejected: bad obs value  = 0
> > > > DEBUG 3: Rejected: off the grid   = 21
> > > > DEBUG 3: Rejected: topography     = 548
> > > > DEBUG 3: Rejected: level mismatch = 7675
> > > > DEBUG 3: Rejected: quality marker = 0
> > > > DEBUG 3: Rejected: message type   = 809
> > > > DEBUG 3: Rejected: masking region = 0
> > > > DEBUG 3: Rejected: bad fcst value = 220
> > > > DEBUG 3: Rejected: duplicates     = 0
> > > >
> > > > The "topography" line indicates the number of point
observations
> which
> > > were
> > > > skipped due to the topography logic.  And they are skipped
when...
> > > > (1) the model topo value or point obs elevation value are bad
data.
> > > > (2) their difference exceeds the "use_obs_thresh" threshold
> > > >
> > > > And we also write a DEBUG(4) log message about it:
> > > >
> > > > DEBUG 4: Skipping observation for topography difference since
119.598
> > is
> > > > not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> > > > [ADPSFC:71069:55.28:114.78:581] and model topography =
700.598.
> > > >
> > > > So please try rerunning with verbosity level 4 (-v 4) and
check for
> log
> > > > messages about "topography" or "geography".
> > > >
> > > > Your next question...
> > > >    Also, how does point_stat know what netCDF variable to
check
> terrht
> > > > against?
> > > >
> > > > Point-Stat is comparing the model "terrht" against the
observation
> > > station
> > > > elevation, which is the 6th column of the 11-column point
observation
> > > > format:
> > > >
> > > >         The "met_point" ASCII format consists of 11 columns:
> > > >                Message_Type Station_ID
Valid_Time(YYYYMMDD_HHMMSS)
> > > >                Lat(Deg North) Lon(Deg East) Elevation(msl)
> > > >                Var_Name(or GRIB_Code) Level Height(msl or agl)
> > > >                QC_String Observation_Value
> > > >
> > > > This logic is used to discard point obs with large differences
from
> the
> > > > model elevation.
> > > >
> > > > John
> > > >
> > > > On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT <
> > > met_help at ucar.edu
> > > > >
> > > > wrote:
> > > >
> > > > >
> > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > > > >
> > > > > Thanks John,
> > > > >
> > > > > I just implemented your changes for a simple point_stat case
> > verifying
> > > > > wind direction.   The point_stat debugging output looks
exactly the
> > > same
> > > > as
> > > > > if I hadn't used topo_mask... how do I know if it actually
worked
> and
> > > > > terrain height got into point_stat?
> > > > >
> > > > > Also, how does point_stat know what netCDF variable to check
terrht
> > > > > against?
> > > > > Justin
> > > > >
> > > > > -----Original Message-----
> > > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > > Sent: Thursday, January 9, 2020 10:27 AM
> > > > > To: Satterfield, Dr. Elizabeth
> > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > > >
> > > > > Justin,
> > > > >
> > > > > Sorry for losing this in the shuffle.  It's a hectic time of
year.
> > > > >
> > > > > So your question is whether or not Python-embedding will
work when
> > > > setting
> > > > > the "topo_mask" dictionary in the Point-Stat config file.  I
just
> > > tested
> > > > > this out (albeit with the development version of the code)
and it
> > seems
> > > > to
> > > > > have worked fine, just as expected.  Remember though that
for
> > > > > python-embedding you set the file_name to the constant
string
> > > > > "PYTHON_NUMPY" and the field "name" to the python command
you want
> to
> > > > > execute to read the data.
> > > > >
> > > > > It looks like you were setting file_name = python command,
and that
> > > won't
> > > > > work.
> > > > >
> > > > > Thanks,
> > > > > John
> > > > >
> > > > > //
> > > > > // Topography
> > > > > //
> > > > > topo_mask = {
> > > > >    flag               = FALSE;
> > > > >    file_name          = [ "PYTHON_NUMPY" ];
> > > > >    field              = { name = "read_NRL_binary.py
> > > > >
trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld";
> }
> > > > >    regrid             = { method = BILIN; width = 2; }
> > > > >    use_obs_thresh     = ge-100&&le100;
> > > > >    interp_fcst_thresh = ge-50&&le50;
> > > > > }
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT <
> > > met_help at ucar.edu
> > > > >
> > > > > wrote:
> > > > >
> > > > > >
> > > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > > > > >
> > > > > > Hey John,
> > > > > >
> > > > > > This email probably got lost during the holidays.  Let me
know if
> > you
> > > > can
> > > > > > get around to helping me out with this problem!
> > > > > >
> > > > > > Thanks and happy new year!
> > > > > > Justin
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Tsu, Mr. Justin
> > > > > > Sent: Friday, December 20, 2019 4:18 PM
> > > > > > To: 'met_help at ucar.edu'
> > > > > > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> > > > > >
> > > > > > Thanks John,
> > > > > >
> > > > > > When using topo_mask,  will point_Stat understand a python
> embedded
> > > > file?
> > > > > > The files we use are named '
> > > > > >
> > > > >
> > > >
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > > > > These are projection gridded data of terrain heights.
Would
> this
> > > look
> > > > > > something like this?
> > > > > >
> > > > > > topo_mask = {
> > > > > >    flag               = FALSE;
> > > > > >    file_name          = ["./read_NRL_binary
> > > > > >
> terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > > > > >    field              = { name = "TOPO"; level = "L0"; }
> > > > > >    regrid             = { method = BILIN; width = 2; }
> > > > > >    use_obs_thresh     = ge-100&&le100;
> > > > > >    interp_fcst_thresh = ge-50&&le50;
> > > > > > }
> > > > > > And how does point_stat know which HDF5 varible to use as
the
> point
> > > of
> > > > > > comparison to the model terrain height?
> > > > > >
> > > > > > Happy holidays!
> > > > > > Justin
> > > > > > -----Original Message-----
> > > > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > > > Sent: Thursday, December 19, 2019 6:05 AM
> > > > > > To: Satterfield, Dr. Elizabeth
> > > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > > > >
> > > > > > Liz,
> > > > > >
> > > > > > (1) When reading data from GRIB1 and GRIB2 files, MET
> automatically
> > > > > checks
> > > > > > the flag in the header indicating whether winds are
defined as
> grid
> > > or
> > > > > > earth-relative.  If grid relative, it searches the file
for the
> > > > > correspond
> > > > > > U or V pair and uses both U and V to rotate them to be
> > > earth-relative.
> > > > > >
> > > > > > That logic does NOT work for python embedding.  I have
some ideas
> > > about
> > > > > how
> > > > > > to make it work but those changes are not slated for the
met-9.0
> > > > release.
> > > > > >
> > > > > > I assume you’d like to see this enhancement?  And perhaps
we’ve
> > > already
> > > > > > talked about this?
> > > > > >
> > > > > > (2) Config options were added in met-8.1 for the Air Force
which
> > > > address
> > > > > > this issue.  By default this logic is disabled but can be
enabled
> > > using
> > > > > the
> > > > > > “topo_mask” config file dictionary.  FYI, the “land_mask”
> > dictionary
> > > > was
> > > > > > also added at the same time.  Below is a link to the
default
> > > point-stat
> > > > > > config file followed by an excerpt from it.
> > > > > >
> > > > > > John
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > > > > >
> > > > > > // Topography
> > > > > > // For SURFACE message types, only use observations where
the
> topo
> > -
> > > > > > station
> > > > > > // elevation difference meets the use_obs_thresh
threshold.
> > > > > > // For the observations kept, when interpolating forecast
data to
> > the
> > > > > > // observation location, only use forecast grid points
where the
> > > topo -
> > > > > > station
> > > > > > // difference meets the interp_fcst_thresh threshold.
> > > > > > // topo_mask.flag may be set separately in each
"obs.field"
> entry.
> > > > > > //
> > > > > > topo_mask = {
> > > > > > flag = FALSE;
> > > > > > file_name = [];
> > > > > > field = { name = "TOPO"; level = "L0"; }
> > > > > > regrid = { method = BILIN; width = 2; }
> > > > > > use_obs_thresh = ge-100&&le100;
> > > > > > interp_fcst_thresh = ge-50&&le50;
> > > > > > }
> > > > > >
> > > > > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth
via
> RT <
> > > > > > met_help at ucar.edu> wrote:
> > > > > >
> > > > > > >
> > > > > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > > > > > Transaction: Ticket created by
> > > Elizabeth.Satterfield at nrlmry.navy.mil
> > > > > > >        Queue: met_help
> > > > > > >      Subject: point stat questions
> > > > > > >        Owner: Nobody
> > > > > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > > > > >       Status: new
> > > > > > >  Ticket <URL:
> > > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Hi John,
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > A few questions about point stat:
> > > > > > >
> > > > > > > 1.         Are grid relative winds automatically
converted to
> > Earth
> > > > > > > relative
> > > > > > > winds?
> > > > > > >
> > > > > > > 2.        For observation that fall below the model
surface,
> are
> > > > model
> > > > > > > fields interpolated to observation location?  If so,
how?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Thanks!
> > > > > > >
> > > > > > > Liz
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Elizabeth Satterfield
> > > > > > > Editor, Monthly Weather Review
> > > > > > >
> > > > > > > Chair, AMS Committee on Probability and Statistics
> > > > > > >
> > > > > > > Meteorologist, Code 7531
> > > > > > > Marine Meteorology Division
> > > > > > > U.S. Naval Research Laboratory
> > > > > > > T 831.656.4056  F 831.656.4026
> > > > > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > > > > >
> > > > > > >
> > __________________________________________________________________
> > > > > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > > > > Any misuse or unauthorized disclosure may result in both
civil
> > and
> > > > > > criminal
> > > > > > > penalties.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>

------------------------------------------------
Subject: RE: FW: [rt.rap.ucar.edu #93532] point stat questions
From: Tsu, Mr. Justin
Time: Mon Feb 08 13:59:53 2021

Ah I knew I forgot one more thing.  That file is in the same directory
on ftp, just placed it there

Thanks,
Justin

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Monday, February 8, 2021 12:57 PM
To: Satterfield, Dr. Elizabeth
Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions

Justin,

OK, I grabbed the data you sent. I'm trying to piece together an
actual run
to replicate the behavior you describe.

But I'm getting this error about missing files for the python
embedding
script:
   datahd_sfc_000000_000000_1a2000x0001_2019072300_00000000_infofld

Are you able to send me that file(s)?

I believe you're using MET version 8.1. I do see that that feature was
added for met-8.1:
https://github.com/dtcenter/MET/issues/527

But I'm sure I didn't test that using python embedding. So it'll be
interesting to see what I find. It may be the case that python
embedding
isn't working yet in that context. But there definitely should be log
messages tell you about that if that's the case.

Thanks,
John

On Mon, Feb 8, 2021 at 1:26 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Thanks John,
>
> I've uploaded a tar file in incoming/irap/met_help/tsu/
>
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Monday, February 8, 2021 12:02 PM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
>
> Jason,
>
> If they're small and email doesn't complain, you could send as an
> attachment. If not, the ftp site is the way to go.
>
> Thanks,
> John
>
> On Mon, Feb 8, 2021 at 11:36 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Thanks John,
> >
> > I have all the data ready to ship.   Do I need to upload it to the
ftp
> > like last time?
> >
> > Justin
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Friday, February 5, 2021 7:45 PM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Justin,
> >
> > If you’re able to send me sample data to replicate your case, I
could
> take
> > a closer look.
> >
> > John
> >
> > On Fri, Feb 5, 2021 at 5:48 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu
> >
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > I don't think my topo mask is working.  I just set use_ob_thresh
to
> > > le-9999:
> > >
> > > 104 topo_mask = {
> > > 105     flag = TRUE;
> > > 106     FILE_NAME = ["PYTHON_NUMPY"];
> > > 107     field = { name = "${READ_MODEL}
> > > ${DATA_DIR}/terrht_sfc_000000_000000_${N
> > > EST}_${START_TIME}_00000000_fcstfld";}
> > > 108     regrid = { method = BILIN; width=2;}
> > > 109     use_obs_thresh = le-9999;
> > > 110     interp_fcst_thresh = ge-50&&le50;
> > >
> > > Which should theoretically reject every single matched pair.
> > >
> > > But:
> > >
> > > [tsu at lorenz raob]$ grep 'topography'
> > > PointStat2019072300NEST1a0127x0127.log
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > > DEBUG 3: Rejected: topography     = 0
> > >
> > > I also read in a terrain height file and an observation file for
a
> > > particular station to see if they are comparable and they check
out.
> Not
> > > sure what is going on, but any guidance would be appreciated.
> > >
> > > Justin
> > >
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Thursday, February 4, 2021 5:28 PM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Justin,
> > >
> > > Here’s the relevant line of code:
> > >
> > >
> > >
> >
>
https://github.com/dtcenter/MET/blob/0fe2e42609120df236f74ae23c07f3fa4b930247/met/src/libcode/vx_statistics/pair_data_point.cc#L875
> > >
> > > The difference is computed as model topography - observation
station
> > > elevation. So this assumes that those two quantities are the
same
> units.
> > > And note that at verbosity level 4 it prints a detailed log
message. So
> > you
> > > could play around with the threshold, run at -v 4, and you
should see
> > > useful log messages.
> > >
> > > John
> > >
> > > On Thu, Feb 4, 2021 at 5:56 PM Tsu, Mr. Justin via RT <
> met_help at ucar.edu
> > >
> > > wrote:
> > >
> > > >
> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>
> > > >
> > > > Hi John,
> > > >
> > > > I'd like to revisit an old question about topography,
specifically
> > > > topo_mask.  When comparing geopotential height for a specific
time,
> our
> > > NRL
> > > > statistic program had some rejects due to ob height being
below
> > simulated
> > > > ground (the stations in question were in Denver).  However, I
had 0
> > > rejects
> > > > for the same cmparison in MET.  My topo_mask looks like this:
> > > >
> > > > 82 topo_mask = {
> > > >  83     flag = TRUE;
> > > >  84     FILE_NAME = ["PYTHON_NUMPY"];
> > > >  85     field = { name = "${READ_MODEL}
> > > >
> > >
> >
>
${DATA_DIR}/terrht_sfc_000000_000000_${NEST}_${START_TIME}_00000000_fcstfld";}
> > > >  86     regrid = { method = BILIN; width=2;}
> > > >  87     use_obs_thresh = ge-100&&le100;
> > > >  88     interp_fcst_thresh = ge-50&&le50;
> > > >  89 }
> > > >
> > > > Since use_obs_thresh can have a negative threshold, what is
the order
> > of
> > > > the difference, model height - ob height or ob height - model
height?
> > > >
> > > > Justin
> > > >
> > > > -----Original Message-----
> > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > Sent: Friday, January 17, 2020 11:06 AM
> > > > To: Satterfield, Dr. Elizabeth
> > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Justin,
> > > >
> > > > Running Point-stat and verbosity level 3 causes these types of
log
> > > messages
> > > > to be printed:
> > > >
> > > > DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation type
> ADPSFC,
> > > over
> > > > region FULL, for interpolation method GEOG_MATCH_SQUARE(9),
using
> 3779
> > > > matched pairs.
> > > > DEBUG 3: Number of matched pairs  = 3779
> > > > DEBUG 3: Observations processed   = 116861
> > > > DEBUG 3: Rejected: SID exclusion  = 0
> > > > DEBUG 3: Rejected: obs type       = 103809
> > > > DEBUG 3: Rejected: valid time     = 0
> > > > DEBUG 3: Rejected: bad obs value  = 0
> > > > DEBUG 3: Rejected: off the grid   = 21
> > > > DEBUG 3: Rejected: topography     = 548
> > > > DEBUG 3: Rejected: level mismatch = 7675
> > > > DEBUG 3: Rejected: quality marker = 0
> > > > DEBUG 3: Rejected: message type   = 809
> > > > DEBUG 3: Rejected: masking region = 0
> > > > DEBUG 3: Rejected: bad fcst value = 220
> > > > DEBUG 3: Rejected: duplicates     = 0
> > > >
> > > > The "topography" line indicates the number of point
observations
> which
> > > were
> > > > skipped due to the topography logic.  And they are skipped
when...
> > > > (1) the model topo value or point obs elevation value are bad
data.
> > > > (2) their difference exceeds the "use_obs_thresh" threshold
> > > >
> > > > And we also write a DEBUG(4) log message about it:
> > > >
> > > > DEBUG 4: Skipping observation for topography difference since
119.598
> > is
> > > > not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> > > > [ADPSFC:71069:55.28:114.78:581] and model topography =
700.598.
> > > >
> > > > So please try rerunning with verbosity level 4 (-v 4) and
check for
> log
> > > > messages about "topography" or "geography".
> > > >
> > > > Your next question...
> > > >    Also, how does point_stat know what netCDF variable to
check
> terrht
> > > > against?
> > > >
> > > > Point-Stat is comparing the model "terrht" against the
observation
> > > station
> > > > elevation, which is the 6th column of the 11-column point
observation
> > > > format:
> > > >
> > > >         The "met_point" ASCII format consists of 11 columns:
> > > >                Message_Type Station_ID
Valid_Time(YYYYMMDD_HHMMSS)
> > > >                Lat(Deg North) Lon(Deg East) Elevation(msl)
> > > >                Var_Name(or GRIB_Code) Level Height(msl or agl)
> > > >                QC_String Observation_Value
> > > >
> > > > This logic is used to discard point obs with large differences
from
> the
> > > > model elevation.
> > > >
> > > > John
> > > >
> > > > On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT <
> > > met_help at ucar.edu
> > > > >
> > > > wrote:
> > > >
> > > > >
> > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > > > >
> > > > > Thanks John,
> > > > >
> > > > > I just implemented your changes for a simple point_stat case
> > verifying
> > > > > wind direction.   The point_stat debugging output looks
exactly the
> > > same
> > > > as
> > > > > if I hadn't used topo_mask... how do I know if it actually
worked
> and
> > > > > terrain height got into point_stat?
> > > > >
> > > > > Also, how does point_stat know what netCDF variable to check
terrht
> > > > > against?
> > > > > Justin
> > > > >
> > > > > -----Original Message-----
> > > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > > Sent: Thursday, January 9, 2020 10:27 AM
> > > > > To: Satterfield, Dr. Elizabeth
> > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > > >
> > > > > Justin,
> > > > >
> > > > > Sorry for losing this in the shuffle.  It's a hectic time of
year.
> > > > >
> > > > > So your question is whether or not Python-embedding will
work when
> > > > setting
> > > > > the "topo_mask" dictionary in the Point-Stat config file.  I
just
> > > tested
> > > > > this out (albeit with the development version of the code)
and it
> > seems
> > > > to
> > > > > have worked fine, just as expected.  Remember though that
for
> > > > > python-embedding you set the file_name to the constant
string
> > > > > "PYTHON_NUMPY" and the field "name" to the python command
you want
> to
> > > > > execute to read the data.
> > > > >
> > > > > It looks like you were setting file_name = python command,
and that
> > > won't
> > > > > work.
> > > > >
> > > > > Thanks,
> > > > > John
> > > > >
> > > > > //
> > > > > // Topography
> > > > > //
> > > > > topo_mask = {
> > > > >    flag               = FALSE;
> > > > >    file_name          = [ "PYTHON_NUMPY" ];
> > > > >    field              = { name = "read_NRL_binary.py
> > > > >
trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld";
> }
> > > > >    regrid             = { method = BILIN; width = 2; }
> > > > >    use_obs_thresh     = ge-100&&le100;
> > > > >    interp_fcst_thresh = ge-50&&le50;
> > > > > }
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT <
> > > met_help at ucar.edu
> > > > >
> > > > > wrote:
> > > > >
> > > > > >
> > > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > > > > >
> > > > > > Hey John,
> > > > > >
> > > > > > This email probably got lost during the holidays.  Let me
know if
> > you
> > > > can
> > > > > > get around to helping me out with this problem!
> > > > > >
> > > > > > Thanks and happy new year!
> > > > > > Justin
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Tsu, Mr. Justin
> > > > > > Sent: Friday, December 20, 2019 4:18 PM
> > > > > > To: 'met_help at ucar.edu'
> > > > > > Subject: RE: [rt.rap.ucar.edu #93532] point stat questions
> > > > > >
> > > > > > Thanks John,
> > > > > >
> > > > > > When using topo_mask,  will point_Stat understand a python
> embedded
> > > > file?
> > > > > > The files we use are named '
> > > > > >
> > > > >
> > > >
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > > > > These are projection gridded data of terrain heights.
Would
> this
> > > look
> > > > > > something like this?
> > > > > >
> > > > > > topo_mask = {
> > > > > >    flag               = FALSE;
> > > > > >    file_name          = ["./read_NRL_binary
> > > > > >
> terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > > > > >    field              = { name = "TOPO"; level = "L0"; }
> > > > > >    regrid             = { method = BILIN; width = 2; }
> > > > > >    use_obs_thresh     = ge-100&&le100;
> > > > > >    interp_fcst_thresh = ge-50&&le50;
> > > > > > }
> > > > > > And how does point_stat know which HDF5 varible to use as
the
> point
> > > of
> > > > > > comparison to the model terrain height?
> > > > > >
> > > > > > Happy holidays!
> > > > > > Justin
> > > > > > -----Original Message-----
> > > > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > > > Sent: Thursday, December 19, 2019 6:05 AM
> > > > > > To: Satterfield, Dr. Elizabeth
> > > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > > > >
> > > > > > Liz,
> > > > > >
> > > > > > (1) When reading data from GRIB1 and GRIB2 files, MET
> automatically
> > > > > checks
> > > > > > the flag in the header indicating whether winds are
defined as
> grid
> > > or
> > > > > > earth-relative.  If grid relative, it searches the file
for the
> > > > > correspond
> > > > > > U or V pair and uses both U and V to rotate them to be
> > > earth-relative.
> > > > > >
> > > > > > That logic does NOT work for python embedding.  I have
some ideas
> > > about
> > > > > how
> > > > > > to make it work but those changes are not slated for the
met-9.0
> > > > release.
> > > > > >
> > > > > > I assume you’d like to see this enhancement?  And perhaps
we’ve
> > > already
> > > > > > talked about this?
> > > > > >
> > > > > > (2) Config options were added in met-8.1 for the Air Force
which
> > > > address
> > > > > > this issue.  By default this logic is disabled but can be
enabled
> > > using
> > > > > the
> > > > > > “topo_mask” config file dictionary.  FYI, the “land_mask”
> > dictionary
> > > > was
> > > > > > also added at the same time.  Below is a link to the
default
> > > point-stat
> > > > > > config file followed by an excerpt from it.
> > > > > >
> > > > > > John
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > > > > >
> > > > > > // Topography
> > > > > > // For SURFACE message types, only use observations where
the
> topo
> > -
> > > > > > station
> > > > > > // elevation difference meets the use_obs_thresh
threshold.
> > > > > > // For the observations kept, when interpolating forecast
data to
> > the
> > > > > > // observation location, only use forecast grid points
where the
> > > topo -
> > > > > > station
> > > > > > // difference meets the interp_fcst_thresh threshold.
> > > > > > // topo_mask.flag may be set separately in each
"obs.field"
> entry.
> > > > > > //
> > > > > > topo_mask = {
> > > > > > flag = FALSE;
> > > > > > file_name = [];
> > > > > > field = { name = "TOPO"; level = "L0"; }
> > > > > > regrid = { method = BILIN; width = 2; }
> > > > > > use_obs_thresh = ge-100&&le100;
> > > > > > interp_fcst_thresh = ge-50&&le50;
> > > > > > }
> > > > > >
> > > > > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr. Elizabeth
via
> RT <
> > > > > > met_help at ucar.edu> wrote:
> > > > > >
> > > > > > >
> > > > > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted upon.
> > > > > > > Transaction: Ticket created by
> > > Elizabeth.Satterfield at nrlmry.navy.mil
> > > > > > >        Queue: met_help
> > > > > > >      Subject: point stat questions
> > > > > > >        Owner: Nobody
> > > > > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > > > > >       Status: new
> > > > > > >  Ticket <URL:
> > > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Hi John,
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > A few questions about point stat:
> > > > > > >
> > > > > > > 1.         Are grid relative winds automatically
converted to
> > Earth
> > > > > > > relative
> > > > > > > winds?
> > > > > > >
> > > > > > > 2.        For observation that fall below the model
surface,
> are
> > > > model
> > > > > > > fields interpolated to observation location?  If so,
how?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Thanks!
> > > > > > >
> > > > > > > Liz
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Elizabeth Satterfield
> > > > > > > Editor, Monthly Weather Review
> > > > > > >
> > > > > > > Chair, AMS Committee on Probability and Statistics
> > > > > > >
> > > > > > > Meteorologist, Code 7531
> > > > > > > Marine Meteorology Division
> > > > > > > U.S. Naval Research Laboratory
> > > > > > > T 831.656.4056  F 831.656.4026
> > > > > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > > > > >
> > > > > > >
> > __________________________________________________________________
> > > > > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > > > > Any misuse or unauthorized disclosure may result in both
civil
> > and
> > > > > > criminal
> > > > > > > penalties.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>



------------------------------------------------
Subject: point stat questions
From: John Halley Gotway
Time: Mon Feb 08 17:53:10 2021

Justin,

Aha! I was able to get your data running and found the reason why the
topography logic is NOT being applied.

You can search for "topo_mask" here:
   https://dtcenter.github.io/MET/develop/Users_Guide/point-stat.html

But the punchline is that it's only applied to message types that are
considered to exist at the surface... e.g. surface verification.
You've
used a message type named "radiosonde", which is fine, but there is no
mention of that in the existing conventions. The way you tell Point-
Stat
which message types should be considered "surface" is by adding it to
the
comma-separated list of SURFACE values in message_type_group_map.

message_type_group_map = [
{key="SURFACE"; val="SYNOP,radiosonde"; },
{key="LANDSF"; val="";},
{key="WATERSF"; val="";}
];

I tested this using MET version 9.1 since I don't have a compiled
version
of 8.1 readily available.

With that I was able to filter obs based on topo differences:

DEBUG 4: Skipping observation for topography difference since
814.5156223
is not >=-50&&<=50 for [msg_typ:sid:lat:lon:elevation] =
[radiosonde:72274:32.22790146:-249.0440063:751] and model topography =
1565.515622.
...
DEBUG 2: Processing geopht/pre_000850 versus ght/P850, for observation
type
radiosonde, over region FULL, for interpolation method BILIN(4), using
36
matched pairs.
DEBUG 3: Number of matched pairs   = 36
DEBUG 3: Observations processed    = 1397946
DEBUG 3: Rejected: station id      = 0
DEBUG 3: Rejected: obs type        = 1161101
DEBUG 3: Rejected: valid time      = 0
DEBUG 3: Rejected: bad obs value   = 0
DEBUG 3: Rejected: off the grid    = 32712
DEBUG 3: Rejected: topography      = 57028
DEBUG 3: Rejected: level mismatch  = 147055
DEBUG 3: Rejected: quality marker  = 0
DEBUG 3: Rejected: message type    = 0
DEBUG 3: Rejected: masking region  = 0
DEBUG 3: Rejected: bad fcst value  = 14
DEBUG 3: Rejected: bad climo mean  = 0
DEBUG 3: Rejected: bad climo stdev = 0
DEBUG 3: Rejected: duplicates      = 0

I do think it makes sense to apply this logic to true surface obs, but
I'm
less sure of whether or not it should be applied to upper-air obs,
like the
ones you have. Up to you I guess, depending on how set the
message_type_group_map.

Hope that helps clarify.

Thanks,
John


On Mon, Feb 8, 2021 at 2:00 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>
> Ah I knew I forgot one more thing.  That file is in the same
directory on
> ftp, just placed it there
>
> Thanks,
> Justin
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Monday, February 8, 2021 12:57 PM
> To: Satterfield, Dr. Elizabeth
> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
>
> Justin,
>
> OK, I grabbed the data you sent. I'm trying to piece together an
actual run
> to replicate the behavior you describe.
>
> But I'm getting this error about missing files for the python
embedding
> script:
>    datahd_sfc_000000_000000_1a2000x0001_2019072300_00000000_infofld
>
> Are you able to send me that file(s)?
>
> I believe you're using MET version 8.1. I do see that that feature
was
> added for met-8.1:
> https://github.com/dtcenter/MET/issues/527
>
> But I'm sure I didn't test that using python embedding. So it'll be
> interesting to see what I find. It may be the case that python
embedding
> isn't working yet in that context. But there definitely should be
log
> messages tell you about that if that's the case.
>
> Thanks,
> John
>
> On Mon, Feb 8, 2021 at 1:26 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> >
> > Thanks John,
> >
> > I've uploaded a tar file in incoming/irap/met_help/tsu/
> >
> > Justin
> >
> > -----Original Message-----
> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > Sent: Monday, February 8, 2021 12:02 PM
> > To: Satterfield, Dr. Elizabeth
> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
> >
> > Jason,
> >
> > If they're small and email doesn't complain, you could send as an
> > attachment. If not, the ftp site is the way to go.
> >
> > Thanks,
> > John
> >
> > On Mon, Feb 8, 2021 at 11:36 AM Tsu, Mr. Justin via RT <
> met_help at ucar.edu>
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > >
> > > Thanks John,
> > >
> > > I have all the data ready to ship.   Do I need to upload it to
the ftp
> > > like last time?
> > >
> > > Justin
> > >
> > > -----Original Message-----
> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > Sent: Friday, February 5, 2021 7:45 PM
> > > To: Satterfield, Dr. Elizabeth
> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
> > >
> > > Justin,
> > >
> > > If you’re able to send me sample data to replicate your case, I
could
> > take
> > > a closer look.
> > >
> > > John
> > >
> > > On Fri, Feb 5, 2021 at 5:48 PM Tsu, Mr. Justin via RT <
> met_help at ucar.edu
> > >
> > > wrote:
> > >
> > > >
> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>
> > > >
> > > > I don't think my topo mask is working.  I just set
use_ob_thresh to
> > > > le-9999:
> > > >
> > > > 104 topo_mask = {
> > > > 105     flag = TRUE;
> > > > 106     FILE_NAME = ["PYTHON_NUMPY"];
> > > > 107     field = { name = "${READ_MODEL}
> > > > ${DATA_DIR}/terrht_sfc_000000_000000_${N
> > > > EST}_${START_TIME}_00000000_fcstfld";}
> > > > 108     regrid = { method = BILIN; width=2;}
> > > > 109     use_obs_thresh = le-9999;
> > > > 110     interp_fcst_thresh = ge-50&&le50;
> > > >
> > > > Which should theoretically reject every single matched pair.
> > > >
> > > > But:
> > > >
> > > > [tsu at lorenz raob]$ grep 'topography'
> > > > PointStat2019072300NEST1a0127x0127.log
> > > > DEBUG 3: Rejected: topography     = 0
> > > > DEBUG 3: Rejected: topography     = 0
> > > > DEBUG 3: Rejected: topography     = 0
> > > > DEBUG 3: Rejected: topography     = 0
> > > > DEBUG 3: Rejected: topography     = 0
> > > > DEBUG 3: Rejected: topography     = 0
> > > > DEBUG 3: Rejected: topography     = 0
> > > > DEBUG 3: Rejected: topography     = 0
> > > > DEBUG 3: Rejected: topography     = 0
> > > > DEBUG 3: Rejected: topography     = 0
> > > > DEBUG 3: Rejected: topography     = 0
> > > >
> > > > I also read in a terrain height file and an observation file
for a
> > > > particular station to see if they are comparable and they
check out.
> > Not
> > > > sure what is going on, but any guidance would be appreciated.
> > > >
> > > > Justin
> > > >
> > > > -----Original Message-----
> > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > Sent: Thursday, February 4, 2021 5:28 PM
> > > > To: Satterfield, Dr. Elizabeth
> > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
> > > >
> > > > Justin,
> > > >
> > > > Here’s the relevant line of code:
> > > >
> > > >
> > > >
> > >
> >
>
https://github.com/dtcenter/MET/blob/0fe2e42609120df236f74ae23c07f3fa4b930247/met/src/libcode/vx_statistics/pair_data_point.cc#L875
> > > >
> > > > The difference is computed as model topography - observation
station
> > > > elevation. So this assumes that those two quantities are the
same
> > units.
> > > > And note that at verbosity level 4 it prints a detailed log
message.
> So
> > > you
> > > > could play around with the threshold, run at -v 4, and you
should see
> > > > useful log messages.
> > > >
> > > > John
> > > >
> > > > On Thu, Feb 4, 2021 at 5:56 PM Tsu, Mr. Justin via RT <
> > met_help at ucar.edu
> > > >
> > > > wrote:
> > > >
> > > > >
> > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > > > >
> > > > > Hi John,
> > > > >
> > > > > I'd like to revisit an old question about topography,
specifically
> > > > > topo_mask.  When comparing geopotential height for a
specific time,
> > our
> > > > NRL
> > > > > statistic program had some rejects due to ob height being
below
> > > simulated
> > > > > ground (the stations in question were in Denver).  However,
I had 0
> > > > rejects
> > > > > for the same cmparison in MET.  My topo_mask looks like
this:
> > > > >
> > > > > 82 topo_mask = {
> > > > >  83     flag = TRUE;
> > > > >  84     FILE_NAME = ["PYTHON_NUMPY"];
> > > > >  85     field = { name = "${READ_MODEL}
> > > > >
> > > >
> > >
> >
>
${DATA_DIR}/terrht_sfc_000000_000000_${NEST}_${START_TIME}_00000000_fcstfld";}
> > > > >  86     regrid = { method = BILIN; width=2;}
> > > > >  87     use_obs_thresh = ge-100&&le100;
> > > > >  88     interp_fcst_thresh = ge-50&&le50;
> > > > >  89 }
> > > > >
> > > > > Since use_obs_thresh can have a negative threshold, what is
the
> order
> > > of
> > > > > the difference, model height - ob height or ob height -
model
> height?
> > > > >
> > > > > Justin
> > > > >
> > > > > -----Original Message-----
> > > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > > Sent: Friday, January 17, 2020 11:06 AM
> > > > > To: Satterfield, Dr. Elizabeth
> > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > > >
> > > > > Justin,
> > > > >
> > > > > Running Point-stat and verbosity level 3 causes these types
of log
> > > > messages
> > > > > to be printed:
> > > > >
> > > > > DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation
type
> > ADPSFC,
> > > > over
> > > > > region FULL, for interpolation method GEOG_MATCH_SQUARE(9),
using
> > 3779
> > > > > matched pairs.
> > > > > DEBUG 3: Number of matched pairs  = 3779
> > > > > DEBUG 3: Observations processed   = 116861
> > > > > DEBUG 3: Rejected: SID exclusion  = 0
> > > > > DEBUG 3: Rejected: obs type       = 103809
> > > > > DEBUG 3: Rejected: valid time     = 0
> > > > > DEBUG 3: Rejected: bad obs value  = 0
> > > > > DEBUG 3: Rejected: off the grid   = 21
> > > > > DEBUG 3: Rejected: topography     = 548
> > > > > DEBUG 3: Rejected: level mismatch = 7675
> > > > > DEBUG 3: Rejected: quality marker = 0
> > > > > DEBUG 3: Rejected: message type   = 809
> > > > > DEBUG 3: Rejected: masking region = 0
> > > > > DEBUG 3: Rejected: bad fcst value = 220
> > > > > DEBUG 3: Rejected: duplicates     = 0
> > > > >
> > > > > The "topography" line indicates the number of point
observations
> > which
> > > > were
> > > > > skipped due to the topography logic.  And they are skipped
when...
> > > > > (1) the model topo value or point obs elevation value are
bad data.
> > > > > (2) their difference exceeds the "use_obs_thresh" threshold
> > > > >
> > > > > And we also write a DEBUG(4) log message about it:
> > > > >
> > > > > DEBUG 4: Skipping observation for topography difference
since
> 119.598
> > > is
> > > > > not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
> > > > > [ADPSFC:71069:55.28:114.78:581] and model topography =
700.598.
> > > > >
> > > > > So please try rerunning with verbosity level 4 (-v 4) and
check for
> > log
> > > > > messages about "topography" or "geography".
> > > > >
> > > > > Your next question...
> > > > >    Also, how does point_stat know what netCDF variable to
check
> > terrht
> > > > > against?
> > > > >
> > > > > Point-Stat is comparing the model "terrht" against the
observation
> > > > station
> > > > > elevation, which is the 6th column of the 11-column point
> observation
> > > > > format:
> > > > >
> > > > >         The "met_point" ASCII format consists of 11 columns:
> > > > >                Message_Type Station_ID
Valid_Time(YYYYMMDD_HHMMSS)
> > > > >                Lat(Deg North) Lon(Deg East) Elevation(msl)
> > > > >                Var_Name(or GRIB_Code) Level Height(msl or
agl)
> > > > >                QC_String Observation_Value
> > > > >
> > > > > This logic is used to discard point obs with large
differences from
> > the
> > > > > model elevation.
> > > > >
> > > > > John
> > > > >
> > > > > On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT <
> > > > met_help at ucar.edu
> > > > > >
> > > > > wrote:
> > > > >
> > > > > >
> > > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
> > > > > >
> > > > > > Thanks John,
> > > > > >
> > > > > > I just implemented your changes for a simple point_stat
case
> > > verifying
> > > > > > wind direction.   The point_stat debugging output looks
exactly
> the
> > > > same
> > > > > as
> > > > > > if I hadn't used topo_mask... how do I know if it actually
worked
> > and
> > > > > > terrain height got into point_stat?
> > > > > >
> > > > > > Also, how does point_stat know what netCDF variable to
check
> terrht
> > > > > > against?
> > > > > > Justin
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> > > > > > Sent: Thursday, January 9, 2020 10:27 AM
> > > > > > To: Satterfield, Dr. Elizabeth
> > > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
> > > > > >
> > > > > > Justin,
> > > > > >
> > > > > > Sorry for losing this in the shuffle.  It's a hectic time
of
> year.
> > > > > >
> > > > > > So your question is whether or not Python-embedding will
work
> when
> > > > > setting
> > > > > > the "topo_mask" dictionary in the Point-Stat config file.
I just
> > > > tested
> > > > > > this out (albeit with the development version of the code)
and it
> > > seems
> > > > > to
> > > > > > have worked fine, just as expected.  Remember though that
for
> > > > > > python-embedding you set the file_name to the constant
string
> > > > > > "PYTHON_NUMPY" and the field "name" to the python command
you
> want
> > to
> > > > > > execute to read the data.
> > > > > >
> > > > > > It looks like you were setting file_name = python command,
and
> that
> > > > won't
> > > > > > work.
> > > > > >
> > > > > > Thanks,
> > > > > > John
> > > > > >
> > > > > > //
> > > > > > // Topography
> > > > > > //
> > > > > > topo_mask = {
> > > > > >    flag               = FALSE;
> > > > > >    file_name          = [ "PYTHON_NUMPY" ];
> > > > > >    field              = { name = "read_NRL_binary.py
> > > > > >
> trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld";
> > }
> > > > > >    regrid             = { method = BILIN; width = 2; }
> > > > > >    use_obs_thresh     = ge-100&&le100;
> > > > > >    interp_fcst_thresh = ge-50&&le50;
> > > > > > }
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT <
> > > > met_help at ucar.edu
> > > > > >
> > > > > > wrote:
> > > > > >
> > > > > > >
> > > > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> >
> > > > > > >
> > > > > > > Hey John,
> > > > > > >
> > > > > > > This email probably got lost during the holidays.  Let
me know
> if
> > > you
> > > > > can
> > > > > > > get around to helping me out with this problem!
> > > > > > >
> > > > > > > Thanks and happy new year!
> > > > > > > Justin
> > > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Tsu, Mr. Justin
> > > > > > > Sent: Friday, December 20, 2019 4:18 PM
> > > > > > > To: 'met_help at ucar.edu'
> > > > > > > Subject: RE: [rt.rap.ucar.edu #93532] point stat
questions
> > > > > > >
> > > > > > > Thanks John,
> > > > > > >
> > > > > > > When using topo_mask,  will point_Stat understand a
python
> > embedded
> > > > > file?
> > > > > > > The files we use are named '
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
> > > > > > > These are projection gridded data of terrain heights.
Would
> > this
> > > > look
> > > > > > > something like this?
> > > > > > >
> > > > > > > topo_mask = {
> > > > > > >    flag               = FALSE;
> > > > > > >    file_name          = ["./read_NRL_binary
> > > > > > >
> >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
> > > > > > >    field              = { name = "TOPO"; level = "L0"; }
> > > > > > >    regrid             = { method = BILIN; width = 2; }
> > > > > > >    use_obs_thresh     = ge-100&&le100;
> > > > > > >    interp_fcst_thresh = ge-50&&le50;
> > > > > > > }
> > > > > > > And how does point_stat know which HDF5 varible to use
as the
> > point
> > > > of
> > > > > > > comparison to the model terrain height?
> > > > > > >
> > > > > > > Happy holidays!
> > > > > > > Justin
> > > > > > > -----Original Message-----
> > > > > > > From: John Halley Gotway via RT
[mailto:met_help at ucar.edu]
> > > > > > > Sent: Thursday, December 19, 2019 6:05 AM
> > > > > > > To: Satterfield, Dr. Elizabeth
> > > > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
> > > > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat
questions
> > > > > > >
> > > > > > > Liz,
> > > > > > >
> > > > > > > (1) When reading data from GRIB1 and GRIB2 files, MET
> > automatically
> > > > > > checks
> > > > > > > the flag in the header indicating whether winds are
defined as
> > grid
> > > > or
> > > > > > > earth-relative.  If grid relative, it searches the file
for the
> > > > > > correspond
> > > > > > > U or V pair and uses both U and V to rotate them to be
> > > > earth-relative.
> > > > > > >
> > > > > > > That logic does NOT work for python embedding.  I have
some
> ideas
> > > > about
> > > > > > how
> > > > > > > to make it work but those changes are not slated for the
> met-9.0
> > > > > release.
> > > > > > >
> > > > > > > I assume you’d like to see this enhancement?  And
perhaps we’ve
> > > > already
> > > > > > > talked about this?
> > > > > > >
> > > > > > > (2) Config options were added in met-8.1 for the Air
Force
> which
> > > > > address
> > > > > > > this issue.  By default this logic is disabled but can
be
> enabled
> > > > using
> > > > > > the
> > > > > > > “topo_mask” config file dictionary.  FYI, the
“land_mask”
> > > dictionary
> > > > > was
> > > > > > > also added at the same time.  Below is a link to the
default
> > > > point-stat
> > > > > > > config file followed by an excerpt from it.
> > > > > > >
> > > > > > > John
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
> > > > > > >
> > > > > > > // Topography
> > > > > > > // For SURFACE message types, only use observations
where the
> > topo
> > > -
> > > > > > > station
> > > > > > > // elevation difference meets the use_obs_thresh
threshold.
> > > > > > > // For the observations kept, when interpolating
forecast data
> to
> > > the
> > > > > > > // observation location, only use forecast grid points
where
> the
> > > > topo -
> > > > > > > station
> > > > > > > // difference meets the interp_fcst_thresh threshold.
> > > > > > > // topo_mask.flag may be set separately in each
"obs.field"
> > entry.
> > > > > > > //
> > > > > > > topo_mask = {
> > > > > > > flag = FALSE;
> > > > > > > file_name = [];
> > > > > > > field = { name = "TOPO"; level = "L0"; }
> > > > > > > regrid = { method = BILIN; width = 2; }
> > > > > > > use_obs_thresh = ge-100&&le100;
> > > > > > > interp_fcst_thresh = ge-50&&le50;
> > > > > > > }
> > > > > > >
> > > > > > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr.
Elizabeth via
> > RT <
> > > > > > > met_help at ucar.edu> wrote:
> > > > > > >
> > > > > > > >
> > > > > > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted
upon.
> > > > > > > > Transaction: Ticket created by
> > > > Elizabeth.Satterfield at nrlmry.navy.mil
> > > > > > > >        Queue: met_help
> > > > > > > >      Subject: point stat questions
> > > > > > > >        Owner: Nobody
> > > > > > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > > > > > > >       Status: new
> > > > > > > >  Ticket <URL:
> > > > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Hi John,
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > A few questions about point stat:
> > > > > > > >
> > > > > > > > 1.         Are grid relative winds automatically
converted to
> > > Earth
> > > > > > > > relative
> > > > > > > > winds?
> > > > > > > >
> > > > > > > > 2.        For observation that fall below the model
surface,
> > are
> > > > > model
> > > > > > > > fields interpolated to observation location?  If so,
how?
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Thanks!
> > > > > > > >
> > > > > > > > Liz
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Elizabeth Satterfield
> > > > > > > > Editor, Monthly Weather Review
> > > > > > > >
> > > > > > > > Chair, AMS Committee on Probability and Statistics
> > > > > > > >
> > > > > > > > Meteorologist, Code 7531
> > > > > > > > Marine Meteorology Division
> > > > > > > > U.S. Naval Research Laboratory
> > > > > > > > T 831.656.4056  F 831.656.4026
> > > > > > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
> > > > > > > >
> > > > > > > >
> > >
__________________________________________________________________
> > > > > > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
> > > > > > > > Any misuse or unauthorized disclosure may result in
both
> civil
> > > and
> > > > > > > criminal
> > > > > > > > penalties.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>

------------------------------------------------
Subject: point stat questions
From: John Halley Gotway
Time: Wed Feb 10 08:59:39 2021

Justin,

Just checking in. Do you have any more thoughts or questions about
this, or
should I go ahead and resolve this ticket?

Thanks,
John

On Mon, Feb 8, 2021 at 5:52 PM John Halley Gotway <johnhg at ucar.edu>
wrote:

> Justin,
>
> Aha! I was able to get your data running and found the reason why
the
> topography logic is NOT being applied.
>
> You can search for "topo_mask" here:
>    https://dtcenter.github.io/MET/develop/Users_Guide/point-
stat.html
>
> But the punchline is that it's only applied to message types that
are
> considered to exist at the surface... e.g. surface verification.
You've
> used a message type named "radiosonde", which is fine, but there is
no
> mention of that in the existing conventions. The way you tell Point-
Stat
> which message types should be considered "surface" is by adding it
to the
> comma-separated list of SURFACE values in message_type_group_map.
>
> message_type_group_map = [
> {key="SURFACE"; val="SYNOP,radiosonde"; },
> {key="LANDSF"; val="";},
> {key="WATERSF"; val="";}
> ];
>
> I tested this using MET version 9.1 since I don't have a compiled
version
> of 8.1 readily available.
>
> With that I was able to filter obs based on topo differences:
>
> DEBUG 4: Skipping observation for topography difference since
814.5156223
> is not >=-50&&<=50 for [msg_typ:sid:lat:lon:elevation] =
> [radiosonde:72274:32.22790146:-249.0440063:751] and model topography
=
> 1565.515622.
> ...
> DEBUG 2: Processing geopht/pre_000850 versus ght/P850, for
observation
> type radiosonde, over region FULL, for interpolation method
BILIN(4), using
> 36 matched pairs.
> DEBUG 3: Number of matched pairs   = 36
> DEBUG 3: Observations processed    = 1397946
> DEBUG 3: Rejected: station id      = 0
> DEBUG 3: Rejected: obs type        = 1161101
> DEBUG 3: Rejected: valid time      = 0
> DEBUG 3: Rejected: bad obs value   = 0
> DEBUG 3: Rejected: off the grid    = 32712
> DEBUG 3: Rejected: topography      = 57028
> DEBUG 3: Rejected: level mismatch  = 147055
> DEBUG 3: Rejected: quality marker  = 0
> DEBUG 3: Rejected: message type    = 0
> DEBUG 3: Rejected: masking region  = 0
> DEBUG 3: Rejected: bad fcst value  = 14
> DEBUG 3: Rejected: bad climo mean  = 0
> DEBUG 3: Rejected: bad climo stdev = 0
> DEBUG 3: Rejected: duplicates      = 0
>
> I do think it makes sense to apply this logic to true surface obs,
but I'm
> less sure of whether or not it should be applied to upper-air obs,
like the
> ones you have. Up to you I guess, depending on how set the
> message_type_group_map.
>
> Hope that helps clarify.
>
> Thanks,
> John
>
>
> On Mon, Feb 8, 2021 at 2:00 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>>
>> Ah I knew I forgot one more thing.  That file is in the same
directory on
>> ftp, just placed it there
>>
>> Thanks,
>> Justin
>>
>> -----Original Message-----
>> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
>> Sent: Monday, February 8, 2021 12:57 PM
>> To: Satterfield, Dr. Elizabeth
>> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
>>
>> Justin,
>>
>> OK, I grabbed the data you sent. I'm trying to piece together an
actual
>> run
>> to replicate the behavior you describe.
>>
>> But I'm getting this error about missing files for the python
embedding
>> script:
>>    datahd_sfc_000000_000000_1a2000x0001_2019072300_00000000_infofld
>>
>> Are you able to send me that file(s)?
>>
>> I believe you're using MET version 8.1. I do see that that feature
was
>> added for met-8.1:
>> https://github.com/dtcenter/MET/issues/527
>>
>> But I'm sure I didn't test that using python embedding. So it'll be
>> interesting to see what I find. It may be the case that python
embedding
>> isn't working yet in that context. But there definitely should be
log
>> messages tell you about that if that's the case.
>>
>> Thanks,
>> John
>>
>> On Mon, Feb 8, 2021 at 1:26 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
>> wrote:
>>
>> >
>> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>> >
>> > Thanks John,
>> >
>> > I've uploaded a tar file in incoming/irap/met_help/tsu/
>> >
>> > Justin
>> >
>> > -----Original Message-----
>> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
>> > Sent: Monday, February 8, 2021 12:02 PM
>> > To: Satterfield, Dr. Elizabeth
>> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
>> >
>> > Jason,
>> >
>> > If they're small and email doesn't complain, you could send as an
>> > attachment. If not, the ftp site is the way to go.
>> >
>> > Thanks,
>> > John
>> >
>> > On Mon, Feb 8, 2021 at 11:36 AM Tsu, Mr. Justin via RT <
>> met_help at ucar.edu>
>> > wrote:
>> >
>> > >
>> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>> > >
>> > > Thanks John,
>> > >
>> > > I have all the data ready to ship.   Do I need to upload it to
the ftp
>> > > like last time?
>> > >
>> > > Justin
>> > >
>> > > -----Original Message-----
>> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
>> > > Sent: Friday, February 5, 2021 7:45 PM
>> > > To: Satterfield, Dr. Elizabeth
>> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> > > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
>> > >
>> > > Justin,
>> > >
>> > > If you’re able to send me sample data to replicate your case, I
could
>> > take
>> > > a closer look.
>> > >
>> > > John
>> > >
>> > > On Fri, Feb 5, 2021 at 5:48 PM Tsu, Mr. Justin via RT <
>> met_help at ucar.edu
>> > >
>> > > wrote:
>> > >
>> > > >
>> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>
>> > > >
>> > > > I don't think my topo mask is working.  I just set
use_ob_thresh to
>> > > > le-9999:
>> > > >
>> > > > 104 topo_mask = {
>> > > > 105     flag = TRUE;
>> > > > 106     FILE_NAME = ["PYTHON_NUMPY"];
>> > > > 107     field = { name = "${READ_MODEL}
>> > > > ${DATA_DIR}/terrht_sfc_000000_000000_${N
>> > > > EST}_${START_TIME}_00000000_fcstfld";}
>> > > > 108     regrid = { method = BILIN; width=2;}
>> > > > 109     use_obs_thresh = le-9999;
>> > > > 110     interp_fcst_thresh = ge-50&&le50;
>> > > >
>> > > > Which should theoretically reject every single matched pair.
>> > > >
>> > > > But:
>> > > >
>> > > > [tsu at lorenz raob]$ grep 'topography'
>> > > > PointStat2019072300NEST1a0127x0127.log
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > >
>> > > > I also read in a terrain height file and an observation file
for a
>> > > > particular station to see if they are comparable and they
check out.
>> > Not
>> > > > sure what is going on, but any guidance would be appreciated.
>> > > >
>> > > > Justin
>> > > >
>> > > > -----Original Message-----
>> > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
>> > > > Sent: Thursday, February 4, 2021 5:28 PM
>> > > > To: Satterfield, Dr. Elizabeth
>> > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> > > > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat
questions
>> > > >
>> > > > Justin,
>> > > >
>> > > > Here’s the relevant line of code:
>> > > >
>> > > >
>> > > >
>> > >
>> >
>>
https://github.com/dtcenter/MET/blob/0fe2e42609120df236f74ae23c07f3fa4b930247/met/src/libcode/vx_statistics/pair_data_point.cc#L875
>> > > >
>> > > > The difference is computed as model topography - observation
station
>> > > > elevation. So this assumes that those two quantities are the
same
>> > units.
>> > > > And note that at verbosity level 4 it prints a detailed log
>> message. So
>> > > you
>> > > > could play around with the threshold, run at -v 4, and you
should
>> see
>> > > > useful log messages.
>> > > >
>> > > > John
>> > > >
>> > > > On Thu, Feb 4, 2021 at 5:56 PM Tsu, Mr. Justin via RT <
>> > met_help at ucar.edu
>> > > >
>> > > > wrote:
>> > > >
>> > > > >
>> > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>> > > > >
>> > > > > Hi John,
>> > > > >
>> > > > > I'd like to revisit an old question about topography,
specifically
>> > > > > topo_mask.  When comparing geopotential height for a
specific
>> time,
>> > our
>> > > > NRL
>> > > > > statistic program had some rejects due to ob height being
below
>> > > simulated
>> > > > > ground (the stations in question were in Denver).  However,
I had
>> 0
>> > > > rejects
>> > > > > for the same cmparison in MET.  My topo_mask looks like
this:
>> > > > >
>> > > > > 82 topo_mask = {
>> > > > >  83     flag = TRUE;
>> > > > >  84     FILE_NAME = ["PYTHON_NUMPY"];
>> > > > >  85     field = { name = "${READ_MODEL}
>> > > > >
>> > > >
>> > >
>> >
>>
${DATA_DIR}/terrht_sfc_000000_000000_${NEST}_${START_TIME}_00000000_fcstfld";}
>> > > > >  86     regrid = { method = BILIN; width=2;}
>> > > > >  87     use_obs_thresh = ge-100&&le100;
>> > > > >  88     interp_fcst_thresh = ge-50&&le50;
>> > > > >  89 }
>> > > > >
>> > > > > Since use_obs_thresh can have a negative threshold, what is
the
>> order
>> > > of
>> > > > > the difference, model height - ob height or ob height -
model
>> height?
>> > > > >
>> > > > > Justin
>> > > > >
>> > > > > -----Original Message-----
>> > > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
>> > > > > Sent: Friday, January 17, 2020 11:06 AM
>> > > > > To: Satterfield, Dr. Elizabeth
>> > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>> > > > >
>> > > > > Justin,
>> > > > >
>> > > > > Running Point-stat and verbosity level 3 causes these types
of log
>> > > > messages
>> > > > > to be printed:
>> > > > >
>> > > > > DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation
type
>> > ADPSFC,
>> > > > over
>> > > > > region FULL, for interpolation method GEOG_MATCH_SQUARE(9),
using
>> > 3779
>> > > > > matched pairs.
>> > > > > DEBUG 3: Number of matched pairs  = 3779
>> > > > > DEBUG 3: Observations processed   = 116861
>> > > > > DEBUG 3: Rejected: SID exclusion  = 0
>> > > > > DEBUG 3: Rejected: obs type       = 103809
>> > > > > DEBUG 3: Rejected: valid time     = 0
>> > > > > DEBUG 3: Rejected: bad obs value  = 0
>> > > > > DEBUG 3: Rejected: off the grid   = 21
>> > > > > DEBUG 3: Rejected: topography     = 548
>> > > > > DEBUG 3: Rejected: level mismatch = 7675
>> > > > > DEBUG 3: Rejected: quality marker = 0
>> > > > > DEBUG 3: Rejected: message type   = 809
>> > > > > DEBUG 3: Rejected: masking region = 0
>> > > > > DEBUG 3: Rejected: bad fcst value = 220
>> > > > > DEBUG 3: Rejected: duplicates     = 0
>> > > > >
>> > > > > The "topography" line indicates the number of point
observations
>> > which
>> > > > were
>> > > > > skipped due to the topography logic.  And they are skipped
when...
>> > > > > (1) the model topo value or point obs elevation value are
bad
>> data.
>> > > > > (2) their difference exceeds the "use_obs_thresh" threshold
>> > > > >
>> > > > > And we also write a DEBUG(4) log message about it:
>> > > > >
>> > > > > DEBUG 4: Skipping observation for topography difference
since
>> 119.598
>> > > is
>> > > > > not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
>> > > > > [ADPSFC:71069:55.28:114.78:581] and model topography =
700.598.
>> > > > >
>> > > > > So please try rerunning with verbosity level 4 (-v 4) and
check
>> for
>> > log
>> > > > > messages about "topography" or "geography".
>> > > > >
>> > > > > Your next question...
>> > > > >    Also, how does point_stat know what netCDF variable to
check
>> > terrht
>> > > > > against?
>> > > > >
>> > > > > Point-Stat is comparing the model "terrht" against the
observation
>> > > > station
>> > > > > elevation, which is the 6th column of the 11-column point
>> observation
>> > > > > format:
>> > > > >
>> > > > >         The "met_point" ASCII format consists of 11
columns:
>> > > > >                Message_Type Station_ID
Valid_Time(YYYYMMDD_HHMMSS)
>> > > > >                Lat(Deg North) Lon(Deg East) Elevation(msl)
>> > > > >                Var_Name(or GRIB_Code) Level Height(msl or
agl)
>> > > > >                QC_String Observation_Value
>> > > > >
>> > > > > This logic is used to discard point obs with large
differences
>> from
>> > the
>> > > > > model elevation.
>> > > > >
>> > > > > John
>> > > > >
>> > > > > On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT <
>> > > > met_help at ucar.edu
>> > > > > >
>> > > > > wrote:
>> > > > >
>> > > > > >
>> > > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>> > > > > >
>> > > > > > Thanks John,
>> > > > > >
>> > > > > > I just implemented your changes for a simple point_stat
case
>> > > verifying
>> > > > > > wind direction.   The point_stat debugging output looks
exactly
>> the
>> > > > same
>> > > > > as
>> > > > > > if I hadn't used topo_mask... how do I know if it
actually
>> worked
>> > and
>> > > > > > terrain height got into point_stat?
>> > > > > >
>> > > > > > Also, how does point_stat know what netCDF variable to
check
>> terrht
>> > > > > > against?
>> > > > > > Justin
>> > > > > >
>> > > > > > -----Original Message-----
>> > > > > > From: John Halley Gotway via RT
[mailto:met_help at ucar.edu]
>> > > > > > Sent: Thursday, January 9, 2020 10:27 AM
>> > > > > > To: Satterfield, Dr. Elizabeth
>> > > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> > > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat
questions
>> > > > > >
>> > > > > > Justin,
>> > > > > >
>> > > > > > Sorry for losing this in the shuffle.  It's a hectic time
of
>> year.
>> > > > > >
>> > > > > > So your question is whether or not Python-embedding will
work
>> when
>> > > > > setting
>> > > > > > the "topo_mask" dictionary in the Point-Stat config file.
I
>> just
>> > > > tested
>> > > > > > this out (albeit with the development version of the
code) and
>> it
>> > > seems
>> > > > > to
>> > > > > > have worked fine, just as expected.  Remember though that
for
>> > > > > > python-embedding you set the file_name to the constant
string
>> > > > > > "PYTHON_NUMPY" and the field "name" to the python command
you
>> want
>> > to
>> > > > > > execute to read the data.
>> > > > > >
>> > > > > > It looks like you were setting file_name = python
command, and
>> that
>> > > > won't
>> > > > > > work.
>> > > > > >
>> > > > > > Thanks,
>> > > > > > John
>> > > > > >
>> > > > > > //
>> > > > > > // Topography
>> > > > > > //
>> > > > > > topo_mask = {
>> > > > > >    flag               = FALSE;
>> > > > > >    file_name          = [ "PYTHON_NUMPY" ];
>> > > > > >    field              = { name = "read_NRL_binary.py
>> > > > > >
>> trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld";
>> > }
>> > > > > >    regrid             = { method = BILIN; width = 2; }
>> > > > > >    use_obs_thresh     = ge-100&&le100;
>> > > > > >    interp_fcst_thresh = ge-50&&le50;
>> > > > > > }
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT <
>> > > > met_help at ucar.edu
>> > > > > >
>> > > > > > wrote:
>> > > > > >
>> > > > > > >
>> > > > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>> >
>> > > > > > >
>> > > > > > > Hey John,
>> > > > > > >
>> > > > > > > This email probably got lost during the holidays.  Let
me
>> know if
>> > > you
>> > > > > can
>> > > > > > > get around to helping me out with this problem!
>> > > > > > >
>> > > > > > > Thanks and happy new year!
>> > > > > > > Justin
>> > > > > > >
>> > > > > > > -----Original Message-----
>> > > > > > > From: Tsu, Mr. Justin
>> > > > > > > Sent: Friday, December 20, 2019 4:18 PM
>> > > > > > > To: 'met_help at ucar.edu'
>> > > > > > > Subject: RE: [rt.rap.ucar.edu #93532] point stat
questions
>> > > > > > >
>> > > > > > > Thanks John,
>> > > > > > >
>> > > > > > > When using topo_mask,  will point_Stat understand a
python
>> > embedded
>> > > > > file?
>> > > > > > > The files we use are named '
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
>> > > > > > > These are projection gridded data of terrain heights.
Would
>> > this
>> > > > look
>> > > > > > > something like this?
>> > > > > > >
>> > > > > > > topo_mask = {
>> > > > > > >    flag               = FALSE;
>> > > > > > >    file_name          = ["./read_NRL_binary
>> > > > > > >
>> >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
>> > > > > > >    field              = { name = "TOPO"; level = "L0";
}
>> > > > > > >    regrid             = { method = BILIN; width = 2; }
>> > > > > > >    use_obs_thresh     = ge-100&&le100;
>> > > > > > >    interp_fcst_thresh = ge-50&&le50;
>> > > > > > > }
>> > > > > > > And how does point_stat know which HDF5 varible to use
as the
>> > point
>> > > > of
>> > > > > > > comparison to the model terrain height?
>> > > > > > >
>> > > > > > > Happy holidays!
>> > > > > > > Justin
>> > > > > > > -----Original Message-----
>> > > > > > > From: John Halley Gotway via RT
[mailto:met_help at ucar.edu]
>> > > > > > > Sent: Thursday, December 19, 2019 6:05 AM
>> > > > > > > To: Satterfield, Dr. Elizabeth
>> > > > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> > > > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat
questions
>> > > > > > >
>> > > > > > > Liz,
>> > > > > > >
>> > > > > > > (1) When reading data from GRIB1 and GRIB2 files, MET
>> > automatically
>> > > > > > checks
>> > > > > > > the flag in the header indicating whether winds are
defined as
>> > grid
>> > > > or
>> > > > > > > earth-relative.  If grid relative, it searches the file
for
>> the
>> > > > > > correspond
>> > > > > > > U or V pair and uses both U and V to rotate them to be
>> > > > earth-relative.
>> > > > > > >
>> > > > > > > That logic does NOT work for python embedding.  I have
some
>> ideas
>> > > > about
>> > > > > > how
>> > > > > > > to make it work but those changes are not slated for
the
>> met-9.0
>> > > > > release.
>> > > > > > >
>> > > > > > > I assume you’d like to see this enhancement?  And
perhaps
>> we’ve
>> > > > already
>> > > > > > > talked about this?
>> > > > > > >
>> > > > > > > (2) Config options were added in met-8.1 for the Air
Force
>> which
>> > > > > address
>> > > > > > > this issue.  By default this logic is disabled but can
be
>> enabled
>> > > > using
>> > > > > > the
>> > > > > > > “topo_mask” config file dictionary.  FYI, the
“land_mask”
>> > > dictionary
>> > > > > was
>> > > > > > > also added at the same time.  Below is a link to the
default
>> > > > point-stat
>> > > > > > > config file followed by an excerpt from it.
>> > > > > > >
>> > > > > > > John
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
>> > > > > > >
>> > > > > > > // Topography
>> > > > > > > // For SURFACE message types, only use observations
where the
>> > topo
>> > > -
>> > > > > > > station
>> > > > > > > // elevation difference meets the use_obs_thresh
threshold.
>> > > > > > > // For the observations kept, when interpolating
forecast
>> data to
>> > > the
>> > > > > > > // observation location, only use forecast grid points
where
>> the
>> > > > topo -
>> > > > > > > station
>> > > > > > > // difference meets the interp_fcst_thresh threshold.
>> > > > > > > // topo_mask.flag may be set separately in each
"obs.field"
>> > entry.
>> > > > > > > //
>> > > > > > > topo_mask = {
>> > > > > > > flag = FALSE;
>> > > > > > > file_name = [];
>> > > > > > > field = { name = "TOPO"; level = "L0"; }
>> > > > > > > regrid = { method = BILIN; width = 2; }
>> > > > > > > use_obs_thresh = ge-100&&le100;
>> > > > > > > interp_fcst_thresh = ge-50&&le50;
>> > > > > > > }
>> > > > > > >
>> > > > > > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr.
Elizabeth via
>> > RT <
>> > > > > > > met_help at ucar.edu> wrote:
>> > > > > > >
>> > > > > > > >
>> > > > > > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted
upon.
>> > > > > > > > Transaction: Ticket created by
>> > > > Elizabeth.Satterfield at nrlmry.navy.mil
>> > > > > > > >        Queue: met_help
>> > > > > > > >      Subject: point stat questions
>> > > > > > > >        Owner: Nobody
>> > > > > > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
>> > > > > > > >       Status: new
>> > > > > > > >  Ticket <URL:
>> > > > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>> > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > Hi John,
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > A few questions about point stat:
>> > > > > > > >
>> > > > > > > > 1.         Are grid relative winds automatically
converted
>> to
>> > > Earth
>> > > > > > > > relative
>> > > > > > > > winds?
>> > > > > > > >
>> > > > > > > > 2.        For observation that fall below the model
surface,
>> > are
>> > > > > model
>> > > > > > > > fields interpolated to observation location?  If so,
how?
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > Thanks!
>> > > > > > > >
>> > > > > > > > Liz
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > Elizabeth Satterfield
>> > > > > > > > Editor, Monthly Weather Review
>> > > > > > > >
>> > > > > > > > Chair, AMS Committee on Probability and Statistics
>> > > > > > > >
>> > > > > > > > Meteorologist, Code 7531
>> > > > > > > > Marine Meteorology Division
>> > > > > > > > U.S. Naval Research Laboratory
>> > > > > > > > T 831.656.4056  F 831.656.4026
>> > > > > > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
>> > > > > > > >
>> > > > > > > >
>> > >
__________________________________________________________________
>> > > > > > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
>> > > > > > > > Any misuse or unauthorized disclosure may result in
both
>> civil
>> > > and
>> > > > > > > criminal
>> > > > > > > > penalties.
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > >
>> > >
>> > >
>> > >
>> >
>> >
>> >
>> >
>>
>>
>>
>>

------------------------------------------------
Subject: RE: FW: [rt.rap.ucar.edu #93532] point stat questions
From: Tsu, Mr. Justin
Time: Wed Feb 10 10:42:51 2021

Thanks John,

Looks good to me.  I haven’t tried the solution yet but it looks like
it clearly works.  Thanks for the nice find!

Justin

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Wednesday, February 10, 2021 8:00 AM
To: Satterfield, Dr. Elizabeth
Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions

Justin,

Just checking in. Do you have any more thoughts or questions about
this, or
should I go ahead and resolve this ticket?

Thanks,
John

On Mon, Feb 8, 2021 at 5:52 PM John Halley Gotway <johnhg at ucar.edu>
wrote:

> Justin,
>
> Aha! I was able to get your data running and found the reason why
the
> topography logic is NOT being applied.
>
> You can search for "topo_mask" here:
>    https://dtcenter.github.io/MET/develop/Users_Guide/point-
stat.html
>
> But the punchline is that it's only applied to message types that
are
> considered to exist at the surface... e.g. surface verification.
You've
> used a message type named "radiosonde", which is fine, but there is
no
> mention of that in the existing conventions. The way you tell Point-
Stat
> which message types should be considered "surface" is by adding it
to the
> comma-separated list of SURFACE values in message_type_group_map.
>
> message_type_group_map = [
> {key="SURFACE"; val="SYNOP,radiosonde"; },
> {key="LANDSF"; val="";},
> {key="WATERSF"; val="";}
> ];
>
> I tested this using MET version 9.1 since I don't have a compiled
version
> of 8.1 readily available.
>
> With that I was able to filter obs based on topo differences:
>
> DEBUG 4: Skipping observation for topography difference since
814.5156223
> is not >=-50&&<=50 for [msg_typ:sid:lat:lon:elevation] =
> [radiosonde:72274:32.22790146:-249.0440063:751] and model topography
=
> 1565.515622.
> ...
> DEBUG 2: Processing geopht/pre_000850 versus ght/P850, for
observation
> type radiosonde, over region FULL, for interpolation method
BILIN(4), using
> 36 matched pairs.
> DEBUG 3: Number of matched pairs   = 36
> DEBUG 3: Observations processed    = 1397946
> DEBUG 3: Rejected: station id      = 0
> DEBUG 3: Rejected: obs type        = 1161101
> DEBUG 3: Rejected: valid time      = 0
> DEBUG 3: Rejected: bad obs value   = 0
> DEBUG 3: Rejected: off the grid    = 32712
> DEBUG 3: Rejected: topography      = 57028
> DEBUG 3: Rejected: level mismatch  = 147055
> DEBUG 3: Rejected: quality marker  = 0
> DEBUG 3: Rejected: message type    = 0
> DEBUG 3: Rejected: masking region  = 0
> DEBUG 3: Rejected: bad fcst value  = 14
> DEBUG 3: Rejected: bad climo mean  = 0
> DEBUG 3: Rejected: bad climo stdev = 0
> DEBUG 3: Rejected: duplicates      = 0
>
> I do think it makes sense to apply this logic to true surface obs,
but I'm
> less sure of whether or not it should be applied to upper-air obs,
like the
> ones you have. Up to you I guess, depending on how set the
> message_type_group_map.
>
> Hope that helps clarify.
>
> Thanks,
> John
>
>
> On Mon, Feb 8, 2021 at 2:00 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>>
>> Ah I knew I forgot one more thing.  That file is in the same
directory on
>> ftp, just placed it there
>>
>> Thanks,
>> Justin
>>
>> -----Original Message-----
>> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
>> Sent: Monday, February 8, 2021 12:57 PM
>> To: Satterfield, Dr. Elizabeth
>> Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
>>
>> Justin,
>>
>> OK, I grabbed the data you sent. I'm trying to piece together an
actual
>> run
>> to replicate the behavior you describe.
>>
>> But I'm getting this error about missing files for the python
embedding
>> script:
>>    datahd_sfc_000000_000000_1a2000x0001_2019072300_00000000_infofld
>>
>> Are you able to send me that file(s)?
>>
>> I believe you're using MET version 8.1. I do see that that feature
was
>> added for met-8.1:
>> https://github.com/dtcenter/MET/issues/527
>>
>> But I'm sure I didn't test that using python embedding. So it'll be
>> interesting to see what I find. It may be the case that python
embedding
>> isn't working yet in that context. But there definitely should be
log
>> messages tell you about that if that's the case.
>>
>> Thanks,
>> John
>>
>> On Mon, Feb 8, 2021 at 1:26 PM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
>> wrote:
>>
>> >
>> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>> >
>> > Thanks John,
>> >
>> > I've uploaded a tar file in incoming/irap/met_help/tsu/
>> >
>> > Justin
>> >
>> > -----Original Message-----
>> > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
>> > Sent: Monday, February 8, 2021 12:02 PM
>> > To: Satterfield, Dr. Elizabeth
>> > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
>> >
>> > Jason,
>> >
>> > If they're small and email doesn't complain, you could send as an
>> > attachment. If not, the ftp site is the way to go.
>> >
>> > Thanks,
>> > John
>> >
>> > On Mon, Feb 8, 2021 at 11:36 AM Tsu, Mr. Justin via RT <
>> met_help at ucar.edu>
>> > wrote:
>> >
>> > >
>> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>> > >
>> > > Thanks John,
>> > >
>> > > I have all the data ready to ship.   Do I need to upload it to
the ftp
>> > > like last time?
>> > >
>> > > Justin
>> > >
>> > > -----Original Message-----
>> > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
>> > > Sent: Friday, February 5, 2021 7:45 PM
>> > > To: Satterfield, Dr. Elizabeth
>> > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> > > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat questions
>> > >
>> > > Justin,
>> > >
>> > > If you’re able to send me sample data to replicate your case, I
could
>> > take
>> > > a closer look.
>> > >
>> > > John
>> > >
>> > > On Fri, Feb 5, 2021 at 5:48 PM Tsu, Mr. Justin via RT <
>> met_help at ucar.edu
>> > >
>> > > wrote:
>> > >
>> > > >
>> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>
>> > > >
>> > > > I don't think my topo mask is working.  I just set
use_ob_thresh to
>> > > > le-9999:
>> > > >
>> > > > 104 topo_mask = {
>> > > > 105     flag = TRUE;
>> > > > 106     FILE_NAME = ["PYTHON_NUMPY"];
>> > > > 107     field = { name = "${READ_MODEL}
>> > > > ${DATA_DIR}/terrht_sfc_000000_000000_${N
>> > > > EST}_${START_TIME}_00000000_fcstfld";}
>> > > > 108     regrid = { method = BILIN; width=2;}
>> > > > 109     use_obs_thresh = le-9999;
>> > > > 110     interp_fcst_thresh = ge-50&&le50;
>> > > >
>> > > > Which should theoretically reject every single matched pair.
>> > > >
>> > > > But:
>> > > >
>> > > > [tsu at lorenz raob]$ grep 'topography'
>> > > > PointStat2019072300NEST1a0127x0127.log
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > > DEBUG 3: Rejected: topography     = 0
>> > > >
>> > > > I also read in a terrain height file and an observation file
for a
>> > > > particular station to see if they are comparable and they
check out.
>> > Not
>> > > > sure what is going on, but any guidance would be appreciated.
>> > > >
>> > > > Justin
>> > > >
>> > > > -----Original Message-----
>> > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
>> > > > Sent: Thursday, February 4, 2021 5:28 PM
>> > > > To: Satterfield, Dr. Elizabeth
>> > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> > > > Subject: Re: FW: [rt.rap.ucar.edu #93532] point stat
questions
>> > > >
>> > > > Justin,
>> > > >
>> > > > Here’s the relevant line of code:
>> > > >
>> > > >
>> > > >
>> > >
>> >
>>
https://github.com/dtcenter/MET/blob/0fe2e42609120df236f74ae23c07f3fa4b930247/met/src/libcode/vx_statistics/pair_data_point.cc#L875
>> > > >
>> > > > The difference is computed as model topography - observation
station
>> > > > elevation. So this assumes that those two quantities are the
same
>> > units.
>> > > > And note that at verbosity level 4 it prints a detailed log
>> message. So
>> > > you
>> > > > could play around with the threshold, run at -v 4, and you
should
>> see
>> > > > useful log messages.
>> > > >
>> > > > John
>> > > >
>> > > > On Thu, Feb 4, 2021 at 5:56 PM Tsu, Mr. Justin via RT <
>> > met_help at ucar.edu
>> > > >
>> > > > wrote:
>> > > >
>> > > > >
>> > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>> > > > >
>> > > > > Hi John,
>> > > > >
>> > > > > I'd like to revisit an old question about topography,
specifically
>> > > > > topo_mask.  When comparing geopotential height for a
specific
>> time,
>> > our
>> > > > NRL
>> > > > > statistic program had some rejects due to ob height being
below
>> > > simulated
>> > > > > ground (the stations in question were in Denver).  However,
I had
>> 0
>> > > > rejects
>> > > > > for the same cmparison in MET.  My topo_mask looks like
this:
>> > > > >
>> > > > > 82 topo_mask = {
>> > > > >  83     flag = TRUE;
>> > > > >  84     FILE_NAME = ["PYTHON_NUMPY"];
>> > > > >  85     field = { name = "${READ_MODEL}
>> > > > >
>> > > >
>> > >
>> >
>>
${DATA_DIR}/terrht_sfc_000000_000000_${NEST}_${START_TIME}_00000000_fcstfld";}
>> > > > >  86     regrid = { method = BILIN; width=2;}
>> > > > >  87     use_obs_thresh = ge-100&&le100;
>> > > > >  88     interp_fcst_thresh = ge-50&&le50;
>> > > > >  89 }
>> > > > >
>> > > > > Since use_obs_thresh can have a negative threshold, what is
the
>> order
>> > > of
>> > > > > the difference, model height - ob height or ob height -
model
>> height?
>> > > > >
>> > > > > Justin
>> > > > >
>> > > > > -----Original Message-----
>> > > > > From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
>> > > > > Sent: Friday, January 17, 2020 11:06 AM
>> > > > > To: Satterfield, Dr. Elizabeth
>> > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat questions
>> > > > >
>> > > > > Justin,
>> > > > >
>> > > > > Running Point-stat and verbosity level 3 causes these types
of log
>> > > > messages
>> > > > > to be printed:
>> > > > >
>> > > > > DEBUG 2: Processing TMP/Z2 versus TMP/Z2, for observation
type
>> > ADPSFC,
>> > > > over
>> > > > > region FULL, for interpolation method GEOG_MATCH_SQUARE(9),
using
>> > 3779
>> > > > > matched pairs.
>> > > > > DEBUG 3: Number of matched pairs  = 3779
>> > > > > DEBUG 3: Observations processed   = 116861
>> > > > > DEBUG 3: Rejected: SID exclusion  = 0
>> > > > > DEBUG 3: Rejected: obs type       = 103809
>> > > > > DEBUG 3: Rejected: valid time     = 0
>> > > > > DEBUG 3: Rejected: bad obs value  = 0
>> > > > > DEBUG 3: Rejected: off the grid   = 21
>> > > > > DEBUG 3: Rejected: topography     = 548
>> > > > > DEBUG 3: Rejected: level mismatch = 7675
>> > > > > DEBUG 3: Rejected: quality marker = 0
>> > > > > DEBUG 3: Rejected: message type   = 809
>> > > > > DEBUG 3: Rejected: masking region = 0
>> > > > > DEBUG 3: Rejected: bad fcst value = 220
>> > > > > DEBUG 3: Rejected: duplicates     = 0
>> > > > >
>> > > > > The "topography" line indicates the number of point
observations
>> > which
>> > > > were
>> > > > > skipped due to the topography logic.  And they are skipped
when...
>> > > > > (1) the model topo value or point obs elevation value are
bad
>> data.
>> > > > > (2) their difference exceeds the "use_obs_thresh" threshold
>> > > > >
>> > > > > And we also write a DEBUG(4) log message about it:
>> > > > >
>> > > > > DEBUG 4: Skipping observation for topography difference
since
>> 119.598
>> > > is
>> > > > > not >=-100&&<=100 for [msg_typ:sid:lat:lon:elevation] =
>> > > > > [ADPSFC:71069:55.28:114.78:581] and model topography =
700.598.
>> > > > >
>> > > > > So please try rerunning with verbosity level 4 (-v 4) and
check
>> for
>> > log
>> > > > > messages about "topography" or "geography".
>> > > > >
>> > > > > Your next question...
>> > > > >    Also, how does point_stat know what netCDF variable to
check
>> > terrht
>> > > > > against?
>> > > > >
>> > > > > Point-Stat is comparing the model "terrht" against the
observation
>> > > > station
>> > > > > elevation, which is the 6th column of the 11-column point
>> observation
>> > > > > format:
>> > > > >
>> > > > >         The "met_point" ASCII format consists of 11
columns:
>> > > > >                Message_Type Station_ID
Valid_Time(YYYYMMDD_HHMMSS)
>> > > > >                Lat(Deg North) Lon(Deg East) Elevation(msl)
>> > > > >                Var_Name(or GRIB_Code) Level Height(msl or
agl)
>> > > > >                QC_String Observation_Value
>> > > > >
>> > > > > This logic is used to discard point obs with large
differences
>> from
>> > the
>> > > > > model elevation.
>> > > > >
>> > > > > John
>> > > > >
>> > > > > On Fri, Jan 17, 2020 at 11:26 AM Tsu, Mr. Justin via RT <
>> > > > met_help at ucar.edu
>> > > > > >
>> > > > > wrote:
>> > > > >
>> > > > > >
>> > > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532 >
>> > > > > >
>> > > > > > Thanks John,
>> > > > > >
>> > > > > > I just implemented your changes for a simple point_stat
case
>> > > verifying
>> > > > > > wind direction.   The point_stat debugging output looks
exactly
>> the
>> > > > same
>> > > > > as
>> > > > > > if I hadn't used topo_mask... how do I know if it
actually
>> worked
>> > and
>> > > > > > terrain height got into point_stat?
>> > > > > >
>> > > > > > Also, how does point_stat know what netCDF variable to
check
>> terrht
>> > > > > > against?
>> > > > > > Justin
>> > > > > >
>> > > > > > -----Original Message-----
>> > > > > > From: John Halley Gotway via RT
[mailto:met_help at ucar.edu]
>> > > > > > Sent: Thursday, January 9, 2020 10:27 AM
>> > > > > > To: Satterfield, Dr. Elizabeth
>> > > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> > > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat
questions
>> > > > > >
>> > > > > > Justin,
>> > > > > >
>> > > > > > Sorry for losing this in the shuffle.  It's a hectic time
of
>> year.
>> > > > > >
>> > > > > > So your question is whether or not Python-embedding will
work
>> when
>> > > > > setting
>> > > > > > the "topo_mask" dictionary in the Point-Stat config file.
I
>> just
>> > > > tested
>> > > > > > this out (albeit with the development version of the
code) and
>> it
>> > > seems
>> > > > > to
>> > > > > > have worked fine, just as expected.  Remember though that
for
>> > > > > > python-embedding you set the file_name to the constant
string
>> > > > > > "PYTHON_NUMPY" and the field "name" to the python command
you
>> want
>> > to
>> > > > > > execute to read the data.
>> > > > > >
>> > > > > > It looks like you were setting file_name = python
command, and
>> that
>> > > > won't
>> > > > > > work.
>> > > > > >
>> > > > > > Thanks,
>> > > > > > John
>> > > > > >
>> > > > > > //
>> > > > > > // Topography
>> > > > > > //
>> > > > > > topo_mask = {
>> > > > > >    flag               = FALSE;
>> > > > > >    file_name          = [ "PYTHON_NUMPY" ];
>> > > > > >    field              = { name = "read_NRL_binary.py
>> > > > > >
>> trpres_sfc_0000.0_0000.0_glob360x181_2013022712_00000000_fcstfld";
>> > }
>> > > > > >    regrid             = { method = BILIN; width = 2; }
>> > > > > >    use_obs_thresh     = ge-100&&le100;
>> > > > > >    interp_fcst_thresh = ge-50&&le50;
>> > > > > > }
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > On Wed, Jan 8, 2020 at 2:32 PM Tsu, Mr. Justin via RT <
>> > > > met_help at ucar.edu
>> > > > > >
>> > > > > > wrote:
>> > > > > >
>> > > > > > >
>> > > > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>> >
>> > > > > > >
>> > > > > > > Hey John,
>> > > > > > >
>> > > > > > > This email probably got lost during the holidays.  Let
me
>> know if
>> > > you
>> > > > > can
>> > > > > > > get around to helping me out with this problem!
>> > > > > > >
>> > > > > > > Thanks and happy new year!
>> > > > > > > Justin
>> > > > > > >
>> > > > > > > -----Original Message-----
>> > > > > > > From: Tsu, Mr. Justin
>> > > > > > > Sent: Friday, December 20, 2019 4:18 PM
>> > > > > > > To: 'met_help at ucar.edu'
>> > > > > > > Subject: RE: [rt.rap.ucar.edu #93532] point stat
questions
>> > > > > > >
>> > > > > > > Thanks John,
>> > > > > > >
>> > > > > > > When using topo_mask,  will point_Stat understand a
python
>> > embedded
>> > > > > file?
>> > > > > > > The files we use are named '
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
/DATA/tsu/repos/flds/terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld'.
>> > > > > > > These are projection gridded data of terrain heights.
Would
>> > this
>> > > > look
>> > > > > > > something like this?
>> > > > > > >
>> > > > > > > topo_mask = {
>> > > > > > >    flag               = FALSE;
>> > > > > > >    file_name          = ["./read_NRL_binary
>> > > > > > >
>> >
terrht_sfc_000000_000000_4a0331x0331_2019072800_00000000_fcstfld"];
>> > > > > > >    field              = { name = "TOPO"; level = "L0";
}
>> > > > > > >    regrid             = { method = BILIN; width = 2; }
>> > > > > > >    use_obs_thresh     = ge-100&&le100;
>> > > > > > >    interp_fcst_thresh = ge-50&&le50;
>> > > > > > > }
>> > > > > > > And how does point_stat know which HDF5 varible to use
as the
>> > point
>> > > > of
>> > > > > > > comparison to the model terrain height?
>> > > > > > >
>> > > > > > > Happy holidays!
>> > > > > > > Justin
>> > > > > > > -----Original Message-----
>> > > > > > > From: John Halley Gotway via RT
[mailto:met_help at ucar.edu]
>> > > > > > > Sent: Thursday, December 19, 2019 6:05 AM
>> > > > > > > To: Satterfield, Dr. Elizabeth
>> > > > > > > Cc: Nachamkin, Dr. Jason; Tsu, Mr. Justin
>> > > > > > > Subject: Re: [rt.rap.ucar.edu #93532] point stat
questions
>> > > > > > >
>> > > > > > > Liz,
>> > > > > > >
>> > > > > > > (1) When reading data from GRIB1 and GRIB2 files, MET
>> > automatically
>> > > > > > checks
>> > > > > > > the flag in the header indicating whether winds are
defined as
>> > grid
>> > > > or
>> > > > > > > earth-relative.  If grid relative, it searches the file
for
>> the
>> > > > > > correspond
>> > > > > > > U or V pair and uses both U and V to rotate them to be
>> > > > earth-relative.
>> > > > > > >
>> > > > > > > That logic does NOT work for python embedding.  I have
some
>> ideas
>> > > > about
>> > > > > > how
>> > > > > > > to make it work but those changes are not slated for
the
>> met-9.0
>> > > > > release.
>> > > > > > >
>> > > > > > > I assume you’d like to see this enhancement?  And
perhaps
>> we’ve
>> > > > already
>> > > > > > > talked about this?
>> > > > > > >
>> > > > > > > (2) Config options were added in met-8.1 for the Air
Force
>> which
>> > > > > address
>> > > > > > > this issue.  By default this logic is disabled but can
be
>> enabled
>> > > > using
>> > > > > > the
>> > > > > > > “topo_mask” config file dictionary.  FYI, the
“land_mask”
>> > > dictionary
>> > > > > was
>> > > > > > > also added at the same time.  Below is a link to the
default
>> > > > point-stat
>> > > > > > > config file followed by an excerpt from it.
>> > > > > > >
>> > > > > > > John
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
https://github.com/NCAR/MET/blob/master_v8.1/met/data/config/PointStatConfig_default
>> > > > > > >
>> > > > > > > // Topography
>> > > > > > > // For SURFACE message types, only use observations
where the
>> > topo
>> > > -
>> > > > > > > station
>> > > > > > > // elevation difference meets the use_obs_thresh
threshold.
>> > > > > > > // For the observations kept, when interpolating
forecast
>> data to
>> > > the
>> > > > > > > // observation location, only use forecast grid points
where
>> the
>> > > > topo -
>> > > > > > > station
>> > > > > > > // difference meets the interp_fcst_thresh threshold.
>> > > > > > > // topo_mask.flag may be set separately in each
"obs.field"
>> > entry.
>> > > > > > > //
>> > > > > > > topo_mask = {
>> > > > > > > flag = FALSE;
>> > > > > > > file_name = [];
>> > > > > > > field = { name = "TOPO"; level = "L0"; }
>> > > > > > > regrid = { method = BILIN; width = 2; }
>> > > > > > > use_obs_thresh = ge-100&&le100;
>> > > > > > > interp_fcst_thresh = ge-50&&le50;
>> > > > > > > }
>> > > > > > >
>> > > > > > > On Wed, Dec 18, 2019 at 6:37 PM Satterfield, Dr.
Elizabeth via
>> > RT <
>> > > > > > > met_help at ucar.edu> wrote:
>> > > > > > >
>> > > > > > > >
>> > > > > > > > Wed Dec 18 18:37:22 2019: Request 93532 was acted
upon.
>> > > > > > > > Transaction: Ticket created by
>> > > > Elizabeth.Satterfield at nrlmry.navy.mil
>> > > > > > > >        Queue: met_help
>> > > > > > > >      Subject: point stat questions
>> > > > > > > >        Owner: Nobody
>> > > > > > > >   Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
>> > > > > > > >       Status: new
>> > > > > > > >  Ticket <URL:
>> > > > > https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=93532
>> > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > Hi John,
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > A few questions about point stat:
>> > > > > > > >
>> > > > > > > > 1.         Are grid relative winds automatically
converted
>> to
>> > > Earth
>> > > > > > > > relative
>> > > > > > > > winds?
>> > > > > > > >
>> > > > > > > > 2.        For observation that fall below the model
surface,
>> > are
>> > > > > model
>> > > > > > > > fields interpolated to observation location?  If so,
how?
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > Thanks!
>> > > > > > > >
>> > > > > > > > Liz
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > Elizabeth Satterfield
>> > > > > > > > Editor, Monthly Weather Review
>> > > > > > > >
>> > > > > > > > Chair, AMS Committee on Probability and Statistics
>> > > > > > > >
>> > > > > > > > Meteorologist, Code 7531
>> > > > > > > > Marine Meteorology Division
>> > > > > > > > U.S. Naval Research Laboratory
>> > > > > > > > T 831.656.4056  F 831.656.4026
>> > > > > > > >  <http://www.nrl.navy.mil/> www.nrl.navy.mil
>> > > > > > > >
>> > > > > > > >
>> > >
__________________________________________________________________
>> > > > > > > > FOR OFFICIAL USE ONLY - PRIVACY SENSITIVE
>> > > > > > > > Any misuse or unauthorized disclosure may result in
both
>> civil
>> > > and
>> > > > > > > criminal
>> > > > > > > > penalties.
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > >
>> > >
>> > >
>> > >
>> >
>> >
>> >
>> >
>>
>>
>>
>>



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


More information about the Met_help mailing list