{ "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 ion temperature estimates ([`EFIxTIE` products](https://earth.esa.int/eogateway/missions/swarm/product-data-handbook/level-2-product-definitions#EFIxTIE_2_)). 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": [ "## EFIxTIE_2_ - Ion Temperature Estimate\n", "\n", "### Collections\n", "\n", "| Collection | Dataset |\n", "|---|---|\n", "|`SW_OPER_EFIATIE_2_`| Swarm A ion temperature estimate |\n", "|`SW_OPER_EFIBTIE_2_`| Swarm B ion temperature estimate |\n", "|`SW_OPER_EFICTIE_2_`| Swarm C ion temperature estimate |\n", "\n", "\n", "### Avaiable Variables\n", "\n", "Note that the source EFIxTIE_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 provides 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", "| `Tn_msis` | `Tn_msis` | $$\\text{K}$$ | scalar | Neutral temperature from NRLMSISE00 model |\n", "| `Te_adj_LP` | `Te_adj_LP` | $$\\text{K}$$ | scalar | Corrected Swarm Langmuir probe (LP) electron temperature |\n", "| `Ti_meas_drift` | `Ti_meas_drift` | $$\\text{K}$$ | scalar | Ion temperature estimated using Swarm TII drift at high latitudes |\n", "| `Ti_model_drift` | `Ti_model_drift` | $$\\text{K}$$ | scalar | Ion temperature estimated using Weimer 2005 model drifts at high latitudes |\n", "| `Flag_ti_meas` | `Flag_ti_meas` | $$-$$ | scalar | Flags characterising TII-based ion temperature |\n", "| `Flag_ti_model` | `Flag_ti_model` | $$-$$ | scalar | Flags characterising model-based ion temperature |\n", "\n", "See the [EFIxTIE_2_ product specification](https://earth.esa.int/eogateway/missions/swarm/product-data-handbook/level-2-product-definitions#EFIxTIE_2_) 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": "1385fda141f34f8db7bd752a32e49663", "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": "19bd0e9507bd4e1ab3bda5ddd082dac8", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Downloading: 0%| | [ Elapsed: 00:00, Remaining: ? ] (24.028MB)" ] }, "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, Tn_msis, Te_adj_LP, Ti_meas_drift, Ti_model_drift, Flag_ti_meas, Flag_ti_model\n", "Response: \n", "Dimensions: (Timestamp: 172776)\n", "Coordinates:\n", " * Timestamp (Timestamp) datetime64[ns] 2016-01-02T00:00:00.196999936 ...\n", "Data variables: (12/19)\n", " Spacecraft (Timestamp) object 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'\n", " Flag_ti_model (Timestamp) uint8 1 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1\n", " MLT (Timestamp) float64 17.16 17.16 17.16 ... 5.09 5.09 5.09\n", " Ti_model_drift (Timestamp) float64 1.031e+03 1.031e+03 ... 843.1 843.2\n", " Radius_GC (Timestamp) float64 6.823e+06 6.823e+06 ... 6.826e+06\n", " Flag_ti_meas (Timestamp) uint8 1 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1\n", " ... ...\n", " Tn_msis (Timestamp) float64 917.5 917.5 917.4 ... 755.6 755.7 755.7\n", " Latitude_QD (Timestamp) float64 41.45 41.48 41.52 ... 1.453 1.418 1.383\n", " Latitude_GD (Timestamp) float64 31.91 31.94 31.98 ... 8.798 8.765 8.733\n", " QDLat (Timestamp) float64 41.45 41.48 41.52 ... 1.453 1.418 1.382\n", " MLT_QD (Timestamp) float64 17.09 17.09 17.09 ... 5.051 5.051 5.051\n", " Height_GD (Timestamp) float64 4.506e+05 4.506e+05 ... 4.488e+05\n", "Attributes:\n", " Sources: ['SW_OPER_EFIATIE_2__20160102T000000_20160102T235959_0101']\n", " MagneticModels: []\n", " RangeFilters: []\n" ] } ], "source": [ "request = SwarmRequest(SERVER_URL)\n", "\n", "request.set_collection(\"SW_OPER_EFIATIE_2_\")\n", "request.set_products(\n", " measurements=SwarmRequest.PRODUCT_VARIABLES[\"EFI_TIE\"], # 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_TIE\"]))\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 }