[Met_help] [rt.rap.ucar.edu #56641] History for set the path to the default config in MET?

Randy Bullock via RT met_help at ucar.edu
Tue Apr 14 10:37:27 MDT 2015


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

Dear MET Help,

I am running MET-3.1-x86_64 on Slackware64-13.37 with kernel 2.6.38.4. 
MET runs all right, but I have the following issue. When I execute, e.g 
the grid_stat tool, it complains:

DEBUG 1: Default Config File: 
/home/marto/build/tmp/MET-3.1/data/config/GridStatConfig_default
DEBUG 1: User Config File: tutorial/config/GridStatConfig_APCP_12
ERROR  :
ERROR  : Machine::read() -> unable to open input file 
"/home/marto/build/tmp/MET-3.1/data/config/GridStatConfig_def

So it looks for the default config file in the directory where MET was 
compiled, but it of course no longer exists because I have packaged MET 
so that on my system the /data/ directory resides in /etc/MET. If I make 
a symlink to the GridStatConfig_def as MET expects, it runs ok.

My question is, *how could I tell MET to look  for the default config in 
/etc/MET instead of in its build directory?*

I already tried setting MET_BASE both via the command line and in the 
User Config File, but of no avail: the default config is still looked 
for in the build directory /home/marto/build/tmp/MET-3.1.

I thank You for providing MET. I am looking forward to Your reply.

Best regards,

-- 
Dr. Martin Ivanov
Eberhard-Karls-Universität Tübingen
Mathematisch-Naturwissenschaftliche Fakultät
Fachbereich Geowissenschaften
Water&  Earth System Science (WESS)
Keplerstraße 17, 72074 Tübingen, Deutschland
Tel. +4970712975023



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

Subject: Re: [rt.rap.ucar.edu #56641] set the path to the default config in MET?
From: Randy Bullock
Time: Tue May 29 10:11:01 2012


Hello -

Thanks for your met-help question.

The good news is that I've tracked down the source
of your problem.  The bad news is that I don't have
a quick fix for you.

The source of the difficulty is that the environment
variable "MET_BASE" that MET uses when it's looking
for config files (and other things) is fixed at compile
time.  That's why setting a new value for MET_BASE on
the command line didn't work.  In order for a new
value of MET_BASE to take effect, you'd have to
recompile the MET code.

For what it's worth, I've discussed this with the
other MET developers and we've agreed to change
this in future releases of MET so that any environment
variables that the MET tools might need will be looked
up at run time, rather than being frozen at compile time.

In the meantime, the symlink trick you described in
your email looks like a fairly decent workaround.
Sorry I don't have a better answer for you.

Randy Bullock



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


More information about the Met_help mailing list