<spanid="dataaccesslayer"></span><h1>DataAccessLayer<aclass="headerlink"href="#module-awips.dataaccess.DataAccessLayer"title="Permalink to this headline">¶</a></h1>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">changeEDEXHost</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">newHostName</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#changeEDEXHost"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.changeEDEXHost"title="Permalink to this definition">¶</a></dt>
<dd><p>Changes the EDEX host the Data Access Framework is communicating with. Only
works if using the native Python client implementation, otherwise, this
method will throw a TypeError.</p>
<dlclass="simple">
<dt>Args:</dt><dd><p>newHostName: the EDEX host to connect to</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getAvailableLevels</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">request</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getAvailableLevels"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getAvailableLevels"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the available levels that match the request without actually
requesting the data.</p>
<dlclass="simple">
<dt>Args:</dt><dd><p>request: the request to find matching levels for</p>
</dd>
<dt>Returns:</dt><dd><p>a list of strings of available levels.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getAvailableLocationNames</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">request</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getAvailableLocationNames"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getAvailableLocationNames"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the available location names that match the request without actually
requesting the data.</p>
<dlclass="simple">
<dt>Args:</dt><dd><p>request: the request to find matching location names for</p>
</dd>
<dt>Returns:</dt><dd><p>a list of strings of available location names.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getAvailableParameters</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">request</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getAvailableParameters"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getAvailableParameters"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the available parameters names that match the request without actually
requesting the data.</p>
<dlclass="simple">
<dt>Args:</dt><dd><p>request: the request to find matching parameter names for</p>
</dd>
<dt>Returns:</dt><dd><p>a list of strings of available parameter names.</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getAvailableTimes</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">request</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">refTimeOnly</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">False</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getAvailableTimes"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getAvailableTimes"title="Permalink to this definition">¶</a></dt>
<dd><p>Get the times of available data to the request.</p>
<dl>
<dt>Args:</dt><dd><p>request: the IDataRequest to get data for
refTimeOnly: optional, use True if only unique refTimes should be</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getForecastRun</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">cycle</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">times</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getForecastRun"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getForecastRun"title="Permalink to this definition">¶</a></dt>
<dd><p>Get the latest forecast run (list of objects) from all
all cycles and times returned from DataAccessLayer “grid”
response.</p>
<dlclass="simple">
<dt>Args:</dt><dd><p>cycle: Forecast cycle reference time
times: All available times/cycles</p>
</dd>
<dt>Returns:</dt><dd><p>DataTime array for a single forecast run</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getGeometryData</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">request</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">times</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">[]</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getGeometryData"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getGeometryData"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the geometry data that matches the request at the specified times.
Each combination of geometry, level, and dataTime will be returned as a
separate IGeometryData.</p>
<dl>
<dt>Args:</dt><dd><p>request: the IDataRequest to get data for
times: a list of DataTimes, a TimeRange, or None if the data is time</p>
<blockquote>
<div><p>agnostic</p>
</div></blockquote>
</dd>
<dt>Returns:</dt><dd><p>a list of IGeometryData</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getGridData</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">request</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">times</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">[]</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getGridData"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getGridData"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the grid data that matches the request at the specified times. Each
combination of parameter, level, and dataTime will be returned as a
separate IGridData.</p>
<dl>
<dt>Args:</dt><dd><p>request: the IDataRequest to get data for
times: a list of DataTimes, a TimeRange, or None if the data is time</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getIdentifierValues</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">request</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">identifierKey</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getIdentifierValues"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getIdentifierValues"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the allowed values for a particular identifier on this datatype.</p>
<dlclass="simple">
<dt>Args:</dt><dd><p>request: the request to find identifier values for
identifierKey: the identifier to find values for</p>
</dd>
<dt>Returns:</dt><dd><p>a list of strings of allowed values for the specified identifier</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getMetarObs</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">response</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getMetarObs"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getMetarObs"title="Permalink to this definition">¶</a></dt>
<dd><p>Processes a DataAccessLayer “obs” response into a dictionary,
with special consideration for multi-value parameters
“presWeather”, “skyCover”, and “skyLayerBase”.</p>
<dlclass="simple">
<dt>Args:</dt><dd><p>response: DAL getGeometry() list</p>
</dd>
<dt>Returns:</dt><dd><p>A dictionary of METAR obs</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getOptionalIdentifiers</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">request</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getOptionalIdentifiers"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getOptionalIdentifiers"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the optional identifiers for this request.</p>
<dlclass="simple">
<dt>Args:</dt><dd><p>request: the request to find optional identifiers for</p>
</dd>
<dt>Returns:</dt><dd><p>a list of strings of optional identifiers</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getRadarProductIDs</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">availableParms</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getRadarProductIDs"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getRadarProductIDs"title="Permalink to this definition">¶</a></dt>
<dd><p>Get only the numeric idetifiers for NEXRAD3 products.</p>
<dlclass="simple">
<dt>Args:</dt><dd><p>availableParms: Full list of radar parameters</p>
</dd>
<dt>Returns:</dt><dd><p>List of filtered parameters</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getRadarProductNames</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">availableParms</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getRadarProductNames"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getRadarProductNames"title="Permalink to this definition">¶</a></dt>
<dd><blockquote>
<div><p>Get only the named idetifiers for NEXRAD3 products.</p>
</div></blockquote>
<dlclass="simple">
<dt>Args:</dt><dd><p>availableParms: Full list of radar parameters</p>
</dd>
<dt>Returns:</dt><dd><p>List of filtered parameters</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getRequiredIdentifiers</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">request</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getRequiredIdentifiers"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getRequiredIdentifiers"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the required identifiers for this request. These identifiers
must be set on a request for the request of this datatype to succeed.</p>
<dlclass="simple">
<dt>Args:</dt><dd><p>request: the request to find required identifiers for</p>
</dd>
<dt>Returns:</dt><dd><p>a list of strings of required identifiers</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getSupportedDatatypes</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getSupportedDatatypes"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getSupportedDatatypes"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the datatypes that are supported by the framework</p>
<dlclass="simple">
<dt>Returns:</dt><dd><p>a list of strings of supported datatypes</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">getSynopticObs</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">response</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#getSynopticObs"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.getSynopticObs"title="Permalink to this definition">¶</a></dt>
<dd><p>Processes a DataAccessLayer “sfcobs” response into a dictionary
of available parameters.</p>
<dlclass="simple">
<dt>Args:</dt><dd><p>response: DAL getGeometry() list</p>
</dd>
<dt>Returns:</dt><dd><p>A dictionary of synop obs</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">newDataRequest</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">datatype</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#newDataRequest"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.newDataRequest"title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a new instance of IDataRequest suitable for the runtime environment.
All args are optional and exist solely for convenience.</p>
<dlclass="simple">
<dt>Args:</dt><dd><p>datatype: the datatype to create a request for
parameters: a list of parameters to set on the request
levels: a list of levels to set on the request
locationNames: a list of locationNames to set on the request
envelope: an envelope to limit the request
kwargs: any leftover kwargs will be set as identifiers</p>
<spanclass="sig-prename descclassname"><spanclass="pre">awips.dataaccess.DataAccessLayer.</span></span><spanclass="sig-name descname"><spanclass="pre">setLazyLoadGridLatLon</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">lazyLoadGridLatLon</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/awips/dataaccess/DataAccessLayer.html#setLazyLoadGridLatLon"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#awips.dataaccess.DataAccessLayer.setLazyLoadGridLatLon"title="Permalink to this definition">¶</a></dt>
<dd><p>Provide a hint to the Data Access Framework indicating whether to load the
lat/lon data for a grid immediately or wait until it is needed. This is
provided as a performance tuning hint and should not affect the way the
Data Access Framework is used. Depending on the internal implementation of
the Data Access Framework this hint might be ignored. Examples of when this
should be set to True are when the lat/lon information is not used or when
it is used only if certain conditions within the data are met. It could be
set to False if it is guaranteed that all lat/lon information is needed and
it would be better to get any performance overhead for generating the
lat/lon data out of the way during the initial request.</p>
<dlclass="simple">
<dt>Args:</dt><dd><p>lazyLoadGridLatLon: Boolean value indicating whether to lazy load.</p>