{ "cells": [ { "cell_type": "markdown", "id": "1b29f6d3", "metadata": {}, "source": [ "# How to plot any radar data" ] }, { "cell_type": "markdown", "id": "28306ae5", "metadata": {}, "source": [ "**_Step 1:_ Import necessary libraries**" ] }, { "cell_type": "code", "execution_count": 1, "id": "c7499d33", "metadata": {}, "outputs": [], "source": [ "import xarray as xr\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import warnings\n", "warnings.filterwarnings('ignore')" ] }, { "cell_type": "markdown", "id": "9351b7cb", "metadata": {}, "source": [ "**_Step 2:_ Read Data**" ] }, { "cell_type": "code", "execution_count": 2, "id": "a3aad88a", "metadata": {}, "outputs": [], "source": [ "ds = xr.open_dataset('../imd_mum/polar_MUM150615000342.nc')" ] }, { "cell_type": "code", "execution_count": 3, "id": "88330f7d", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
<xarray.Dataset>\n", "Dimensions: (time: 3599, range: 800, sweep: 10)\n", "Coordinates:\n", " * time (time) datetime64[ns] 2015-06-15T00:03:42 ... 2015...\n", " * range (range) float64 0.0 300.0 ... 2.394e+05 2.397e+05\n", " azimuth (time) float32 0.0 0.9998 2.0 ... 357.0 358.0 359.0\n", " elevation (time) float32 0.1978 0.1978 0.1978 ... 21.0 21.0\n", "Dimensions without coordinates: sweep\n", "Data variables: (12/15)\n", " REF (time, range) float32 ...\n", " VEL (time, range) float32 ...\n", " WIDTH (time, range) float32 ...\n", " sweep_number (sweep) int16 0 1 2 3 4 5 6 7 8 9\n", " fixed_angle (sweep) float32 0.1978 0.9998 2.0 ... 12.0 16.0 21.0\n", " sweep_start_ray_index (sweep) int64 0 360 720 1080 ... 2160 2520 2880 3240\n", " ... ...\n", " longitude float32 72.81\n", " altitude float32 100.0\n", " time_coverage_start |S32 b'2015-06-15T00:03:42Z'\n", " time_coverage_end |S32 b'2015-06-15T00:10:01Z'\n", " time_reference |S32 b'1970-1-1 00:00:00.00'\n", " volume_number int32 0\n", "Attributes:\n", " instrument_name: MUM\n", " Conventions: CF/Radial\n", " field_names: REF, VEL, WIDTH\n", " history: created by rizvi on Syeds-MacBook-Air.local at 2021-11-...
array(['2015-06-15T00:03:42.000000000', '2015-06-15T00:03:42.000000000',\n", " '2015-06-15T00:03:42.000000000', ..., '2015-06-15T00:10:01.000000000',\n", " '2015-06-15T00:10:01.000000000', '2015-06-15T00:10:01.000000000'],\n", " dtype='datetime64[ns]')
array([ 0., 300., 600., ..., 239100., 239400., 239700.])
array([ 0. , 0.999756, 1.999512, ..., 357.00073 , 358.0005 ,\n", " 359.00024 ], dtype=float32)
array([ 0.197754, 0.197754, 0.197754, ..., 21.000366, 21.000366, 21.000366],\n", " dtype=float32)
[2879200 values with dtype=float32]
[2879200 values with dtype=float32]
[2879200 values with dtype=float32]
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=int16)
array([ 0.197754, 0.999756, 1.999512, 2.999268, 4.498901, 5.998535,\n", " 8.997803, 12.002563, 16.001587, 21.000366], dtype=float32)
array([ 0, 360, 720, 1080, 1440, 1800, 2160, 2520, 2880, 3240])
array([ 359, 719, 1079, 1439, 1799, 2159, 2519, 2879, 3239, 3599])
array([b'azimuth_surveillance', b'azimuth_surveillance',\n", " b'azimuth_surveillance', b'azimuth_surveillance',\n", " b'azimuth_surveillance', b'azimuth_surveillance',\n", " b'azimuth_surveillance', b'azimuth_surveillance',\n", " b'azimuth_surveillance', b'azimuth_surveillance'], dtype='|S32')
array(18.9013, dtype=float32)
array(72.8076, dtype=float32)
array(100., dtype=float32)
array(b'2015-06-15T00:03:42Z', dtype='|S32')
array(b'2015-06-15T00:10:01Z', dtype='|S32')
array(b'1970-1-1 00:00:00.00', dtype='|S32')
array(0, dtype=int32)