[Met_help] [rt.rap.ucar.edu #92290] History for Re: SBU Project: Python Embedding Resources

John Halley Gotway via RT met_help at ucar.edu
Wed Sep 25 16:10:33 MDT 2019


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

Taylor,

FYI, that can’t write met_config... error message just means that you don’t
have permission to write to the current working directory.  The logic is
fixed in the next bugfix release of MET (met-8.1.2) where we write to /tmp
instead.

John

On Mon, Sep 23, 2019 at 9:47 PM Taylor Mandelbaum <
taylor.mandelbaum at stonybrook.edu> wrote:

> Hey John, Lindsay,
>
> Keeping the others out of the CC chain to avoid spam but threw in met_help
> for a paper trail - I tried running the commands both on the
> /glade/u.../mandelbaum folder and on my own directory's copy of the data
> and got different errors on both:
>
> "
> ERROR  :
> ERROR  : recursive_envs() -> unable to open output file
> "met_config_14911_0"
> ERROR  :
> "
> for the folder John created
> and
>
> "
> WARNING: python_dataplane() -> an error occurred importing module
> "./read_CPC_binary.py"
> WARNING:
> ERROR  :
> ERROR  : plot_data_plane -> trouble getting field
> "name="read_CPC_binary.py gefs.bin 1";" from file "PYTHON_NUMPY"
> ERROR  :
> "
> for my local directory (I renamed the file to gefs.bin for readability
> here). I tried different record numbers as a sanity check, none work.
> Here's my terminal output:
>
> [image: image.png]
>
> Anything glaringly obvious that I'm missing?
>
> Thanks again for the help!
>
> On Mon, Sep 23, 2019 at 6:35 PM Lindsay Blank <lblank at ucar.edu> wrote:
>
>> Hi Taylor and Brian,
>>
>> I know that there has been some confusion regarding METplus and python
>> embedding. Tara, Paul, and I met today and think that the best first step
>> for you to do is to derive a field from your python scripts and run the
>> plot_data_plane tool on the field.  This is a simple MET tool that will be
>> good for a first sanity check. There is more information about this on the
>> Google doc from when Taylor was here in August (page 3).
>> https://docs.google.com/document/d/1aycg0jsn9HK-JHnEkqB8uQgrVtnrohNSGF3O8eGotLs/edit?usp=sharing
>>
>> Here is a list of resources that should help getting your scripts and
>> METplus to talk to one another.
>>
>> 1. The PowerPoint is a slide deck on how to execute python embedding in
>> METplus.
>> 2. Here is a page on the MET website with examples of python embedding.
>> https://dtcenter.org/community-code/model-evaluation-tools-met/sample-analysis-scripts
>> 3. There is a section on Python embedding in the MET User's guide that
>> can be found here.
>> https://dtcenter.org/community-code/model-evaluation-tools-met/documentation
>>
>> Here is a set of commands for you to run on cheyenne and test courtesy of
>> John.
>>
>> *cd /glade/u/home/johnhg/MET/MET_Help/mandelbaum_data_20190923*
>>>
>>> *module use /glade/p/ral/jntp/MET/MET_releases/modulefiles*
>>> *module load met/8.1_python*
>>> *ncar_pylib*
>>> *wget https://dtcenter.org/sites/default/files/community-code/met/python-scripts/read_CPC_binary.py.txt
>>> <https://dtcenter.org/sites/default/files/community-code/met/python-scripts/read_CPC_binary.py.txt> *
>>> *mv read_CPC_binary.py.txt  read_CPC_binary.py*
>>> *wget https://dtcenter.org/sites/default/files/community-code/met/python-scripts/gefs-legacy-00z_rfcst-cal_tmean_20170807_8-14day.bin
>>> <https://dtcenter.org/sites/default/files/community-code/met/python-scripts/gefs-legacy-00z_rfcst-cal_tmean_20170807_8-14day.bin>*
>>>
>> *plot_data_plane PYTHON_NUMPY gefs_rec10.ps
>>> <http://gefs_rec10.ps/> 'name="read_CPC_binary.py
>>> gefs-legacy-00z_rfcst-cal_tmean_20170807_8-14day.bin 10";'*
>>>
>>>
>> Please let us know if you have any questions about any of this. As a
>> heads up, I will not be attending our bi-weekly meeting on Thursday, but
>> Minna and Paul will be there.
>>
>> Best,
>> Lindsay
>>
>> --
>> Lindsay R. Blank
>> Associate Scientist
>> Joint Numerical Testbed Program
>> National Center for Atmospheric Research
>> +1 (303)-497-2772
>>
>> *My working day may not be your working day. Please do not feel obliged
>> to reply to this email outside of your normal working hours.*
>>
>
>
> --
> *Taylor Mandelbaum*
> Research Technician
> SoMAS | Stony Brook University
> 678.468.5789
>


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

Subject: Re: SBU Project: Python Embedding Resources
From: George McCabe
Time: Tue Sep 24 13:26:09 2019

Hi Taylor,

I would try running the python script (what is inside name="") and see
what
errors you get from that. My guess is the version of python you are
using
doesn't have modules that are imported by that python script.

On Tue, Sep 24, 2019 at 6:24 PM John Halley Gotway via RT
<met_help at ucar.edu>
wrote:

>
> Tue Sep 24 12:23:48 2019: Request 92290 was acted upon.
> Transaction: Ticket created by johnhg
>        Queue: met_help
>      Subject: Re: SBU Project: Python Embedding Resources
>        Owner: Nobody
>   Requestors: johnhg at ucar.edu
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92290 >
>
>
> Taylor,
>
> FYI, that can’t write met_config... error message just means that
you don’t
> have permission to write to the current working directory.  The
logic is
> fixed in the next bugfix release of MET (met-8.1.2) where we write
to /tmp
> instead.
>
> John
>
> On Mon, Sep 23, 2019 at 9:47 PM Taylor Mandelbaum <
> taylor.mandelbaum at stonybrook.edu> wrote:
>
> > Hey John, Lindsay,
> >
> > Keeping the others out of the CC chain to avoid spam but threw in
> met_help
> > for a paper trail - I tried running the commands both on the
> > /glade/u.../mandelbaum folder and on my own directory's copy of
the data
> > and got different errors on both:
> >
> > "
> > ERROR  :
> > ERROR  : recursive_envs() -> unable to open output file
> > "met_config_14911_0"
> > ERROR  :
> > "
> > for the folder John created
> > and
> >
> > "
> > WARNING: python_dataplane() -> an error occurred importing module
> > "./read_CPC_binary.py"
> > WARNING:
> > ERROR  :
> > ERROR  : plot_data_plane -> trouble getting field
> > "name="read_CPC_binary.py gefs.bin 1";" from file "PYTHON_NUMPY"
> > ERROR  :
> > "
> > for my local directory (I renamed the file to gefs.bin for
readability
> > here). I tried different record numbers as a sanity check, none
work.
> > Here's my terminal output:
> >
> > [image: image.png]
> >
> > Anything glaringly obvious that I'm missing?
> >
> > Thanks again for the help!
> >
> > On Mon, Sep 23, 2019 at 6:35 PM Lindsay Blank <lblank at ucar.edu>
wrote:
> >
> >> Hi Taylor and Brian,
> >>
> >> I know that there has been some confusion regarding METplus and
python
> >> embedding. Tara, Paul, and I met today and think that the best
first
> step
> >> for you to do is to derive a field from your python scripts and
run the
> >> plot_data_plane tool on the field.  This is a simple MET tool
that will
> be
> >> good for a first sanity check. There is more information about
this on
> the
> >> Google doc from when Taylor was here in August (page 3).
> >>
> https://docs.google.com/document/d/1aycg0jsn9HK-
JHnEkqB8uQgrVtnrohNSGF3O8eGotLs/edit?usp=sharing
> >>
> >> Here is a list of resources that should help getting your scripts
and
> >> METplus to talk to one another.
> >>
> >> 1. The PowerPoint is a slide deck on how to execute python
embedding in
> >> METplus.
> >> 2. Here is a page on the MET website with examples of python
embedding.
> >>
> https://dtcenter.org/community-code/model-evaluation-tools-
met/sample-analysis-scripts
> >> 3. There is a section on Python embedding in the MET User's guide
that
> >> can be found here.
> >>
> https://dtcenter.org/community-code/model-evaluation-tools-
met/documentation
> >>
> >> Here is a set of commands for you to run on cheyenne and test
courtesy
> of
> >> John.
> >>
> >> *cd /glade/u/home/johnhg/MET/MET_Help/mandelbaum_data_20190923*
> >>>
> >>> *module use /glade/p/ral/jntp/MET/MET_releases/modulefiles*
> >>> *module load met/8.1_python*
> >>> *ncar_pylib*
> >>> *wget
> https://dtcenter.org/sites/default/files/community-code/met/python-
scripts/read_CPC_binary.py.txt
> >>> <
> https://dtcenter.org/sites/default/files/community-code/met/python-
scripts/read_CPC_binary.py.txt>
> *
> >>> *mv read_CPC_binary.py.txt  read_CPC_binary.py*
> >>> *wget
> https://dtcenter.org/sites/default/files/community-code/met/python-
scripts/gefs-legacy-00z_rfcst-cal_tmean_20170807_8-14day.bin
> >>> <
> https://dtcenter.org/sites/default/files/community-code/met/python-
scripts/gefs-legacy-00z_rfcst-cal_tmean_20170807_8-14day.bin
> >*
> >>>
> >> *plot_data_plane PYTHON_NUMPY gefs_rec10.ps
> >>> <http://gefs_rec10.ps/> 'name="read_CPC_binary.py
> >>> gefs-legacy-00z_rfcst-cal_tmean_20170807_8-14day.bin 10";'*
> >>>
> >>>
> >> Please let us know if you have any questions about any of this.
As a
> >> heads up, I will not be attending our bi-weekly meeting on
Thursday, but
> >> Minna and Paul will be there.
> >>
> >> Best,
> >> Lindsay
> >>
> >> --
> >> Lindsay R. Blank
> >> Associate Scientist
> >> Joint Numerical Testbed Program
> >> National Center for Atmospheric Research
> >> +1 (303)-497-2772
> >>
> >> *My working day may not be your working day. Please do not feel
obliged
> >> to reply to this email outside of your normal working hours.*
> >>
> >
> >
> > --
> > *Taylor Mandelbaum*
> > Research Technician
> > SoMAS | Stony Brook University
> > 678.468.5789
> >
>
>

------------------------------------------------
Subject: Re: SBU Project: Python Embedding Resources
From: George McCabe
Time: Tue Sep 24 13:30:21 2019

Nevermind, it looks like there is output from that script appearing.
That
script parses the filename to get time information. Since you renamed
the
file, that information is unavailable. You will have to either change
the
name back or modify the script to get that information another way
(1st
option is likely easier).

On Tue, Sep 24, 2019 at 7:25 PM George McCabe <mccabe at ucar.edu> wrote:

> Hi Taylor,
>
> I would try running the python script (what is inside name="") and
see
> what errors you get from that. My guess is the version of python you
are
> using doesn't have modules that are imported by that python script.
>
> On Tue, Sep 24, 2019 at 6:24 PM John Halley Gotway via RT <
> met_help at ucar.edu> wrote:
>
>>
>> Tue Sep 24 12:23:48 2019: Request 92290 was acted upon.
>> Transaction: Ticket created by johnhg
>>        Queue: met_help
>>      Subject: Re: SBU Project: Python Embedding Resources
>>        Owner: Nobody
>>   Requestors: johnhg at ucar.edu
>>       Status: new
>>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92290 >
>>
>>
>> Taylor,
>>
>> FYI, that can’t write met_config... error message just means that
you
>> don’t
>> have permission to write to the current working directory.  The
logic is
>> fixed in the next bugfix release of MET (met-8.1.2) where we write
to /tmp
>> instead.
>>
>> John
>>
>> On Mon, Sep 23, 2019 at 9:47 PM Taylor Mandelbaum <
>> taylor.mandelbaum at stonybrook.edu> wrote:
>>
>> > Hey John, Lindsay,
>> >
>> > Keeping the others out of the CC chain to avoid spam but threw in
>> met_help
>> > for a paper trail - I tried running the commands both on the
>> > /glade/u.../mandelbaum folder and on my own directory's copy of
the data
>> > and got different errors on both:
>> >
>> > "
>> > ERROR  :
>> > ERROR  : recursive_envs() -> unable to open output file
>> > "met_config_14911_0"
>> > ERROR  :
>> > "
>> > for the folder John created
>> > and
>> >
>> > "
>> > WARNING: python_dataplane() -> an error occurred importing module
>> > "./read_CPC_binary.py"
>> > WARNING:
>> > ERROR  :
>> > ERROR  : plot_data_plane -> trouble getting field
>> > "name="read_CPC_binary.py gefs.bin 1";" from file "PYTHON_NUMPY"
>> > ERROR  :
>> > "
>> > for my local directory (I renamed the file to gefs.bin for
readability
>> > here). I tried different record numbers as a sanity check, none
work.
>> > Here's my terminal output:
>> >
>> > [image: image.png]
>> >
>> > Anything glaringly obvious that I'm missing?
>> >
>> > Thanks again for the help!
>> >
>> > On Mon, Sep 23, 2019 at 6:35 PM Lindsay Blank <lblank at ucar.edu>
wrote:
>> >
>> >> Hi Taylor and Brian,
>> >>
>> >> I know that there has been some confusion regarding METplus and
python
>> >> embedding. Tara, Paul, and I met today and think that the best
first
>> step
>> >> for you to do is to derive a field from your python scripts and
run the
>> >> plot_data_plane tool on the field.  This is a simple MET tool
that
>> will be
>> >> good for a first sanity check. There is more information about
this on
>> the
>> >> Google doc from when Taylor was here in August (page 3).
>> >>
>> https://docs.google.com/document/d/1aycg0jsn9HK-
JHnEkqB8uQgrVtnrohNSGF3O8eGotLs/edit?usp=sharing
>> >>
>> >> Here is a list of resources that should help getting your
scripts and
>> >> METplus to talk to one another.
>> >>
>> >> 1. The PowerPoint is a slide deck on how to execute python
embedding in
>> >> METplus.
>> >> 2. Here is a page on the MET website with examples of python
embedding.
>> >>
>> https://dtcenter.org/community-code/model-evaluation-tools-
met/sample-analysis-scripts
>> >> 3. There is a section on Python embedding in the MET User's
guide that
>> >> can be found here.
>> >>
>> https://dtcenter.org/community-code/model-evaluation-tools-
met/documentation
>> >>
>> >> Here is a set of commands for you to run on cheyenne and test
courtesy
>> of
>> >> John.
>> >>
>> >> *cd /glade/u/home/johnhg/MET/MET_Help/mandelbaum_data_20190923*
>> >>>
>> >>> *module use /glade/p/ral/jntp/MET/MET_releases/modulefiles*
>> >>> *module load met/8.1_python*
>> >>> *ncar_pylib*
>> >>> *wget
>> https://dtcenter.org/sites/default/files/community-code/met/python-
scripts/read_CPC_binary.py.txt
>> >>> <
>> https://dtcenter.org/sites/default/files/community-code/met/python-
scripts/read_CPC_binary.py.txt>
>> *
>> >>> *mv read_CPC_binary.py.txt  read_CPC_binary.py*
>> >>> *wget
>> https://dtcenter.org/sites/default/files/community-code/met/python-
scripts/gefs-legacy-00z_rfcst-cal_tmean_20170807_8-14day.bin
>> >>> <
>> https://dtcenter.org/sites/default/files/community-code/met/python-
scripts/gefs-legacy-00z_rfcst-cal_tmean_20170807_8-14day.bin
>> >*
>> >>>
>> >> *plot_data_plane PYTHON_NUMPY gefs_rec10.ps
>> >>> <http://gefs_rec10.ps/> 'name="read_CPC_binary.py
>> >>> gefs-legacy-00z_rfcst-cal_tmean_20170807_8-14day.bin 10";'*
>> >>>
>> >>>
>> >> Please let us know if you have any questions about any of this.
As a
>> >> heads up, I will not be attending our bi-weekly meeting on
Thursday,
>> but
>> >> Minna and Paul will be there.
>> >>
>> >> Best,
>> >> Lindsay
>> >>
>> >> --
>> >> Lindsay R. Blank
>> >> Associate Scientist
>> >> Joint Numerical Testbed Program
>> >> National Center for Atmospheric Research
>> >> +1 (303)-497-2772
>> >>
>> >> *My working day may not be your working day. Please do not feel
obliged
>> >> to reply to this email outside of your normal working hours.*
>> >>
>> >
>> >
>> > --
>> > *Taylor Mandelbaum*
>> > Research Technician
>> > SoMAS | Stony Brook University
>> > 678.468.5789
>> >
>>
>>

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


More information about the Met_help mailing list