noaaport team mailing list archive
-
noaaport team
-
Mailing list archive
-
Message #00003
[Bug 984489] [NEW] Cannot override gribfilter.init function that sets the default grib files names
Public bug reported:
I put this in /usr/local/etc/nbsp/site/g
ribfilter.conf
rename gribfilter_make_default_name gribfilter_make_default_name.orig
proc gribfilter_make_default_name {rc_array_name f_flag {modelname ""}} {
#
# "modelname" is put as an argument because some rules use a special
# value. If f_flag is 1, the forecast time is included in the name;
# otherwise it is not.
#
upvar 1 $rc_array_name rc;
if {$modelname eq ""} {
set modelname $rc(gribmodel);
}
set fname "";
append fname $modelname "_" $rc(gribgrid) "_" $rc(gribymdh);
if {$f_flag == 1} {
append fname "_" [format "%03d" $rc(gribforecasttime)];
}
append fname [gribfilter_make_default_ext $rc(gribedition)];
return $fname;
}
And I get an error saying
can't rename "gribfilter_make_default_name": command doesn't exist
while executing
"rename gribfilter_make_default_name gribfilter_make_default_name.orig"
(file "/usr/local/etc/nbsp/site/gribfilter.conf" line 1)
invoked from within
"source ${_localconfname}"
("foreach" body line 4)
invoked from within
"foreach _d $gribfilter(localconfdirs) {
set _localconfname ${_d}/${_confname}
if {[file exists ${_localconfname}] == 1} {
source ${_lo..."
(file "/usr/local/etc/nbsp/gribfilter.conf" line 112)
invoked from within
"source $gribfilter(conf)"
invoked from within
"if {[file exists $gribfilter(conf)] == 1} {
source $gribfilter(conf);
}"
(file "/usr/local/libexec/nbsp/gribfilter.init" line 59)
invoked from within
"source $grib_init_file"
(file "/usr/local/libexec/nbsp/gribfilter" line 36)
So i edited the /usr/local/libexec/nbsp/gribfilter.init and changed the
line to
if {$f_flag == 1} {
append fname "_" [format "%03d" $rc(gribforecasttime)];
}
and now nothing shows up in data/grib/data/grb but all the files do show up
in data/grib/data/grids
I tried "%03f" but still no data in data/grib/data/grb.
On Mon, Apr 16, 2012 at 4:17 PM, Jose F Nieves <nieves@xxxxxxxxxxxxx>
wrote:
> Jason
>
> In this portion
>
> if {$f_flag == 1} {
> append fname "_" $rc(gribforecasttime);
> }
>
>
> replace the statement on the middle by the following
>
> append fname "_" [format "%03d" $rc(gribforecasttime)];
>
> That will give you things like
>
> 00n
> 0mn
>
> Jose
>
>
>
--
Jason Brooks
KE5FSE
** Affects: nbsp
Importance: High
Assignee: Jose F Nieves (nieves)
Status: Confirmed
** Changed in: nbsp
Assignee: (unassigned) => Jose F Nieves (nieves)
** Changed in: nbsp
Status: New => Confirmed
** Changed in: nbsp
Importance: Low => High
--
You received this bug notification because you are a member of Noaaport,
which is the registrant for Nbsp.
https://bugs.launchpad.net/bugs/984489
Title:
Cannot override gribfilter.init function that sets the default grib
files names
Status in Noaaport Broadcast System Processor:
Confirmed
Bug description:
I put this in /usr/local/etc/nbsp/site/g
ribfilter.conf
rename gribfilter_make_default_name gribfilter_make_default_name.orig
proc gribfilter_make_default_name {rc_array_name f_flag {modelname ""}} {
#
# "modelname" is put as an argument because some rules use a special
# value. If f_flag is 1, the forecast time is included in the name;
# otherwise it is not.
#
upvar 1 $rc_array_name rc;
if {$modelname eq ""} {
set modelname $rc(gribmodel);
}
set fname "";
append fname $modelname "_" $rc(gribgrid) "_" $rc(gribymdh);
if {$f_flag == 1} {
append fname "_" [format "%03d" $rc(gribforecasttime)];
}
append fname [gribfilter_make_default_ext $rc(gribedition)];
return $fname;
}
And I get an error saying
can't rename "gribfilter_make_default_name": command doesn't exist
while executing
"rename gribfilter_make_default_name gribfilter_make_default_name.orig"
(file "/usr/local/etc/nbsp/site/gribfilter.conf" line 1)
invoked from within
"source ${_localconfname}"
("foreach" body line 4)
invoked from within
"foreach _d $gribfilter(localconfdirs) {
set _localconfname ${_d}/${_confname}
if {[file exists ${_localconfname}] == 1} {
source ${_lo..."
(file "/usr/local/etc/nbsp/gribfilter.conf" line 112)
invoked from within
"source $gribfilter(conf)"
invoked from within
"if {[file exists $gribfilter(conf)] == 1} {
source $gribfilter(conf);
}"
(file "/usr/local/libexec/nbsp/gribfilter.init" line 59)
invoked from within
"source $grib_init_file"
(file "/usr/local/libexec/nbsp/gribfilter" line 36)
So i edited the /usr/local/libexec/nbsp/gribfilter.init and changed the
line to
if {$f_flag == 1} {
append fname "_" [format "%03d" $rc(gribforecasttime)];
}
and now nothing shows up in data/grib/data/grb but all the files do show up
in data/grib/data/grids
I tried "%03f" but still no data in data/grib/data/grb.
On Mon, Apr 16, 2012 at 4:17 PM, Jose F Nieves <nieves@xxxxxxxxxxxxx>
wrote:
> Jason
>
> In this portion
>
> if {$f_flag == 1} {
> append fname "_" $rc(gribforecasttime);
> }
>
>
> replace the statement on the middle by the following
>
> append fname "_" [format "%03d" $rc(gribforecasttime)];
>
> That will give you things like
>
> 00n
> 0mn
>
> Jose
>
>
>
--
Jason Brooks
KE5FSE
To manage notifications about this bug go to:
https://bugs.launchpad.net/nbsp/+bug/984489/+subscriptions
Follow ups
References