mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-24 06:57:56 -05:00
949 B
949 B
== Using the DAF to get all of the available grids ==
#!python
from ufpy.dataaccess import DataAccessLayer
#Initiate a new DataRequest
request = DataAccessLayer.newDataRequest()
#Set the datatype to grid so it knows what plugin to route the request too
request.setDatatype("grid")
#getAvailableLocationNames method will return a list of all available models
#LocationNames mean different things to different plugins beware...radar is icao,
#satellite is sector, etc
available_grids = DataAccessLayer.getAvailableLocationNames(request)
for grid in available_grids:
print grid
And the output of the print grid statement would look something like this:
#!div style="font-size: 90%;font-style:italic"
RUC236 SREF216 ENSEMBLE RTOFS-WestAtl AKwave10 HiResW-NMM-AK QPE-KRF AK-NamDNG5 GFS160 FFG-TIR GFS254 SPCGuide RFCqpf RTMA-Mosaic QPE-RFC-RSA UKMET40 MPE-Local-MSR gefs WNAwave4 GFS201 QPE-XNAV-ALR AK-RTMA3 GFS212 ...