DataAccessLayer

awips.dataaccess.DataAccessLayer.changeEDEXHost(newHostName)[source]

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.

Args:

newHostName: the EDEX host to connect to

awips.dataaccess.DataAccessLayer.getAvailableLevels(request)[source]

Gets the available levels that match the request without actually requesting the data.

Args:

request: the request to find matching levels for

Returns:

a list of strings of available levels.

awips.dataaccess.DataAccessLayer.getAvailableLocationNames(request)[source]

Gets the available location names that match the request without actually requesting the data.

Args:

request: the request to find matching location names for

Returns:

a list of strings of available location names.

awips.dataaccess.DataAccessLayer.getAvailableParameters(request)[source]

Gets the available parameters names that match the request without actually requesting the data.

Args:

request: the request to find matching parameter names for

Returns:

a list of strings of available parameter names.

awips.dataaccess.DataAccessLayer.getAvailableTimes(request, refTimeOnly=False)[source]

Get the times of available data to the request.

Args:

request: the IDataRequest to get data for refTimeOnly: optional, use True if only unique refTimes should be

returned (without a forecastHr)

Returns:

a list of DataTimes

awips.dataaccess.DataAccessLayer.getForecastRun(cycle, times)[source]

Get the latest forecast run (list of objects) from all all cycles and times returned from DataAccessLayer “grid” response.

Args:

cycle: Forecast cycle reference time times: All available times/cycles

Returns:

DataTime array for a single forecast run

awips.dataaccess.DataAccessLayer.getGeometryData(request, times=[])[source]

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.

Args:

request: the IDataRequest to get data for times: a list of DataTimes, a TimeRange, or None if the data is time

agnostic

Returns:

a list of IGeometryData

awips.dataaccess.DataAccessLayer.getGridData(request, times=[])[source]

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.

Args:

request: the IDataRequest to get data for times: a list of DataTimes, a TimeRange, or None if the data is time

agnostic

Returns:

a list of IGridData

awips.dataaccess.DataAccessLayer.getIdentifierValues(request, identifierKey)[source]

Gets the allowed values for a particular identifier on this datatype.

Args:

request: the request to find identifier values for identifierKey: the identifier to find values for

Returns:

a list of strings of allowed values for the specified identifier

awips.dataaccess.DataAccessLayer.getMetarObs(response)[source]

Processes a DataAccessLayer “obs” response into a dictionary, with special consideration for multi-value parameters “presWeather”, “skyCover”, and “skyLayerBase”.

Args:

response: DAL getGeometry() list

Returns:

A dictionary of METAR obs

awips.dataaccess.DataAccessLayer.getOptionalIdentifiers(request)[source]

Gets the optional identifiers for this request.

Args:

request: the request to find optional identifiers for

Returns:

a list of strings of optional identifiers

awips.dataaccess.DataAccessLayer.getRadarProductIDs(availableParms)[source]

Get only the numeric idetifiers for NEXRAD3 products.

Args:

availableParms: Full list of radar parameters

Returns:

List of filtered parameters

awips.dataaccess.DataAccessLayer.getRadarProductNames(availableParms)[source]

Get only the named idetifiers for NEXRAD3 products.

Args:

availableParms: Full list of radar parameters

Returns:

List of filtered parameters

awips.dataaccess.DataAccessLayer.getRequiredIdentifiers(request)[source]

Gets the required identifiers for this request. These identifiers must be set on a request for the request of this datatype to succeed.

Args:

request: the request to find required identifiers for

Returns:

a list of strings of required identifiers

awips.dataaccess.DataAccessLayer.getSupportedDatatypes()[source]

Gets the datatypes that are supported by the framework

Returns:

a list of strings of supported datatypes

awips.dataaccess.DataAccessLayer.getSynopticObs(response)[source]

Processes a DataAccessLayer “sfcobs” response into a dictionary of available parameters.

Args:

response: DAL getGeometry() list

Returns:

A dictionary of synop obs

awips.dataaccess.DataAccessLayer.newDataRequest(datatype=None, **kwargs)[source]

Creates a new instance of IDataRequest suitable for the runtime environment. All args are optional and exist solely for convenience.

Args:

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

Returns:

a new IDataRequest

awips.dataaccess.DataAccessLayer.setLazyLoadGridLatLon(lazyLoadGridLatLon)[source]

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.

Args:

lazyLoadGridLatLon: Boolean value indicating whether to lazy load.