Skip to content

Commit

Permalink
Weather Forecast Retrieval - Update to v0.7
Browse files Browse the repository at this point in the history
Adapt the changes introduced in weather_forecast_retrieval v0.7.
  • Loading branch information
jomey committed Apr 27, 2021
1 parent 024be6e commit f7fd7f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ scipy>=1.0.0,<1.5.0
utm==0.4.0
pykrige>=1.5.0
spatialnc>=0.2.12
weather-forecast-retrieval>=0.6.12
weather-forecast-retrieval>=0.7
topocalc>=0.5
setuptools_scm<4.2
xarray>=0.15,<0.16
19 changes: 10 additions & 9 deletions smrf/data/hrrr_grib.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
import pandas as pd
from weather_forecast_retrieval.hrrr import HRRR
import weather_forecast_retrieval.data.hrrr as hrrr_data

from smrf.data.gridded_input import GriddedInput
from smrf.envphys.solar.cloud import get_hrrr_cloud
Expand Down Expand Up @@ -55,14 +55,15 @@ def load(self):
self.config['hrrr_directory']
))

metadata, data = HRRR(external_logger=self._logger).\
get_saved_data(
self.start_date,
self.end_date,
self.bbox,
output_dir=self.config['hrrr_directory'],
force_zone_number=self.topo.zone_number
)
metadata, data = hrrr_data.FileLoader(
file_dir=self.config['hrrr_directory'],
external_logger=self._logger
).get_saved_data(
self.start_date,
self.end_date,
self.bbox,
force_zone_number=self.topo.zone_number
)

self.parse_data(metadata, data)

Expand Down

0 comments on commit f7fd7f8

Please sign in to comment.