Docstoc

GRIB2 installation

Document Sample
GRIB2 installation Powered By Docstoc
					  Geostationary Operational Environmental Satellite (GOES) Sounder
                      Gridded Cloud Products

                           Compilation and Installation Procedures
                                           September 19, 2006

The formal documentation works from the assumption that the entire Merged Sounder Products System
(MSPS) (ASOS, Soundings and Derived Product Imagery) is being installed from a tape back-up. That is
not the case with this hand-off. Only those portions new to the GRIB2 encoding process, as well as current
MSPS software requiring modification are being passed. As such, this document is being provided in
addition to the formal documentation in order to provide for a smoother implementation of the GRIB2
encoding process into the operational MSPS.

The GRIB2 encoding process requires a number of GRIB2 support libraries. There is also an application,
„copygb2‟, that is used to convert the 10km GRIB2 file to the RTMA GRIB2 5km product file (for
distribution to the NWS Telecommunication Gateway). These application libraries are, in a sense, similar
to the „core‟ McIDAS software used with local McIDAS applications. There should be no reason to modify
or work with these modules beyond simply compiling them properly. Much of this document will focus on
compiling these support libraries and building these applications („grib2‟, „grib2RTMA‟, and „copygb2‟).


Software and Documentation
All of the necessary software and documentation for the installation of the system can be found on the
STAR anon-ftp server in: ftp://www.orbit.nesdis.noaa.gov/pub/smcd/opdb/goes/gscp/OSDPD. What
follows is a listing of what‟s in this directory and the steps to take to implement this within the MSPS.

Contents of ftp://www.orbit.nesdis.noaa.gov/pub/smcd/opdb/goes/gscp/OSDPD:

         makegrib2.css -                      GRIB2 encoding driver script. This script handles all the
                                              processing steps required to make the GRIB2 files.
         axform-gscp.pgm -                    McIDAS module used to create a set of binary data from a
                                              source AREA to be used for the 10km resolution GRIB2
                                              conversion.
         axform-gscp-RTMA.pgm -               McIDAS module used to create a set of binary data from the
                                              source AREA to be used for the 5km resolution RTMA
                                              GRIB2 conversion
         compilegscp -                        Compiles the axform-gscp modules (this could certainly be
                                              folded into the overall MSPS compile script).
         newsound.mac -                       Existing MSPS processing macro modified to submit the
                                              GRIB2 encoding processing script „makegrib2.css.‟

         satgrib2.tar -                       Tarball containing all of the GRIB2 encoding source code and
                                              supporting GRIB2 libraries.
         copygb2.tar -                        Tarball containing all of the „copygb2‟ source code and
                                              supporting „copygb2‟ libraries.
         g95-x86-linux.tgz -                  Tarball containing the GNU g95 compiler required to compile
                                              the „copygb2‟ executable.

         GSCPSTAT -                           Copy of System Status log file
         cleanstatfile.css -                  Utility scheduled via cron to periodically cleanout the
                                              GSCPSTAT file
         clnmax -                             Utility scheduled via cron to periodically delete old log files

         /canned_data -                       Directory containing a canned data set and STAR output for a
                                             single run for testing and comparison runs.


Installation and Compilation
GRIB2/COPYGB2
To begin the installation, copy the following tarball files to the $HOME directory on the MSPS system
workstation/account:
                            satgrib2.tar
                            copygb2.tar
                            g95-x86-linux.tgz

We now need to unpack each file by running the tar command. Do this by typing:

                 tar –xvf satgrib2.tar
                 tar –xvf copygb2.tar
                 tar -zxvf g95-x86-linux.tgz

There should now be three new directories in $HOME, namely,

                 $HOME/copygb2
                 $HOME/satgrib2
                 $HOME/ g95-install

The procedure, then, to compile the software is to run the various configure and “make” commands for
each component of the system (GRIB2 and copygb2). First, however, we need to make sure a couple of
things are in place.
                   1) Create a softlink to the „g95‟ compiler in $HOME/mcidas/bin by typing the
                      following:
                                    ln -s $HOME/g95-install/bin/*g95* ~/mcidas/bin/g95

                 2) Ensure that the JPEG and PNG libraries have been installed at the system level. IT
                    support personnel will need to perform this task and should be aware of how to
                    install these libraries, if they are not already resident on the system.


What follows is a detailed description of the configure and make process for „grib2‟ and „copygb2‟.

        GRIB2 ‘make’
        To build the two GRIB2 executables requires that a number of supporting libraries be compiled
        first. This is done by going into each subdirectory and running the individual makefiles as
        described below. Note: Many of the makefiles refer to system specific directory structures for the
        f90 compiler, as well as references to other libraries. These makefiles will have to be edited to
        reflect the MSPS directory structure.

        Change directory to the ~/satgrib2/src directory. An „ls‟ in this directory will display the various
        subdirectories to compile (shown below).

                                    grib2lib
                                    jpeg2000
                                    libpng
                                    satgrib2
                                    zlib

                 a)       Change directory to ~/satgrib2/src/zlib
                                      o Modify any system specific directory references within the
                                    makefile to reflect the MSPS system structure.
                                o   Type: „make clean‟ to remove the old object files.
                                o   Type: „configure‟
                                o   Type: „make –f Makefile‟

         b)       Change directory to ~/satgrib2/src/libpng
                               Modify any system specific directory references within the
                                   makefile to reflect the MSPS system structure.
                               Type: „make clean‟ to remove the old object files.
                               Type: „make –f makefile‟

         c)       Change directory to ~/satgrib2/src/jpeg2000
                               Modify any system specific directory references within the
                                   makefile to reflect the MSPS system structure.
                               Type: „make clean‟ to remove the old object files.
                               Type: „configure‟
                               Type: „make –f Makefile‟

         d)       Change directory to ~/satgrib2/src/grib2lib
                               Modify any system specific directory references within the
                                   makefile to reflect the MSPS system structure.
                               Type: „rm libgrib2.a‟
                               Type: „make –f makefile.linux‟

         e)       Change directory to ~/satgrib2/src/satgrib2. This is the main source code to
                  create the two executables „grib2‟ and „grib2RTMA‟.
                                 Modify any system specific directory references within the
                                    makefile to reflect the MSPS system structure.
                                 Modify line 44 in BOTH of the modules „driver_satellite.f‟
                                    and „driver_satelliteRTMA.f‟ to reflect the MSPS directory
                                    structure.
                                 Type: „rm *.o‟ to remove the old object files.
                                 Type: „make –f makefile.linux‟
                                 Type „make –f makefile.linuxRTMA‟
                                 Copy the two GRIB2 executables to the ~/mcidas/data
                                    directory:         „
                                             „cp grib2 ~/mcidas/data‟
                                             „cp grib2RTMA ~/mcidas/data‟


COPYGB2 ‘make’
Building the copygb2 executable requires essentially the same process as performed for GRIB2.
As such, a number of supporting libraries must be compiled first. Again, this is done by going into
each subdirectory and running the individual makefiles as described below. Also, as with the
GRIB2 „make‟, many of the makefiles refer to system specific directory structures for the
compiler, as well as in references to other libraries. These makefiles will have to be edited to
reflect the MSPS directory structure.

Change directory to the ~/copygb2 directory. An „ls‟ in this directory will display the various
subdirectories to compile (shown below).

                           copygb2
                           g2lib-1.0.7.1
                           iplib
                           jasper-1.700.2
                                    splib
                                    w3lib-1.0

                  a)       Change directory to ~/copygb2/w3lib-1.0
                                        Modify any system specific directory references within the
                                            makefile to reflect the MSPS system structure.
                                        Type: „make clean‟ to remove the old object files.
                                        Type: „make –f Makefile‟

                  b)       Change directory to ~/copygb2/splib
                                        Modify any system specific directory references within the
                                            makefile to reflect the MSPS system structure.
                                        Type: „make –f makefile‟

                  c)       Change directory to ~/copygb2/jasper-1.700.2
                                        Modify any system specific directory references within the
                                            makefile to reflect the MSPS system structure.
                                        Type: „make clean‟ to remove the old object files.
                                        Type: „configure‟
                                        Type: „make –f Makefile‟

                  d)       Change directory to ~/copygb2/iplib
                                        Modify any system specific directory references within the
                                            makefile to reflect the MSPS system structure.
                                        Type: „make –f makefile‟

                  e)       Change directory to ~/copygb2/g2lib-1.0.7.1
                                        Modify any system specific directory references within the
                                            makefile to reflect the MSPS system structure.
                                        Type: „rm libg2.a‟
                                        Type: „make –f makefile‟

                  f)       Change directory to ~/copygb2/copygb2/src. This is the main source code to
                           create the executable „copygb2‟.
                                          Modify any system specific directory references within the
                                             makefile to reflect the MSPS system structure.
                                          Type: „make clean‟ to remove the old object files.
                                          Type: „make –f makefile‟
                                          Copy the copygb2 executable to the ~/mcidas/data directory:
                                                      „cp copygb2 ~/mcidas/data‟



McIDAS SOURCE CODE COMPILE AND SCRIPTS

AXFORM-GSCP.PGM / AXFORM-GSCP-RTMA.PGM
The next step is to compile the two new McIDAS modules used in the GRIB2 encoding process.

    1.   Copy both files (axform-gscp.pgm and axform-gscp-RTMA.pgm) from the anonftp directory to
         ~/mcidas/src.

    2.   Within each file there are references to OPEN various header files. These references will need to
         be edited to reflect the MSPS directory structure. The easiest way to do this is to search on the
         character string „ggray‟ and make the necessary modifications to those lines of code in BOTH
         files.
    3.   Once this is done, type the command „compilegscp‟ in ~/mcidas/src to compile the modules.

NEWSOUND.MAC
The submission of the GRIB2 encoding process is handled by the existing NEWSOUND.MAC macro. The
shell script „makegrib2.css‟ is submitted from the macro as soon as the last GOES-West DPI image is
generated.

                  1) Copy the „newsound.mac‟ file from the anonftp directory to ~mcidas/src on the
                     MSPS workstation.
                  2) Edit lines 638 and 639 of the module to reflect the MSPS directory structure
                  3) Compile the macro.

MAKEGRIB2.CSS
Makegrib2.css is the driver script for the entire GRIB2 encoding process. It resides in the ~/mcidas/data
directory where many of the other MSPS processing scripts are kept.

                  1) Copy the file „makegrib2.css‟ from the anonftp directory to ~/mcidas/data.
                  2) Edit the many system specific directory references to reflect the MSPS system
                     architecture.


UTILITIES AND CRONTAB ENTRY
There are two utilities („clnmax‟ and „cleanstatfile.css‟) used to handle cleanup of log files generated by the
GRIB2 encoding process. In order to function properly, they must be placed into a ~/mcidas/logs directory
and entered into the crontab file.

                                1.   Change directory to ~/mcidas
                                2.   Type: „mkdir logs‟
                                3.   Copy the files clnmax, cleanstatfile.css, and GSCPSTAT from the
                                     anonftp directory to the ~/mcidas/logs directory.
                                4.   Edit any references to „ggray‟ within cleanstatfile.css to reflect the
                                     MSPS directory structure.
                                5.   Place the following entries into the MSPS crontab file:

                  # Clean up detailed GRIB encoding logs (keeping ~1 weeks worth)
                  58 23 * * 0 $HOME/mcidas/logs/clnmax -d 168 $HOME/mcidas/logs gscplog 1>
                  $HOME/mcidas/logs/cleanlogs.out 2>&1

                  # Clean out GRIB2 System Status File GSCPSTAT (keeping ~1 months worth of
                  entries)
                  0 0 1 1,3,5,7,9,11 * $HOME/mcidas/logs/cleanstatfile.css
                  $HOME/mcidas/logs/GSCPSTAT



NDFD GRIB2 DECODER
Once the system is installed it will be helpful to be able to compare output between OSDPD and STAR. To
do this it will be necessary to be able to decode the GRIB2 files. The Meteorological Development
Laboratory (MDL) has created a driver for the GRIB2 library. The driver, known as "degrib" (aka "NDFD
GRIB2 decoder"), is able to convert from GRIB2 to selected file formats such as ESRI shapefiles (.shp),
ASCII comma separated files (.csv), NetCDF files, and binary float files (.flt) (useful in conjunction with
GrADS or ESRI Spatial Analyst). This is one option for viewing the files. It‟s a fairly simple GUI program
(tkdegrib.exe) to use and the web site has a complete tutorial.

To view more information about degrib, go to:
http://www.weather.gov/mdl/NDFD_GRIB2Decoder/index.php.

View the „How to Install‟ page and „Tutorial‟ page for detailed descriptions.

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:7
posted:11/2/2011
language:English
pages:5