stns_on_grid
- postprocessinglib.forecast.forecast.stns_on_grid(stn_locs_file: str = None, out_format: str = 'dataframe') Union[DataFrame, list[str]]
Retrieves the “model world” gauge station locations from file. TO-DO: when the station locations are available from GeoMet, this function should be modified to query the locations from the OGC Features API.
- Parameters:
stn_locs_file (str, optional) – Path to geoJSON file containing station locations, by default None.
- Returns:
pd.DataFrame –
Tabulated gauge station coordinates. DataFrame has the format:
--------------------------------- | id | lat | lon | --------------------------------- | 05AC012 | 50.1714 | -112.7203 | | ... | ... | ... | ---------------------------------
DataFrame index =
idlist[str] – A list of station IDs corresponding to the rows in the DataFrame.
- Raises:
RuntimeError – While the station locations are not available from GeoMet, an error is raised if the user does not provide a geoJSON file with the station locations.