Skip to content

Commit

Permalink
option to not download satellite data
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Aug 18, 2024
1 parent 1a334ec commit e2cc6dc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pvnet_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ def app(
- NWP_UKV_ZARR_PATH
- NWP_ECMWF_ZARR_PATH
- SATELLITE_ZARR_PATH
- PVNET_V2_VERSION, default is a version above
- DOWNLOAD_SATELLITE, option to get satelite data. defaults to true
Args:
t0 (datetime): Datetime at which forecast is made
gsp_ids (array_like): List of gsp_ids to make predictions for. This list of GSPs are summed
Expand Down Expand Up @@ -292,11 +294,15 @@ def app(
gsp_id_to_loc = GSPLocationLookup(ds_gsp.x_osgb, ds_gsp.y_osgb)

# Download satellite data
logger.info("Downloading satellite data")
download_all_sat_data()
if os.getenv("DOWNLOAD_SATELLITE", "true").lower() == "true":
logger.info("Downloading satellite data")
download_all_sat_data()

# Preprocess the satellite data and record the delay of the most recent non-nan timestep
all_satellite_datetimes, data_freq_minutes = preprocess_sat_data(t0)
# Preprocess the satellite data and record the delay of the most recent non-nan timestep
all_satellite_datetimes, data_freq_minutes = preprocess_sat_data(t0)
else:
all_satellite_datetimes = []
data_freq_minutes = 5

# Download NWP data
logger.info("Downloading NWP data")
Expand Down

0 comments on commit e2cc6dc

Please sign in to comment.