[Met_help] [rt.rap.ucar.edu #41335] History for Two questions

RAL HelpDesk {for John Halley Gotway} met_help at ucar.edu
Mon Oct 11 15:53:40 MDT 2010


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

Hi John, 
 
We are beginning to store the point-stat output in a database and need
to parse through the CNT output files.  Is there any flexibility in how
these files are delimited?  Our programmer would prefer to use
comma-delimited files if that is something that can be user-defined
(though I suspect it is not).  Can you tell me exactly how those are
delimited?  I thought they were tab-delimited but our programmer said
that is not the case. 

Secondly, when using point-stat to verify surface pressure, what is the
appropriate level?  I used Z2 to represent the sfc (as with TMP and RH)
but that does not appear to be correct.

Thank you,

Jackie

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

Subject: Re: [rt.rap.ucar.edu #41335] Two questions
From: John Halley Gotway
Time: Wed Oct 06 15:57:59 2010

Jackie,

I went ahead and made a met_help ticket for this issue.  We're trying
to route all of our support for MET through met_help.

The ASCII output of Point-Stat is delimited by one or more white-
spaces.  We have some code to line the columns up nicely, making them
more human-readable.  I'm sure there's a way that could easily be
read into into a database.  But if you'd strongly prefer commas, I see
two options:

(1) Post-process the MET output files before reading them.  Something
like the following would do it:
   sed -r 's/ +/,/g' grid_stat_120000L_20050807_120000V.stat
   That uses the 'sed' command to replace all instances of one or more
spaces with a single comma.

(2) Or you could modify the MET source code to dump it out with
commas.  For example, in point_stat.cc, add the following two lines to
the "setup_table()" function:
   at.set_col_sep_char(',');
   The columns will still be padded with spaces to get them to line
up, but there will be a comma between them.

The downside to the latter option is that I doubt the STAT-Analysis
tool would correctly read the output of Point-Stat and Grid-Stat if
there were commas in it.

Lastly, I want to mention our development work on METViewer - a
database and display tool for the output of MET.  I'd say we're
basically in alpha testing of it.  We're using it a lot in our work
within the DTC, but haven't released it externally yet.  If you guys
would be interested in serving as beta testers for us, we may be able
transfer some code to you.

METViewer consists of a database, some tools in java to load and query
from the database, and the ability to define plots to be generated
from the data via an XML file.  It can be run in "batch" mode
to generated many, many plots at once.  Or it can be run via a web GUI
for interactive plotting of the data.  Paul Oldenburg has put a lot of
work into this and it's becoming increasingly useful here.
 We don't have an example of it exposed on the web externally yet, but
we should in the near future.

I don't know what your plans are a database for the MET output, but we
may have already done a lot of the work for you.

John

RAL HelpDesk {for John Halley Gotway} wrote:
> Wed Oct 06 15:27:58 2010: Request 41335 was acted upon.
> Transaction: Ticket created by johnhg
>        Queue: met_help
>      Subject: Two questions
>        Owner: johnhg
>   Requestors: jackie.miller at vaisala.com
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=41335 >
>
>
> Hi John,
>
> We are beginning to store the point-stat output in a database and
need
> to parse through the CNT output files.  Is there any flexibility in
how
> these files are delimited?  Our programmer would prefer to use
> comma-delimited files if that is something that can be user-defined
> (though I suspect it is not).  Can you tell me exactly how those are
> delimited?  I thought they were tab-delimited but our programmer
said
> that is not the case.
>
> Secondly, when using point-stat to verify surface pressure, what is
the
> appropriate level?  I used Z2 to represent the sfc (as with TMP and
RH)
> but that does not appear to be correct.
>
> Thank you,
>
> Jackie

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #41335] Two questions
From: John Halley Gotway
Time: Wed Oct 06 16:04:03 2010

Jackie,

Oops, I got caught up in the METViewer information and forgot to
answer your second question.

When I run some sample GRIB data through wgrib, I see the following
output:
   wgrib METv3.0/data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212
| grep PRES
   3:59276:d=05080700:PRES:kpds5=1:kpds6=1:kpds7=0:TR=0:P1=12:P2=0:TimeU=1:sfc:12hr
fcst:NAve=0

The "level" value for surface pressure is defined to be zero
(kpds7=0).  Therefore, try using "PRES/Z0".  I tried that, and it
worked.  If it hadn't worked, I would have tried "PRES/L0" next.

Since you're using Point-Stat, you should probably be verifying
surface pressure against the ADPSFC "surface" message type.

John

RAL HelpDesk {for John Halley Gotway} wrote:
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=41335 >
>
> Jackie,
>
> I went ahead and made a met_help ticket for this issue.  We're
trying to route all of our support for MET through met_help.
>
> The ASCII output of Point-Stat is delimited by one or more white-
spaces.  We have some code to line the columns up nicely, making them
more human-readable.  I'm sure there's a way that could easily be
> read into into a database.  But if you'd strongly prefer commas, I
see two options:
>
> (1) Post-process the MET output files before reading them.
Something like the following would do it:
>    sed -r 's/ +/,/g' grid_stat_120000L_20050807_120000V.stat
>    That uses the 'sed' command to replace all instances of one or
more spaces with a single comma.
>
> (2) Or you could modify the MET source code to dump it out with
commas.  For example, in point_stat.cc, add the following two lines to
the "setup_table()" function:
>    at.set_col_sep_char(',');
>    The columns will still be padded with spaces to get them to line
up, but there will be a comma between them.
>
> The downside to the latter option is that I doubt the STAT-Analysis
tool would correctly read the output of Point-Stat and Grid-Stat if
there were commas in it.
>
> Lastly, I want to mention our development work on METViewer - a
database and display tool for the output of MET.  I'd say we're
basically in alpha testing of it.  We're using it a lot in our work
> within the DTC, but haven't released it externally yet.  If you guys
would be interested in serving as beta testers for us, we may be able
transfer some code to you.
>
> METViewer consists of a database, some tools in java to load and
query from the database, and the ability to define plots to be
generated from the data via an XML file.  It can be run in "batch"
mode
> to generated many, many plots at once.  Or it can be run via a web
GUI for interactive plotting of the data.  Paul Oldenburg has put a
lot of work into this and it's becoming increasingly useful here.
>  We don't have an example of it exposed on the web externally yet,
but we should in the near future.
>
> I don't know what your plans are a database for the MET output, but
we may have already done a lot of the work for you.
>
> John
>
> RAL HelpDesk {for John Halley Gotway} wrote:
>> Wed Oct 06 15:27:58 2010: Request 41335 was acted upon.
>> Transaction: Ticket created by johnhg
>>        Queue: met_help
>>      Subject: Two questions
>>        Owner: johnhg
>>   Requestors: jackie.miller at vaisala.com
>>       Status: new
>>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=41335 >
>>
>>
>> Hi John,
>>
>> We are beginning to store the point-stat output in a database and
need
>> to parse through the CNT output files.  Is there any flexibility in
how
>> these files are delimited?  Our programmer would prefer to use
>> comma-delimited files if that is something that can be user-defined
>> (though I suspect it is not).  Can you tell me exactly how those
are
>> delimited?  I thought they were tab-delimited but our programmer
said
>> that is not the case.
>>
>> Secondly, when using point-stat to verify surface pressure, what is
the
>> appropriate level?  I used Z2 to represent the sfc (as with TMP and
RH)
>> but that does not appear to be correct.
>>
>> Thank you,
>>
>> Jackie

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


More information about the Met_help mailing list