[Met_help] [rt.rap.ucar.edu #69394] History for Grid_stat with multiple inputs by setting environment variable
John Halley Gotway via RT
met_help at ucar.edu
Thu Oct 16 10:31:32 MDT 2014
----------------------------------------------------------------
Initial Request
----------------------------------------------------------------
Dear John,
To run Grid_stat with multiple inputs, I created a bash code,
gridstatmulti.bash at /glade/scratch/jyoo/domain/mean/analysis.
But, it seems that I haven't set the environment variable "CUR_LVL"
correctly and I got error message as below:
ERROR :
ERROR : patch_env() -> environment variable "CUR_LVL" not found!
ERROR :
In my bash code, I calculate a number for the CUR_LVL and I set the
variable as "set CUR_LVL $CUR_LVL". I also set [ "(${CUR_LVL},*,*)" ]; in
my Grid-Stat config file which can be found at
/glade/scratch/jyoo/domain/mean/analysis/GridStatConfig_ccsm_multi
Then, I called grid_stat.
Could you please give me a hint?
Thank you in advance.
Regards,
Jinwoong Yoo
UNM
Jinwoong,
If you're running Grid-Stat multiple times via a script, I suggest using an
environment variable in your Grid-Stat configuration file. For example...
setenv CUR_LVL 0
And in your Grid-Stat config file, use:
= [ "(${CUR_LVL},*,*)" ];
Just set that variable in your script that calls Grid-Stat and the MET code
will substitute in the value. Supporting environment variables in the
config files makes scripting up calls to the MET tools much easier.
Thanks,
John
On Wed, Oct 15, 2014 at 10:59 AM, Jinwoong Yoo via RT <met_help at ucar.edu>
wrote:
----------------------------------------------------------------
Complete Ticket History
----------------------------------------------------------------
Subject: Grid_stat with multiple inputs by setting environment variable
From: Jinwoong Yoo
Time: Wed Oct 15 17:43:04 2014
Dear John,
When I changed the setenv to export for my bash code,
it worked.
#set CUR_LVL=$CUR_LVL1
export CUR_LVL=$CUR_LVL1
Thank you.
Regards,
Jinwoong Yoo
UNM
On Wed, Oct 15, 2014 at 5:00 PM, met_help at ucar.edu via RT
<met_help at ucar.edu
> wrote:
> Greetings,
>
> This message has been automatically generated in response to the
> creation of a trouble ticket regarding:
> "Grid_stat with multiple inputs by setting environment
variable",
> a summary of which appears below.
>
> There is no need to reply to this message right now. Your ticket
has been
> assigned an ID of [rt.rap.ucar.edu #69394].
>
> Please include the string:
>
> [rt.rap.ucar.edu #69394]
>
> in the subject line of all future correspondence about this issue.
To do
> so,
> you may reply to this message.
>
> Thank you,
> met_help at ucar.edu
>
>
-------------------------------------------------------------------------
> Dear John,
>
> To run Grid_stat with multiple inputs, I created a bash code,
> gridstatmulti.bash at /glade/scratch/jyoo/domain/mean/analysis.
>
> But, it seems that I haven't set the environment variable "CUR_LVL"
> correctly and I got error message as below:
> ERROR :
> ERROR : patch_env() -> environment variable "CUR_LVL" not found!
> ERROR :
>
> In my bash code, I calculate a number for the CUR_LVL and I set the
> variable as "set CUR_LVL $CUR_LVL". I also set [ "(${CUR_LVL},*,*)"
]; in
> my Grid-Stat config file which can be found at
> /glade/scratch/jyoo/domain/mean/analysis/GridStatConfig_ccsm_multi
> Then, I called grid_stat.
>
> Could you please give me a hint?
> Thank you in advance.
>
> Regards,
>
> Jinwoong Yoo
> UNM
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Jinwoong,
>
> If you're running Grid-Stat multiple times via a script, I suggest
using an
> environment variable in your Grid-Stat configuration file. For
example...
>
> setenv CUR_LVL 0
>
> And in your Grid-Stat config file, use:
> = [ "(${CUR_LVL},*,*)" ];
>
> Just set that variable in your script that calls Grid-Stat and the
MET code
> will substitute in the value. Supporting environment variables in
the
> config files makes scripting up calls to the MET tools much easier.
>
> Thanks,
> John
>
> On Wed, Oct 15, 2014 at 10:59 AM, Jinwoong Yoo via RT
<met_help at ucar.edu>
> wrote:
>
>
------------------------------------------------
Subject: Grid_stat with multiple inputs by setting environment variable
From: John Halley Gotway
Time: Thu Oct 16 10:27:52 2014
Great, glad you were able to figure it out.
John
On Wed, Oct 15, 2014 at 5:43 PM, Jinwoong Yoo via RT
<met_help at ucar.edu>
wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=69394 >
>
> Dear John,
>
> When I changed the setenv to export for my bash code,
> it worked.
>
>
> #set CUR_LVL=$CUR_LVL1
> export CUR_LVL=$CUR_LVL1
>
> Thank you.
>
> Regards,
>
> Jinwoong Yoo
> UNM
>
>
> On Wed, Oct 15, 2014 at 5:00 PM, met_help at ucar.edu via RT <
> met_help at ucar.edu
> > wrote:
>
> > Greetings,
> >
> > This message has been automatically generated in response to the
> > creation of a trouble ticket regarding:
> > "Grid_stat with multiple inputs by setting environment
variable",
> > a summary of which appears below.
> >
> > There is no need to reply to this message right now. Your ticket
has
> been
> > assigned an ID of [rt.rap.ucar.edu #69394].
> >
> > Please include the string:
> >
> > [rt.rap.ucar.edu #69394]
> >
> > in the subject line of all future correspondence about this issue.
To do
> > so,
> > you may reply to this message.
> >
> > Thank you,
> > met_help at ucar.edu
> >
> >
-------------------------------------------------------------------------
> > Dear John,
> >
> > To run Grid_stat with multiple inputs, I created a bash code,
> > gridstatmulti.bash at /glade/scratch/jyoo/domain/mean/analysis.
> >
> > But, it seems that I haven't set the environment variable
"CUR_LVL"
> > correctly and I got error message as below:
> > ERROR :
> > ERROR : patch_env() -> environment variable "CUR_LVL" not found!
> > ERROR :
> >
> > In my bash code, I calculate a number for the CUR_LVL and I set
the
> > variable as "set CUR_LVL $CUR_LVL". I also set [
"(${CUR_LVL},*,*)" ];
> in
> > my Grid-Stat config file which can be found at
> > /glade/scratch/jyoo/domain/mean/analysis/GridStatConfig_ccsm_multi
> > Then, I called grid_stat.
> >
> > Could you please give me a hint?
> > Thank you in advance.
> >
> > Regards,
> >
> > Jinwoong Yoo
> > UNM
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Jinwoong,
> >
> > If you're running Grid-Stat multiple times via a script, I suggest
using
> an
> > environment variable in your Grid-Stat configuration file. For
> example...
> >
> > setenv CUR_LVL 0
> >
> > And in your Grid-Stat config file, use:
> > = [ "(${CUR_LVL},*,*)" ];
> >
> > Just set that variable in your script that calls Grid-Stat and the
MET
> code
> > will substitute in the value. Supporting environment variables in
the
> > config files makes scripting up calls to the MET tools much
easier.
> >
> > Thanks,
> > John
> >
> > On Wed, Oct 15, 2014 at 10:59 AM, Jinwoong Yoo via RT
<met_help at ucar.edu
> >
> > wrote:
> >
> >
>
>
------------------------------------------------
More information about the Met_help
mailing list