{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# AEBS products in VirES\n", "\n", "This notebook demonstrates access to the AEBS products data by means of the vires client.\n", "\n", "For each VirES data collection the avaiable variables are listed. In addition, mapping the the variables of the source AEBS products is provided [*link to spec TBD*]." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from viresclient import SwarmRequest\n", "\n", "server_url = 'https://staging.viresdisc.vires.services/ows'\n", "\n", "\n", "if True:\n", " # setup older client versions without AEBS support\n", " SwarmRequest.COLLECTIONS.update({\n", " 'AEJ_LPL': ['SW_OPER_AEJ{}LPL_2F'.format(x) for x in 'ABC'],\n", " 'AEJ_LPL:Quality': ['SW_OPER_AEJ{}LPL_2F:Quality'.format(x) for x in 'ABC'],\n", " 'AEJ_LPS': ['SW_OPER_AEJ{}LPS_2F'.format(x) for x in 'ABC'],\n", " 'AEJ_LPS:Quality': ['SW_OPER_AEJ{}LPS_2F:Quality'.format(x) for x in 'ABC'],\n", " 'AEJ_PBL': ['SW_OPER_AEJ{}PBL_2F'.format(x) for x in 'ABC'],\n", " 'AEJ_PBS': ['SW_OPER_AEJ{}PBS_2F'.format(x) for x in 'ABC'],\n", " 'AOB_FAC': ['SW_OPER_AOB{}FAC_2F'.format(x) for x in 'ABC'],\n", " })\n", " SwarmRequest.PRODUCT_VARIABLES.update({\n", " 'AEJ_LPL': ['Latitude_QD', 'Longitude_QD', 'MLT_QD', 'J_NE', 'J_QD'],\n", " 'AEJ_LPL:Quality': ['RMS_misfit', 'Confidence'],\n", " 'AEJ_LPS': ['Latitude_QD', 'Longitude_QD', 'MLT_QD', 'J_CF_NE', 'J_DF_NE', 'J_CF_SemiQD', 'J_DF_SemiQD', 'J_R'],\n", " 'AEJ_LPS:Quality': ['RMS_misfit', 'Confidence'],\n", " 'AEJ_PBL': ['Latitude_QD', 'Longitude_QD', 'MLT_QD', 'J_QD', 'Flags', 'PointType'],\n", " 'AEJ_PBS': ['Latitude_QD', 'Longitude_QD', 'MLT_QD', 'J_DF_SemiQD', 'Flags', 'PointType'],\n", " 'AOB_FAC': ['Latitude_QD', 'Longitude_QD', 'MLT_QD', 'Boundary_Flag', 'Quality', 'Pair_Indicator'],\n", " })" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## AEJxLPL product\n", "\n", "Avaiables Variables:\n", "\n", "| VirES Variable | Source Product Variable | Unit | Dimension | Description | \n", "|---|---|---|---|---|\n", "| `Timestamp` | `t` | $-$ | scalar |UTC time of observation |\n", "| `Latitude` | `Latitude` | `Latitude` | $\\text{deg}$ | scalar | ITRF geocentric latitude |\n", "| `Longitude` | `Longitude` | $\\text{deg}$ | scalar | ITRF geocentric longitude |\n", "| `Latitude_QD` | `Latitude_QD` | $\\text{deg}$ | scalar | Quasi-dipole latitude |\n", "| `Longitude_QD` | `Longitude_QD` | $\\text{deg}$ | scalar | Quasi-dipole longitude |\n", "| `MLT_QD` | `MLT` | $\\text{hour}$ | scalar | Magnetic local time (QD) |\n", "| `J_NE` | `J` | $\\text{A}\\ \\text{km}^{-1}$ | vector [2] | North and East component of horizontal sheet current density vector in the geocentric frame |\n", "| `J_QD` | `J_QD` | $\\text{A}\\ \\text{km}^{-1}$ | scalar | East component of horizontal sheet current density in QD frame |\n", "\n", "Note: If the standard VirES `QDLat`, `QDLat` and `MLT` auxialiary variables default to the `Latitude_QD`, `Longitude_QD`, `MLT_QD` stored in AEBS products if they cannot be calculated from the times and locations. (Locations in the AEBS products are incomplete due to the missing `Radius` and they cannot be used to calucate the magnetic coordinates.)\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[1/1] Processing: 100%|██████████| [ Elapsed: 00:01, Remaining: 00:00 ]\n", " Downloading: 100%|██████████| [ Elapsed: 00:00, Remaining: 00:00 ] (0.247MB)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Dimensions: (J_NE_dim1: 2, Timestamp: 2412)\n", "Coordinates:\n", " * Timestamp (Timestamp) datetime64[ns] 2015-06-01T00:00:15.688632727 ... 2015-06-01T23:33:26.110890627\n", "Dimensions without coordinates: J_NE_dim1\n", "Data variables:\n", " Spacecraft (Timestamp) object 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A' 'A'\n", " QDLon (Timestamp) float64 -27.39 -31.73 -35.82 ... -74.72 -75.39\n", " Latitude_QD (Timestamp) float64 -77.66 -77.26 -76.8 ... -52.17 -51.2\n", " Longitude_QD (Timestamp) float64 -27.39 -31.73 -35.82 ... -74.72 -75.39\n", " J_NE (Timestamp, J_NE_dim1) float64 58.18 -7.87 ... 6.264 -17.93\n", " MLT (Timestamp) float64 17.6 17.32 17.05 ... 14.05 14.01 13.97\n", " QDLat (Timestamp) float64 -77.66 -77.26 -76.8 ... -52.17 -51.2\n", " Latitude (Timestamp) float64 -79.2 -78.22 -77.24 ... -50.34 -49.34\n", " Longitude (Timestamp) float64 178.7 179.9 -179.2 ... -165.0 -164.9\n", " J_QD (Timestamp) float64 -58.71 -64.28 -72.47 ... -20.11 -18.99\n", " MLT_QD (Timestamp) float64 17.6 17.32 17.05 ... 14.05 14.01 13.97\n", "Attributes:\n", " Sources: ['SW_OPER_AEJALPL_2F_20150531T000000_20150531T235959_010...\n", " MagneticModels: []\n", " RangeFilters: []\n" ] } ], "source": [ "request = SwarmRequest(server_url)\n", "request.set_collection('SW_OPER_AEJALPL_2F')\n", "request.set_products(\n", " measurements=['Latitude_QD', 'Longitude_QD', 'MLT_QD', 'J_NE', 'J_QD'],\n", " auxiliaries=['QDLat', 'QDLon', 'MLT'],\n", ")\n", "\n", "data = request.get_between(\n", " start_time='2015-06-01T00:00:00Z',\n", " end_time='2015-06-02T00:00:00Z',\n", ").as_xarray()\n", "\n", "print(data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## AEJxLPL product quality\n", "\n", "The AEJxLPL quality information is accessible as a separate dataset.\n", "\n", "Avaiables Variables:\n", "\n", "| VirES Variable | Source Product Variable | Unit | Dimension | Description | \n", "|---|---|---|---|---|\n", "| `Timestamp` | `t_qual` | $-$ | scalar | UTC timestamp of the quality record |\n", "| `RMS_misfit` | `RMS_misfit` | $\\text{nT}$ | scalar | Root Mean Square error misfit between observations and model values for the oval crossing |\n", "| `Confidence` | `Confidence` | $-$ | scalar | Goodness of fit computed as 1 - (residual RMS / signal RMS) for the oval crossing |\n" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[1/1] Processing: 100%|██████████| [ Elapsed: 00:01, Remaining: 00:00 ]\n", " Downloading: 100%|██████████| [ Elapsed: 00:00, Remaining: 00:00 ] (0.037MB)" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Dimensions: (Timestamp: 61)\n", "Coordinates:\n", " * Timestamp (Timestamp) datetime64[ns] 2015-06-01T00:05:37 ... 2015-06-01T23:30:25\n", "Data variables:\n", " Spacecraft (Timestamp) object 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A' 'A'\n", " RMS_misfit (Timestamp) float64 0.3433 0.5879 0.5471 ... 0.04362 0.07308\n", " Confidence (Timestamp) float64 0.9642 0.9695 0.9793 ... 0.9834 0.9809\n", "Attributes:\n", " Sources: ['SW_OPER_AEJALPL_2F_20150531T000000_20150531T235959_010...\n", " MagneticModels: []\n", " RangeFilters: []\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n" ] } ], "source": [ "request = SwarmRequest(server_url)\n", "request.set_collection('SW_OPER_AEJALPL_2F:Quality')\n", "request.set_products(\n", " measurements=['RMS_misfit', 'Confidence'],\n", ")\n", "\n", "data = request.get_between(\n", " start_time='2015-06-01T00:00:00Z',\n", " end_time='2015-06-02T00:00:00Z'\n", ").as_xarray()\n", "\n", "print(data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## AEJxLPS product\n", "\n", "Avaiables Variables:\n", "\n", "| VirES Variable | Source Product Variable | Unit | Dimension | Description | \n", "|---|---|---|---|---|\n", "| `Timestamp` | `t` | $-$ | scalar |UTC time of observation |\n", "| `Latitude` | `Latitude` | `Latitude` | $\\text{deg}$ | scalar | ITRF geocentric latitude |\n", "| `Longitude` | `Longitude` | $\\text{deg}$ | scalar | ITRF geocentric longitude |\n", "| `Latitude_QD` | `Latitude_QD` | $\\text{deg}$ | scalar | Quasi-dipole latitude |\n", "| `Longitude_QD` | `Longitude_QD` | $\\text{deg}$ | scalar | Quasi-dipole longitude |\n", "| `MLT_QD` | `MLT` | $\\text{hour}$ | scalar | Magnetic local time (QD) |\n", "| `J_CF_NE` | `J_CF` | $\\text{A}\\ \\text{km}^{-1}$ | vector [2] | North and East component of the curl-free horizontal sheet current density vector in geocentric frame |\n", "| `J_DF_NE` | `J_DF` | $\\text{A}\\ \\text{km}^{-1}$ | vector [2] | North and East component of the divergence-free horizontal sheet current density vector in geocentric frame |\n", "| `J_CF_SemiQD` | `J_CF_SemiQD` | $\\text{A}\\ \\text{km}^{-1}$ | scalar | North component of the curl-free horizontal sheet current density in semi-QD frame |\n", "| `J_DF_SemiQD` | `J_DF_SemiQD` | $\\text{A}\\ \\text{km}^{-1}$ | scalar | East component of the divergence-free horizontal sheet current density in semi-QD frame |\n", "| `J_R` | `J_r` | $\\text{A}\\ \\text{km}^{-2}$ | scalar | Radial ionospheric current density at 110 km altitude in SemiQD frame |\n", "\n", "\n", "Note: If the standard VirES `QDLat`, `QDLat` and `MLT` auxialiary variables default to the `Latitude_QD`, `Longitude_QD`, `MLT_QD` stored in AEBS products if they cannot be calculated from the times and locations. (Locations in the AEBS products are incomplete due to the missing `Radius` and they cannot be used to calucate the magnetic coordinates.)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[1/1] Processing: 100%|██████████| [ Elapsed: 00:01, Remaining: 00:00 ]\n", " Downloading: 100%|██████████| [ Elapsed: 00:00, Remaining: 00:00 ] (4.836MB)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Dimensions: (J_CF_NE_dim1: 2, J_DF_NE_dim1: 2, Timestamp: 37416)\n", "Coordinates:\n", " * Timestamp (Timestamp) datetime64[ns] 2015-06-01 ... 2015-06-01T23:59:59\n", "Dimensions without coordinates: J_CF_NE_dim1, J_DF_NE_dim1\n", "Data variables:\n", " Spacecraft (Timestamp) object 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A' 'A'\n", " J_DF_SemiQD (Timestamp) float64 -132.5 -131.9 -131.2 ... 25.7 25.81 25.84\n", " QDLon (Timestamp) float64 -22.79 -23.08 -23.38 ... -102.3 -102.3\n", " J_DF_NE (Timestamp, J_DF_NE_dim1) float64 132.5 1.824 ... -5.264 25.3\n", " J_R (Timestamp) float64 -0.08894 -0.08894 ... -0.04155 -0.01852\n", " Latitude_QD (Timestamp) float64 -78.32 -78.3 -78.28 ... 50.96 51.02 51.09\n", " Longitude_QD (Timestamp) float64 -22.79 -23.08 -23.38 ... -102.3 -102.3\n", " MLT (Timestamp) float64 17.9 17.88 17.86 17.84 ... 12.6 12.6 12.6\n", " J_CF_SemiQD (Timestamp) float64 -22.12 -22.27 -22.42 ... 8.053 7.782 7.614\n", " QDLat (Timestamp) float64 -78.32 -78.3 -78.28 ... 50.96 51.02 51.09\n", " Latitude (Timestamp) float64 -79.78 -79.72 -79.67 ... 53.79 53.85 53.91\n", " Longitude (Timestamp) float64 174.7 174.8 174.9 ... -164.7 -164.7 -164.6\n", " J_CF_NE (Timestamp, J_CF_NE_dim1) float64 -0.3044 22.12 ... -1.551\n", " MLT_QD (Timestamp) float64 17.9 17.88 17.86 17.84 ... 12.6 12.6 12.6\n", "Attributes:\n", " Sources: ['SW_OPER_AEJALPS_2F_20150531T000000_20150531T235959_010...\n", " MagneticModels: []\n", " RangeFilters: []\n" ] } ], "source": [ "request = SwarmRequest(server_url)\n", "request.set_collection('SW_OPER_AEJALPS_2F')\n", "request.set_products(\n", " measurements=[\n", " 'Latitude_QD', 'Longitude_QD', 'MLT_QD',\n", " 'J_CF_NE', 'J_DF_NE', 'J_CF_SemiQD', 'J_DF_SemiQD', 'J_R',\n", " ],\n", " auxiliaries=['QDLat', 'QDLon', 'MLT'],\n", ")\n", "\n", "data = request.get_between(\n", " start_time='2015-06-01T00:00:00Z',\n", " end_time='2015-06-02T00:00:00Z'\n", ").as_xarray()\n", "\n", "print(data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## AEJxLPS product quality\n", "\n", "The AEJxLPS quality information is accessible as a separate dataset.\n", "\n", "Avaiables Variables:\n", "\n", "| VirES Variable | Source Product Variable | Unit | Dimension | Description |\n", "|---|---|---|---|---|\n", "| `Timestamp` | `t_qual` | $-$ | scalar | UTC timestamp of the quality record |\n", "| `RMS_misfit` | `RMS_misfit` | $\\text{nT}$ | scalar | Root Mean Square error misfit between observations and model values for the oval crossing |\n", "| `Confidence` | `Confidence` | $-$ | scalar | Goodness of fit computed as 1 - (residual RMS / signal RMS) for the oval crossing |\n" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[1/1] Processing: 100%|██████████| [ Elapsed: 00:01, Remaining: 00:00 ]\n", " Downloading: 100%|██████████| [ Elapsed: 00:00, Remaining: 00:00 ] (0.037MB)" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Dimensions: (Timestamp: 61)\n", "Coordinates:\n", " * Timestamp (Timestamp) datetime64[ns] 2015-06-01T00:34:39 ... 2015-06-01T23:59:42\n", "Data variables:\n", " Spacecraft (Timestamp) object 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A' 'A'\n", " RMS_misfit (Timestamp) float64 2.298 4.103 2.858 3.35 ... 0.4935 1.32 2.046\n", " Confidence (Timestamp) float64 0.8908 0.911 0.7526 ... 0.7863 0.3651 0.9071\n", "Attributes:\n", " Sources: ['SW_OPER_AEJALPS_2F_20150531T000000_20150531T235959_010...\n", " MagneticModels: []\n", " RangeFilters: []\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n" ] } ], "source": [ "request = SwarmRequest(server_url)\n", "request.set_collection('SW_OPER_AEJALPS_2F:Quality')\n", "request.set_products(\n", " measurements=['RMS_misfit', 'Confidence'],\n", ")\n", "\n", "data = request.get_between(\n", " start_time='2015-06-01T00:00:00Z',\n", " end_time='2015-06-02T00:00:00Z'\n", ").as_xarray()\n", "\n", "print(data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## AEJxPBL product\n", "\n", "| VirES Variable | Source Product Variable | Unit | Dimension | Description | \n", "|---|---|---|---|---|\n", "| `Timestamp` | `t_Peak`, `t_EB`, `t_PB` | $-$ | scalar |UTC time of observation |\n", "| `Latitude` | `Latitude_Peak`, `Latitude_EB`, `Latitude_PB` | $\\text{deg}$ | scalar | ITRF geocentric latitude |\n", "| `Longitude` | `Longitude_Peak`, `Longitude_EB`, `Longitude_PB` | $\\text{deg}$ | scalar | ITRF geocentric longitude |\n", "| `Latitude_QD` | `Latitude_Peak_QD`, `Latitude_EB_QD`, `Latitude_PB_QD` | $\\text{deg}$ | scalar | Quasi-dipole latitude |\n", "| `Longitude_QD` | `Longitude_Peak_QD`, `Longitude_EB_QD`, `Longitude_PB_QD` | $\\text{deg}$ | scalar | Quasi-dipole longitude |\n", "| `MLT_QD` | `MLT_Peak`, `MLT_EB`, `MLT_PB` | $\\text{hour}$ | scalar | Magnetic local time (QD) |\n", "| `J_QD` | `J` | $\\text{A}\\ \\text{km}^{-1}$ | scalar | Peak eastward sheet current intensity in QD frame. Set to `NaN` for equatorial and polar boundaries. |\n", "| `Flags` | `Flags` | $-$ | scalar | Quality indicator (for more details of the binary flags see the product specification) |\n", "| `PointType` | n/a | $-$ | scalar | Point type (see the details below) |\n", "\n", "`Latitude`, `Longitude`, `Latitude_QD`, `Longitude_QD`, `MLT_QD`, and `J_QD` are set to `NaN` if the EJ boubdaries have not been detected (also see the `Flags` specification).\n", "\n", "The multi-timestamp table structure of the source AEJxPBL products is transormed into a simple time-series. The newly introduced `PointType` variable determines the type of the samples. The meaning of the bit flags is as follows:\n", "\n", "\n", "| Bit No. | False (0) | True (1) | Note\n", "|---|---|---|---|\n", "| bit 0 (1) | WEJ | EEJ |\n", "| bit 1 (2) | Peak | Boundary |\n", "| bit 2 (4) | Equatorial boundary | Polar boundary | only if bit 1 set\n", "| bit 3 (8) | Boundary pair start | Boundary pair end | only if bit 1 set\n", "\n", "These are the possible `PointType` values:\n", "\n", "| Value | Hex. | Bin. | Meaning |\n", "|---|---|---|---|\n", "| 0 | 0x0 | 0b0000 | WEJ peak (minimum) |\n", "| 1 | 0x1 | 0b0001 | EEJ peak (maximum) |\n", "| 2 | 0x2 | 0b0010 | WEJ equatorial boundary (pair start) |\n", "| 3 | 0x3 | 0b0011 | EEJ equatorial boundary (pair start) |\n", "| 6 | 0x6 | 0b0110 | WEJ polar boundary (pair start) |\n", "| 7 | 0x7 | 0b0111 | EEJ polar boundary (pair start) |\n", "| 10 | 0xA | 0b1010 | WEJ equatorial boundary (pair end) |\n", "| 11 | 0xB | 0b1011 | EEJ equatorial boundary (pair end) |\n", "| 14 | 0xE | 0b1110 | WEJ polar boundary (pair end) |\n", "| 15 | 0xF | 0b1111 | EEJ polar boundary (pair end) |\n", "\n", "Note: If the standard VirES `QDLat`, `QDLat` and `MLT` auxialiary variables default to the `Latitude_QD`, `Longitude_QD`, `MLT_QD` stored in AEBS products if they cannot be calculated from the times and locations. (Locations in the AEBS products are incomplete due to the missing `Radius` and they cannot be used to calucate the magnetic coordinates.)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[1/1] Processing: 100%|██████████| [ Elapsed: 00:01, Remaining: 00:00 ]\n", " Downloading: 100%|██████████| [ Elapsed: 00:00, Remaining: 00:00 ] (0.115MB)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Dimensions: (Timestamp: 366)\n", "Coordinates:\n", " * Timestamp (Timestamp) datetime64[ns] 2015-06-01T00:02:07.298531294 ... 2015-06-01T23:33:41.800961018\n", "Data variables:\n", " Spacecraft (Timestamp) object 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A' 'A'\n", " Flags (Timestamp) uint8 80 80 80 80 80 80 ... 113 113 113 113 113\n", " PointType (Timestamp) uint16 7 1 11 6 0 10 2 0 ... 14 15 6 3 1 0 15 10\n", " QDLon (Timestamp) float64 -52.56 -59.43 -64.89 ... -74.03 nan -76.03\n", " Latitude_QD (Timestamp) float64 -73.62 -71.39 -68.96 ... -53.14 nan -50.22\n", " Longitude_QD (Timestamp) float64 -52.56 -59.43 -64.89 ... -74.03 nan -76.03\n", " MLT (Timestamp) float64 15.95 15.51 15.15 ... 14.05 nan 13.93\n", " QDLat (Timestamp) float64 -73.62 -71.39 -68.96 ... -53.14 nan -50.22\n", " Latitude (Timestamp) float64 -72.2 -69.33 -66.45 ... -51.34 nan -48.34\n", " Longitude (Timestamp) float64 -176.0 -174.9 -174.2 ... -165.0 nan -164.9\n", " J_QD (Timestamp) float64 nan 65.0 nan nan ... nan -20.47 nan nan\n", " MLT_QD (Timestamp) float64 15.95 15.51 15.15 ... 14.05 nan 13.93\n", "Attributes:\n", " Sources: ['SW_OPER_AEJAPBL_2F_20150101T000000_20151231T235959_0101']\n", " MagneticModels: []\n", " RangeFilters: []\n" ] } ], "source": [ "request = SwarmRequest(server_url)\n", "request.set_collection('SW_OPER_AEJAPBL_2F')\n", "request.set_products(\n", " measurements=[\n", " 'Latitude_QD', 'Longitude_QD', 'MLT_QD',\n", " 'J_QD', 'Flags', 'PointType',\n", " ],\n", " auxiliaries=['QDLat', 'QDLon', 'MLT'],\n", ")\n", "\n", "data = request.get_between(\n", " start_time='2015-06-01T00:00:00Z',\n", " end_time='2015-06-02T00:00:00Z'\n", ").as_xarray()\n", "\n", "print(data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## AEJxPBS product\n", "\n", "Avaiables Variables:\n", "\n", "| VirES Variable | Source Product Variable | Unit | Dimension | Description | \n", "|---|---|---|---|---|\n", "| `Timestamp` | `t_Peak`, `t_EB`, `t_PB` | $-$ | scalar |UTC time of observation |\n", "| `Latitude` | `Latitude_Peak`, `Latitude_EB`, `Latitude_PB` | $\\text{deg}$ | scalar | ITRF geocentric latitude |\n", "| `Longitude` | `Longitude_Peak`, `Longitude_EB`, `Longitude_PB` | $\\text{deg}$ | scalar | ITRF geocentric longitude |\n", "| `Latitude_QD` | `Latitude_Peak_QD`, `Latitude_EB_QD`, `Latitude_PB_QD` | $\\text{deg}$ | scalar | Quasi-dipole latitude |\n", "| `Longitude_QD` | `Longitude_Peak_QD`, `Longitude_EB_QD`, `Longitude_PB_QD` | $\\text{deg}$ | scalar | Quasi-dipole longitude |\n", "| `MLT_QD` | `MLT_Peak`, `MLT_EB`, `MLT_PB` | $\\text{hour}$ | scalar | Magnetic local time (QD) |\n", "| `J_DF_SemiQD` | `J_DF` | $\\text{A}\\ \\text{km}^{-1}$ | scalar | Peak eastward sheet current intensity in semi-QD frame. Set to `NaN` for equatorial and polar boundaries. |\n", "| `Flags` | `Flags` | $-$ | scalar | Quality indicator (for more details of the binary flags see the product specification) |\n", "| `PointType` | n/a | $-$ | scalar | Point type (see the details below) |\n", "\n", "`Latitude`, `Longitude`, `Latitude_QD`, `Longitude_QD`, `MLT_QD`, and `J_DF_SemiQD` are set to `NaN` if the EJ boubdaries have not been detected (also see the `Flags` specification).\n", "\n", "The multi-timestamp table structure of the source AEJxPBS products is transormed into a simple time-series. The newly introduced `PointType` variable determines the type of the samples. The meaning of the bit flags is as follows:\n", "\n", "| Bit No. | False (0) | True (1) | Note\n", "|---|---|---|---|\n", "| bit 0 (1) | WEJ | EEJ |\n", "| bit 1 (2) | Peak | Boundary |\n", "| bit 2 (4) | Equatorial boundary | Polar boundary | only if bit 1 set\n", "| bit 3 (8) | Boundary pair start | Boundary pair end | only if bit 1 set\n", "\n", "These are the possible `PointType` values:\n", "\n", "| Value | Hex. | Bin. | Meaning |\n", "|---|---|---|---|\n", "| 0 | 0x0 | 0b0000 | WEJ peak (minimum) |\n", "| 1 | 0x1 | 0b0001 | EEJ peak (maximum) |\n", "| 2 | 0x2 | 0b0010 | WEJ equatorial boundary (pair start) |\n", "| 3 | 0x3 | 0b0011 | EEJ equatorial boundary (pair start) |\n", "| 6 | 0x6 | 0b0110 | WEJ polar boundary (pair start) |\n", "| 7 | 0x7 | 0b0111 | EEJ polar boundary (pair start) |\n", "| 10 | 0xA | 0b1010 | WEJ equatorial boundary (pair end) |\n", "| 11 | 0xB | 0b1011 | EEJ equatorial boundary (pair end) |\n", "| 14 | 0xE | 0b1110 | WEJ polar boundary (pair end) |\n", "| 15 | 0xF | 0b1111 | EEJ polar boundary (pair end) |\n", "\n", "Note: If the standard VirES `QDLat`, `QDLat` and `MLT` auxialiary variables default to the `Latitude_QD`, `Longitude_QD`, `MLT_QD` stored in AEBS products if they cannot be calculated from the times and locations. (Locations in the AEBS products are incomplete due to the missing `Radius` and they cannot be used to calucate the magnetic coordinates.)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[1/1] Processing: 100%|██████████| [ Elapsed: 00:01, Remaining: 00:00 ]\n", " Downloading: 100%|██████████| [ Elapsed: 00:00, Remaining: 00:00 ] (0.115MB)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Dimensions: (Timestamp: 364)\n", "Coordinates:\n", " * Timestamp (Timestamp) datetime64[ns] 2015-06-01T00:01:32 ... 2015-06-01T23:34:07\n", "Data variables:\n", " Spacecraft (Timestamp) object 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A' 'A'\n", " J_DF_SemiQD (Timestamp) float64 nan nan 96.41 nan ... nan nan -7.49 nan\n", " Flags (Timestamp) uint8 96 96 96 96 32 32 32 ... 72 72 72 72 72 72\n", " PointType (Timestamp) uint16 10 7 1 11 3 1 15 2 0 ... 0 14 7 1 11 6 0 10\n", " QDLon (Timestamp) float64 -45.97 -45.97 -58.46 ... -73.9 -76.97\n", " Latitude_QD (Timestamp) float64 -75.57 -75.57 -72.24 ... -54.38 -49.98\n", " Longitude_QD (Timestamp) float64 -45.97 -45.97 -58.46 ... -73.9 -76.97\n", " MLT (Timestamp) float64 16.38 16.38 15.57 ... 14.37 14.05 13.87\n", " QDLat (Timestamp) float64 -75.57 -75.57 -72.24 ... -54.38 -49.98\n", " Latitude (Timestamp) float64 -74.35 -74.35 -69.9 ... -52.45 -47.95\n", " Longitude (Timestamp) float64 -179.0 -179.0 -176.6 ... -166.0 -165.7\n", " MLT_QD (Timestamp) float64 16.38 16.38 15.57 ... 14.37 14.05 13.87\n", "Attributes:\n", " Sources: ['SW_OPER_AEJAPBS_2F_20150101T000000_20151231T235959_0101']\n", " MagneticModels: []\n", " RangeFilters: []\n" ] } ], "source": [ "equest = SwarmRequest(server_url)\n", "request.set_collection('SW_OPER_AEJAPBS_2F')\n", "request.set_products(\n", " measurements=[\n", " 'Latitude_QD', 'Longitude_QD', 'MLT_QD',\n", " 'J_DF_SemiQD', 'Flags', 'PointType',\n", " ],\n", " auxiliaries=['QDLat', 'QDLon', 'MLT'],\n", ")\n", "\n", "data = request.get_between(\n", " start_time='2015-06-01T00:00:00Z',\n", " end_time='2015-06-02T00:00:00Z'\n", ").as_xarray()\n", "\n", "print(data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## AEJxPBS product - Ground magnetic disturbance\n", "\n", "The AEJxPBS ground magnetic disturbance is avaialble as a separate dataset.\n", "\n", "Avaiables Variables:\n", "\n", "\n", "| VirES Variable | Source Product Variable | Unit | Dimension | Description |\n", "|---|---|---|---|---|\n", "| `Timestamp` | n/a | $-$ | scalar | UTC timestamp ⃰ | \n", "| `Latitude` | `Latitude_B` | $\\text{deg}$ | scalar | **Geodetic** latitude ⃰ ⃰ |\n", "| `Longitude` | `Longitude_B` | $\\text{deg}$ | scalar | **Geodetic** longitude ⃰ ⃰ |\n", "| `B_NE` | `B` | $\\text{nT}$ | vector [2] | Peak value of the horizontal ground magnetic disturbance in the **geodetic** NE frame ⃰ ⃰ |\n", "\n", " ⃰ The ground magnetic disturbance timestamp is not present in the original product. It is assigned from the corresponding peak and therefore it may not excatly express the time of the disturbance event.\n", "\n", " ⃰ ⃰ Due to the missing elevation the geodetic coordinates cannot be reliably converted to ITRF geocentric ones." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[1/1] Processing: 100%|██████████| [ Elapsed: 00:01, Remaining: 00:00 ]\n", " Downloading: 100%|██████████| [ Elapsed: 00:00, Remaining: 00:00 ] (0.037MB)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Dimensions: (Timestamp: 121)\n", "Coordinates:\n", " * Timestamp (Timestamp) datetime64[ns] 2015-06-01T00:02:46 ... 2015-06-01T23:32:53\n", "Data variables:\n", " Spacecraft (Timestamp) object 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A' 'A'\n", " Longitude (Timestamp) float64 165.7 -144.9 -163.9 ... 34.37 -166.3 178.3\n", " Latitude (Timestamp) float64 -82.66 85.2 79.07 ... -72.74 -52.89 -80.83\n", "Attributes:\n", " Sources: ['SW_OPER_AEJAPBS_2F_20150101T000000_20151231T235959_0101']\n", " MagneticModels: []\n", " RangeFilters: []\n" ] } ], "source": [ "SwarmRequest.COLLECTIONS['AEJ_PBS:GroundMagneticDisturbance'] = [\n", " 'SW_OPER_AEJ{}PBS_2F:GroundMagneticDisturbance'.format(x) for x in 'ABC'\n", "]\n", "\n", "SwarmRequest.PRODUCT_VARIABLES['AEJ_PBS:GroundMagneticDisturbance'] = ['B']\n", "\n", "request = SwarmRequest(server_url)\n", "request.set_collection('SW_OPER_AEJAPBS_2F:GroundMagneticDisturbance')\n", "request.set_products(\n", " measurements=['B'],\n", ")\n", "\n", "data = request.get_between(\n", " start_time='2015-06-01T00:00:00Z',\n", " end_time='2015-06-02T00:00:00Z'\n", ").as_xarray()\n", "\n", "print(data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## AOBxFAC product\n", "\n", "Avaiables Variables:\n", "\n", "| Variable | Unit | Dimension | Description | \n", "|---|---|---|---|\n", "| `Timestamp` | $-$ | scalar |UTC time of observation |\n", "| `Latitude` | $\\text{deg}$ | scalar | ITRF geocentric latitude |\n", "| `Longitude` | $\\text{deg}$ | scalar | ITRF geocentric longitude |\n", "| `Latitude_QD` | $\\text{deg}$ | scalar | Quasi-dipole latitude |\n", "| `Longitude_QD` | $\\text{deg}$ | scalar | Quasi-dipole longitude |\n", "| `MLT_QD` | $\\text{hour}$ | scalar | Magnetic local time (QD) |\n", "| `Boundary_Flag` | $-$ | scalar | Indicator for equatorward (1) or poleward (2) boundary |\n", "| `Pair_Indicator` | $-$ | scalar | Quality indicator (for more details of the binary flags see the product specification) |\n", "| `Quality` | $-$ | vector [2] | Quality indicator of equatorward/poleward boundary (Pa, Sigma) |\n", "\n", "Note: If the standard VirES `QDLat`, `QDLat` and `MLT` auxialiary variables default to the `Latitude_QD`, `Longitude_QD`, `MLT_QD` stored in AEBS products if they cannot be calculated from the times and locations. (Locations in the AEBS products are incomplete due to the missing `Radius` and they cannot be used to calucate the magnetic coordinates.)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[1/1] Processing: 100%|██████████| [ Elapsed: 00:01, Remaining: 00:00 ]\n", " Downloading: 100%|██████████| [ Elapsed: 00:00, Remaining: 00:00 ] (0.115MB)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Dimensions: (Quality_dim1: 2, Timestamp: 102)\n", "Coordinates:\n", " * Timestamp (Timestamp) datetime64[ns] 2015-06-01T00:02:10.500000 ... 2015-06-01T23:26:29.500000\n", "Dimensions without coordinates: Quality_dim1\n", "Data variables:\n", " Spacecraft (Timestamp) object 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'\n", " Pair_Indicator (Timestamp) int8 1 -1 1 -1 1 -1 1 -1 ... -1 0 1 -1 1 -1 0 0\n", " QDLon (Timestamp) float64 -53.06 -59.62 -115.8 ... 23.12 -38.02\n", " Latitude_QD (Timestamp) float64 -73.47 -71.3 70.39 ... -77.08 -74.39\n", " Longitude_QD (Timestamp) float64 -53.11 -59.66 -115.8 ... 23.11 -38.06\n", " MLT (Timestamp) float64 15.92 15.49 12.34 ... 1.213 20.36 16.35\n", " Quality (Timestamp, Quality_dim1) float64 4.012 0.1697 ... 0.2392\n", " QDLat (Timestamp) float64 -73.46 -71.29 70.4 ... -77.08 -74.39\n", " Latitude (Timestamp) float64 -72.0 -69.22 72.77 ... -87.26 -75.78\n", " Longitude (Timestamp) float64 -175.9 -174.9 -168.6 ... 95.84 -170.6\n", " Radius (Timestamp) float64 6.839e+06 6.839e+06 ... 6.839e+06\n", " MLT_QD (Timestamp) float64 15.92 15.49 12.34 ... 1.21 20.36 16.34\n", "Attributes:\n", " Sources: ['SW_OPER_AOBAFAC_2F_20150101T000000_20151231T235959_0102']\n", " MagneticModels: []\n", " RangeFilters: []\n" ] } ], "source": [ "request = SwarmRequest(server_url)\n", "request.set_collection('SW_OPER_AOBAFAC_2F')\n", "request.set_products( \n", " measurements=[\n", " 'Latitude_QD', 'Longitude_QD', 'MLT_QD',\n", " 'Quality', 'Pair_Indicator',\n", " ],\n", " auxiliaries=['QDLat', 'QDLon', 'MLT'],\n", ")\n", "\n", "data = request.get_between(\n", " start_time='2015-06-01T00:00:00Z',\n", " end_time='2015-06-02T00:00:00Z'\n", ").as_xarray()\n", "\n", "print(data)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "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.7.6" } }, "nbformat": 4, "nbformat_minor": 4 }