awips2/edex/new-grid-grib1-old/index.html
2023-05-03 16:57:50 +00:00

1170 lines
No EOL
35 KiB
HTML

<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="Documentation for all things AWIPS.">
<link rel="canonical" href="http://unidata.github.io/awips2/edex/new-grid-grib1-old/">
<meta name="author" content="support-awips@unidata.ucar.edu">
<link rel="shortcut icon" href="../../images/favicon.ico">
<meta name="generator" content="mkdocs-1.4.3, mkdocs-unidata-2.0.3">
<title>Ingest a New Grid Using .grib Files - Unidata AWIPS User Manual</title>
<script src="../../assets/javascripts/modernizr-e826f8942a.js"></script>
<link rel="stylesheet" href="../../assets/stylesheets/application-37fa87ea8f.css">
<link rel="stylesheet" href="../../assets/stylesheets/application-624922a329.palette.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono">
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="../../css/extra.css">
</head>
<body data-md-color-primary="blue-grey" data-md-color-accent="light-blue">
<svg class="md-svg">
<defs>
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="drawer">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="search">
<label class="md-overlay" data-md-component="overlay" for="drawer"></label>
<header class="md-header" data-md-component="header">
<a href="../..">
<div class="background-logo" style="background-image:url('../../images/cave.png');background-repeat:no-repeat;height:107px">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="http://unidata.github.io/awips2/" title="Unidata AWIPS User Manual" class="md-header-nav__button md-logo">
<img src="../../images/home.png" width="24" height="24">
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<span class="md-flex__ellipsis md-header-nav__title">
Ingest a New Grid Using .grib Files
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="search"></label>
<div class="md-search__inner">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" required placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query">
<label class="md-icon md-search__icon" for="search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset">&#xE5CD;</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result" data-md-lang-search="" data-md-lang-tokenizer="[\s\-]+">
<div class="md-search-result__meta" data-md-lang-result-none="No matching documents" data-md-lang-result-one="1 matching document" data-md-lang-result-other="# matching documents">
Type to start searching
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
<a href="https://github.com/Unidata/awips2" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
</div>
</div>
</nav>
</header>
<div class="md-container">
<main class="md-main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="drawer">
<a href="http://unidata.github.io/awips2/" title="Unidata AWIPS User Manual" class="md-nav__button md-logo">
<img src="../../images/home.png">
</a>
Unidata AWIPS User Manual
</label>
<div class="md-nav__source">
<a href="https://github.com/Unidata/awips2" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../.." title="Home" class="md-nav__link">
Home
</a>
</li>
<li class="md-nav__item">
<a href="../../install/install-cave/" title="Install CAVE" class="md-nav__link">
Install CAVE
</a>
</li>
<li class="md-nav__item">
<a href="../../install/install-edex/" title="Install EDEX" class="md-nav__link">
Install EDEX
</a>
</li>
<li class="md-nav__item">
<a href="../../appendix/common-problems/" title="Common Problems" class="md-nav__link">
Common Problems
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
<label class="md-nav__link" for="nav-5">
CAVE User Manual
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-5">
CAVE User Manual
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../cave/d2d-perspective/" title="D2D Perspective" class="md-nav__link">
D2D Perspective
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/maps-views-projections/" title="Maps, Views, Projections" class="md-nav__link">
Maps, Views, Projections
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/bundles-and-procedures/" title="Displays and Procedures" class="md-nav__link">
Displays and Procedures
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/localization-perspective/" title="Localization Perspective" class="md-nav__link">
Localization Perspective
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/nsharp/" title="NSHARP" class="md-nav__link">
NSHARP
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/warngen/" title="WarnGen Walkthrough" class="md-nav__link">
WarnGen Walkthrough
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/goes-16-17-satellite/" title="GOES 16/17" class="md-nav__link">
GOES 16/17
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/d2d-gis-shapefiles/" title="GIS and Shapefiles" class="md-nav__link">
GIS and Shapefiles
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/d2d-gridded-models/" title="Volume Browser" class="md-nav__link">
Volume Browser
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/d2d-tools/" title="Display Tools" class="md-nav__link">
Display Tools
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/d2d-radar-tools/" title="Radar Tools" class="md-nav__link">
Radar Tools
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/d2d-edit-menus/" title="Editing Menus" class="md-nav__link">
Editing Menus
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/cave-localization/" title="Change Localization" class="md-nav__link">
Change Localization
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/import-export/" title="Import/Export" class="md-nav__link">
Import/Export
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-6" type="checkbox" id="nav-6">
<label class="md-nav__link" for="nav-6">
EDEX User Manual
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-6">
EDEX User Manual
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../install/start-edex/" title="EDEX Basic Commands" class="md-nav__link">
EDEX Basic Commands
</a>
</li>
<li class="md-nav__item">
<a href="../settings/" title="EDEX Settings" class="md-nav__link">
EDEX Settings
</a>
</li>
<li class="md-nav__item">
<a href="../distributed-computing/" title="Distributed EDEX" class="md-nav__link">
Distributed EDEX
</a>
</li>
<li class="md-nav__item">
<a href="../edex-ingest-docker-container/" title="Docker EDEX" class="md-nav__link">
Docker EDEX
</a>
</li>
<li class="md-nav__item">
<a href="../ldm/" title="LDM Feeds" class="md-nav__link">
LDM Feeds
</a>
</li>
<li class="md-nav__item">
<a href="../data-distribution-files/" title="Data Distribution Files" class="md-nav__link">
Data Distribution Files
</a>
</li>
<li class="md-nav__item">
<a href="../new-grid/" title="Ingest a New Grid" class="md-nav__link">
Ingest a New Grid
</a>
</li>
<li class="md-nav__item">
<a href="../data-purge/" title="Purging and Retention" class="md-nav__link">
Purging and Retention
</a>
</li>
<li class="md-nav__item">
<a href="../edex-users/" title="Monitor Users" class="md-nav__link">
Monitor Users
</a>
</li>
<li class="md-nav__item">
<a href="../data-plugins/" title="Data Plugins" class="md-nav__link">
Data Plugins
</a>
</li>
<li class="md-nav__item">
<a href="../case-studies/" title="Archive Case Studies" class="md-nav__link">
Archive Case Studies
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../python/overview/" title="Python-AWIPS" class="md-nav__link">
Python-AWIPS
</a>
</li>
<li class="md-nav__item">
<a href="../../appendix/educational-resources/" title="Educational Resources" class="md-nav__link">
Educational Resources
</a>
</li>
<li class="md-nav__item">
<a href="../../dev/awips-development-environment/" title="Development" class="md-nav__link">
Development
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-10" type="checkbox" id="nav-10">
<label class="md-nav__link" for="nav-10">
Appendix
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-10">
Appendix
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../appendix/appendix-grid-parameters/" title="AWIPS Grid Parameters" class="md-nav__link">
AWIPS Grid Parameters
</a>
</li>
<li class="md-nav__item">
<a href="../../python/maps-database/" title="Maps Database" class="md-nav__link">
Maps Database
</a>
</li>
<li class="md-nav__item">
<a href="../../appendix/appendix-acronyms/" title="Acronyms and Abbreviations" class="md-nav__link">
Acronyms and Abbreviations
</a>
</li>
<li class="md-nav__item">
<a href="../../appendix/appendix-wsr88d/" title="WSR-88D Product Table" class="md-nav__link">
WSR-88D Product Table
</a>
</li>
<li class="md-nav__item">
<a href="../../cave/cave-keyboard-shortcuts/" title="Keyboard Shortcuts" class="md-nav__link">
Keyboard Shortcuts
</a>
</li>
<li class="md-nav__item">
<a href="../../raytheon/cave_d2d/" title="Raytheon: CAVE User's Manual" class="md-nav__link">
Raytheon: CAVE User's Manual
</a>
</li>
<li class="md-nav__item">
<a href="../../raytheon/smm/" title="Raytheon: AWIPS System Manager's Manual" class="md-nav__link">
Raytheon: AWIPS System Manager's Manual
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#ingest-an-unsupported-grid" title="Ingest an Unsupported Grid" class="md-nav__link">
Ingest an Unsupported Grid
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#download-test-data" title="Download Test Data" class="md-nav__link">
Download Test Data
</a>
</li>
<li class="md-nav__item">
<a href="#check-grib-logs" title="Check Grib Logs" class="md-nav__link">
Check Grib Logs
</a>
</li>
<li class="md-nav__item">
<a href="#check-hdf5-data" title="Check HDF5 Data" class="md-nav__link">
Check HDF5 Data
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#determine-grid-projection" title="Determine Grid Projection" class="md-nav__link">
Determine Grid Projection
</a>
</li>
<li class="md-nav__item">
<a href="#create-grid-projection-file" title="Create Grid Projection File" class="md-nav__link">
Create Grid Projection File
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#projection-types" title="Projection Types" class="md-nav__link">
Projection Types
</a>
</li>
<li class="md-nav__item">
<a href="#creating-a-new-projection-file" title="Creating a New Projection File" class="md-nav__link">
Creating a New Projection File
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#create-model-definition" title="Create Model Definition" class="md-nav__link">
Create Model Definition
</a>
</li>
<li class="md-nav__item">
<a href="#adding-a-table" title="Adding a Table" class="md-nav__link">
Adding a Table
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset">
<a href="https://github.com/Unidata/awips2/edit/unidata_18.2.1/docs/edex/new-grid-grib1-old.md" title="Edit this page" class="md-icon md-content__icon">&#xE3C9;</a>
<h1 id="ingest-a-new-grid-using-grib-files">Ingest a New Grid Using .grib Files<a class="headerlink" href="#ingest-a-new-grid-using-grib-files" title="Permanent link"></a></h1>
<p>Unrecognized grids can be decoded by EDEX simply by dropping <code>*.grib</code> or <code>*.grib2</code> files into <code>/awips2/data_store/ingest/</code></p>
<p>To add support for a new grid, two edits must be made:</p>
<ul>
<li><strong>Geospatial projection</strong> must be defined in a <a href="#create-grid-projection-file"><strong><em>grid navigation file</em></strong></a></li>
<li><strong>Grid name</strong>, <strong>center</strong>, <strong>subcenter</strong>, and <strong>process ID</strong> must be defined in a <a href="#create-model-definition"><strong><em>model definition file</em></strong></a></li>
</ul>
<p>If the parameters in the grib file haven't been previously specified, another change <em>may</em> be needed as well:</p>
<ul>
<li><strong>Center</strong>, <strong>subcenter</strong>, <strong>discipline</strong>, <strong>category</strong>, and possibly <strong>parameter ID</strong> information may need to be defined in a <a href="#adding-a-table"><strong><em>table</em></strong></a></li>
</ul>
<hr />
<h2 id="ingest-an-unsupported-grid">Ingest an Unsupported Grid<a class="headerlink" href="#ingest-an-unsupported-grid" title="Permanent link"></a></h2>
<h3 id="download-test-data">Download Test Data<a class="headerlink" href="#download-test-data" title="Permanent link"></a></h3>
<p>Download an example grib1 file and rename to a <code>*.grib</code> extension, then copy to the manual ingest point <code>/awips2/data_store/ingest/</code> </p>
<pre><code>wget https://downloads.unidata.ucar.edu/awips2/current/files/14102318_nmm_d01.GrbF00600 -O wrf.grib
cp wrf.grib /awips2/data_store/ingest/
</code></pre>
<p>Remember that the data distribution file (<code>/awips2/edex/data/utility/common_static/base/distribution/grib.xml</code>) will match filenames which have the <code>*.grib*</code> extension.</p>
<h3 id="check-grib-logs">Check Grib Logs<a class="headerlink" href="#check-grib-logs" title="Permanent link"></a></h3>
<p>Confirm that the grib file decodes in the grib log file:</p>
<pre><code>edex log grib
INFO [Ingest.GribDecode] /awips2/data_store/ingest/grib/20141026/14/wrf.grib processed in: 0.1200 (sec) Latency: 21.8080 (sec)
INFO [Ingest.GribDecode] /awips2/data_store/ingest/grib/20141026/14/wrf.grib processed in: 0.1180 (sec) Latency: 21.8140 (sec)
INFO [Ingest.GribDecode] /awips2/data_store/ingest/grib/20141026/14/wrf.grib processed in: 0.4230 (sec) Latency: 21.8360 (sec)
INFO [Ingest.GribDecode] /awips2/data_store/ingest/grib/20141026/14/wrf.grib processed in: 0.2240 (sec) Latency: 21.9140 (sec)
...
</code></pre>
<h3 id="check-hdf5-data">Check HDF5 Data<a class="headerlink" href="#check-hdf5-data" title="Permanent link"></a></h3>
<p>Check that the hdf5 data directory exists for our unnamed grid</p>
<pre><code>ls -latr /awips2/edex/data/hdf5/grid/GribModel:7:0:89
</code></pre>
<p>Though the grib file has been decoded, it has been given a generic name with its center, subcenter, and process IDs (7, 0, 89, respectively). </p>
<hr />
<h2 id="determine-grid-projection">Determine Grid Projection<a class="headerlink" href="#determine-grid-projection" title="Permanent link"></a></h2>
<p>When the grid was ingested a record was added to the <code>grid_coverage</code> table with its navigation information:</p>
<pre><code>psql metadata
metadata=# select nx,ny,dx,dy,majoraxis,minoraxis,la1,lo1,lov,latin1,latin2 from gridcoverage where id=(select distinct(location_id) from grid_info where datasetid='GribModel:7:0:89');
nx | ny | dx | dy | majoraxis | minoraxis | la1 | lo1 | lov | latin1 | latin2
-----+-----+------------------+------------------+-----------+-----------+------------------+-------------------+-------------------+------------------+------------------
201 | 155 | 4.29699993133545 | 4.29699993133545 | 6378160 | 6356775 | 42.2830009460449 | -72.3610000610352 | -67.0770034790039 | 45.3680000305176 | 45.3680000305176
(1 row)
</code></pre>
<p>Compare with the projection info returned by wgrib on the original file (look at the bolded sections below and make sure they match up with the corresponding entries returned from the database above):</p>
<!--
Using html for this code block so that certain sections within the code can be emphasized (bolded)
-->
<pre>
wgrib -V wrf.grib
rec 799:27785754:date 2014102318 ALBDO kpds5=84 kpds6=1 kpds7=0 levels=(0,0) grid=255 sfc 6hr fcst: bitmap: 736 undef
ALBDO=Albedo [%]
timerange 0 P1 6 P2 0 TimeU 1 <b>nx 201 ny 155</b> GDS grid 3 num_in_ave 0 missing 0
center 7 subcenter 0 process 89 Table 2 scan: WE:SN winds(grid)
<b>Lambert Conf: Lat1 42.283000 Lon1 -72.361000 Lov -67.077000</b>
<b>Latin1 45.368000 Latin2 45.368000</b> LatSP 0.000000 LonSP 0.000000
North Pole (201 x 155) <b>Dx 4.297000 Dy 4.297000</b> scan 64 mode 8
min/max data 5 21.9 num bits 8 BDS_Ref 50 DecScale 1 BinScale 0
</pre>
<p>Notice that our grib file has a <strong>Lambert Conformal</strong> projection. We will need these values for the next step.</p>
<div class="admonition note">
<p class="admonition-title"><strong>There is a tolerance of +/- 0.1 degrees</strong> to keep in mind when defining your coverage area.</p>
</div>
<hr />
<h2 id="create-grid-projection-file">Create Grid Projection File<a class="headerlink" href="#create-grid-projection-file" title="Permanent link"></a></h2>
<h3 id="projection-types">Projection Types<a class="headerlink" href="#projection-types" title="Permanent link"></a></h3>
<p>Grid projection files are stored in <code>/awips2/edex/data/utility/common_static/base/grib/grids/</code> and there are four grid coverage types available:</p>
<ol>
<li>
<p><strong>lambertConformalGridCoverage</strong> (example: <code>RUCIcing.xml</code>)</p>
<pre><code>&lt;lambertConformalGridCoverage&gt;
&lt;name&gt;305&lt;/name&gt;
&lt;description&gt;Regional - CONUS (Lambert Conformal)&lt;/description&gt;
&lt;la1&gt;16.322&lt;/la1&gt;
&lt;lo1&gt;-125.955&lt;/lo1&gt;
&lt;firstGridPointCorner&gt;LowerLeft&lt;/firstGridPointCorner&gt;
&lt;nx&gt;151&lt;/nx&gt;
&lt;ny&gt;113&lt;/ny&gt;
&lt;dx&gt;40.63525&lt;/dx&gt;
&lt;dy&gt;40.63525&lt;/dy&gt;
&lt;spacingUnit&gt;km&lt;/spacingUnit&gt;
&lt;minorAxis&gt;6356775.0&lt;/minorAxis&gt;
&lt;majorAxis&gt;6378160.0&lt;/majorAxis&gt;
&lt;lov&gt;-95.0&lt;/lov&gt;
&lt;latin1&gt;25.0&lt;/latin1&gt;
&lt;latin2&gt;25.0&lt;/latin2&gt;
&lt;/lambertConformalGridCoverage&gt;
</code></pre>
</li>
<li>
<p><strong>polarStereoGridCoverage</strong> (example <code>seaice_south1_grid.xml</code>)</p>
<pre><code>&lt;polarStereoGridCoverage&gt;
&lt;name&gt;405&lt;/name&gt;
&lt;description&gt;Sea Ice south 690X710 13km grid&lt;/description&gt;
&lt;la1&gt;-36.866&lt;/la1&gt;
&lt;lo1&gt;139.806&lt;/lo1&gt;
&lt;firstGridPointCorner&gt;LowerLeft&lt;/firstGridPointCorner&gt;
&lt;nx&gt;690&lt;/nx&gt;
&lt;ny&gt;710&lt;/ny&gt;
&lt;dx&gt;12.7&lt;/dx&gt;
&lt;dy&gt;12.7&lt;/dy&gt;
&lt;spacingUnit&gt;km&lt;/spacingUnit&gt;
&lt;minorAxis&gt;6371229.0&lt;/minorAxis&gt;
&lt;majorAxis&gt;6371229.0&lt;/majorAxis&gt;
&lt;lov&gt;100.0&lt;/lov&gt;
&lt;/polarStereoGridCoverage&gt;
</code></pre>
</li>
<li>
<p><strong>latLonGridCoverage</strong> (example <code>UkmetHR-SHemisphere.xml</code>)</p>
<pre><code>&lt;latLonGridCoverage&gt;
&lt;name&gt;864162002&lt;/name&gt;
&lt;description&gt;UKMet HiRes combined - Southern Hemisphere
Longitude range 71.25E - 70.416E &lt;/description&gt;
&lt;la1&gt;-89.721&lt;/la1&gt;
&lt;lo1&gt;71.25&lt;/lo1&gt;
&lt;firstGridPointCorner&gt;LowerLeft&lt;/firstGridPointCorner&gt;
&lt;nx&gt;864&lt;/nx&gt;
&lt;ny&gt;162&lt;/ny&gt;
&lt;dx&gt;0.833&lt;/dx&gt;
&lt;dy&gt;0.556&lt;/dy&gt;
&lt;spacingUnit&gt;degree&lt;/spacingUnit&gt;
&lt;la2&gt;-0.278&lt;/la2&gt;
&lt;lo2&gt;70.416&lt;/lo2&gt;
&lt;/latLonGridCoverage&gt;
</code></pre>
</li>
<li>
<p><strong>mercatorGridCoverage</strong> (example <code>gridNBM_PR.xml</code>)</p>
<pre><code>&lt;mercatorGridCoverage&gt;
&lt;name&gt;NBM_PR&lt;/name&gt;
&lt;description&gt; National Blend Grid over Puerto Rico - (1.25 km)&lt;/description&gt;
&lt;la1&gt;16.9775&lt;/la1&gt;
&lt;lo1&gt;-68.0278&lt;/lo1&gt;
&lt;firstGridPointCorner&gt;LowerLeft&lt;/firstGridPointCorner&gt;
&lt;nx&gt;339&lt;/nx&gt;
&lt;ny&gt;225&lt;/ny&gt;
&lt;dx&gt;1.25&lt;/dx&gt;
&lt;dy&gt;1.25&lt;/dy&gt;
&lt;la2&gt;19.3750032477232&lt;/la2&gt;
&lt;lo2&gt;-63.984399999999994&lt;/lo2&gt;
&lt;latin&gt;20&lt;/latin&gt;
&lt;spacingUnit&gt;km&lt;/spacingUnit&gt;
&lt;minorAxis&gt;6371200&lt;/minorAxis&gt;
&lt;majorAxis&gt;6371200&lt;/majorAxis&gt;
&lt;/mercatorGridCoverage&gt;
</code></pre>
</li>
</ol>
<h3 id="creating-a-new-projection-file">Creating a New Projection File<a class="headerlink" href="#creating-a-new-projection-file" title="Permanent link"></a></h3>
<p>Copy an existing xml file with the same grid projection type (in this case <strong>lambertConformalGridCoverage</strong>) to a new file <code>wrf.xml</code>:</p>
<pre><code>cd /awips2/edex/data/utility/common_static/base/grib/grids/
cp RUCIcing.xml wrf.xml
</code></pre>
<p>And edit the new <code>wrf.xml</code> to define the projection values using the <a href="#determine-grid-projection">output from wgrib or the database</a> (example provided):</p>
<pre><code>vi wrf.xml
&lt;lambertConformalGridCoverage&gt;
&lt;name&gt;201155&lt;/name&gt;
&lt;description&gt;Regional - CONUS (Lambert Conformal)&lt;/description&gt;
&lt;la1&gt;42.2830009460449&lt;/la1&gt;
&lt;lo1&gt;-72.3610000610352&lt;/lo1&gt;
&lt;firstGridPointCorner&gt;LowerLeft&lt;/firstGridPointCorner&gt;
&lt;nx&gt;201&lt;/nx&gt;
&lt;ny&gt;155&lt;/ny&gt;
&lt;dx&gt;4.29699993133545&lt;/dx&gt;
&lt;dy&gt;4.29699993133545&lt;/dy&gt;
&lt;spacingUnit&gt;km&lt;/spacingUnit&gt;
&lt;minorAxis&gt;6356775.0&lt;/minorAxis&gt;
&lt;majorAxis&gt;6378160.0&lt;/majorAxis&gt;
&lt;lov&gt;-67.0770034790039&lt;/lov&gt;
&lt;latin1&gt;45.3680000305176&lt;/latin1&gt;
&lt;latin2&gt;45.3680000305176&lt;/latin2&gt;
&lt;/lambertConformalGridCoverage&gt;
</code></pre>
<div class="admonition note">
<p class="admonition-title">Notice the <code>&lt;name&gt;201155&lt;/name&gt;</code> tag was created by using the number of grid points (201 and 155). This name can be anything as long as it is unique and will be used to match against in the model definition.</p>
</div>
<hr />
<h2 id="create-model-definition">Create Model Definition<a class="headerlink" href="#create-model-definition" title="Permanent link"></a></h2>
<p>Model definition XML files are found in <strong>/awips2/edex/data/utility/common_static/base/grib/models/</strong>. </p>
<p>Since our grib file has a center ID of 7 (NCEP) we will edit the <strong>gribModels_NCEP-7.xml</strong> file.</p>
<pre><code>cd /awips2/edex/data/utility/common_static/base/grib/models/
vi gribModels_NCEP-7.xml
</code></pre>
<p>In <code>&lt;gribModelSet&gt;</code> add an entry:</p>
<pre><code> &lt;model&gt;
&lt;name&gt;WRF&lt;/name&gt;
&lt;center&gt;7&lt;/center&gt;
&lt;subcenter&gt;0&lt;/subcenter&gt;
&lt;grid&gt;201155&lt;/grid&gt;
&lt;process&gt;
&lt;id&gt;89&lt;/id&gt;
&lt;/process&gt;
&lt;/model&gt;
</code></pre>
<p>Save the file and restart EDEX for the changes to take effect:</p>
<pre><code>sudo service edex_camel restart ingestGrib
</code></pre>
<p>Now copy the <code>wrf.grib</code> file <em>again</em> to <strong>/awips2/data_store/ingest/</strong>. If everything is correct we will not see any persistence errors since the grid is now named <strong>WRF</strong> and not <strong>GribModel:7:0:89</strong>.</p>
<pre><code>cp wrf.grib /awips2/data_store/ingest/
edex log grib
</code></pre>
<p>After you have confirmed that the grid was ingested with the given name, you can <a href="../../cave/d2d-edit-menus/">edit the D2D product menus to display the new grid</a>.</p>
<hr />
<h2 id="adding-a-table">Adding a Table<a class="headerlink" href="#adding-a-table" title="Permanent link"></a></h2>
<p>If you ingest a piece of data and the parameter appears as unknown in the metadata database, ensure that the correct parameter tables are in place for the center/subcenter.</p>
<p>The tables are located in <strong>/awips2/edex/data/utility/common_static/base/grib/tables/</strong>. They are then broken into subdirectories using the following structure: <strong>/[Center]/[Subcenter]/4.2.[Discipine].[Category].table</strong>. </p>
<p>The center and subcenter have been identified previously <a href="#determine-grid-projection">here</a>, as 7 and 0, respectively. So, the corresponding directory is:</p>
<pre><code>/awips2/edex/data/utility/common_static/base/grib/tables/7/0/
</code></pre>
<p>To find the <strong>discipline</strong> of a grib product, you need the <strong>process</strong> and <strong>table</strong> values from the grib file. These are output with the <code>wgrib -V</code> command:</p>
<pre>
wgrib -V wrf.grib
rec 799:27785754:date 2014102318 ALBDO kpds5=84 kpds6=1 kpds7=0 levels=(0,0) grid=255 sfc 6hr fcst: bitmap: 736 undef
ALBDO=Albedo [%]
timerange 0 P1 6 P2 0 TimeU 1 nx 201 ny 155 GDS grid 3 num_in_ave 0 missing 0
center 7 subcenter 0 <b>process 89 Table 2</b> scan: WE:SN winds(grid)
Lambert Conf: Lat1 42.283000 Lon1 -72.361000 Lov -67.077000
Latin1 45.368000 Latin2 45.368000< LatSP 0.000000 LonSP 0.000000
North Pole (201 x 155) Dx 4.297000 Dy 4.297000 scan 64 mode 8
min/max data 5 21.9 num bits 8 BDS_Ref 50 DecScale 1 BinScale 0
</pre>
<p>For our example, the process is <strong>89</strong> and table is <strong>2</strong>. Next, take a look in:</p>
<pre><code> /awips2/edex/data/utility/common_static/base/grid/grib1ParameterConvTable.xml
</code></pre>
<p>And find the entry that has grib1 data with TableVersion 2 and Value 89:</p>
<pre><code>&lt;grib1Parameter&gt;
&lt;center&gt;7&lt;/center&gt;
&lt;grib1TableVersion&gt;2&lt;/grib1TableVersion&gt;
&lt;grib1Value&gt;89&lt;/grib1Value&gt;
&lt;grib2discipline&gt;0&lt;/grib2discipline&gt;
&lt;grib2category&gt;3&lt;/grib2category&gt;
&lt;grib2Value&gt;10&lt;/grib2Value&gt;
&lt;/grib1Parameter&gt;
</code></pre>
<p>Here, we can see the discipline and category values (referred to as x above) are 0 and 3, respectively.</p>
<p>So, the table needed for our example file is:</p>
<pre><code>/awips2/edex/data/utility/common_static/base/grib/tables/7/0/4.2.0.3.table
</code></pre>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
Copyright &copy; 2022 Unidata Program Center.
</div>
powered by
<a href="http://www.mkdocs.org" title="MkDocs">MkDocs</a>
and
<a href="http://squidfunk.github.io/mkdocs-material/" title="Material for MkDocs">
Material for MkDocs</a>
</div>
<div class="md-footer-social">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<a href="https://www.unidata.ucar.edu/software/awips2" class="md-footer-social__link fa fa-globe"></a>
<a href="https://github.com/Unidata/awips2" class="md-footer-social__link fa fa-github-alt"></a>
<a href="https://twitter.com/Unidata" class="md-footer-social__link fa fa-twitter"></a>
<a href="https://facebook.com/Unidata" class="md-footer-social__link fa fa-facebook"></a>
</div>
</div>
</div>
</footer>
</div>
<script src="../../assets/javascripts/application-eaeb7b21e3.js"></script>
<script>app.initialize({url:{base:"../.."}})</script>
</body>
</html>