-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update notebook, add testing notebook
- Loading branch information
Showing
2 changed files
with
117 additions
and
278 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"vscode": { | ||
"languageId": "plaintext" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"GAUGE_X = 122.2183\n", | ||
"GAUGE_Y = -18.0008\n", | ||
"ENSEMBLE_MODELS = [\"EOT20\", \"HAMTIDE11\"] # simplified for tests\n", | ||
"\n", | ||
"def load_satellite_ds():\n", | ||
" \"\"\"\n", | ||
" Load a sample timeseries of Landsat 8 data using odc-stac\n", | ||
" \"\"\"\n", | ||
" # Connect to stac catalogue\n", | ||
" catalog = pystac_client.Client.open(\"https://explorer.dea.ga.gov.au/stac\")\n", | ||
"\n", | ||
" # Set cloud defaults\n", | ||
" odc.stac.configure_rio(\n", | ||
" cloud_defaults=True,\n", | ||
" aws={\"aws_unsigned\": True},\n", | ||
" )\n", | ||
"\n", | ||
" # Build a query with the parameters above\n", | ||
" bbox = [GAUGE_X - 0.08, GAUGE_Y - 0.08, GAUGE_X + 0.08, GAUGE_Y + 0.08]\n", | ||
" query = catalog.search(\n", | ||
" bbox=bbox,\n", | ||
" collections=[\"ga_ls8c_ard_3\"],\n", | ||
" datetime=\"2020-01/2020-02\",\n", | ||
" )\n", | ||
"\n", | ||
" # Search the STAC catalog for all items matching the query\n", | ||
" ds = odc.stac.load(\n", | ||
" list(query.items()),\n", | ||
" bands=[\"nbart_red\"],\n", | ||
" crs=\"epsg:3577\",\n", | ||
" resolution=30,\n", | ||
" groupby=\"solar_day\",\n", | ||
" bbox=bbox,\n", | ||
" fail_on_error=False,\n", | ||
" chunks={},\n", | ||
" )\n", | ||
"\n", | ||
" return ds\n", | ||
"\n", | ||
"satellite_ds = load_satellite_ds()" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"language_info": { | ||
"name": "python" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |