[Met_help] [rt.rap.ucar.edu #86333] History for Grid Stat tool

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


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

Hello,

I am planning on using the grid stat tool to compute neighborhood statistics for model and observed radar data. The files themselves do not contain latitude/longitude information - does this information need to be added to the data files or can an external grid file specifying the lat/lon at each grid point (NetCDF) be used in the MET software?

Thanks!
Marcus


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

Subject: Grid Stat tool
From: John Halley Gotway
Time: Tue Jul 24 15:35:40 2018

Hi Marcus,

I see you have a question about formatting data for use in MET.

The currently released version of MET is version 7.0.  MET version 7.0
can
read gridded data from a few different file formats, GRIB1, GRIB2, and
a
handful of flavors of NetCDF.  In all cases, MET needs to be able to
read
the grid projection information from the input file.  For GRIB1 and
GRIB2
data it parses that info from the grid description section of that
file.
For NetCDF data, it parses that info from global attributes (for MET
NetCDF
output files) or variables (for CF-compliant NetCDF files).

With the current version of the code, you'd need to reformat the data
into
a flavor of NetCDF that MET can handle.

However, we are actively working on the next version of MET and are
adding
some functionality which would be useful for you.  Instead, of
reformatting
all of your data, you can pass to the MET tools a python script which
prepares that data for use in MET.  You'd be responsible for writing
the
python script to store your data in a numpy array (or xarray) and
define
attributes, like timing information and projection info.  When that
functionality is ready for testing from user's we'd be happy to share
a
pre-release version with you.

But for version 7.0, you'd be stuck reformatting your data.

Hope that helps clarify.

Thanks,
John Halley Gotway









On Tue, Jul 24, 2018 at 1:48 PM Johnson, Marcus R. via RT
<met_help at ucar.edu>
wrote:

>
> Tue Jul 24 13:47:40 2018: Request 86333 was acted upon.
> Transaction: Ticket created by marcus.johnson at ou.edu
>        Queue: met_help
>      Subject: Grid Stat tool
>        Owner: Nobody
>   Requestors: marcus.johnson at ou.edu
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86333 >
>
>
> Hello,
>
> I am planning on using the grid stat tool to compute neighborhood
> statistics for model and observed radar data. The files themselves
do not
> contain latitude/longitude information - does this information need
to be
> added to the data files or can an external grid file specifying the
lat/lon
> at each grid point (NetCDF) be used in the MET software?
>
> Thanks!
> Marcus
>
>

------------------------------------------------
Subject: RE: [rt.rap.ucar.edu #86333] Grid Stat tool
From: Johnson, Marcus R.
Time: Wed Jul 25 15:42:10 2018

Good afternoon,

Thank you for the response. I have both the grid projection and
lat/lon grid point information. Would you mind providing the necessary
variable names so that I can correctly add the information to my
forecast files and MET can successfully read them?

Thanks!
Marcus

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Tuesday, July 24, 2018 4:36 PM
To: Johnson, Marcus R.
Subject: Re: [rt.rap.ucar.edu #86333] Grid Stat tool

Hi Marcus,

I see you have a question about formatting data for use in MET.

The currently released version of MET is version 7.0.  MET version 7.0
can
read gridded data from a few different file formats, GRIB1, GRIB2, and
a
handful of flavors of NetCDF.  In all cases, MET needs to be able to
read
the grid projection information from the input file.  For GRIB1 and
GRIB2
data it parses that info from the grid description section of that
file.
For NetCDF data, it parses that info from global attributes (for MET
NetCDF
output files) or variables (for CF-compliant NetCDF files).

With the current version of the code, you'd need to reformat the data
into
a flavor of NetCDF that MET can handle.

However, we are actively working on the next version of MET and are
adding
some functionality which would be useful for you.  Instead, of
reformatting
all of your data, you can pass to the MET tools a python script which
prepares that data for use in MET.  You'd be responsible for writing
the
python script to store your data in a numpy array (or xarray) and
define
attributes, like timing information and projection info.  When that
functionality is ready for testing from user's we'd be happy to share
a
pre-release version with you.

But for version 7.0, you'd be stuck reformatting your data.

Hope that helps clarify.

Thanks,
John Halley Gotway









On Tue, Jul 24, 2018 at 1:48 PM Johnson, Marcus R. via RT
<met_help at ucar.edu>
wrote:

>
> Tue Jul 24 13:47:40 2018: Request 86333 was acted upon.
> Transaction: Ticket created by marcus.johnson at ou.edu
>        Queue: met_help
>      Subject: Grid Stat tool
>        Owner: Nobody
>   Requestors: marcus.johnson at ou.edu
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86333 >
>
>
> Hello,
>
> I am planning on using the grid stat tool to compute neighborhood
> statistics for model and observed radar data. The files themselves
do not
> contain latitude/longitude information - does this information need
to be
> added to the data files or can an external grid file specifying the
lat/lon
> at each grid point (NetCDF) be used in the MET software?
>
> Thanks!
> Marcus
>
>



------------------------------------------------
Subject: Grid Stat tool
From: John Halley Gotway
Time: Thu Jul 26 10:02:40 2018

Hi Marcus,

There are 2 flavors of NetCDF you can consider.  You could follow the
NetCDF CF (Climate Forecast) convention, as described here:
http://cfconventions.org/

Or you could make it look like the NetCDF output of MET tools
themselves.

Writing to the CF convention is more generally useful, but specifying
the
projection information is overly tedious.  If you projection is
simple,
evenly spaced, lat/lon's, I'd use the CF convention.  If it's Lambert
Conformal, Polar Stereographic, or Mercator, I think you'll find the
MET
format is easier.

If you go with the MET format, here's what I'd recommend.
(1) Determine your projection type... for example, let's say it's
Lambert
Conformal.
(2) Take a GRIB file that uses that projection already and run it
through
MET's pcp_combine tool.
   - Just use the "-add" command to run it as "pass-through".  For
example,
      pcp_combine -add in.grb 'name="TMP"; level="Z2";' out.nc

That'll read 2m temperature from the input file and write it to
out.nc.

(3) Use that out.nc file as an example format for your data.

Hope that helps.  Just let me know what other questions you have or
where
you get stuck.

Thanks,
John

On Wed, Jul 25, 2018 at 3:42 PM Johnson, Marcus R. via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86333 >
>
> Good afternoon,
>
> Thank you for the response. I have both the grid projection and
lat/lon
> grid point information. Would you mind providing the necessary
variable
> names so that I can correctly add the information to my forecast
files and
> MET can successfully read them?
>
> Thanks!
> Marcus
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Tuesday, July 24, 2018 4:36 PM
> To: Johnson, Marcus R.
> Subject: Re: [rt.rap.ucar.edu #86333] Grid Stat tool
>
> Hi Marcus,
>
> I see you have a question about formatting data for use in MET.
>
> The currently released version of MET is version 7.0.  MET version
7.0 can
> read gridded data from a few different file formats, GRIB1, GRIB2,
and a
> handful of flavors of NetCDF.  In all cases, MET needs to be able to
read
> the grid projection information from the input file.  For GRIB1 and
GRIB2
> data it parses that info from the grid description section of that
file.
> For NetCDF data, it parses that info from global attributes (for MET
NetCDF
> output files) or variables (for CF-compliant NetCDF files).
>
> With the current version of the code, you'd need to reformat the
data into
> a flavor of NetCDF that MET can handle.
>
> However, we are actively working on the next version of MET and are
adding
> some functionality which would be useful for you.  Instead, of
reformatting
> all of your data, you can pass to the MET tools a python script
which
> prepares that data for use in MET.  You'd be responsible for writing
the
> python script to store your data in a numpy array (or xarray) and
define
> attributes, like timing information and projection info.  When that
> functionality is ready for testing from user's we'd be happy to
share a
> pre-release version with you.
>
> But for version 7.0, you'd be stuck reformatting your data.
>
> Hope that helps clarify.
>
> Thanks,
> John Halley Gotway
>
>
>
>
>
>
>
>
>
> On Tue, Jul 24, 2018 at 1:48 PM Johnson, Marcus R. via RT <
> met_help at ucar.edu>
> wrote:
>
> >
> > Tue Jul 24 13:47:40 2018: Request 86333 was acted upon.
> > Transaction: Ticket created by marcus.johnson at ou.edu
> >        Queue: met_help
> >      Subject: Grid Stat tool
> >        Owner: Nobody
> >   Requestors: marcus.johnson at ou.edu
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86333 >
> >
> >
> > Hello,
> >
> > I am planning on using the grid stat tool to compute neighborhood
> > statistics for model and observed radar data. The files themselves
do not
> > contain latitude/longitude information - does this information
need to be
> > added to the data files or can an external grid file specifying
the
> lat/lon
> > at each grid point (NetCDF) be used in the MET software?
> >
> > Thanks!
> > Marcus
> >
> >
>
>
>
>

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


More information about the Met_help mailing list