Skip to content

Commit

Permalink
gh-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Dec 19, 2023
1 parent 47d59cb commit 3eb5e4a
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions fire.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,16 @@ def compute_nbs(items, box):
after_date = alarm_date + timedelta(days=14)
search_dates = before_date.strftime("%Y-%m-%d") + "/" + after_date.strftime("%Y-%m-%d")

# here we go!
items = stac_search(box, search_dates)
nbs = compute_nbs(items, box)

# write first and last date to tif
nbs.isel(time=0).rio.to_raster(raster_path="before.tif", driver="COG")
nbs.isel(time=(nbs.time.size-1)).rio.to_raster(raster_path="after.tif", driver="COG")
def run():
# here we go!
items = stac_search(box, search_dates)
nbs = compute_nbs(items, box)

# write first and last date to tif
nbs.isel(time=0).rio.to_raster(raster_path="before.tif", driver="COG")
nbs.isel(time=(nbs.time.size-1)).rio.to_raster(raster_path="after.tif", driver="COG")


if __name__ == "__main__":
run()

0 comments on commit 3eb5e4a

Please sign in to comment.