[Met_help] [rt.rap.ucar.edu #68205] History for empty basin list on tc_stat cmd line

John Halley Gotway via RT met_help at ucar.edu
Wed Jul 16 12:00:27 MDT 2014


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

Is it possible to specify an empty list on the tc_stat command line?

I would like to loop through basins like this

foreach basin (AL WP [])
tc_stat -job filter -basin $basin -dump_row rows
end

where AL and WP are basins and [] is an empty list (use all basins).  It
doesn't choke, but it doesn't dump any lines either.


Dave


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

Subject: empty basin list on tc_stat cmd line
From: John Halley Gotway
Time: Tue Jul 15 13:29:53 2014

Dave,

No, passing an option on the command line with no argument should
cause
tc_stat to error out.  However, tc_stat in METv4.1 should support a
comma-separated list of options.  So you could run over AL and WP with
"AL,WP"...

foreach basin (AL WP AL,WP)
tc_stat -job filter -basin $basin -dump_row rows
end

Does that accomplish what you're after?

Thanks,
John


On Tue, Jul 15, 2014 at 12:29 PM, David Ahijevych via RT
<met_help at ucar.edu>
wrote:

>
> Tue Jul 15 12:29:33 2014: Request 68205 was acted upon.
> Transaction: Ticket created by ahijevyc
>        Queue: met_help
>      Subject: empty basin list on tc_stat cmd line
>        Owner: Nobody
>   Requestors: ahijevyc at ucar.edu
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68205 >
>
>
> Is it possible to specify an empty list on the tc_stat command line?
>
> I would like to loop through basins like this
>
> foreach basin (AL WP [])
> tc_stat -job filter -basin $basin -dump_row rows
> end
>
> where AL and WP are basins and [] is an empty list (use all basins).
It
> doesn't choke, but it doesn't dump any lines either.
>
>
> Dave
>
>

------------------------------------------------
Subject: empty basin list on tc_stat cmd line
From: David Ahijevych
Time: Tue Jul 15 17:16:45 2014

Yes.
very clever!


On Tue, Jul 15, 2014 at 1:29 PM, John Halley Gotway via RT <
met_help at ucar.edu> wrote:

> Dave,
>
> No, passing an option on the command line with no argument should
cause
> tc_stat to error out.  However, tc_stat in METv4.1 should support a
> comma-separated list of options.  So you could run over AL and WP
with
> "AL,WP"...
>
> foreach basin (AL WP AL,WP)
> tc_stat -job filter -basin $basin -dump_row rows
> end
>
> Does that accomplish what you're after?
>
> Thanks,
> John
>
>
> On Tue, Jul 15, 2014 at 12:29 PM, David Ahijevych via RT <
> met_help at ucar.edu>
> wrote:
>
> >
> > Tue Jul 15 12:29:33 2014: Request 68205 was acted upon.
> > Transaction: Ticket created by ahijevyc
> >        Queue: met_help
> >      Subject: empty basin list on tc_stat cmd line
> >        Owner: Nobody
> >   Requestors: ahijevyc at ucar.edu
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68205 >
> >
> >
> > Is it possible to specify an empty list on the tc_stat command
line?
> >
> > I would like to loop through basins like this
> >
> > foreach basin (AL WP [])
> > tc_stat -job filter -basin $basin -dump_row rows
> > end
> >
> > where AL and WP are basins and [] is an empty list (use all
basins).  It
> > doesn't choke, but it doesn't dump any lines either.
> >
> >
> > Dave
> >
> >
>
>

------------------------------------------------
Subject: empty basin list on tc_stat cmd line
From: David Ahijevych
Time: Tue Jul 15 17:23:32 2014

although to get true global coverage, I'll add EP CP IO and SH

-basin WP,AL,EP,CP,IO,SH

Is that all the possible basins?



On Tue, Jul 15, 2014 at 5:16 PM, David Ahijevych <ahijevyc at ucar.edu>
wrote:

> Yes.
> very clever!
>
>
> On Tue, Jul 15, 2014 at 1:29 PM, John Halley Gotway via RT <
> met_help at ucar.edu> wrote:
>
>> Dave,
>>
>> No, passing an option on the command line with no argument should
cause
>> tc_stat to error out.  However, tc_stat in METv4.1 should support a
>> comma-separated list of options.  So you could run over AL and WP
with
>> "AL,WP"...
>>
>> foreach basin (AL WP AL,WP)
>> tc_stat -job filter -basin $basin -dump_row rows
>> end
>>
>> Does that accomplish what you're after?
>>
>> Thanks,
>> John
>>
>>
>> On Tue, Jul 15, 2014 at 12:29 PM, David Ahijevych via RT <
>> met_help at ucar.edu>
>> wrote:
>>
>> >
>> > Tue Jul 15 12:29:33 2014: Request 68205 was acted upon.
>> > Transaction: Ticket created by ahijevyc
>> >        Queue: met_help
>> >      Subject: empty basin list on tc_stat cmd line
>> >        Owner: Nobody
>> >   Requestors: ahijevyc at ucar.edu
>> >       Status: new
>> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68205 >
>> >
>> >
>> > Is it possible to specify an empty list on the tc_stat command
line?
>> >
>> > I would like to loop through basins like this
>> >
>> > foreach basin (AL WP [])
>> > tc_stat -job filter -basin $basin -dump_row rows
>> > end
>> >
>> > where AL and WP are basins and [] is an empty list (use all
basins).  It
>> > doesn't choke, but it doesn't dump any lines either.
>> >
>> >
>> > Dave
>> >
>> >
>>
>>
>

------------------------------------------------
Subject: empty basin list on tc_stat cmd line
From: John Halley Gotway
Time: Wed Jul 16 10:00:03 2014

Dave,

You'd probably know better that I would about the global basins!  I
could
ask the hurricane folks around here, but their evaluations are usually
limited to the Atlantic and Eastern Pacific.

But there's a more straight-forward way to handle this through
scripting.
By not passing the "basin" option, you'd get all of them:

foreach basin ( AL WP ALL )
   set basin_option = ""
   if ($basin != "ALL") then
      set basin_option = "-basin ${basin}"
   endif
   tc_stat -job filter ${basin_option} -dump_row rows
end

That's the c-shell syntax.

Thanks,
John



On Tue, Jul 15, 2014 at 5:23 PM, David Ahijevych via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68205 >
>
> although to get true global coverage, I'll add EP CP IO and SH
>
> -basin WP,AL,EP,CP,IO,SH
>
> Is that all the possible basins?
>
>
>
> On Tue, Jul 15, 2014 at 5:16 PM, David Ahijevych <ahijevyc at ucar.edu>
> wrote:
>
> > Yes.
> > very clever!
> >
> >
> > On Tue, Jul 15, 2014 at 1:29 PM, John Halley Gotway via RT <
> > met_help at ucar.edu> wrote:
> >
> >> Dave,
> >>
> >> No, passing an option on the command line with no argument should
cause
> >> tc_stat to error out.  However, tc_stat in METv4.1 should support
a
> >> comma-separated list of options.  So you could run over AL and WP
with
> >> "AL,WP"...
> >>
> >> foreach basin (AL WP AL,WP)
> >> tc_stat -job filter -basin $basin -dump_row rows
> >> end
> >>
> >> Does that accomplish what you're after?
> >>
> >> Thanks,
> >> John
> >>
> >>
> >> On Tue, Jul 15, 2014 at 12:29 PM, David Ahijevych via RT <
> >> met_help at ucar.edu>
> >> wrote:
> >>
> >> >
> >> > Tue Jul 15 12:29:33 2014: Request 68205 was acted upon.
> >> > Transaction: Ticket created by ahijevyc
> >> >        Queue: met_help
> >> >      Subject: empty basin list on tc_stat cmd line
> >> >        Owner: Nobody
> >> >   Requestors: ahijevyc at ucar.edu
> >> >       Status: new
> >> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68205
> >
> >> >
> >> >
> >> > Is it possible to specify an empty list on the tc_stat command
line?
> >> >
> >> > I would like to loop through basins like this
> >> >
> >> > foreach basin (AL WP [])
> >> > tc_stat -job filter -basin $basin -dump_row rows
> >> > end
> >> >
> >> > where AL and WP are basins and [] is an empty list (use all
basins).
>  It
> >> > doesn't choke, but it doesn't dump any lines either.
> >> >
> >> >
> >> > Dave
> >> >
> >> >
> >>
> >>
> >
>
>

------------------------------------------------
Subject: empty basin list on tc_stat cmd line
From: David Ahijevych
Time: Wed Jul 16 11:21:34 2014

I'd better remove the basin option if I want global. Like you have in
your
latest csh example.  Thanks.

 I don't want to miss any basins (you get a different set of basins
depending on who you ask!).




On Wed, Jul 16, 2014 at 10:00 AM, John Halley Gotway via RT <
met_help at ucar.edu> wrote:

> Dave,
>
> You'd probably know better that I would about the global basins!  I
could
> ask the hurricane folks around here, but their evaluations are
usually
> limited to the Atlantic and Eastern Pacific.
>
> But there's a more straight-forward way to handle this through
scripting.
> By not passing the "basin" option, you'd get all of them:
>
> foreach basin ( AL WP ALL )
>    set basin_option = ""
>    if ($basin != "ALL") then
>       set basin_option = "-basin ${basin}"
>    endif
>    tc_stat -job filter ${basin_option} -dump_row rows
> end
>
> That's the c-shell syntax.
>
> Thanks,
> John
>
>
>
> On Tue, Jul 15, 2014 at 5:23 PM, David Ahijevych via RT
<met_help at ucar.edu
> >
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68205 >
> >
> > although to get true global coverage, I'll add EP CP IO and SH
> >
> > -basin WP,AL,EP,CP,IO,SH
> >
> > Is that all the possible basins?
> >
> >
> >
> > On Tue, Jul 15, 2014 at 5:16 PM, David Ahijevych
<ahijevyc at ucar.edu>
> > wrote:
> >
> > > Yes.
> > > very clever!
> > >
> > >
> > > On Tue, Jul 15, 2014 at 1:29 PM, John Halley Gotway via RT <
> > > met_help at ucar.edu> wrote:
> > >
> > >> Dave,
> > >>
> > >> No, passing an option on the command line with no argument
should
> cause
> > >> tc_stat to error out.  However, tc_stat in METv4.1 should
support a
> > >> comma-separated list of options.  So you could run over AL and
WP with
> > >> "AL,WP"...
> > >>
> > >> foreach basin (AL WP AL,WP)
> > >> tc_stat -job filter -basin $basin -dump_row rows
> > >> end
> > >>
> > >> Does that accomplish what you're after?
> > >>
> > >> Thanks,
> > >> John
> > >>
> > >>
> > >> On Tue, Jul 15, 2014 at 12:29 PM, David Ahijevych via RT <
> > >> met_help at ucar.edu>
> > >> wrote:
> > >>
> > >> >
> > >> > Tue Jul 15 12:29:33 2014: Request 68205 was acted upon.
> > >> > Transaction: Ticket created by ahijevyc
> > >> >        Queue: met_help
> > >> >      Subject: empty basin list on tc_stat cmd line
> > >> >        Owner: Nobody
> > >> >   Requestors: ahijevyc at ucar.edu
> > >> >       Status: new
> > >> >  Ticket <URL:
> https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68205
> > >
> > >> >
> > >> >
> > >> > Is it possible to specify an empty list on the tc_stat
command line?
> > >> >
> > >> > I would like to loop through basins like this
> > >> >
> > >> > foreach basin (AL WP [])
> > >> > tc_stat -job filter -basin $basin -dump_row rows
> > >> > end
> > >> >
> > >> > where AL and WP are basins and [] is an empty list (use all
basins).
> >  It
> > >> > doesn't choke, but it doesn't dump any lines either.
> > >> >
> > >> >
> > >> > Dave
> > >> >
> > >> >
> > >>
> > >>
> > >
> >
> >
>
>

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


More information about the Met_help mailing list