{ "cells": [ { "cell_type": "markdown", "id": "393d3557-78ea-4e93-af20-e19429374978", "metadata": {}, "source": [ "# Swarm Ion Temperature Estimate Products in VirES\n", "\n", "This notebook demonstrates access to the Swarm LP Ion Drift and Effective Mass products ([`EFIxIDM` products](https://earth.esa.int/eogateway/documents/20142/2860886/SLIDEM_Product_Definition.pdf)). The available variables and their mapping to source product variables are provided." ] }, { "cell_type": "code", "execution_count": 1, "id": "9242a435-0c00-4670-beaa-11975b32c51c", "metadata": {}, "outputs": [], "source": [ "from viresclient import SwarmRequest\n", "\n", "SERVER_URL = \"https://vires.services/ows\"" ] }, { "cell_type": "markdown", "id": "c2346078-474b-4886-82df-8f3bd588c42c", "metadata": {}, "source": [ "## EFIxIDM_2_ - Ion Drift, Density and Effective Mass\n", "\n", "### Collections\n", "\n", "| Collection | Dataset |\n", "|---|---|\n", "|`SW_PREL_EFIAIDM_2_`| Swarm A ion drift, density and effective mass |\n", "|`SW_PREL_EFIBIDM_2_`| Swarm B ion drift, density and effective mass |\n", "|`SW_PREL_EFICIDM_2_`| Swarm C ion drift, density and effective mass |\n", "\n", "\n", "### Avaiable Variables\n", "\n", "Note that the source EFIxIDM_2_ products contain WGS84 geodetic coordinates rather than the ITRF geocentric sperical coordinates commonly used by other Swarm products. Although the differerences between the latitudes are not very large, VirES coverts the geodetic coordinates to the geocentric ones. The original coordinates from the source products are provided as a reference.\n", "\n", "\n", "| VirES Variable | Source Product Variable | Unit | Dimension | Description | \n", "|---|---|---|---|---|\n", "| `Timestamp` | `Timestamp` | $$-$$ | scalar | UTC time-stamp|\n", "| `Latitude` | n/a | $$\\text{deg}$$ | scalar | ITRF geocentric latitude calculated from the source geodetic coordinates |\n", "| `Longitude` | n/a | $$\\text{deg}$$ | scalar | ITRF geocentric longitude calculated from the source geodetic coordinates |\n", "| `Radius` | n/a | $$\\text{m}$$ | scalar | ITRF geocentric radius calculated from the source geodetic coordinates |\n", "| `Latitude_GD` | `Latitude` | $$\\text{deg}$$ | scalar | Geodetic latitude from the source product |\n", "| `Longitude_GD` | `Longitude` | $$\\text{deg}$$ | scalar | Geodetic longitude from the source product |\n", "| `Height_GD` | `Height` | $$\\text{m}$$ | scalar | Height above the WGS84 ellipsoind from the source product |\n", "| `Radius_GC` | `Radius` | $$\\text{m}$$ | scalar | Geocentric radius from the source products |\n", "| `Latitude_QD` | `QDLatitude` | $$\\text{deg}$$ | scalar | Quasi-dipole latitude from the source product |\n", "| `MLT_QD` | `MLT` | $$\\text{hour}$$ | scalar | Magnetic local time (QD) from the source product |\n", "| `V_sat_nec` | `V_sat_nec` | $$\\text{m}/\\text{s}$$ | vector[3] | Satellite velocity in north, east, centre (NEC) reference frame | \n", "| `M_i_eff` | `M_i_eff` | $$\\text{AMU}$$ | scalar | Ion effective mass |\n", "| `M_i_eff_err` | `M_i_eff_err` | $$\\text{AMU}$$ | scalar | Ion effective mass uncertainty |\n", "| `M_i_eff_Flags` | `M_i_eff_Flags` | $$-$$ | scalar | Ion effective mass validity flag. |\n", "| `M_i_eff_tbt_model` | `M_i_eff_tbt_model` | $$\\text{AMU}$$ | scalar | Ion effective mass from Truhlik et al. (2015) topside empirical model |\n", "| `V_i` | `V_i` | $$\\text{m}/\\text{s}$$ | scalar | Ion along-track drift |\n", "| `V_i_err` | `V_i_err` | $$\\text{m}/\\text{s}$$ | scalar | Ion along-track drift uncertainty |\n", "| `V_i_Flags` | `V_i_Flags` | $$-$$ | scalar | Ion along-track drift validity flag |\n", "| `V_i_raw` | `V_i_raw` | $$\\text{m}/\\text{s}$$ | scalar | Ion along-track drift without high-latitude detrending |\n", "| `N_i` | `N_i` | $$\\text{cm}^{-3}$$ | scalar | Ion density |\n", "| `N_i_err` | `N_i_err` | $$\\text{cm}^{-3}$$ | scalar | Ion density unertainty |\n", "| `N_i_Flags` | `N_i_Flags` | $$-$$ | scalar | Ion density validity flag |\n", "| `A_fp` | `A_fp` | $$\\text{m}^2$$ | scalar | Modified-OML EFI faceplate area |\n", "| `R_p` | `R_p` | $$\\text{m}$$ | scalar | Modified-OML Langmuir spherical probe radius |\n", "| `T_e` | `T_e` | $$\\text{K}$$ | scalar | Electron temperature |\n", "| `Phi_sc` | `Phi_sc` | $$\\text{V}$$ | scalar | Spacecraft floating potential with respect to plasma potential far from satellite |\n", "\n", "See the [EFIxIDM_2_ product specification](https://earth.esa.int/eogateway/documents/20142/2860886/SLIDEM_Product_Definition.pdf) for more details." ] }, { "cell_type": "code", "execution_count": 2, "id": "04543adc-6801-405d-9be3-7593375a93fa", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "cc6f01e85f1245708158e207cac4ea03", "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": "4e8ebc62cb5547eb890a262f765a7e76", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Downloading: 0%| | [ Elapsed: 00:00, Remaining: ? ] (40.975MB)" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "Requested variables Latitude_GD, Longitude_GD, Height_GD, Radius_GC, Latitude_QD, MLT_QD, V_sat_nec, M_i_eff, M_i_eff_err, M_i_eff_Flags, M_i_eff_tbt_model, V_i, V_i_err, V_i_Flags, V_i_raw, N_i, N_i_err, N_i_Flags, A_fp, R_p, T_e, Phi_sc\n", "Response: \n", "Dimensions: (Timestamp: 172776, V_sat_nec_dim1: 3)\n", "Coordinates:\n", " * Timestamp (Timestamp) datetime64[ns] 2016-01-02T00:00:00.1969999...\n", "Dimensions without coordinates: V_sat_nec_dim1\n", "Data variables: (12/29)\n", " Spacecraft (Timestamp) object 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'\n", " Radius (Timestamp) float64 6.823e+06 6.823e+06 ... 6.826e+06\n", " MLT (Timestamp) float64 17.16 17.16 17.16 ... 5.09 5.09 5.09\n", " V_i (Timestamp) float64 -1e+05 -1e+05 ... -1e+05 -1e+05\n", " N_i_err (Timestamp) float64 -1.0 -1.0 -1.0 ... -1.0 -1.0 -1.0\n", " Latitude_GD (Timestamp) float64 31.91 31.94 31.98 ... 8.765 8.733\n", " ... ...\n", " N_i_Flags (Timestamp) uint32 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1\n", " R_p (Timestamp) float64 -1.0 -1.0 -1.0 ... -1.0 -1.0 -1.0\n", " Height_GD (Timestamp) float64 4.506e+05 4.506e+05 ... 4.488e+05\n", " Latitude (Timestamp) float64 31.75 31.78 31.82 ... 8.711 8.679\n", " V_sat_nec (Timestamp, V_sat_nec_dim1) float64 7.634e+03 ... -11.15\n", " V_i_Flags (Timestamp) uint32 65537 65537 65537 ... 65537 65537\n", "Attributes:\n", " Sources: ['SW_PREL_EFIAIDM_2__20160102T000000_20160102T235959_0101']\n", " MagneticModels: []\n", " AppliedFilters: []\n" ] } ], "source": [ "request = SwarmRequest(SERVER_URL)\n", "\n", "request.set_collection(\"SW_PREL_EFIAIDM_2_\")\n", "\n", "request.set_products(\n", " measurements=SwarmRequest.PRODUCT_VARIABLES[\"EFI_IDM\"], # request all dataset variables\n", " auxiliaries=['QDLat', 'QDLon', 'MLT'], # QD coordinates and MLT calculated by VirES\n", ")\n", "\n", "data = request.get_between(\n", " start_time=\"2016-01-02T00:00:00Z\",\n", " end_time=\"2016-01-03T00:00:00Z\",\n", ").as_xarray()\n", "\n", "print(\"Requested variables\", \", \".join(SwarmRequest.PRODUCT_VARIABLES[\"EFI_IDM\"]))\n", "print(\"Response:\", data)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.9.7" } }, "nbformat": 4, "nbformat_minor": 5 }