[Met_help] [rt.rap.ucar.edu #81734] History for Plotting question using Rscript

John Halley Gotway via RT met_help at ucar.edu
Wed Aug 30 09:38:46 MDT 2017


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

I have a question about the R-scripts to plot output from grid_stat.

The following is from the MET User's Guide:

The plot_cnt.R
<http://www.dtcenter.org/met/users/downloads/Rscripts/plot_cnt.R> script
may be run to read continuous statistics (CNT) output lines from Point-Stat
and Grid-Stat. By default, it will create boxplots and time series plots of
RMSE for each case. But a command line argument may be used to specify
other CNT statistics to be plotted. You may pass this script one or more
".stat" files, continuous statistics files (*_cnt.txt), or the output of a
Stat-Analysis filter type job.

My question is: For the plot_cnt.R script, for the command line arguments,
is the argument name the name in the NBRCTC and NBRCTCS column names?
For example, from Table 8.2 below, is NBRCTC a valid argument name, so the
script call would be:

Rscript plot_cnt.R grid_stat_240000L_20050808_000000V_cnt.txt -column NBRCTC

Any help is appreciated........Brad Diehl

[image: Inline image 1]


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

Subject: Plotting question using Rscript
From: John Halley Gotway
Time: Thu Aug 24 09:33:13 2017

Brad,

That plot_cnt.R script is meant as a simple example of reading MET
output
into and creating boxplots and time-series plot of the data you pass
to
it.  The "-column" argument tells the script which columns from the
CNT
line type should be plotted.  By default, it plots RMSE.  But passing
in
"-column MSE -column MAE" would tell it to plot Mean-Squared-Error and
Mean-Absolute-Error instead.

The columns included in the CNT line type are defined in table 7.6 of
the
MET User's Guide:

http://www.dtcenter.org/met/users/docs/users_guide/MET_Users_Guide_v6.0.pdf

Hope that helps clarify.

Thanks,
John

On Thu, Aug 24, 2017 at 8:28 AM, Brad Diehl - NOAA Federal via RT <
met_help at ucar.edu> wrote:

>
> Thu Aug 24 08:28:26 2017: Request 81734 was acted upon.
> Transaction: Ticket created by brad.diehl at noaa.gov
>        Queue: met_help
>      Subject: Plotting question using Rscript
>        Owner: Nobody
>   Requestors: brad.diehl at noaa.gov
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81734 >
>
>
> I have a question about the R-scripts to plot output from grid_stat.
>
> The following is from the MET User's Guide:
>
> The plot_cnt.R
> <http://www.dtcenter.org/met/users/downloads/Rscripts/plot_cnt.R>
script
> may be run to read continuous statistics (CNT) output lines from
Point-Stat
> and Grid-Stat. By default, it will create boxplots and time series
plots of
> RMSE for each case. But a command line argument may be used to
specify
> other CNT statistics to be plotted. You may pass this script one or
more
> ".stat" files, continuous statistics files (*_cnt.txt), or the
output of a
> Stat-Analysis filter type job.
>
> My question is: For the plot_cnt.R script, for the command line
arguments,
> is the argument name the name in the NBRCTC and NBRCTCS column
names?
> For example, from Table 8.2 below, is NBRCTC a valid argument name,
so the
> script call would be:
>
> Rscript plot_cnt.R grid_stat_240000L_20050808_000000V_cnt.txt
-column
> NBRCTC
>
> Any help is appreciated........Brad Diehl
>
> [image: Inline image 1]
>
>

------------------------------------------------
Subject: Plotting question using Rscript
From: Brad Diehl - NOAA Federal
Time: Thu Aug 24 13:12:30 2017

What I was really after was the range of possible values for the
column
variables,
for example you mentioned  "-column MSE -column MAE" would tell it to
plot
Mean-Squared-Error and Mean-Absolute-Error. For example in Table 7.6,
is
FBAR and its associated variables possible column values, e.g. "-
column
FBAR", telling
it to plot the forecast mean?

On Thu, Aug 24, 2017 at 3:33 PM, John Halley Gotway via RT <
met_help at ucar.edu> wrote:

> Brad,
>
> That plot_cnt.R script is meant as a simple example of reading MET
output
> into and creating boxplots and time-series plot of the data you pass
to
> it.  The "-column" argument tells the script which columns from the
CNT
> line type should be plotted.  By default, it plots RMSE.  But
passing in
> "-column MSE -column MAE" would tell it to plot Mean-Squared-Error
and
> Mean-Absolute-Error instead.
>
> The columns included in the CNT line type are defined in table 7.6
of the
> MET User's Guide:
>
> http://www.dtcenter.org/met/users/docs/users_guide/MET_
> Users_Guide_v6.0.pdf
>
> Hope that helps clarify.
>
> Thanks,
> John
>
> On Thu, Aug 24, 2017 at 8:28 AM, Brad Diehl - NOAA Federal via RT <
> met_help at ucar.edu> wrote:
>
> >
> > Thu Aug 24 08:28:26 2017: Request 81734 was acted upon.
> > Transaction: Ticket created by brad.diehl at noaa.gov
> >        Queue: met_help
> >      Subject: Plotting question using Rscript
> >        Owner: Nobody
> >   Requestors: brad.diehl at noaa.gov
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81734 >
> >
> >
> > I have a question about the R-scripts to plot output from
grid_stat.
> >
> > The following is from the MET User's Guide:
> >
> > The plot_cnt.R
> > <http://www.dtcenter.org/met/users/downloads/Rscripts/plot_cnt.R>
script
> > may be run to read continuous statistics (CNT) output lines from
> Point-Stat
> > and Grid-Stat. By default, it will create boxplots and time series
plots
> of
> > RMSE for each case. But a command line argument may be used to
specify
> > other CNT statistics to be plotted. You may pass this script one
or more
> > ".stat" files, continuous statistics files (*_cnt.txt), or the
output of
> a
> > Stat-Analysis filter type job.
> >
> > My question is: For the plot_cnt.R script, for the command line
> arguments,
> > is the argument name the name in the NBRCTC and NBRCTCS column
names?
> > For example, from Table 8.2 below, is NBRCTC a valid argument
name, so
> the
> > script call would be:
> >
> > Rscript plot_cnt.R grid_stat_240000L_20050808_000000V_cnt.txt
-column
> > NBRCTC
> >
> > Any help is appreciated........Brad Diehl
> >
> > [image: Inline image 1]
> >
> >
>
>

------------------------------------------------
Subject: Plotting question using Rscript
From: John Halley Gotway
Time: Thu Aug 24 14:04:31 2017

Yes, that's correct.  The FBAR column contains the mean forecast
value.  A
description of the columns present in the CNT line type can be found
in
table 7.6 of the MET User's Guide.

You can also see them listed at the beginning of that Rscript.

Thanks,
John

On Thu, Aug 24, 2017 at 1:12 PM, Brad Diehl - NOAA Federal via RT <
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81734 >
>
> What I was really after was the range of possible values for the
column
> variables,
> for example you mentioned  "-column MSE -column MAE" would tell it
to plot
> Mean-Squared-Error and Mean-Absolute-Error. For example in Table
7.6, is
> FBAR and its associated variables possible column values, e.g. "-
column
> FBAR", telling
> it to plot the forecast mean?
>
> On Thu, Aug 24, 2017 at 3:33 PM, John Halley Gotway via RT <
> met_help at ucar.edu> wrote:
>
> > Brad,
> >
> > That plot_cnt.R script is meant as a simple example of reading MET
output
> > into and creating boxplots and time-series plot of the data you
pass to
> > it.  The "-column" argument tells the script which columns from
the CNT
> > line type should be plotted.  By default, it plots RMSE.  But
passing in
> > "-column MSE -column MAE" would tell it to plot Mean-Squared-Error
and
> > Mean-Absolute-Error instead.
> >
> > The columns included in the CNT line type are defined in table 7.6
of the
> > MET User's Guide:
> >
> > http://www.dtcenter.org/met/users/docs/users_guide/MET_
> > Users_Guide_v6.0.pdf
> >
> > Hope that helps clarify.
> >
> > Thanks,
> > John
> >
> > On Thu, Aug 24, 2017 at 8:28 AM, Brad Diehl - NOAA Federal via RT
<
> > met_help at ucar.edu> wrote:
> >
> > >
> > > Thu Aug 24 08:28:26 2017: Request 81734 was acted upon.
> > > Transaction: Ticket created by brad.diehl at noaa.gov
> > >        Queue: met_help
> > >      Subject: Plotting question using Rscript
> > >        Owner: Nobody
> > >   Requestors: brad.diehl at noaa.gov
> > >       Status: new
> > >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81734
> >
> > >
> > >
> > > I have a question about the R-scripts to plot output from
grid_stat.
> > >
> > > The following is from the MET User's Guide:
> > >
> > > The plot_cnt.R
> > >
<http://www.dtcenter.org/met/users/downloads/Rscripts/plot_cnt.R>
> script
> > > may be run to read continuous statistics (CNT) output lines from
> > Point-Stat
> > > and Grid-Stat. By default, it will create boxplots and time
series
> plots
> > of
> > > RMSE for each case. But a command line argument may be used to
specify
> > > other CNT statistics to be plotted. You may pass this script one
or
> more
> > > ".stat" files, continuous statistics files (*_cnt.txt), or the
output
> of
> > a
> > > Stat-Analysis filter type job.
> > >
> > > My question is: For the plot_cnt.R script, for the command line
> > arguments,
> > > is the argument name the name in the NBRCTC and NBRCTCS column
names?
> > > For example, from Table 8.2 below, is NBRCTC a valid argument
name, so
> > the
> > > script call would be:
> > >
> > > Rscript plot_cnt.R grid_stat_240000L_20050808_000000V_cnt.txt
-column
> > > NBRCTC
> > >
> > > Any help is appreciated........Brad Diehl
> > >
> > > [image: Inline image 1]
> > >
> > >
> >
> >
>
>

------------------------------------------------
Subject: Plotting question using Rscript
From: Brad Diehl - NOAA Federal
Time: Thu Aug 24 14:34:33 2017

John, thanks for clarifying. Having said all this, I was working on
the
grid_stat
tutorial instructions, and was working with the first example with the
APCP_12.
I re-checked the config instructions and they appear correct, but not
getting any
meaningful results in the scripts, i.e. after running  Rscript
plot_cnt.R
and looking at cnt_plots.pdf. I have sent the command line arguments
used
and the resultant output below, with unintelligible plots as a result.
I
did'nt notice the "null device" output from the script until now, is
that
an issue here? Also attached the .txt file used.

Any help is greatly appreciated.


[bradd at shell1 met_out]$ Rscript plot_cnt.R
grid_stat_240000L_20050808_000000V_cnt.txt -save
[1] "Reading: grid_stat_240000L_20050808_000000V_cnt.txt"
[1] "Found: 4 CNT lines"
[1] "Writing: cnt_plots.pdf"
[1] "Processing case:
WRF_APCP_12_A12_APCP_12_A12_ANALYS_G212_NEAREST_1_0.05"
[1] "Processing case:
WRF_APCP_12_A12_APCP_12_A12_ANALYS_CONUS_NEAREST_1_0.05"
[1] "Processing case:
WRF_APCP_12_A12_APCP_12_A12_ANALYS_EAST_NEAREST_1_0.05"
[1] "Processing case:
WRF_APCP_12_A12_APCP_12_A12_ANALYS_WEST_NEAREST_1_0.05"
null device
          1
[1] "Finished: cnt_plots.pdf"
[1] "Saving image..."

On Thu, Aug 24, 2017 at 8:04 PM, John Halley Gotway via RT <
met_help at ucar.edu> wrote:

> Yes, that's correct.  The FBAR column contains the mean forecast
value.  A
> description of the columns present in the CNT line type can be found
in
> table 7.6 of the MET User's Guide.
>
> You can also see them listed at the beginning of that Rscript.
>
> Thanks,
> John
>
> On Thu, Aug 24, 2017 at 1:12 PM, Brad Diehl - NOAA Federal via RT <
> met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81734 >
> >
> > What I was really after was the range of possible values for the
column
> > variables,
> > for example you mentioned  "-column MSE -column MAE" would tell it
to
> plot
> > Mean-Squared-Error and Mean-Absolute-Error. For example in Table
7.6, is
> > FBAR and its associated variables possible column values, e.g. "-
column
> > FBAR", telling
> > it to plot the forecast mean?
> >
> > On Thu, Aug 24, 2017 at 3:33 PM, John Halley Gotway via RT <
> > met_help at ucar.edu> wrote:
> >
> > > Brad,
> > >
> > > That plot_cnt.R script is meant as a simple example of reading
MET
> output
> > > into and creating boxplots and time-series plot of the data you
pass to
> > > it.  The "-column" argument tells the script which columns from
the CNT
> > > line type should be plotted.  By default, it plots RMSE.  But
passing
> in
> > > "-column MSE -column MAE" would tell it to plot Mean-Squared-
Error and
> > > Mean-Absolute-Error instead.
> > >
> > > The columns included in the CNT line type are defined in table
7.6 of
> the
> > > MET User's Guide:
> > >
> > > http://www.dtcenter.org/met/users/docs/users_guide/MET_
> > > Users_Guide_v6.0.pdf
> > >
> > > Hope that helps clarify.
> > >
> > > Thanks,
> > > John
> > >
> > > On Thu, Aug 24, 2017 at 8:28 AM, Brad Diehl - NOAA Federal via
RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > >
> > > > Thu Aug 24 08:28:26 2017: Request 81734 was acted upon.
> > > > Transaction: Ticket created by brad.diehl at noaa.gov
> > > >        Queue: met_help
> > > >      Subject: Plotting question using Rscript
> > > >        Owner: Nobody
> > > >   Requestors: brad.diehl at noaa.gov
> > > >       Status: new
> > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> Ticket/Display.html?id=81734
> > >
> > > >
> > > >
> > > > I have a question about the R-scripts to plot output from
grid_stat.
> > > >
> > > > The following is from the MET User's Guide:
> > > >
> > > > The plot_cnt.R
> > > >
<http://www.dtcenter.org/met/users/downloads/Rscripts/plot_cnt.R>
> > script
> > > > may be run to read continuous statistics (CNT) output lines
from
> > > Point-Stat
> > > > and Grid-Stat. By default, it will create boxplots and time
series
> > plots
> > > of
> > > > RMSE for each case. But a command line argument may be used to
> specify
> > > > other CNT statistics to be plotted. You may pass this script
one or
> > more
> > > > ".stat" files, continuous statistics files (*_cnt.txt), or the
output
> > of
> > > a
> > > > Stat-Analysis filter type job.
> > > >
> > > > My question is: For the plot_cnt.R script, for the command
line
> > > arguments,
> > > > is the argument name the name in the NBRCTC and NBRCTCS column
names?
> > > > For example, from Table 8.2 below, is NBRCTC a valid argument
name,
> so
> > > the
> > > > script call would be:
> > > >
> > > > Rscript plot_cnt.R grid_stat_240000L_20050808_000000V_cnt.txt
> -column
> > > > NBRCTC
> > > >
> > > > Any help is appreciated........Brad Diehl
> > > >
> > > > [image: Inline image 1]
> > > >
> > > >
> > >
> > >
> >
> >
>
>

------------------------------------------------
Subject: Plotting question using Rscript
From: Brad Diehl - NOAA Federal
Time: Thu Aug 24 14:34:33 2017

VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG  FCST_VALID_END  OBS_LEAD
OBS_VALID_BEG   OBS_VALID_END   FCST_VAR FCST_LEV OBS_VAR OBS_LEV
OBTYPE VX
_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA
LINE_TYPE TOTAL FBAR    FBAR_NCL FBAR_NCU FBAR_BCL FBAR_BCU FSTDEV
FSTDEV_
NCL FSTDEV_NCU FSTDEV_BCL FSTDEV_BCU OBAR    OBAR_NCL OBAR_NCU
OBAR_BCL OBAR_BCU OSTDEV  OSTDEV_NCL OSTDEV_NCU OSTDEV_BCL OSTDEV_BCU
PR_CORR PR_C
ORR_NCL PR_CORR_NCU PR_CORR_BCL PR_CORR_BCU SP_CORR KT_CORR RANKS
FRANK_TIES ORANK_TIES ME        ME_NCL   ME_NCU     ME_BCL ME_BCU
ESTDEV  ESTDE
V_NCL ESTDEV_NCU ESTDEV_BCL ESTDEV_BCU MBIAS   MBIAS_BCL MBIAS_BCU MAE
MAE_BCL MAE_BCU MSE      MSE_BCL MSE_BCU BCMSE    BCMSE_BCL BCMSE_BCU
RMSE    RMSE_BCL RMSE_BCU E10     E10_BCL E10_BCU E25 E25_BCL E25_BCU
E50 E50_BCL E50_BCU E75    E75_BCL E75_BCU E90    E90_BCL E90_BCU EIQR
EI
QR_BCL EIQR_BCU MAD   MAD_BCL MAD_BCU ANOM_CORR ANOM_CORR_NCL
ANOM_CORR_NCU ANOM_CORR_BCL ANOM_CORR_BCU ME2        ME2_BCL ME2_BCU
MSESS     MSES
S_BCL MSESS_BCU
V6.0    WRF   NA   240000    20050808_000000 20050808_000000 000000
20050808_000000 20050808_000000 APCP_12  A12      APCP_12 A12
ANALYS G2
12    NEAREST     1           NA          NA         NA         0.05
CNT        6547 1.15331  1.06526  1.24135       NA       NA 3.6348
3.57
359    3.69815         NA         NA 1.2848   1.17734  1.39226
NA       NA 4.43632    4.36162    4.51365         NA         NA 0.1728
0.1492      0.19621          NA          NA      NA      NA     0
0          0 -0.1315   -0.2581  -0.0048858     NA     NA 5.22683    5.
13882    5.31793         NA         NA 0.89765        NA        NA
1.7078       NA      NA 27.33288      NA      NA 27.31558        NA
NA
5.22809       NA       NA -1.5912      NA      NA   0      NA      NA
0      NA      NA 0.177       NA      NA 1.875       NA      NA 0.177
    NA       NA 0.091      NA      NA        NA            NA
NA            NA            NA 0.017291        NA      NA -0.3888
   NA        NA
V6.0    WRF   NA   240000    20050808_000000 20050808_000000 000000
20050808_000000 20050808_000000 APCP_12  A12      APCP_12 A12
ANALYS CO
NUS   NEAREST     1           NA          NA         NA         0.05
CNT        5451 1.24174  1.14978  1.33371       NA       NA 3.46432
3.40
049    3.53061         NA         NA 1.30455  1.18437  1.42473
NA       NA 4.52726    4.44385    4.61389         NA         NA 0.2008
0.17519     0.22614          NA          NA      NA      NA     0
0          0 -0.062807 -0.19869  0.073072      NA     NA 5.11849    5.
02418    5.21642         NA         NA 0.95186        NA        NA
1.71948      NA      NA 26.19804      NA      NA 26.1941         NA
NA
5.1184        NA       NA -1.5         NA      NA   0      NA      NA
0      NA      NA 0.3005      NA      NA 2.127       NA      NA 0.3005
    NA       NA 0.1        NA      NA        NA            NA
NA            NA            NA 0.0039447       NA      NA -0.2782
   NA        NA
V6.0    WRF   NA   240000    20050808_000000 20050808_000000 000000
20050808_000000 20050808_000000 APCP_12  A12      APCP_12 A12
ANALYS EA
ST    NEAREST     1           NA          NA         NA         0.05
CNT        2605 1.77874  1.59718  1.96029       NA       NA 4.7278
4.60
282    4.85981         NA         NA 1.79309  1.58022  2.00596
NA       NA 5.54339    5.39686    5.69817         NA         NA
0.19577
0.15856     0.23243          NA          NA      NA      NA     0
0          0 -0.014354 -0.26564  0.23693       NA     NA 6.54369    6.
37071    6.72639         NA         NA 0.99199        NA        NA
2.40035      NA      NA 42.80361      NA      NA 42.8034         NA
NA
6.54245       NA       NA -2.1988      NA      NA   0      NA      NA
0      NA      NA 0.202       NA      NA 3.1092      NA      NA 0.202
    NA       NA 0.084      NA      NA        NA            NA
NA            NA            NA 0.00020605      NA      NA -0.39293
   NA        NA
V6.0    WRF   NA   240000    20050808_000000 20050808_000000 000000
20050808_000000 20050808_000000 APCP_12  A12      APCP_12 A12
ANALYS WE
ST    NEAREST     1           NA          NA         NA         0.05
CNT        2846 0.75022  0.69793  0.80252       NA       NA 1.42346
1.38
741    1.46143         NA         NA 0.85738  0.7371   0.97766
NA       NA 3.2739     3.19101    3.36125         NA         NA
0.18815
0.15246     0.22335          NA          NA      NA      NA     0
0          0 -0.10716  -0.22896  0.014644      NA     NA 3.31527    3.
23133    3.40372         NA         NA 0.87502        NA        NA
1.09626      NA      NA 10.99864      NA      NA 10.98716        NA
NA
3.31642       NA       NA -1           NA      NA   0      NA      NA
0      NA      NA 0.367       NA      NA 1.6995      NA      NA 0.367
    NA       NA 0.16       NA      NA        NA            NA
NA            NA            NA 0.011482        NA      NA -0.026143
   NA        NA


------------------------------------------------
Subject: Plotting question using Rscript
From: John Halley Gotway
Time: Mon Aug 28 13:30:27 2017

Brad,

No the "null device" line is nothing to be worried about.  That's
something
that R prints out when it's finished making plots.  It means that it's
closed the output image device.  I wish I could suppress that message
but
don't know how to.

I used the ascii data you sent me and had to some formatting to get
back to
"normal".  It contains 1 header line followed by 4 STAT lines.  But
the
file you sent had 41 lines in it... probably the result of doing a
copy-and-paste.  I've attached the resulting PDF file so that you can
make
sure it looks like yours.

The Rscript is doing exactly what it was designed to do.  Check the
header
columns to define "cases", and for each case, create plots of the
distribution of RMSE values.  You have only passed it data for a
single
point in time.  It identified 4 cases in the data you passed it
(listed
below), and it plotted all the RMSE values for each case.

[1] "Processing case:
WRF_APCP_12_A12_APCP_12_A12_ANALYS_G212_NEAREST_1_0.05"
[1] "Processing case:
WRF_APCP_12_A12_APCP_12_A12_ANALYS_CONUS_NEAREST_1_0.05"
[1] "Processing case:
WRF_APCP_12_A12_APCP_12_A12_ANALYS_EAST_NEAREST_1_0.05"
[1] "Processing case:
WRF_APCP_12_A12_APCP_12_A12_ANALYS_WEST_NEAREST_1_0.05"

So the obvious issue here is that each plot only contains a single
point.
If you pass it 30 days of CNT output, your plots will have 30 points
on
them... or 1 year would lead to 365 points.

The plots aren't interesting because you have haven't passed in enough
data
to make them interesting.  Make sense?

Is this the type time-series plotting you're after or were you
expecting a
2D spatial plot?

Thanks,
John

On Thu, Aug 24, 2017 at 2:34 PM, Brad Diehl - NOAA Federal via RT <
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81734 >
>
> John, thanks for clarifying. Having said all this, I was working on
the
> grid_stat
> tutorial instructions, and was working with the first example with
the
> APCP_12.
> I re-checked the config instructions and they appear correct, but
not
> getting any
> meaningful results in the scripts, i.e. after running  Rscript
plot_cnt.R
> and looking at cnt_plots.pdf. I have sent the command line arguments
used
> and the resultant output below, with unintelligible plots as a
result. I
> did'nt notice the "null device" output from the script until now, is
that
> an issue here? Also attached the .txt file used.
>
> Any help is greatly appreciated.
>
>
> [bradd at shell1 met_out]$ Rscript plot_cnt.R
> grid_stat_240000L_20050808_000000V_cnt.txt -save
> [1] "Reading: grid_stat_240000L_20050808_000000V_cnt.txt"
> [1] "Found: 4 CNT lines"
> [1] "Writing: cnt_plots.pdf"
> [1] "Processing case:
> WRF_APCP_12_A12_APCP_12_A12_ANALYS_G212_NEAREST_1_0.05"
> [1] "Processing case:
> WRF_APCP_12_A12_APCP_12_A12_ANALYS_CONUS_NEAREST_1_0.05"
> [1] "Processing case:
> WRF_APCP_12_A12_APCP_12_A12_ANALYS_EAST_NEAREST_1_0.05"
> [1] "Processing case:
> WRF_APCP_12_A12_APCP_12_A12_ANALYS_WEST_NEAREST_1_0.05"
> null device
>           1
> [1] "Finished: cnt_plots.pdf"
> [1] "Saving image..."
>
> On Thu, Aug 24, 2017 at 8:04 PM, John Halley Gotway via RT <
> met_help at ucar.edu> wrote:
>
> > Yes, that's correct.  The FBAR column contains the mean forecast
value.
> A
> > description of the columns present in the CNT line type can be
found in
> > table 7.6 of the MET User's Guide.
> >
> > You can also see them listed at the beginning of that Rscript.
> >
> > Thanks,
> > John
> >
> > On Thu, Aug 24, 2017 at 1:12 PM, Brad Diehl - NOAA Federal via RT
<
> > met_help at ucar.edu> wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81734 >
> > >
> > > What I was really after was the range of possible values for the
column
> > > variables,
> > > for example you mentioned  "-column MSE -column MAE" would tell
it to
> > plot
> > > Mean-Squared-Error and Mean-Absolute-Error. For example in Table
7.6,
> is
> > > FBAR and its associated variables possible column values, e.g.
"-column
> > > FBAR", telling
> > > it to plot the forecast mean?
> > >
> > > On Thu, Aug 24, 2017 at 3:33 PM, John Halley Gotway via RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > > Brad,
> > > >
> > > > That plot_cnt.R script is meant as a simple example of reading
MET
> > output
> > > > into and creating boxplots and time-series plot of the data
you pass
> to
> > > > it.  The "-column" argument tells the script which columns
from the
> CNT
> > > > line type should be plotted.  By default, it plots RMSE.  But
passing
> > in
> > > > "-column MSE -column MAE" would tell it to plot Mean-Squared-
Error
> and
> > > > Mean-Absolute-Error instead.
> > > >
> > > > The columns included in the CNT line type are defined in table
7.6 of
> > the
> > > > MET User's Guide:
> > > >
> > > > http://www.dtcenter.org/met/users/docs/users_guide/MET_
> > > > Users_Guide_v6.0.pdf
> > > >
> > > > Hope that helps clarify.
> > > >
> > > > Thanks,
> > > > John
> > > >
> > > > On Thu, Aug 24, 2017 at 8:28 AM, Brad Diehl - NOAA Federal via
RT <
> > > > met_help at ucar.edu> wrote:
> > > >
> > > > >
> > > > > Thu Aug 24 08:28:26 2017: Request 81734 was acted upon.
> > > > > Transaction: Ticket created by brad.diehl at noaa.gov
> > > > >        Queue: met_help
> > > > >      Subject: Plotting question using Rscript
> > > > >        Owner: Nobody
> > > > >   Requestors: brad.diehl at noaa.gov
> > > > >       Status: new
> > > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> > Ticket/Display.html?id=81734
> > > >
> > > > >
> > > > >
> > > > > I have a question about the R-scripts to plot output from
> grid_stat.
> > > > >
> > > > > The following is from the MET User's Guide:
> > > > >
> > > > > The plot_cnt.R
> > > > >
<http://www.dtcenter.org/met/users/downloads/Rscripts/plot_cnt.R>
> > > script
> > > > > may be run to read continuous statistics (CNT) output lines
from
> > > > Point-Stat
> > > > > and Grid-Stat. By default, it will create boxplots and time
series
> > > plots
> > > > of
> > > > > RMSE for each case. But a command line argument may be used
to
> > specify
> > > > > other CNT statistics to be plotted. You may pass this script
one or
> > > more
> > > > > ".stat" files, continuous statistics files (*_cnt.txt), or
the
> output
> > > of
> > > > a
> > > > > Stat-Analysis filter type job.
> > > > >
> > > > > My question is: For the plot_cnt.R script, for the command
line
> > > > arguments,
> > > > > is the argument name the name in the NBRCTC and NBRCTCS
column
> names?
> > > > > For example, from Table 8.2 below, is NBRCTC a valid
argument name,
> > so
> > > > the
> > > > > script call would be:
> > > > >
> > > > > Rscript plot_cnt.R
grid_stat_240000L_20050808_000000V_cnt.txt
> > -column
> > > > > NBRCTC
> > > > >
> > > > > Any help is appreciated........Brad Diehl
> > > > >
> > > > > [image: Inline image 1]
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

------------------------------------------------
Subject: Plotting question using Rscript
From: Brad Diehl - NOAA Federal
Time: Mon Aug 28 15:13:24 2017

John,

Late Friday I went through the R script with one of my colleagues and
realized the plots were doing exactly what you said, I just need more
cases
as you mentioned.

Let's say I have more cases, like 12,24,36, etc  lead time, is the R-
script
robust enough to plot those on one plot?

Thanks for your help, Brad

On Mon, Aug 28, 2017 at 7:30 PM, John Halley Gotway via RT <
met_help at ucar.edu> wrote:

> Brad,
>
> No the "null device" line is nothing to be worried about.  That's
something
> that R prints out when it's finished making plots.  It means that
it's
> closed the output image device.  I wish I could suppress that
message but
> don't know how to.
>
> I used the ascii data you sent me and had to some formatting to get
back to
> "normal".  It contains 1 header line followed by 4 STAT lines.  But
the
> file you sent had 41 lines in it... probably the result of doing a
> copy-and-paste.  I've attached the resulting PDF file so that you
can make
> sure it looks like yours.
>
> The Rscript is doing exactly what it was designed to do.  Check the
header
> columns to define "cases", and for each case, create plots of the
> distribution of RMSE values.  You have only passed it data for a
single
> point in time.  It identified 4 cases in the data you passed it
(listed
> below), and it plotted all the RMSE values for each case.
>
> [1] "Processing case:
> WRF_APCP_12_A12_APCP_12_A12_ANALYS_G212_NEAREST_1_0.05"
> [1] "Processing case:
> WRF_APCP_12_A12_APCP_12_A12_ANALYS_CONUS_NEAREST_1_0.05"
> [1] "Processing case:
> WRF_APCP_12_A12_APCP_12_A12_ANALYS_EAST_NEAREST_1_0.05"
> [1] "Processing case:
> WRF_APCP_12_A12_APCP_12_A12_ANALYS_WEST_NEAREST_1_0.05"
>
> So the obvious issue here is that each plot only contains a single
point.
> If you pass it 30 days of CNT output, your plots will have 30 points
on
> them... or 1 year would lead to 365 points.
>
> The plots aren't interesting because you have haven't passed in
enough data
> to make them interesting.  Make sense?
>
> Is this the type time-series plotting you're after or were you
expecting a
> 2D spatial plot?
>
> Thanks,
> John
>
> On Thu, Aug 24, 2017 at 2:34 PM, Brad Diehl - NOAA Federal via RT <
> met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81734 >
> >
> > John, thanks for clarifying. Having said all this, I was working
on the
> > grid_stat
> > tutorial instructions, and was working with the first example with
the
> > APCP_12.
> > I re-checked the config instructions and they appear correct, but
not
> > getting any
> > meaningful results in the scripts, i.e. after running  Rscript
plot_cnt.R
> > and looking at cnt_plots.pdf. I have sent the command line
arguments used
> > and the resultant output below, with unintelligible plots as a
result. I
> > did'nt notice the "null device" output from the script until now,
is that
> > an issue here? Also attached the .txt file used.
> >
> > Any help is greatly appreciated.
> >
> >
> > [bradd at shell1 met_out]$ Rscript plot_cnt.R
> > grid_stat_240000L_20050808_000000V_cnt.txt -save
> > [1] "Reading: grid_stat_240000L_20050808_000000V_cnt.txt"
> > [1] "Found: 4 CNT lines"
> > [1] "Writing: cnt_plots.pdf"
> > [1] "Processing case:
> > WRF_APCP_12_A12_APCP_12_A12_ANALYS_G212_NEAREST_1_0.05"
> > [1] "Processing case:
> > WRF_APCP_12_A12_APCP_12_A12_ANALYS_CONUS_NEAREST_1_0.05"
> > [1] "Processing case:
> > WRF_APCP_12_A12_APCP_12_A12_ANALYS_EAST_NEAREST_1_0.05"
> > [1] "Processing case:
> > WRF_APCP_12_A12_APCP_12_A12_ANALYS_WEST_NEAREST_1_0.05"
> > null device
> >           1
> > [1] "Finished: cnt_plots.pdf"
> > [1] "Saving image..."
> >
> > On Thu, Aug 24, 2017 at 8:04 PM, John Halley Gotway via RT <
> > met_help at ucar.edu> wrote:
> >
> > > Yes, that's correct.  The FBAR column contains the mean forecast
value.
> > A
> > > description of the columns present in the CNT line type can be
found in
> > > table 7.6 of the MET User's Guide.
> > >
> > > You can also see them listed at the beginning of that Rscript.
> > >
> > > Thanks,
> > > John
> > >
> > > On Thu, Aug 24, 2017 at 1:12 PM, Brad Diehl - NOAA Federal via
RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > >
> > > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81734
>
> > > >
> > > > What I was really after was the range of possible values for
the
> column
> > > > variables,
> > > > for example you mentioned  "-column MSE -column MAE" would
tell it to
> > > plot
> > > > Mean-Squared-Error and Mean-Absolute-Error. For example in
Table 7.6,
> > is
> > > > FBAR and its associated variables possible column values, e.g.
> "-column
> > > > FBAR", telling
> > > > it to plot the forecast mean?
> > > >
> > > > On Thu, Aug 24, 2017 at 3:33 PM, John Halley Gotway via RT <
> > > > met_help at ucar.edu> wrote:
> > > >
> > > > > Brad,
> > > > >
> > > > > That plot_cnt.R script is meant as a simple example of
reading MET
> > > output
> > > > > into and creating boxplots and time-series plot of the data
you
> pass
> > to
> > > > > it.  The "-column" argument tells the script which columns
from the
> > CNT
> > > > > line type should be plotted.  By default, it plots RMSE.
But
> passing
> > > in
> > > > > "-column MSE -column MAE" would tell it to plot Mean-
Squared-Error
> > and
> > > > > Mean-Absolute-Error instead.
> > > > >
> > > > > The columns included in the CNT line type are defined in
table 7.6
> of
> > > the
> > > > > MET User's Guide:
> > > > >
> > > > > http://www.dtcenter.org/met/users/docs/users_guide/MET_
> > > > > Users_Guide_v6.0.pdf
> > > > >
> > > > > Hope that helps clarify.
> > > > >
> > > > > Thanks,
> > > > > John
> > > > >
> > > > > On Thu, Aug 24, 2017 at 8:28 AM, Brad Diehl - NOAA Federal
via RT <
> > > > > met_help at ucar.edu> wrote:
> > > > >
> > > > > >
> > > > > > Thu Aug 24 08:28:26 2017: Request 81734 was acted upon.
> > > > > > Transaction: Ticket created by brad.diehl at noaa.gov
> > > > > >        Queue: met_help
> > > > > >      Subject: Plotting question using Rscript
> > > > > >        Owner: Nobody
> > > > > >   Requestors: brad.diehl at noaa.gov
> > > > > >       Status: new
> > > > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> > > Ticket/Display.html?id=81734
> > > > >
> > > > > >
> > > > > >
> > > > > > I have a question about the R-scripts to plot output from
> > grid_stat.
> > > > > >
> > > > > > The following is from the MET User's Guide:
> > > > > >
> > > > > > The plot_cnt.R
> > > > > >
<http://www.dtcenter.org/met/users/downloads/Rscripts/plot_cnt.R
> >
> > > > script
> > > > > > may be run to read continuous statistics (CNT) output
lines from
> > > > > Point-Stat
> > > > > > and Grid-Stat. By default, it will create boxplots and
time
> series
> > > > plots
> > > > > of
> > > > > > RMSE for each case. But a command line argument may be
used to
> > > specify
> > > > > > other CNT statistics to be plotted. You may pass this
script one
> or
> > > > more
> > > > > > ".stat" files, continuous statistics files (*_cnt.txt), or
the
> > output
> > > > of
> > > > > a
> > > > > > Stat-Analysis filter type job.
> > > > > >
> > > > > > My question is: For the plot_cnt.R script, for the command
line
> > > > > arguments,
> > > > > > is the argument name the name in the NBRCTC and NBRCTCS
column
> > names?
> > > > > > For example, from Table 8.2 below, is NBRCTC a valid
argument
> name,
> > > so
> > > > > the
> > > > > > script call would be:
> > > > > >
> > > > > > Rscript plot_cnt.R
grid_stat_240000L_20050808_000000V_cnt.txt
> > > -column
> > > > > > NBRCTC
> > > > > >
> > > > > > Any help is appreciated........Brad Diehl
> > > > > >
> > > > > > [image: Inline image 1]
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

------------------------------------------------
Subject: Plotting question using Rscript
From: John Halley Gotway
Time: Tue Aug 29 08:10:41 2017

Brad,

Yep, that Rscript creates a time series plot using all the lead time
available in the data you pass it.  So adding data with more lead
times
will yield more values along the x-axis.

I should emphasize that that Rscript is really just doing the most
basic
thing... plotting a time-series of daily statistics and including no
confidence intervals.  We have put a lot more thought, time, and
effort
developing METViewer which is a robust database and display plotting
system.  Once we have it wrapped in a container and available for
testing,
I'll let you know.

Johm

On Mon, Aug 28, 2017 at 3:13 PM Brad Diehl - NOAA Federal via RT <
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81734 >
>
> John,
>
> Late Friday I went through the R script with one of my colleagues
and
> realized the plots were doing exactly what you said, I just need
more cases
> as you mentioned.
>
> Let's say I have more cases, like 12,24,36, etc  lead time, is the
R-script
> robust enough to plot those on one plot?
>
> Thanks for your help, Brad
>
> On Mon, Aug 28, 2017 at 7:30 PM, John Halley Gotway via RT <
> met_help at ucar.edu> wrote:
>
> > Brad,
> >
> > No the "null device" line is nothing to be worried about.  That's
> something
> > that R prints out when it's finished making plots.  It means that
it's
> > closed the output image device.  I wish I could suppress that
message but
> > don't know how to.
> >
> > I used the ascii data you sent me and had to some formatting to
get back
> to
> > "normal".  It contains 1 header line followed by 4 STAT lines.
But the
> > file you sent had 41 lines in it... probably the result of doing a
> > copy-and-paste.  I've attached the resulting PDF file so that you
can
> make
> > sure it looks like yours.
> >
> > The Rscript is doing exactly what it was designed to do.  Check
the
> header
> > columns to define "cases", and for each case, create plots of the
> > distribution of RMSE values.  You have only passed it data for a
single
> > point in time.  It identified 4 cases in the data you passed it
(listed
> > below), and it plotted all the RMSE values for each case.
> >
> > [1] "Processing case:
> > WRF_APCP_12_A12_APCP_12_A12_ANALYS_G212_NEAREST_1_0.05"
> > [1] "Processing case:
> > WRF_APCP_12_A12_APCP_12_A12_ANALYS_CONUS_NEAREST_1_0.05"
> > [1] "Processing case:
> > WRF_APCP_12_A12_APCP_12_A12_ANALYS_EAST_NEAREST_1_0.05"
> > [1] "Processing case:
> > WRF_APCP_12_A12_APCP_12_A12_ANALYS_WEST_NEAREST_1_0.05"
> >
> > So the obvious issue here is that each plot only contains a single
point.
> > If you pass it 30 days of CNT output, your plots will have 30
points on
> > them... or 1 year would lead to 365 points.
> >
> > The plots aren't interesting because you have haven't passed in
enough
> data
> > to make them interesting.  Make sense?
> >
> > Is this the type time-series plotting you're after or were you
expecting
> a
> > 2D spatial plot?
> >
> > Thanks,
> > John
> >
> > On Thu, Aug 24, 2017 at 2:34 PM, Brad Diehl - NOAA Federal via RT
<
> > met_help at ucar.edu> wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81734 >
> > >
> > > John, thanks for clarifying. Having said all this, I was working
on the
> > > grid_stat
> > > tutorial instructions, and was working with the first example
with the
> > > APCP_12.
> > > I re-checked the config instructions and they appear correct,
but not
> > > getting any
> > > meaningful results in the scripts, i.e. after running  Rscript
> plot_cnt.R
> > > and looking at cnt_plots.pdf. I have sent the command line
arguments
> used
> > > and the resultant output below, with unintelligible plots as a
result.
> I
> > > did'nt notice the "null device" output from the script until
now, is
> that
> > > an issue here? Also attached the .txt file used.
> > >
> > > Any help is greatly appreciated.
> > >
> > >
> > > [bradd at shell1 met_out]$ Rscript plot_cnt.R
> > > grid_stat_240000L_20050808_000000V_cnt.txt -save
> > > [1] "Reading: grid_stat_240000L_20050808_000000V_cnt.txt"
> > > [1] "Found: 4 CNT lines"
> > > [1] "Writing: cnt_plots.pdf"
> > > [1] "Processing case:
> > > WRF_APCP_12_A12_APCP_12_A12_ANALYS_G212_NEAREST_1_0.05"
> > > [1] "Processing case:
> > > WRF_APCP_12_A12_APCP_12_A12_ANALYS_CONUS_NEAREST_1_0.05"
> > > [1] "Processing case:
> > > WRF_APCP_12_A12_APCP_12_A12_ANALYS_EAST_NEAREST_1_0.05"
> > > [1] "Processing case:
> > > WRF_APCP_12_A12_APCP_12_A12_ANALYS_WEST_NEAREST_1_0.05"
> > > null device
> > >           1
> > > [1] "Finished: cnt_plots.pdf"
> > > [1] "Saving image..."
> > >
> > > On Thu, Aug 24, 2017 at 8:04 PM, John Halley Gotway via RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > > Yes, that's correct.  The FBAR column contains the mean
forecast
> value.
> > > A
> > > > description of the columns present in the CNT line type can be
found
> in
> > > > table 7.6 of the MET User's Guide.
> > > >
> > > > You can also see them listed at the beginning of that Rscript.
> > > >
> > > > Thanks,
> > > > John
> > > >
> > > > On Thu, Aug 24, 2017 at 1:12 PM, Brad Diehl - NOAA Federal via
RT <
> > > > met_help at ucar.edu> wrote:
> > > >
> > > > >
> > > > > <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81734 >
> > > > >
> > > > > What I was really after was the range of possible values for
the
> > column
> > > > > variables,
> > > > > for example you mentioned  "-column MSE -column MAE" would
tell it
> to
> > > > plot
> > > > > Mean-Squared-Error and Mean-Absolute-Error. For example in
Table
> 7.6,
> > > is
> > > > > FBAR and its associated variables possible column values,
e.g.
> > "-column
> > > > > FBAR", telling
> > > > > it to plot the forecast mean?
> > > > >
> > > > > On Thu, Aug 24, 2017 at 3:33 PM, John Halley Gotway via RT <
> > > > > met_help at ucar.edu> wrote:
> > > > >
> > > > > > Brad,
> > > > > >
> > > > > > That plot_cnt.R script is meant as a simple example of
reading
> MET
> > > > output
> > > > > > into and creating boxplots and time-series plot of the
data you
> > pass
> > > to
> > > > > > it.  The "-column" argument tells the script which columns
from
> the
> > > CNT
> > > > > > line type should be plotted.  By default, it plots RMSE.
But
> > passing
> > > > in
> > > > > > "-column MSE -column MAE" would tell it to plot
> Mean-Squared-Error
> > > and
> > > > > > Mean-Absolute-Error instead.
> > > > > >
> > > > > > The columns included in the CNT line type are defined in
table
> 7.6
> > of
> > > > the
> > > > > > MET User's Guide:
> > > > > >
> > > > > > http://www.dtcenter.org/met/users/docs/users_guide/MET_
> > > > > > Users_Guide_v6.0.pdf
> > > > > >
> > > > > > Hope that helps clarify.
> > > > > >
> > > > > > Thanks,
> > > > > > John
> > > > > >
> > > > > > On Thu, Aug 24, 2017 at 8:28 AM, Brad Diehl - NOAA Federal
via
> RT <
> > > > > > met_help at ucar.edu> wrote:
> > > > > >
> > > > > > >
> > > > > > > Thu Aug 24 08:28:26 2017: Request 81734 was acted upon.
> > > > > > > Transaction: Ticket created by brad.diehl at noaa.gov
> > > > > > >        Queue: met_help
> > > > > > >      Subject: Plotting question using Rscript
> > > > > > >        Owner: Nobody
> > > > > > >   Requestors: brad.diehl at noaa.gov
> > > > > > >       Status: new
> > > > > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> > > > Ticket/Display.html?id=81734
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > > I have a question about the R-scripts to plot output
from
> > > grid_stat.
> > > > > > >
> > > > > > > The following is from the MET User's Guide:
> > > > > > >
> > > > > > > The plot_cnt.R
> > > > > > > <
> http://www.dtcenter.org/met/users/downloads/Rscripts/plot_cnt.R
> > >
> > > > > script
> > > > > > > may be run to read continuous statistics (CNT) output
lines
> from
> > > > > > Point-Stat
> > > > > > > and Grid-Stat. By default, it will create boxplots and
time
> > series
> > > > > plots
> > > > > > of
> > > > > > > RMSE for each case. But a command line argument may be
used to
> > > > specify
> > > > > > > other CNT statistics to be plotted. You may pass this
script
> one
> > or
> > > > > more
> > > > > > > ".stat" files, continuous statistics files (*_cnt.txt),
or the
> > > output
> > > > > of
> > > > > > a
> > > > > > > Stat-Analysis filter type job.
> > > > > > >
> > > > > > > My question is: For the plot_cnt.R script, for the
command line
> > > > > > arguments,
> > > > > > > is the argument name the name in the NBRCTC and NBRCTCS
column
> > > names?
> > > > > > > For example, from Table 8.2 below, is NBRCTC a valid
argument
> > name,
> > > > so
> > > > > > the
> > > > > > > script call would be:
> > > > > > >
> > > > > > > Rscript plot_cnt.R
grid_stat_240000L_20050808_000000V_cnt.txt
> > > > -column
> > > > > > > NBRCTC
> > > > > > >
> > > > > > > Any help is appreciated........Brad Diehl
> > > > > > >
> > > > > > > [image: Inline image 1]
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

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


More information about the Met_help mailing list