{ "cells": [ { "cell_type": "markdown", "id": "59447ad6-ac47-494e-b696-4335b36b205b", "metadata": {}, "source": [ "# Furuno" ] }, { "cell_type": "code", "execution_count": null, "id": "6f96b5d8-2b96-4fd7-b8ba-166c34a8dcd2", "metadata": {}, "outputs": [], "source": [ "import xarray as xr\n", "import xradar as xd\n", "from open_radar_data import DATASETS" ] }, { "cell_type": "markdown", "id": "33d50be4-dfe5-4d99-a936-67a9a76bac94", "metadata": {}, "source": [ "## Download\n", "\n", "Fetching Furuno radar data file from [open-radar-data](https://github.com/openradar/open-radar-data) repository." ] }, { "cell_type": "code", "execution_count": null, "id": "d3c6d408-5ab2-43c3-afd1-b3a703ef3b24", "metadata": {}, "outputs": [], "source": [ "filename_scnx = DATASETS.fetch(\"2006_20220324_000000_000.scnx.gz\")\n", "filename_scn = DATASETS.fetch(\"0080_20210730_160000_01_02.scn.gz\")" ] }, { "cell_type": "markdown", "id": "b987dcfd-5105-4483-932e-71b8002e5f09", "metadata": {}, "source": [ "## xr.open_dataset\n", "\n", "Making use of the xarray `furuno` backend. " ] }, { "cell_type": "markdown", "id": "6fc6bd45-c3c7-488c-adf8-de5766fd9012", "metadata": {}, "source": [ "### scn format" ] }, { "cell_type": "code", "execution_count": null, "id": "7675b518-18e4-4ea6-b101-f1bccf603902", "metadata": {}, "outputs": [], "source": [ "ds = xr.open_dataset(filename_scn, engine=\"furuno\")\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(y=\"time\")" ] }, { "cell_type": "markdown", "id": "222ca704-d6e1-49e6-84a0-de55df9fdf61", "metadata": {}, "source": [ "#### Plot Range vs. Time\n", "\n", "We need to sort by `time` and specify the y-coordinate." ] }, { "cell_type": "code", "execution_count": null, "id": "34429720-e689-4786-99e3-5af9742d19ad", "metadata": {}, "outputs": [], "source": [ "ds.DBZH.sortby(\"time\").plot(y=\"time\")" ] }, { "cell_type": "markdown", "id": "d904cd09-8590-42e2-8dce-41d3949d313c", "metadata": {}, "source": [ "#### Plot Range vs. Azimuth" ] }, { "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": "1c2764fd-715a-46d9-8dca-f5e3594272ed", "metadata": {}, "source": [ "### scnx format" ] }, { "cell_type": "code", "execution_count": null, "id": "c3e73ea1-bb52-4122-908e-9d5da4bd8334", "metadata": {}, "outputs": [], "source": [ "ds = xr.open_dataset(filename_scnx, engine=\"furuno\")\n", "display(ds)" ] }, { "cell_type": "markdown", "id": "726e51dc-d0d6-4998-91dd-87006473f71a", "metadata": {}, "source": [ "#### Plot Time vs. Azimuth" ] }, { "cell_type": "code", "execution_count": null, "id": "1ed03f35-c6d2-4299-aabb-1d6c572f4d3e", "metadata": {}, "outputs": [], "source": [ "ds.azimuth.plot(y=\"time\")" ] }, { "cell_type": "markdown", "id": "23b90ac5-f5df-4c8c-afa7-084fc1435a07", "metadata": {}, "source": [ "#### Plot Range vs. Time\n", "\n", "We need to sort by `time` and specify the y-coordinate." ] }, { "cell_type": "code", "execution_count": null, "id": "c3af4272-e031-47e4-a220-bf3f2f335f37", "metadata": {}, "outputs": [], "source": [ "ds.DBZH.sortby(\"time\").plot(y=\"time\")" ] }, { "cell_type": "markdown", "id": "05e46127-c632-4972-9053-1db19bde14df", "metadata": {}, "source": [ "#### Plot Range vs. Azimuth" ] }, { "cell_type": "code", "execution_count": null, "id": "d2a1cf3a-48e0-4a3e-9129-8b9ada8e94ce", "metadata": {}, "outputs": [], "source": [ "ds.DBZH.sortby(\"azimuth\").plot(y=\"azimuth\")" ] }, { "cell_type": "markdown", "id": "5deafdf1-9224-459c-8b10-7c501ae13234", "metadata": {}, "source": [ "## open_furuno_datatree\n", "\n", "Furuno scn/scnx files consist only of one sweep. But we might load and combine several sweeps into one DataTree." ] }, { "cell_type": "code", "execution_count": null, "id": "a65f0b48-7197-4f79-bc26-2045cfc59a4a", "metadata": {}, "outputs": [], "source": [ "dtree = xd.io.open_furuno_datatree(filename_scn)\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.11.0" } }, "nbformat": 4, "nbformat_minor": 5 }