awips2/docs/gempak.html
2017-02-07 17:52:57 -06:00

434 lines
20 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html itemscope itemtype="http://schema.org/Organization">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1">
<meta name="google-site-verification" content="k0e8DrbD40s54xHNBqwIsRrSSAkZoprwtEYDnNY06bU" />
<meta name="google-site-verification" content="pnjjbQFvjPwaWhEXY6nSyaS9iyghmH-M_yLHBveDX2M">
<meta itemprop="name" content="Unidata AWIPS User Manual - GEMPAK and AWIPS">
<meta itemprop="description" content="Polymer is a library that uses the latest web technologies to let you create custom HTML elements. Build anything from a button to a complete application as an encapsulated, reusable element that works across desktop and mobile.">
<meta itemprop="image" content="https://www.polymer-project.org/images/instacod.png">
<title>
GEMPAK and AWIPS -
Unidata AWIPS User Manual
</title>
<link rel="publisher" href="https://plus.google.com/107187849809354688692">
<link rel="shortcut icon" href="http://www.unidata.ucar.edu/favicon.ico">
<link href="//fonts.googleapis.com/css?family=RobotoDraft:300,400,500|Source+Code+Pro:400,500,700" rel="stylesheet">
<link href="/awips2/css/site2.css?20170207" rel="stylesheet">
<link href="/awips2/css/site2_sd_rules.css?20170207" rel="stylesheet" shim-shadowdom>
<script src="/awips2/components/webcomponentsjs/webcomponents.min.js?20170207"></script>
<!-- TODO: remove when https://github.com/Polymer/polymer/issues/391 is fixed -->
<link rel="import" href="/awips2/components/polymer/polymer.html">
<link rel="stylesheet" href="/awips2/css/elements/docs-menu.css">
<link rel="import" href="/awips2/elements/common_elements.vulcanized.html?20170207">
</head>
<body id="gempak-and-awips">
<main id="content-container" class="polymer-content">
<app-drawer id="sidebar" unresolved>
<div layout vertical id="sidebar-content">
<div id="logo-container" layout horizontal center>
<a href="/awips2/" class="logo"><img style="width:200px;" src="/awips2/images/logos/awips2.png" alt="Unidata AWIPS User Guide"></a>
</div>
<docs-menu unresolved flex
baseurl='/awips2'
coreElements='{"core-header-panel":"components/core-header-panel/core-header-panel.html","core-transition-pages":"components/core-animated-pages/transitions/core-transition-pages.html","core-animated-pages":"components/core-animated-pages/core-animated-pages.html","core-overlay":"components/core-overlay/core-overlay.html","core-toolbar":"components/core-toolbar/core-toolbar.html","core-image":"components/core-image/core-image.html","core-shared-lib":"components/core-shared-lib/core-shared-lib.html","core-a11y-keys":"components/core-a11y-keys/core-a11y-keys.html","core-menu-button":"components/core-menu-button/core-menu-button.html","core-icon":"components/core-icon/core-icon.html","core-selection":"components/core-selection/core-selection.html","core-style":"components/core-style/core-style.html","core-menu":"components/core-menu/core-menu.html","core-submenu":"components/core-menu/core-submenu.html","core-list":"components/core-list/core-list.html","core-dropdown-menu":"components/core-dropdown-menu/core-dropdown-menu.html","core-input":"components/core-input/core-input.html","core-iconset-svg":"components/core-iconset-svg/core-iconset-svg.html","core-field":"components/core-field/core-field.html","core-selector":"components/core-selector/core-selector.html","core-media-query":"components/core-media-query/core-media-query.html","core-animation-group":"components/core-animation/core-animation-group.html","core-animation":"components/core-animation/core-animation.html","core-animation-keyframe":"components/core-animation/core-animation.html","core-animation-prop":"components/core-animation/core-animation.html","core-dropdown":"components/core-dropdown/core-dropdown.html","core-dropdown-base":"components/core-dropdown/core-dropdown-base.html","core-pages":"components/core-pages/core-pages.html","core-meta":"components/core-meta/core-meta.html","core-splitter":"components/core-splitter/core-splitter.html","core-scroll-header-panel":"components/core-scroll-header-panel/core-scroll-header-panel.html","core-tooltip":"components/core-tooltip/core-tooltip.html","core-localstorage":"components/core-localstorage/core-localstorage.html","core-scroll-threshold":"components/core-scroll-threshold/core-scroll-threshold.html","core-drag-drop":"components/core-drag-drop/core-drag-drop.html","core-iconset":"components/core-iconset/core-iconset.html","core-label":"components/core-label/core-label.html","core-signals":"components/core-signals/core-signals.html","core-transition":"components/core-transition/core-transition.html","core-scaffold":"components/core-scaffold/core-scaffold.html","core-drawer-panel":"components/core-drawer-panel/core-drawer-panel.html","core-range":"components/core-range/core-range.html","core-collapse":"components/core-collapse/core-collapse.html","core-xhr":"components/core-ajax/core-xhr.html","core-ajax":"components/core-ajax/core-ajax.html","core-icon-button":"components/core-icon-button/core-icon-button.html","core-item":"components/core-item/core-item.html"}'
paperElements='{"paper-dropdown":"components/paper-dropdown/paper-dropdown.html","paper-dropdown-transition":"components/paper-dropdown/paper-dropdown-transition.html","paper-item":"components/paper-item/paper-item.html","paper-dropdown-menu":"components/paper-dropdown-menu/paper-dropdown-menu.html","paper-checkbox":"components/paper-checkbox/paper-checkbox.html","paper-button":"components/paper-button/paper-button.html","paper-button-base":"components/paper-button/paper-button-base.html","paper-menu-button":"components/paper-menu-button/paper-menu-button.html","paper-radio-group":"components/paper-radio-group/paper-radio-group.html","paper-toast":"components/paper-toast/paper-toast.html","paper-char-counter":"components/paper-input/paper-char-counter.html","paper-autogrow-textarea":"components/paper-input/paper-autogrow-textarea.html","paper-input":"components/paper-input/paper-input.html","paper-input-decorator":"components/paper-input/paper-input-decorator.html","paper-slider":"components/paper-slider/paper-slider.html","paper-toggle-button":"components/paper-toggle-button/paper-toggle-button.html","paper-fab":"components/paper-fab/paper-fab.html","paper-ripple":"components/paper-ripple/paper-ripple.html","paper-icon-button":"components/paper-icon-button/paper-icon-button.html","paper-tabs":"components/paper-tabs/paper-tabs.html","paper-tab":"components/paper-tabs/paper-tab.html","paper-shadow":"components/paper-shadow/paper-shadow.html","paper-radio-button":"components/paper-radio-button/paper-radio-button.html","paper-dialog":"components/paper-dialog/paper-dialog.html","paper-action-dialog":"components/paper-dialog/paper-action-dialog.html","paper-dialog-base":"components/paper-dialog/paper-dialog-base.html","paper-dialog-transition":"components/paper-dialog/paper-dialog-transition.html","paper-spinner":"components/paper-spinner/paper-spinner.html","paper-progress":"components/paper-progress/paper-progress.html"}'></docs-menu>
</div>
</app-drawer>
<scroll-area sidebar unresolved class="scrolling">
<site-banner type="guide" shortname="Docs" unresolved>
<app-bar theme="light" class="bar fixed">
</app-bar>
<header class="shrink">
<h1>
GEMPAK and AWIPS
</h1>
</header>
</site-banner>
<article class="show-permalinks">
<header class="onlyonmobile">
<h1>
: GEMPAK and AWIPS
</h1>
</header>
<h1 id="system-python-27">System Python (2.7+)</h1>
<ol>
<li>
<p>Prerequisites</p>
<pre><code> sudo yum install python-devel python-setuptools
sudo /bin/easy_install pip
sudo pip install python-awips numpy
</code></pre>
</li>
<li>
<p>Source <strong>Gemenviron.build</strong></p>
<p>(after youve sourced <strong>Gemenviron.profile</strong>)</p>
<pre><code> cd GEMPAK7
. Gemenviron.build
</code></pre>
</li>
<li>
<p>Confirm Python definitions</p>
<pre><code> env |grep PY
PYDEP=-lpthread -ldl -lutil
PYHOME=/usr
WITHPY=-DWITHPYTHON
PYLIB=-lpython2.7
PYTHONPATH=/usr/lib64/python2.7/site-packages:/usr/lib/python2.7/site-packages:/home/awips/GEMPAK7/scripts/python
PYINC=-I/usr/include/python2.7
</code></pre>
</li>
<li>
<p>Run <code>make all</code> and <code>make install</code> in <strong>GEMPAK7/gempak</strong></p>
<pre><code> cd $NAWIPS
make all 2&gt;&amp;1 | tee -a make.log
make install
</code></pre>
</li>
<li>
<p>Confirm linked Python in the new <code>$OS_BIN</code> executables</p>
<pre><code> ldd $OS_BIN/gdinfo
linux-vdso.so.1 =&gt; (0x00007ffde81f9000)
libpython2.7.so.1.0 =&gt; /usr/lib64/libpython2.7.so.1.0 (0x00007f3168f5e000)
libpthread.so.0 =&gt; /usr/lib64/libpthread.so.0 (0x00007f3168d41000)
libdl.so.2 =&gt; /usr/lib64/libdl.so.2 (0x00007f3168b3d000)
libutil.so.1 =&gt; /usr/lib64/libutil.so.1 (0x00007f316893a000)
libgfortran.so.3 =&gt; /usr/lib64/libgfortran.so.3 (0x00007f3168617000)
libm.so.6 =&gt; /usr/lib64/libm.so.6 (0x00007f3168315000)
libgcc_s.so.1 =&gt; /usr/lib64/libgcc_s.so.1 (0x00007f31680ff000)
libquadmath.so.0 =&gt; /usr/lib64/libquadmath.so.0 (0x00007f3167ec2000)
libc.so.6 =&gt; /usr/lib64/libc.so.6 (0x00007f3167b00000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3169325000)
</code></pre>
</li>
</ol>
<h1 id="awips-python">AWIPS Python</h1>
<ol>
<li>
<p>Install</p>
<p>Install all of the packages in the AWIPS Python group (or the <code>awips2-server</code> or <code>awips2-cave</code> groups) to install AWIPS Python 2.7</p>
<pre><code> sudo yum groupinstall awips2-python
sudo yum install awips2-gempak
</code></pre>
<p>This will install the <code>awips2-python-setuptools</code> package.</p>
</li>
<li>
<p>Source <strong>Gemenviron.profile</strong></p>
<pre><code> cd GEMPAK7
. Gemenviron.profile
</code></pre>
</li>
<li>
<p>Run</p>
<p><code>gdinfo</code></p>
<pre><code> GDFILE = A2GFS20
LSTALL = YES
OUTPUT = T
GDATTIM = LAST
GLEVEL = 500
GVCORD = PRES
GFUNC = T
r
Server = edex-cloud.unidata.ucar.edu
Table = grid
MODEL = GFS20
</code></pre>
</li>
</ol>
<h1 id="centosrhel-7-w-python-27">CentOS/RHEL 7 w Python 2.7</h1>
<h1 id="install-on-centosrhel">Install on CentOS/RHEL</h1>
<pre><code>pip install python-awips numpy
</code></pre>
<h2 id="awips-database-grid-names">AWIPS Database Grid Names</h2>
<p>For <code>GDFILE</code></p>
<ul>
<li><code>A2GFS</code></li>
<li><code>A2GFS20</code></li>
<li><code>A2NAM12</code></li>
<li><code>A2RAP13</code></li>
</ul>
<h3 id="example">Example</h3>
<ul>
<li>
<p><code>gdinfo</code></p>
<pre><code> GDFILE = A2GFS20
LSTALL = YES
OUTPUT = T
GDATTIM = LAST
GLEVEL = 500
GVCORD = PRES
GFUNC = T
r
Requesting from edex.unidata.ucar.edu
Server = edex.unidata.ucar.edu
Table = grid
MODEL = GFS20
</code></pre>
</li>
</ul>
<p>Creating process: gplt for queue 0
Creating process: gif for queue 32769
Requesting from edex-cloud.unidata.ucar.edu
Traceback (most recent call last):
File “/home/awips/GEMPAK7/scripts/python/GridInfoRetriever.py”, line 5, in <module>
from awips import ThriftClient
ImportError: No module named awips
Traceback (most recent call last):
File "/home/awips/GEMPAK7/scripts/python/GridInfoRetriever.py", line 5, in <module>
from awips import ThriftClient
ImportError: No module named awips
Traceback (most recent call last):
File "/home/awips/GEMPAK7/scripts/python/GridNavRetriever.py", line 4, in <module>
from awips import ThriftClient
ImportError: No module named awips
Traceback (most recent call last):
File "/home/awips/GEMPAK7/scripts/python/GridNavRetriever.py", line 4, in <module>
from awips import ThriftClient
ImportError: No module named awips</module></module></module></module></p>
<p>Program received signal SIGSEGV: Segmentation fault - invalid memory reference.</p>
<p>Backtrace for this error:
#0 0x7F740049E467
#1 0x7F740049EAAE
#2 0x7F73FF9A466F
#3 0x458E0E
Segmentation fault
[awips@edex-el7 ~]$</p>
<h1 id="section">#</h1>
<p>Remote AWIPS data retrieval must be built into GEMPAK. The GEMPAK binary is <em>not</em> built against Python due to the potential problem encountered when dynamically linking against libpython2.6.so or libpython2.7.so, but the binary installation can be easily updated with a new source build:</p>
<ol>
<li>
<p>Source <strong>Gemenviron.build</strong></p>
<p>(after youve sourced <strong>Gemenviron.profile</strong>)</p>
<pre><code> cd $NAWIPS
. Gemenviron.build
</code></pre>
</li>
<li>
<p>Confirm Python definitions</p>
<pre><code> env |grep PY
PYDEP=-lpthread -ldl -lutil
PYHOME=/usr
WITHPY=-DWITHPYTHON
PYLIB=-lpython2.6
PYTHONPATH=/usr/lib64/python2.6/site-packages:/usr/lib/python2.6/site-packages:/home/awips/GEMPAK7/scripts/python
PYINC=-I/usr/include/python2.6
</code></pre>
<p>Example shows CentOS/RHEL 6 using Python 2.6.</p>
</li>
<li>
<p>Run <code>make all</code> and <code>make install</code> in <strong>GEMPAK7/gempak</strong></p>
<pre><code> cd $NAWIPS
make all 2&gt;&amp;1 | tee -a make.log
make install
</code></pre>
</li>
<li>
<p>Confirm linked Python in the new <code>$OS_BIN</code> executables</p>
<pre><code> ldd $OS_BIN/gdinfo
linux-vdso.so.1 =&gt; (0x00007fffc8be5000)
libpython2.6.so.1.0 =&gt; /usr/lib64/libpython2.6.so.1.0 (0x0000003b68200000)
libpthread.so.0 =&gt; /lib64/libpthread.so.0 (0x0000003b5ce00000)
libdl.so.2 =&gt; /lib64/libdl.so.2 (0x0000003b5d200000)
libutil.so.1 =&gt; /lib64/libutil.so.1 (0x0000003b6ba00000)
libgfortran.so.3 =&gt; /usr/lib64/libgfortran.so.3 (0x00007ff7ef266000)
libm.so.6 =&gt; /lib64/libm.so.6 (0x0000003b5ca00000)
libgcc_s.so.1 =&gt; /lib64/libgcc_s.so.1 (0x0000003b66600000)
libc.so.6 =&gt; /lib64/libc.so.6 (0x0000003b5c600000)
/lib64/ld-linux-x86-64.so.2 (0x0000003b5c200000)
</code></pre>
</li>
</ol>
<h1 id="install-with-awips">Install with AWIPS</h1>
<p>GEMPAK 7.3.1 includes a bundled libpython2.7.so.1.0, which many programs link against (for example, see <code>ldd $OS_BIN/gdinfo</code>), and this library is required for these program to run, but <em>AWIPS python is not required unless you request A2 data sources</em>. Making a request for <code>GDFILE = A2NAM12</code>, for example, results in the following error:</p>
<pre><code>Requesting from edex.unidata.ucar.edu
Could not find platform independent libraries &lt;prefix&gt;
Could not find platform dependent libraries &lt;exec_prefix&gt;
Consider setting $PYTHONHOME to &lt;prefix&gt;[:&lt;exec_prefix&gt;]
ImportError: No module named site
</code></pre>
<p>While <code>GDFILE = GFS</code> (which resolves to $GEMDATA/model) would run as expected on a local data file.</p>
<p>As part of the migration from NAWIPS to AWIPS (II), the users will no longer have GEMPAK data management files created for use in operations. All data will be retrieved from the AWIPS database.</p>
<p>The changes in v7.0.0 only apply to applications that read data. Any of the programs that write
data to GEMPAK files will not write to the A2DB. The following is a list of the applications that
may access the A2DB:
● Surface (SF)
○ SFGRAM - plot meteorograms
○ SFL604/SFLIST - list surface observations in different tabular formats
○ SFMAP - plot surface observations on a map
● Sounding (SN) [Upper Air]
○ SNCROSS - plot a spatial or temporal cross-section
○ SNHODO - plot a hodograph
○ SNLIST - list the upper air observations
○ SNMAP - plot upper air observations on a map
○ SNPROF - plot a sounding profile/SKEW-T
○ SNTSER - plot a time series of an upper air data parameter
● Grid (GD)
○ GDCNTR - plot contours on a map
○ GDCROSS - plot a spatial cross-section
○ GDLIST - list grid point data
○ GDMAP - plot grid point values on a map
○ GDPLOT/GDPLOT2/GDPLOT3 - plot contours, vectors, point data, streamlines
as appropriate for the type of data
○ GDPROF - plot a sounding profile/SKEW-T at a grid point
○ GDSTREAM - plot streamlines on a map
○ GDTHGT - plot a temporal cross-section
○ GDTSER - plot a time series at a grid point
○ GDWIND - plot vectors on a map</p>
<p>Adding or Modifying a Data Set
In order to access data from the A2DB, use the standard SFFILE, SNFILE and GDFILE
application parameters. These parameters allow the use of aliases to represent files or
collections of files. This functionality has been extended to reference the control files, which
define the attributes for connecting to, and reading from, the A2DB. The aliases are defined in
$GEMTBL/config/datatype.tbl. For a new entry in the DataType table, most of the values can
be copied from a corresponding entry that references an actual directory and file. The
differences are in the PATH and FILE TEMPLATE. The path will always be AWIPSDB and the file
will be the name of the control file. All of the control files reside in $GEMTBL/data-access. For
example, the entry for METAR data from the A2DB begins with:
A2METAR AWIPSDB metar.xml ………
The remainder of the line is identical to the regular METAR alias.
After adding a new entry in the DataType table, the XML control file must be created. The control
file equates the A2DB meta information to the required GEMPAK information for defining the
contents of a “data file”. GEMPAK Surface, Sounding and Grid files have header values that
identify the type of file and how to read the subsequent data. The control file is configured to
specify the Python scripts that will request the appropriate header information and how that
information is returned to the GEMPAK applications.
At present, adding new point data types requires some knowledge of the contents of the A2DB in
order to configure the list of data fields.
Adding new grid data sets is much easier, but does require the name of the grid data in the
A2DB. For example, the GFS model is stored as “GFS230” and the NAM model is stored as
“nam”. Note that one is uppercase and one is lowercase.
Until a utility can be written to provide the required information, please see your local AWIPS
Administrator to help gather this information.</p>
<p>Suggested Installation for the AWIPS Environment
The following configuration is used on NTBN, OPCN and HPCN. It allows for easy updating, but
does require a separate user account to store the NAWIPS/GEMPAK tables, libraries and
binaries.
1. If it does not exist, create a user account named “gempak”. Log into the “gempak”
account.
2. Get the source tar file from the download web site above and transfer it to the AWIPS
system.
3. Sample .cshrc and .profile files may also be found on the download site.
4. Make a directory for the current release (i.e., mkdir v7.0.0) in $HOME.
5. Go to the release directory and unpack the source tar file.
6. Follow the build instructions above.
The current data flow paradigm for the AWIPS does not provide for creating or transferring
GEMPAK files to the AWIPS system. Therefore, all of the data-related environment variables will
not be used. Any data access, while on an AWIPS system, will be through the database. Sample
entries for the data types are in $GEMTBL/config/datatype.tbl and the XML control files are in
$GEMTBL/data-access/*.xml.</p>
</article>
<footer>
<div>
<div class="links">
<a href="https://www.facebook.com/unidata" title="Unidata on Facebook" tabindex="-1"><paper-button><core-icon icon="social:post-facebook"></core-icon>Facebook</paper-button></a>
<a href="https://twitter.com/intent/follow?screen_name=unidata" data-twitter-follow title="Follow @Unidata on Twitter" tabindex="-1"><paper-button><core-icon icon="social:post-twitter"></core-icon>Twitter</paper-button></a>
<a href="https://github.com/Unidata/awips2"><paper-button class="github" tabindex="-1"><core-icon icon="social:post-github"></core-icon>GitHub</paper-button></a>
<a href="https://github.com/Unidata/awips2/issues/new" tabindex="-1"><paper-button><core-icon icon="bug-report"></core-icon>File a bug</paper-button></a>
</div>
</div>
</footer>
<script src="/awips2/js/prettify/prettify.js"></script>
<!-- <script src="/awips2/js/bower_components/smoothscroll/smoothscroll.js"></script> -->
<script src="/awips2/js/app.js?20170207"></script>
</scroll-area>
</main>
</body>
</html>