[Met_help] [rt.rap.ucar.edu #73158] History for GRIB1 Table Modification for Point Stat Analysis

John Halley Gotway via RT met_help at ucar.edu
Fri Aug 28 09:30:44 MDT 2015


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

Hi, 

I've recently installed the Model Evaluation Tools (MET) Version 5.0. I'm looking to modify the provided GRIB1 Table (nceptab_flat.txt) to include Altimeter Setting, a variable provided in all METAR reports. I'd like to compare METAR Altimeter Setting to Altimeter Setting forecasts from WRF. I've modifed the "nceptab_flat.txt" replacing the second GRIB1 code, abbreviation: "PRMSL", with "ALTS" for altimeter setting. I've chosen to replace the 2nd GRIB1 code (PRMSL) with "ALTS" since both are approximations of sea-level pressure and thus would be expected to have the same GRIB Level (MSL). I've successfully modified the madis2nc source code to extract altimeter setting from MADIS NetCDF files when formatting the files for ingestion into the Point Stat tool. The issue is after recompiling and modifying "nceptab_flat.txt" the point stat tool fails to recognize the new GRIB1 abbreviation for Altimeter Setting (see the error code below):

*** Running Point-Stat on sample NAM data ***
DEBUG 1: Default Config File: /home/disk/p/cmcnich/.local/share/met/config/PointStatConfig_default
DEBUG 1: User Config File: config/PointStatConfig
ERROR  : 
ERROR  : VarInfoGrib::set_dict() - unrecognized GRIB1 field abbreviation 'ALTS' for table version 2
ERROR  : 

After looking through the source code I was left with the impression that the Point Stat tool reads the GRIB1 file at run-time. If my hypothesis is correct then I'm unsure as to why my modification of the GRIB1 table has not been picked up by the point stat code. My question is, is there a specific .cc or .h file I should modify to include a new GRIB1 variable (Altimeter Setting) or am I incorrectly modifying the GRIB1 table? If adjusting the GRIB1 table is misguided, is there a recommended way of adding to the list of model variables that are identifiable to the point stat tool?

Thank you, 

Conor Mc Nicholas
Graduate Research Assistant 
Dept. Atmospheric Sciences
University of Washington 




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

Subject: GRIB1 Table Modification for Point Stat Analysis
From: John Halley Gotway
Time: Thu Aug 27 14:32:03 2015

Conor,

Yes, you are correct, the MET tools read nceptab_flag.txt at run time.
However, they read it from the installation directory... not the
source
code directory.  When you compiled MET, you likely used the "--prefix"
option to specify where the tools should be installed.  I almost
always
install the tools in the same directory as the code itself.  For
example,
here's the configure command I often run:

cd met-5.0
./configure --prefix=`pwd` --enable-grib2 (and whatever other options)
make install

Running "make install" puts the compiled binaries into PREFIX/bin and
the
data needed at runtime into PREFIX/share/met, where PREFIX is what you
set
with the configure command.

So perhaps you modified the wrong version of the nceptab_flat.txt
file.  If
you set --prefix as I did in my example above, you'll find 2 copies of
that
file:
  (1) met-5.0/data/table_files/nceptab_flat.txt
  (2) met-5.0/share/met/table_files/nceptab_flat.txt

During the "make install" process, (1) is copied over to (2).  And
it's (2)
that is read at runtime.

You could either edit both copies or just edit (1) and then rerun
"make
install".

If that doesn't solve your issue, feel free to send me a sample GRIB
file
and I'll take a look.  Here are instructions for posting data to our
anonymous ftp site:
   http://www.dtcenter.org/met/users/support/met_help.php#ftp

Thanks,
John Halley Gotway
met_help at ucar.edu

On Wed, Aug 26, 2015 at 9:03 PM, cmcnich at u.washington.edu via RT <
met_help at ucar.edu> wrote:

>
> Wed Aug 26 21:03:04 2015: Request 73158 was acted upon.
> Transaction: Ticket created by cmcnich at u.washington.edu
>        Queue: met_help
>      Subject: GRIB1 Table Modification for Point Stat Analysis
>        Owner: Nobody
>   Requestors: cmcnich at u.washington.edu
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=73158 >
>
>
> Hi,
>
> I've recently installed the Model Evaluation Tools (MET) Version
5.0. I'm
> looking to modify the provided GRIB1 Table (nceptab_flat.txt) to
include
> Altimeter Setting, a variable provided in all METAR reports. I'd
like to
> compare METAR Altimeter Setting to Altimeter Setting forecasts from
WRF.
> I've modifed the "nceptab_flat.txt" replacing the second GRIB1 code,
> abbreviation: "PRMSL", with "ALTS" for altimeter setting. I've
chosen to
> replace the 2nd GRIB1 code (PRMSL) with "ALTS" since both are
> approximations of sea-level pressure and thus would be expected to
have the
> same GRIB Level (MSL). I've successfully modified the madis2nc
source code
> to extract altimeter setting from MADIS NetCDF files when formatting
the
> files for ingestion into the Point Stat tool. The issue is after
> recompiling and modifying "nceptab_flat.txt" the point stat tool
fails to
> recognize the new GRIB1 abbreviation for Altimeter Setting (see the
error
> code below):
>
> *** Running Point-Stat on sample NAM data ***
> DEBUG 1: Default Config File:
> /home/disk/p/cmcnich/.local/share/met/config/PointStatConfig_default
> DEBUG 1: User Config File: config/PointStatConfig
> ERROR  :
> ERROR  : VarInfoGrib::set_dict() - unrecognized GRIB1 field
abbreviation
> 'ALTS' for table version 2
> ERROR  :
>
> After looking through the source code I was left with the impression
that
> the Point Stat tool reads the GRIB1 file at run-time. If my
hypothesis is
> correct then I'm unsure as to why my modification of the GRIB1 table
has
> not been picked up by the point stat code. My question is, is there
a
> specific .cc or .h file I should modify to include a new GRIB1
variable
> (Altimeter Setting) or am I incorrectly modifying the GRIB1 table?
If
> adjusting the GRIB1 table is misguided, is there a recommended way
of
> adding to the list of model variables that are identifiable to the
point
> stat tool?
>
> Thank you,
>
> Conor Mc Nicholas
> Graduate Research Assistant
> Dept. Atmospheric Sciences
> University of Washington
>
>
>
>

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #73158] GRIB1 Table Modification for Point Stat Analysis
From: cmcnich at u.washington.edu
Time: Thu Aug 27 16:52:45 2015

Hi John,

Thanks for the speedy reply. Following your advice I managed to solve
the issue by simply modifying the nceptab_flat.txt file in the install
directory.

Best regards,

Conor Mc Nicholas
Graduate Research Assistant
Dept. Atmospheric Sciences
University of Washington



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


More information about the Met_help mailing list