{ "cells": [ { "cell_type": "markdown", "id": "08975936-43aa-454c-a6f3-19b34b656b33", "metadata": {}, "source": [ "# AOBxFAC (Auroral oval boundaries)" ] }, { "cell_type": "markdown", "id": "47c74477-e177-4bcc-a0fc-e99c995d922c", "metadata": {}, "source": [ "> Abstract: Access to the AEBS project output, boundaries of the auroral oval determined from field-aligned currents" ] }, { "cell_type": "markdown", "id": "c97d9d8d", "metadata": {}, "source": [ "See also:\n", "- https://nbviewer.jupyter.org/github/pacesm/jupyter_notebooks/blob/master/AEBS/AEBS_AOB_FAC.ipynb\n", "- https://earth.esa.int/eogateway/search?filter=swarm&text=aebs" ] }, { "cell_type": "markdown", "id": "53efdc27-89ad-4f2a-806f-3c60ae396eae", "metadata": {}, "source": [ "## Accessing the collection" ] }, { "cell_type": "code", "execution_count": 1, "id": "b01f6f1b", "metadata": { "execution": { "iopub.execute_input": "2024-01-24T17:46:11.839323Z", "iopub.status.busy": "2024-01-24T17:46:11.838775Z", "iopub.status.idle": "2024-01-24T17:46:12.994467Z", "shell.execute_reply": "2024-01-24T17:46:12.993911Z" } }, "outputs": [], "source": [ "from viresclient import SwarmRequest\n", "import datetime as dt\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": 2, "id": "f3c1a8ae", "metadata": { "execution": { "iopub.execute_input": "2024-01-24T17:46:12.996835Z", "iopub.status.busy": "2024-01-24T17:46:12.996372Z", "iopub.status.idle": "2024-01-24T17:46:13.403957Z", "shell.execute_reply": "2024-01-24T17:46:13.403426Z" } }, "outputs": [ { "data": { "text/plain": [ "{'AOB_FAC': ['SW_OPER_AOBAFAC_2F', 'SW_OPER_AOBBFAC_2F', 'SW_OPER_AOBCFAC_2F']}" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "request = SwarmRequest()\n", "request.available_collections(\"AOB_FAC\", details=False)" ] }, { "cell_type": "code", "execution_count": 3, "id": "99a06a9f", "metadata": { "execution": { "iopub.execute_input": "2024-01-24T17:46:13.405974Z", "iopub.status.busy": "2024-01-24T17:46:13.405650Z", "iopub.status.idle": "2024-01-24T17:46:13.409460Z", "shell.execute_reply": "2024-01-24T17:46:13.408887Z" } }, "outputs": [ { "data": { "text/plain": [ "['Latitude_QD',\n", " 'Longitude_QD',\n", " 'MLT_QD',\n", " 'Boundary_Flag',\n", " 'Quality',\n", " 'Pair_Indicator']" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "request.available_measurements(\"AOB_FAC\")" ] }, { "cell_type": "markdown", "id": "2814cf8f-4d1b-4c4c-b138-e8f05f4d92cc", "metadata": {}, "source": [ "Let's fetch one month of measurements. We will also fetch magnetic coordinates and the orbit direction flag for extra context, which we will use later in the figure." ] }, { "cell_type": "code", "execution_count": 4, "id": "bc733029", "metadata": { "execution": { "iopub.execute_input": "2024-01-24T17:46:13.411234Z", "iopub.status.busy": "2024-01-24T17:46:13.410920Z", "iopub.status.idle": "2024-01-24T17:46:16.406156Z", "shell.execute_reply": "2024-01-24T17:46:16.405712Z" } }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "9c032abc2c724842b531daa96ad40767", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Processing: 0%| | [ Elapsed: 00:00, Remaining: ? ] [1/1] " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f12443b8b089442a9b09240ff8d16b5b", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Downloading: 0%| | [ Elapsed: 00:00, Remaining: ? ] (0.348MB)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "request.set_collection(\"SW_OPER_AOBAFAC_2F\")\n", "request.set_products(\n", " ['Latitude_QD',\n", " 'Longitude_QD',\n", " 'MLT_QD',\n", " 'Boundary_Flag',\n", " 'Quality',\n", " 'Pair_Indicator'],\n", " auxiliaries=[\"QDOrbitDirection\", \"QDLat\", \"QDLon\", \"MLT\"]\n", ")\n", "data = request.get_between(\n", " dt.datetime(2016, 1, 1),\n", " dt.datetime(2016, 2, 1)\n", ")" ] }, { "cell_type": "code", "execution_count": 5, "id": "c70f7116", "metadata": { "execution": { "iopub.execute_input": "2024-01-24T17:46:16.409593Z", "iopub.status.busy": "2024-01-24T17:46:16.408827Z", "iopub.status.idle": "2024-01-24T17:46:16.450883Z", "shell.execute_reply": "2024-01-24T17:46:16.450060Z" } }, "outputs": [ { "data": { "text/html": [ "
<xarray.Dataset>\n", "Dimensions: (Timestamp: 3157, Quality_dim1: 2)\n", "Coordinates:\n", " * Timestamp (Timestamp) datetime64[ns] 2016-01-01T00:07:01.500000 ....\n", "Dimensions without coordinates: Quality_dim1\n", "Data variables: (12/14)\n", " Spacecraft (Timestamp) object 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'\n", " Radius (Timestamp) float64 6.834e+06 6.834e+06 ... 6.834e+06\n", " Quality (Timestamp, Quality_dim1) float64 3.572 0.1437 ... 0.2844\n", " Pair_Indicator (Timestamp) int8 1 -1 1 -1 1 -1 1 -1 ... -1 1 -1 1 -1 1 -1\n", " Boundary_Flag (Timestamp) uint8 2 1 1 2 2 1 1 2 2 ... 2 2 1 1 2 2 1 1 2\n", " Longitude (Timestamp) float64 -112.7 -104.1 -102.9 ... 47.91 49.89\n", " ... ...\n", " MLT_QD (Timestamp) float64 18.61 18.04 17.11 ... 1.216 0.2201\n", " MLT (Timestamp) float64 18.61 18.04 17.11 ... 1.216 0.2201\n", " Latitude (Timestamp) float64 -80.0 -64.82 48.04 ... -53.34 -67.73\n", " QDLon (Timestamp) float64 -5.015 -14.53 -36.0 ... 99.16 83.28\n", " QDLat (Timestamp) float64 -67.88 -53.31 56.62 ... -57.92 -68.26\n", " QDOrbitDirection (Timestamp) int8 1 1 1 1 -1 -1 -1 -1 ... 1 1 1 -1 -1 -1 -1\n", "Attributes:\n", " MagneticModels: []\n", " AppliedFilters: []