-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8a5a6c
commit dd7418c
Showing
10 changed files
with
348 additions
and
47 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
|
@@ -27,4 +27,5 @@ notebooks/CfRadial1 | |
notebooks/CfRadial1_full | ||
notebooks/ODIM_H5 | ||
notebooks/ODIM_H5_full | ||
notebooks/Furuno | ||
``` |
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,209 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "59447ad6-ac47-494e-b696-4335b36b205b", | ||
"metadata": { | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"# Furuno - Simple" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "6f96b5d8-2b96-4fd7-b8ba-166c34a8dcd2", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import os\n", | ||
"import xarray as xr\n", | ||
"import xradar as xd\n", | ||
"from urllib.parse import urljoin\n", | ||
"from urllib.request import urlretrieve" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "33d50be4-dfe5-4d99-a936-67a9a76bac94", | ||
"metadata": {}, | ||
"source": [ | ||
"## Download\n", | ||
"\n", | ||
"Fetching Furuno radar data file from wradlib-data repository." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "d3c6d408-5ab2-43c3-afd1-b3a703ef3b24", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"def fetch_furuno_file():\n", | ||
" fname = \"furuno_data.scn.gz\"\n", | ||
" if not os.path.exists(fname):\n", | ||
" base_url = \"https://raw.githubusercontent.com/wradlib/wradlib-data/main/furuno/\"\n", | ||
" #filename = \"2006_20220324_000000_000.scnx.gz\"\n", | ||
" filename = \"0080_20210730_160000_01_02.scn.gz\"\n", | ||
" url = urljoin(base_url, filename)\n", | ||
" urlretrieve(url, filename=fname)\n", | ||
" return fname\n", | ||
"\n", | ||
"\n", | ||
"filename = fetch_furuno_file()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "b987dcfd-5105-4483-932e-71b8002e5f09", | ||
"metadata": {}, | ||
"source": [ | ||
"## xr.open_dataset\n", | ||
"\n", | ||
"Making use of the xarray `odim` backend. We also need to provide the group." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "7675b518-18e4-4ea6-b101-f1bccf603902", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"ds = xr.open_dataset(\n", | ||
" filename, engine=\"furuno\", backend_kwargs=dict(reindex_angle=False)\n", | ||
")\n", | ||
"display(ds)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "01ec8c90-2da8-46ae-a0b5-0e1792a79bbe", | ||
"metadata": {}, | ||
"source": [ | ||
"### Plot Time vs. Azimuth" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "24dfb5f8-de27-46f0-9246-722e5955a345", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"ds.azimuth.plot()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "222ca704-d6e1-49e6-84a0-de55df9fdf61", | ||
"metadata": {}, | ||
"source": [ | ||
"### Plot Range vs. Time" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "34429720-e689-4786-99e3-5af9742d19ad", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"ds.DBZH.plot()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "d904cd09-8590-42e2-8dce-41d3949d313c", | ||
"metadata": {}, | ||
"source": [ | ||
"### Plot Range vs. Azimuth\n", | ||
"\n", | ||
"We need to sort by azimuth and specify the y-coordinate." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "6479a374-25ab-42be-b53e-82849b6faffc", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"ds.DBZH.sortby(\"azimuth\").plot(y=\"azimuth\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "5deafdf1-9224-459c-8b10-7c501ae13234", | ||
"metadata": {}, | ||
"source": [ | ||
"## open_odim_datatree" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "a65f0b48-7197-4f79-bc26-2045cfc59a4a", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"dtree = xd.io.open_furuno_datatree(filename)\n", | ||
"display(dtree)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "638bc6c0-3293-4661-a5d5-e9aaad14ffe9", | ||
"metadata": {}, | ||
"source": [ | ||
"### Plot Sweep Range vs. Time" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "f9db8500-7072-451b-84a1-f36767110e16", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"dtree[\"sweep_0\"].ds.DBZH.plot()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "1e44c0fd-02bc-4d2d-ac91-772bdcebe04b", | ||
"metadata": {}, | ||
"source": [ | ||
"### Plot Sweep Range vs. Azimuth" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "c7aab6b3-aeb0-4ed1-8397-8b505e63464a", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"dtree[\"sweep_0\"].ds.DBZH.sortby(\"azimuth\").plot(y=\"azimuth\")" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.13" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
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
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
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
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
Oops, something went wrong.