[Met_help] [rt.rap.ucar.edu #86636] History for stat_analysis output

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


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

Hi,


I have run stat_analysis tool and have output from it.

When analyzing the output file apparently the data is written in random order, i.e., the FCST_LEAD values are random.


I have attached a file, please have a look and let me know is there a way to correct this.


Thanks,

Jagdeep





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

Subject: stat_analysis output
From: John Halley Gotway
Time: Thu Aug 16 12:37:54 2018

Jagdeep,

I see you have a question about STAT-Analysis... trying to control the
order in which the output is written.  There is no logic within
STAT-Analysis to control this.  Instead, the data is written out in
the
order in which it is encountered in the input.

I'm just guessing here, but perhaps you ran STAT-Analysis using the
"-lookin" option set to the name of a directory.  STAT-Analysis
searches
that directory recursively for files ending in .stat.  There is no
guarantee in the order in which those files will be processed... and
so
there's no specific order for the output.  In fact, in pre-release
testing
of MET on different machines, I've seen differences in the order of
the
STAT-Analysis output.  Different file systems serve up the files in
different orders.

If you'd like to control the sorting of the data, I see 2 options:

(1) Instead of setting "-lookin" to the name of a directory, use it
one or
more times to specify the explicit file names you'd like to process.
For
example, if you say "-lookin F000500.stat F001000.stat F001500.stat
..."
then the output should appear in that order as well.
(2) Alternatively, run the "sort" command on the output of MET to
apply
whatever sorting logic you'd like.  In the example below, we're
sorting the
4th column, for FCST_LEAD:
      cat RH_1000_job.stat | awk 'NR == 1; NR > 1 {print $0 | "sort
-k4"}'

Thanks,
John


On Thu, Aug 16, 2018 at 11:08 AM Jagdeep Sodhi via RT
<met_help at ucar.edu>
wrote:

>
> Thu Aug 16 11:08:16 2018: Request 86636 was acted upon.
> Transaction: Ticket created by jagdeep.sodhi at mail.mcgill.ca
>        Queue: met_help
>      Subject: stat_analysis output
>        Owner: Nobody
>   Requestors: jagdeep.sodhi at mail.mcgill.ca
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86636 >
>
>
> Hi,
>
>
> I have run stat_analysis tool and have output from it.
>
> When analyzing the output file apparently the data is written in
random
> order, i.e., the FCST_LEAD values are random.
>
>
> I have attached a file, please have a look and let me know is there
a way
> to correct this.
>
>
> Thanks,
>
> Jagdeep
>
>
>
>
>

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


More information about the Met_help mailing list