[Met_help] [rt.rap.ucar.edu #89445] History for python embedding
John Halley Gotway via RT
met_help at ucar.edu
Fri Apr 5 08:46:35 MDT 2019
----------------------------------------------------------------
Initial Request
----------------------------------------------------------------
Following the NRL 10-meter winds speed example here:
Plot binary NRL 10-meter wind speed:
plot_data_plane PYTHON_NUMPY
<https://dtcenter.org/met/users/downloads/python_scripts/wind_z10.png>
wind_z10.ps'name="
<https://dtcenter.org/met/users/downloads/python_scripts/read_NRL_binary.py>
read_NRL_binary.py
<https://dtcenter.org/met/users/downloads/python_scripts/wndspd_zht_0010.0_0
000.0_glob360x181_2016122412_01200000_fcstfld>
wndspd_zht_0010.0_0000.0_glob360x181_2016122412_01200000_fcstfld";
Is it possible to use python embedding to pass data to grid_stat, etc? I
have only been able to get this to work with plot_data_plane.
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: python embedding
From: John Halley Gotway
Time: Sat Mar 23 08:00:09 2019
Liz,
Yes, definitely. The examples we’ve posted to date have all been for
plot_data_plane because it makes a nice image to show if MET is
reading
your data as you expect. But you can use your settings for
plot_data_plane
and use them to run grid_stat.
The command line arguements to grid_stat are fcst_file, obs_file, and
config_file. You can replace either or both of the first two with
PYTHON_NUMPY. And then edit the config file by placing the
“name=...python
command...” info into the fcst.field and/or obs.field entries.
For testing, just run grid_stat to run the same python script for both
fcst
and obs to compare the same data to itself. And once that works,
change
the python commands to start making real comparisons.
Make sense?
Thanks
John
On Fri, Mar 22, 2019 at 5:31 PM Satterfield, Dr. Elizabeth via RT <
met_help at ucar.edu> wrote:
>
> Fri Mar 22 17:31:11 2019: Request 89445 was acted upon.
> Transaction: Ticket created by Elizabeth.Satterfield at nrlmry.navy.mil
> Queue: met_help
> Subject: python embedding
> Owner: Nobody
> Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=89445 >
>
>
> Following the NRL 10-meter winds speed example here:
>
>
>
> Plot binary NRL 10-meter wind speed:
> plot_data_plane PYTHON_NUMPY
>
<https://dtcenter.org/met/users/downloads/python_scripts/wind_z10.png>
> wind_z10.ps'name="
> <
>
https://dtcenter.org/met/users/downloads/python_scripts/read_NRL_binary.py
> >
> read_NRL_binary.py
> <
>
https://dtcenter.org/met/users/downloads/python_scripts/wndspd_zht_0010.0_0
> 000.0_glob360x181_2016122412_01200000_fcstfld>
> wndspd_zht_0010.0_0000.0_glob360x181_2016122412_01200000_fcstfld";
>
>
>
> Is it possible to use python embedding to pass data to grid_stat,
etc? I
> have only been able to get this to work with plot_data_plane.
>
>
>
> 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: python embedding
From: Satterfield, Dr. Elizabeth
Time: Mon Mar 25 14:19:45 2019
Thanks, John. Got it working now.
-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Saturday, March 23, 2019 7:00 AM
To: Satterfield, Dr. Elizabeth
Subject: Re: [rt.rap.ucar.edu #89445] python embedding
Liz,
Yes, definitely. The examples we’ve posted to date have all been for
plot_data_plane because it makes a nice image to show if MET is
reading
your data as you expect. But you can use your settings for
plot_data_plane
and use them to run grid_stat.
The command line arguements to grid_stat are fcst_file, obs_file, and
config_file. You can replace either or both of the first two with
PYTHON_NUMPY. And then edit the config file by placing the
“name=...python
command...” info into the fcst.field and/or obs.field entries.
For testing, just run grid_stat to run the same python script for both
fcst
and obs to compare the same data to itself. And once that works,
change
the python commands to start making real comparisons.
Make sense?
Thanks
John
On Fri, Mar 22, 2019 at 5:31 PM Satterfield, Dr. Elizabeth via RT <
met_help at ucar.edu> wrote:
>
> Fri Mar 22 17:31:11 2019: Request 89445 was acted upon.
> Transaction: Ticket created by Elizabeth.Satterfield at nrlmry.navy.mil
> Queue: met_help
> Subject: python embedding
> Owner: Nobody
> Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=89445 >
>
>
> Following the NRL 10-meter winds speed example here:
>
>
>
> Plot binary NRL 10-meter wind speed:
> plot_data_plane PYTHON_NUMPY
>
<https://dtcenter.org/met/users/downloads/python_scripts/wind_z10.png>
> wind_z10.ps'name="
> <
>
https://dtcenter.org/met/users/downloads/python_scripts/read_NRL_binary.py
> >
> read_NRL_binary.py
> <
>
https://dtcenter.org/met/users/downloads/python_scripts/wndspd_zht_0010.0_0
> 000.0_glob360x181_2016122412_01200000_fcstfld>
> wndspd_zht_0010.0_0000.0_glob360x181_2016122412_01200000_fcstfld";
>
>
>
> Is it possible to use python embedding to pass data to grid_stat,
etc? I
> have only been able to get this to work with plot_data_plane.
>
>
>
> 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: python embedding
From: Satterfield, Dr. Elizabeth
Time: Tue Apr 02 16:14:51 2019
Hi John,
Next question -- what is the best way to do this for ensemble stat?
Can I read in multiple files (1 for each member) using the name
command in the config or do we need to modify the python script to do
this?
Thanks!
Liz
-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Saturday, March 23, 2019 7:00 AM
To: Satterfield, Dr. Elizabeth
Subject: Re: [rt.rap.ucar.edu #89445] python embedding
Liz,
Yes, definitely. The examples we’ve posted to date have all been for
plot_data_plane because it makes a nice image to show if MET is
reading
your data as you expect. But you can use your settings for
plot_data_plane
and use them to run grid_stat.
The command line arguements to grid_stat are fcst_file, obs_file, and
config_file. You can replace either or both of the first two with
PYTHON_NUMPY. And then edit the config file by placing the
“name=...python
command...” info into the fcst.field and/or obs.field entries.
For testing, just run grid_stat to run the same python script for both
fcst
and obs to compare the same data to itself. And once that works,
change
the python commands to start making real comparisons.
Make sense?
Thanks
John
On Fri, Mar 22, 2019 at 5:31 PM Satterfield, Dr. Elizabeth via RT <
met_help at ucar.edu> wrote:
>
> Fri Mar 22 17:31:11 2019: Request 89445 was acted upon.
> Transaction: Ticket created by Elizabeth.Satterfield at nrlmry.navy.mil
> Queue: met_help
> Subject: python embedding
> Owner: Nobody
> Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=89445 >
>
>
> Following the NRL 10-meter winds speed example here:
>
>
>
> Plot binary NRL 10-meter wind speed:
> plot_data_plane PYTHON_NUMPY
>
<https://dtcenter.org/met/users/downloads/python_scripts/wind_z10.png>
> wind_z10.ps'name="
> <
>
https://dtcenter.org/met/users/downloads/python_scripts/read_NRL_binary.py
> >
> read_NRL_binary.py
> <
>
https://dtcenter.org/met/users/downloads/python_scripts/wndspd_zht_0010.0_0
> 000.0_glob360x181_2016122412_01200000_fcstfld>
> wndspd_zht_0010.0_0000.0_glob360x181_2016122412_01200000_fcstfld";
>
>
>
> Is it possible to use python embedding to pass data to grid_stat,
etc? I
> have only been able to get this to work with plot_data_plane.
>
>
>
> 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: python embedding
From: John Halley Gotway
Time: Tue Apr 02 18:25:59 2019
Liz,
Unfortunately, the Python embedding will not work well for ensemble-
stat
yet. The Python embedding currently only enables MET to read in a
single
2D field of data. For ensemble-stat, we need multiple 2D fields of
data...
for each ensemble member.
A workaround using met-8.0 would be doing the following:
(1) For each member, use the python embedding to run pcp_combine or
regrid_data_plane basically as a pre-processor. That'll run your
Python
script, read the data, and write it to an output NetCDF file.
(2) Then run those output NetCDF files through ensemble-stat.
We do realize that this is a short-coming and plan to enhance the
Python
embedding functionality in the future to handle this.
Thanks,
John
On Tue, Apr 2, 2019 at 4:15 PM Satterfield, Dr. Elizabeth via RT <
met_help at ucar.edu> wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=89445 >
>
> Hi John,
>
> Next question -- what is the best way to do this for ensemble stat?
>
> Can I read in multiple files (1 for each member) using the name
command in
> the config or do we need to modify the python script to do this?
>
> Thanks!
> Liz
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Saturday, March 23, 2019 7:00 AM
> To: Satterfield, Dr. Elizabeth
> Subject: Re: [rt.rap.ucar.edu #89445] python embedding
>
> Liz,
>
> Yes, definitely. The examples we’ve posted to date have all been
for
> plot_data_plane because it makes a nice image to show if MET is
reading
> your data as you expect. But you can use your settings for
plot_data_plane
> and use them to run grid_stat.
>
> The command line arguements to grid_stat are fcst_file, obs_file,
and
> config_file. You can replace either or both of the first two with
> PYTHON_NUMPY. And then edit the config file by placing the
“name=...python
> command...” info into the fcst.field and/or obs.field entries.
>
> For testing, just run grid_stat to run the same python script for
both fcst
> and obs to compare the same data to itself. And once that works,
change
> the python commands to start making real comparisons.
>
> Make sense?
>
> Thanks
> John
>
> On Fri, Mar 22, 2019 at 5:31 PM Satterfield, Dr. Elizabeth via RT <
> met_help at ucar.edu> wrote:
>
> >
> > Fri Mar 22 17:31:11 2019: Request 89445 was acted upon.
> > Transaction: Ticket created by
Elizabeth.Satterfield at nrlmry.navy.mil
> > Queue: met_help
> > Subject: python embedding
> > Owner: Nobody
> > Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > Status: new
> > Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=89445 >
> >
> >
> > Following the NRL 10-meter winds speed example here:
> >
> >
> >
> > Plot binary NRL 10-meter wind speed:
> > plot_data_plane PYTHON_NUMPY
> >
<https://dtcenter.org/met/users/downloads/python_scripts/wind_z10.png>
> > wind_z10.ps'name="
> > <
> >
>
https://dtcenter.org/met/users/downloads/python_scripts/read_NRL_binary.py
> > >
> > read_NRL_binary.py
> > <
> >
>
https://dtcenter.org/met/users/downloads/python_scripts/wndspd_zht_0010.0_0
> > 000.0_glob360x181_2016122412_01200000_fcstfld>
> > wndspd_zht_0010.0_0000.0_glob360x181_2016122412_01200000_fcstfld";
> >
> >
> >
> > Is it possible to use python embedding to pass data to grid_stat,
etc? I
> > have only been able to get this to work with plot_data_plane.
> >
> >
> >
> > 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: python embedding
From: Satterfield, Dr. Elizabeth
Time: Tue Apr 02 18:27:33 2019
Many thanks John!
-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Tuesday, April 2, 2019 5:26 PM
To: Satterfield, Dr. Elizabeth
Subject: Re: [rt.rap.ucar.edu #89445] python embedding
Liz,
Unfortunately, the Python embedding will not work well for ensemble-
stat
yet. The Python embedding currently only enables MET to read in a
single
2D field of data. For ensemble-stat, we need multiple 2D fields of
data...
for each ensemble member.
A workaround using met-8.0 would be doing the following:
(1) For each member, use the python embedding to run pcp_combine or
regrid_data_plane basically as a pre-processor. That'll run your
Python
script, read the data, and write it to an output NetCDF file.
(2) Then run those output NetCDF files through ensemble-stat.
We do realize that this is a short-coming and plan to enhance the
Python
embedding functionality in the future to handle this.
Thanks,
John
On Tue, Apr 2, 2019 at 4:15 PM Satterfield, Dr. Elizabeth via RT <
met_help at ucar.edu> wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=89445 >
>
> Hi John,
>
> Next question -- what is the best way to do this for ensemble stat?
>
> Can I read in multiple files (1 for each member) using the name
command in
> the config or do we need to modify the python script to do this?
>
> Thanks!
> Liz
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Saturday, March 23, 2019 7:00 AM
> To: Satterfield, Dr. Elizabeth
> Subject: Re: [rt.rap.ucar.edu #89445] python embedding
>
> Liz,
>
> Yes, definitely. The examples we’ve posted to date have all been
for
> plot_data_plane because it makes a nice image to show if MET is
reading
> your data as you expect. But you can use your settings for
plot_data_plane
> and use them to run grid_stat.
>
> The command line arguements to grid_stat are fcst_file, obs_file,
and
> config_file. You can replace either or both of the first two with
> PYTHON_NUMPY. And then edit the config file by placing the
“name=...python
> command...” info into the fcst.field and/or obs.field entries.
>
> For testing, just run grid_stat to run the same python script for
both fcst
> and obs to compare the same data to itself. And once that works,
change
> the python commands to start making real comparisons.
>
> Make sense?
>
> Thanks
> John
>
> On Fri, Mar 22, 2019 at 5:31 PM Satterfield, Dr. Elizabeth via RT <
> met_help at ucar.edu> wrote:
>
> >
> > Fri Mar 22 17:31:11 2019: Request 89445 was acted upon.
> > Transaction: Ticket created by
Elizabeth.Satterfield at nrlmry.navy.mil
> > Queue: met_help
> > Subject: python embedding
> > Owner: Nobody
> > Requestors: Elizabeth.Satterfield at nrlmry.navy.mil
> > Status: new
> > Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=89445 >
> >
> >
> > Following the NRL 10-meter winds speed example here:
> >
> >
> >
> > Plot binary NRL 10-meter wind speed:
> > plot_data_plane PYTHON_NUMPY
> >
<https://dtcenter.org/met/users/downloads/python_scripts/wind_z10.png>
> > wind_z10.ps'name="
> > <
> >
>
https://dtcenter.org/met/users/downloads/python_scripts/read_NRL_binary.py
> > >
> > read_NRL_binary.py
> > <
> >
>
https://dtcenter.org/met/users/downloads/python_scripts/wndspd_zht_0010.0_0
> > 000.0_glob360x181_2016122412_01200000_fcstfld>
> > wndspd_zht_0010.0_0000.0_glob360x181_2016122412_01200000_fcstfld";
> >
> >
> >
> > Is it possible to use python embedding to pass data to grid_stat,
etc? I
> > have only been able to get this to work with plot_data_plane.
> >
> >
> >
> > 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