{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# VirES - access to Swarm virtual observatories data\n", "\n", "This notebook demonstrates access to Swarm VOBS_1M and V_OBS_4M virtual observatory data via VirES for Swarm API.\n", "\n", "Avalable observed and core field data collections\n", "\n", "| Collection Name | Description |\n", "|---|---|\n", "| `SW_OPER_VOBS_1M_2_` | Swarm 1 month data from all virtual observatories |\n", "| `SW_OPER_VOBS_1M_2_:` | Swarm 1 month data from one selected virtual observatory |\n", "| `SW_OPER_VOBS_4M_2_` | Swarm 4 month data from all virtual observatories |\n", "| `SW_OPER_VOBS_4M_2_:` | Swarm 4 months data from one selected virtual observatory |\n", "\n", "Avalable field secular variation data collections\n", "\n", "| Collection Name | Description |\n", "|---|---|\n", "| `SW_OPER_VOBS_1M_2_:SecularVariation` | Swarm 1 month secular variation data from all virtual observatories |\n", "| `SW_OPER_VOBS_1M_2_:SecularVariation:` | Swarm 1 month secular variation data from one selected virtual observatory |\n", "| `SW_OPER_VOBS_4M_2_:SecularVariation` | Swarm 4 month secular variation data from all virtual observatories |\n", "| `SW_OPER_VOBS_4M_2_:SecularVariation:` | Swarm 4 months secular variation data from one selected virtual observatory |\n", "\n", "The `` is a 7-letter \"virtual observatories\" identifier, unique for each of the 300 \"virtual observatories\".\n", "\n", "Avalable observed and core filed variables (same for all collections)\n", "\n", "| Variable | Unit | Dimension | Description |\n", "|---|---|---|---|\n", "| `SiteCode` | $-$ | char [7] | virtual observatory identifier |\n", "| `Timestamp` | $-$ | scalar | UTC time of observation |\n", "| `Latitude` | $\\text{deg}$ | scalar | ITRF geocentric latitude |\n", "| `Longitude` | $\\text{deg}$ | scalar | ITRF geocentric longitude |\n", "| `Radius` | $\\text{m}$ | scalar | ITRF geocentric radius |\n", "| `B_CF` | $\\text{nT}$ | vector [3] | Core magnetic field vector in ITRF NEC frame. |\n", "| `B_OB` | $\\text{nT}$ | vector [3] | Observed magnetic field vector in ITRF NEC frame. |\n", "| `sigma_CF` | $\\text{nT}$ | vector [3] | Estimated error of the core magnetic field vector in ITRF NEC frame. |\n", "| `sigma_OB` | $\\text{nT}$ | vector [3] | Estimated error of the observed magnetic field vector in ITRF NEC frame. |\n", "\n", "Avalable secular variation variables (same for all collections)\n", "\n", "| Variable | Unit | Dimension | Description | \n", "|---|---|---|---|\n", "| `SiteCode` | $-$ | char [7] | virtual observatory identifier |\n", "| `Timestamp` | $-$ | scalar | UTC time of observation |\n", "| `Latitude` | $\\text{deg}$ | scalar | ITRF geocentric latitude |\n", "| `Longitude` | $\\text{deg}$ | scalar | ITRF geocentric longitude |\n", "| `Radius` | $\\text{m}$ | scalar | ITRF geocentric radius |\n", "| `B_SV` | $\\text{nT}/\\text{yr}$ | vector [3] | Field secular variation vector in ITRF NEC frame. |\n", "| `sigma_SV` | $\\text{nT}/\\text{yr}$ | vector [3] | Estimated error of the field secular variation vector in ITRF NEC frame. |\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from matplotlib.pyplot import figure, subplot, show\n", "from viresclient import SwarmRequest\n", "\n", "server_url = None # default VirES server\n", "\n", "request = SwarmRequest(server_url)\n", "\n", "VOBS_VARIABLES = ['SiteCode', 'B_CF', 'B_OB', 'sigma_CF', 'sigma_OB']\n", "VOBS_SV_VARIABLES = ['SiteCode', 'B_SV', 'sigma_SV']" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## VOBS_1M - list of virtual observatories" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Avaiable observatories and temporal extent of their data:\n", "site\t\tstartTime\t\t\tendTime\n", "N06E002\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E013\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E025\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E037\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E048\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E060\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E072\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E083\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E095\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E106\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E118\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E130\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E141\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E153\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E164\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06E176\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W010\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W021\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W033\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W045\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W056\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W068\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W079\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W091\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W103\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W114\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W126\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W138\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W149\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W161\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N06W172\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E002\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E014\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E026\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E038\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E050\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E062\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E074\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E086\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E098\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E110\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E122\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E134\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E146\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E158\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18E170\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W010\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W022\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W034\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W046\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W058\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W070\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W082\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W094\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W106\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W118\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W130\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W142\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W154\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W166\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N18W178\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E004\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E018\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E031\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E044\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E058\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E071\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E084\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E098\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E111\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E124\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E138\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E151\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E164\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30E178\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30W009\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30W022\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30W036\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30W049\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30W062\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30W076\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30W089\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30W102\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30W116\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30W129\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30W142\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30W156\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N30W169\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42E009\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42E024\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42E040\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42E056\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42E071\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42E087\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42E103\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42E118\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42E134\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42E150\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42E165\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42W007\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42W023\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42W038\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42W054\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42W069\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42W085\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42W101\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42W116\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42W132\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42W148\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42W163\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N42W179\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54E017\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54E037\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54E057\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54E077\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54E097\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54E117\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54E137\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54E157\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54E177\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54W003\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54W023\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54W043\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54W063\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54W083\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54W103\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54W123\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54W143\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N54W163\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N65E004\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N65E032\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N65E059\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N65E087\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N65E115\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N65E142\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N65E170\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N65W024\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N65W051\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N65W079\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N65W107\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N65W135\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N65W162\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N77E026\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N77E077\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N77E129\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N77E180\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N77W026\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N77W077\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N77W129\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "N90E000\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E008\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E019\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E031\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E042\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E054\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E066\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E077\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E089\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E101\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E112\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E124\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E135\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E147\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E159\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06E170\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W004\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W016\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W027\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W039\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W050\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W062\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W074\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W085\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W097\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W108\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W120\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W132\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W143\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W155\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W167\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S06W178\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E009\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E021\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E033\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E045\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E057\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E069\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E081\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E093\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E105\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E117\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E129\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E141\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E153\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E165\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18E177\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W003\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W015\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W027\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W039\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W051\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W063\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W075\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W087\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W099\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W111\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W123\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W135\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W147\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W159\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S18W171\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30E012\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30E025\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30E039\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30E052\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30E065\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30E079\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30E092\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30E105\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30E119\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30E132\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30E145\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30E159\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30E172\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W001\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W015\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W028\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W041\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W055\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W068\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W081\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W095\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W108\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W121\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W135\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W148\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W161\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S30W175\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42E001\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42E017\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42E033\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42E048\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42E064\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42E079\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42E095\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42E111\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42E126\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42E142\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42E158\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42E173\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42W014\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42W030\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42W046\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42W061\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42W077\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42W093\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42W108\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42W124\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42W140\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42W155\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S42W171\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54E006\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54E026\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54E046\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54E066\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54E086\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54E106\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54E126\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54E146\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54E166\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54W014\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54W034\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54W054\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54W074\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54W094\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54W114\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54W134\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54W154\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S54W174\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S65E014\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S65E042\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S65E070\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S65E098\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S65E125\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S65E153\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S65W013\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S65W041\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S65W069\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S65W096\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S65W124\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S65W152\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S65W179\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S77E040\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S77E092\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S77E143\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S77W011\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S77W063\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S77W114\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S77W166\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n", "S90E000\t\t2013-12-15T12:00:00Z\t2020-12-15T12:00:00Z\n" ] } ], "source": [ "observatories = request.available_observatories('SW_OPER_VOBS_1M_2_', details=True)\n", "\n", "print('Avaiable observatories and temporal extent of their data:')\n", "print('site\\t\\tstartTime\\t\\t\\tendTime')\n", "for item in zip(observatories['site'], observatories['startTime'], observatories['endTime']):\n", " print(\"%s\\t\\t%s\\t%s\" % item)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## VOBS_1M - all virtual observatories" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "5d4b03cd0d6f48108cd94c17c7b63c31", "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": "073ab6674bd7426abee5b323c97c12f9", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Downloading: 0%| | [ Elapsed: 00:00, Remaining: ? ] (0.559MB)" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Dimensions: (NEC: 3, Timestamp: 3600)\n", "Coordinates:\n", " * Timestamp (Timestamp) datetime64[ns] 2016-01-15T12:00:00 ... 2016-12-15...\n", " * NEC (NEC) " ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "from matplotlib.pyplot import figure, subplot, show\n", "from scipy.interpolate import interp1d\n", "from cartopy.feature import LAND, OCEAN, COASTLINE\n", "from cartopy.crs import Mollweide, Orthographic, PlateCarree\n", "\n", "\n", "request = SwarmRequest(server_url)\n", "request.set_collection('SW_OPER_VOBS_1M_2_')\n", "request.set_products(\n", " measurements=VOBS_VARIABLES,\n", " auxiliaries=['QDLat', 'QDLon'],\n", ")\n", "data = request.get_between(\n", " start_time='2016-01-01T00:00:00Z',\n", " end_time='2017-01-01T00:00:00Z',\n", " asynchronous=True,\n", ").as_xarray()\n", "\n", "# ---------\n", "\n", "print(data)\n", "\n", "text_properties = dict(\n", " fontsize='xx-small',\n", " fontstretch='condensed',\n", " horizontalalignment='center',\n", " verticalalignment='baseline',\n", " rotation=10,\n", " color='tab:red',\n", ")\n", "\n", "def add_features(ax):\n", " ax.add_feature(LAND, facecolor=(1.0, 1.0, 0.9))\n", " ax.add_feature(OCEAN, facecolor=(0.9, 1.0, 1.0))\n", " ax.add_feature(COASTLINE, edgecolor='silver')\n", " return ax\n", "\n", "%matplotlib inline\n", "fig = figure(figsize=(18, 18), dpi=100)\n", "\n", "times = data['Timestamp'].values\n", "idx = (times == times.max()).nonzero()[0]\n", "\n", "\n", "ax = add_features(subplot(2, 1, 1, projection=Mollweide()))\n", "for lat, lon, code in zip(data['Latitude'].values[idx], data['Longitude'].values[idx], data['SiteCode'].values[idx]):\n", " ax.plot(lon, lat, '.', ms=6, alpha=0.5, color='tab:blue', transform=PlateCarree())\n", " ax.text(lon, lat, code, transform=PlateCarree(), **text_properties )\n", "\n", "ax = add_features(subplot(2, 2, 3, projection=Orthographic(0, 90)))\n", "for lat, lon, code in zip(data['Latitude'].values[idx], data['Longitude'].values[idx], data['SiteCode'].values[idx]):\n", " if lat < 0: continue\n", " ax.plot(lon, lat, '.', ms=6, alpha=0.5, color='tab:blue', transform=PlateCarree())\n", " ax.text(lon, lat, code, transform=PlateCarree(), **text_properties )\n", "\n", "ax = add_features(subplot(2, 2, 4, projection=Orthographic(0, -90)))\n", "for lat, lon, code in zip(data['Latitude'].values[idx], data['Longitude'].values[idx], data['SiteCode'].values[idx]):\n", " if lat > 0: continue\n", " ax.plot(lon, lat, '.', ms=6, alpha=0.5, color='tab:blue', transform=PlateCarree())\n", " ax.text(lon, lat, code, transform=PlateCarree(), **text_properties )\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## VOBS_4M - list of virtual observatories - secular variation" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Avaiable observatories and temporal extent of their data:\n", "site\t\tstartTime\t\t\tendTime\n", "N06E002\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E013\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E025\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E037\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E048\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E060\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E072\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E083\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E095\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E106\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E118\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E130\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E141\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E153\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E164\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06E176\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W010\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W021\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W033\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W045\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W056\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W068\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W079\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W091\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W103\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W114\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W126\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W138\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W149\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W161\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N06W172\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E002\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E014\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E026\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E038\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E050\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E062\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E074\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E086\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E098\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E110\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E122\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E134\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E146\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E158\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18E170\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W010\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W022\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W034\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W046\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W058\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W070\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W082\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W094\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W106\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W118\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W130\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W142\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W154\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W166\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N18W178\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E004\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E018\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E031\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E044\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E058\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E071\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E084\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E098\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E111\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E124\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E138\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E151\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E164\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30E178\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30W009\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30W022\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30W036\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30W049\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30W062\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30W076\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30W089\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30W102\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30W116\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30W129\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30W142\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30W156\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N30W169\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42E009\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42E024\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42E040\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42E056\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42E071\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42E087\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42E103\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42E118\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42E134\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42E150\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42E165\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42W007\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42W023\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42W038\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42W054\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42W069\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42W085\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42W101\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42W116\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42W132\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42W148\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42W163\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N42W179\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54E017\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54E037\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54E057\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54E077\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54E097\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54E117\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54E137\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54E157\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54E177\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54W003\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54W023\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54W043\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54W063\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54W083\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54W103\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54W123\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54W143\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N54W163\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N65E004\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N65E032\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N65E059\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N65E087\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N65E115\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N65E142\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N65E170\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N65W024\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N65W051\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N65W079\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N65W107\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N65W135\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N65W162\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N77E026\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N77E077\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N77E129\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N77E180\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N77W026\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N77W077\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N77W129\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "N90E000\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E008\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E019\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E031\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E042\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E054\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E066\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E077\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E089\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E101\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E112\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E124\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E135\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E147\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E159\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06E170\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W004\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W016\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W027\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W039\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W050\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W062\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W074\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W085\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W097\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W108\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W120\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W132\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W143\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W155\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W167\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S06W178\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E009\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E021\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E033\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E045\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E057\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E069\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E081\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E093\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E105\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E117\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E129\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E141\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E153\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E165\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18E177\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W003\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W015\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W027\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W039\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W051\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W063\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W075\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W087\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W099\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W111\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W123\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W135\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W147\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W159\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S18W171\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30E012\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30E025\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30E039\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30E052\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30E065\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30E079\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30E092\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30E105\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30E119\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30E132\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30E145\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30E159\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30E172\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W001\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W015\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W028\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W041\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W055\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W068\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W081\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W095\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W108\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W121\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W135\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W148\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W161\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S30W175\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42E001\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42E017\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42E033\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42E048\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42E064\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42E079\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42E095\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42E111\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42E126\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42E142\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42E158\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42E173\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42W014\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42W030\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42W046\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42W061\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42W077\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42W093\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42W108\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42W124\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42W140\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42W155\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S42W171\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54E006\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54E026\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54E046\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54E066\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54E086\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54E106\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54E126\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54E146\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54E166\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54W014\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54W034\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54W054\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54W074\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54W094\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54W114\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54W134\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54W154\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S54W174\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S65E014\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S65E042\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S65E070\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S65E098\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S65E125\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S65E153\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S65W013\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S65W041\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S65W069\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S65W096\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S65W124\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S65W152\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S65W179\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S77E040\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S77E092\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S77E143\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S77W011\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S77W063\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S77W114\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S77W166\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n", "S90E000\t\t2014-09-15T12:00:00Z\t2020-05-15T12:00:00Z\n" ] } ], "source": [ "observatories = request.available_observatories('SW_OPER_VOBS_4M_2_:SecularVariation', details=True)\n", "\n", "print('Avaiable observatories and temporal extent of their data:')\n", "print('site\\t\\tstartTime\\t\\t\\tendTime')\n", "for item in zip(observatories['site'], observatories['startTime'], observatories['endTime']):\n", " print(\"%s\\t\\t%s\\t%s\" % item)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## VOBS_4M - all virtual observatories - secular variation" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e04ce63aa184439b92b6da2a3ba928b9", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Processing: 0%| | [ Elapsed: 00:00, Remaining: ? ] [1/1] " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "request = SwarmRequest(server_url)\n", "request.set_collection('SW_OPER_VOBS_4M_2_:SecularVariation')\n", "request.set_products(\n", " measurements=VOBS_SV_VARIABLES,\n", " auxiliaries=['QDLat', 'QDLon'],\n", ")\n", "data = request.get_between(\n", " start_time='2016-01-01T00:00:00Z',\n", " end_time='2017-01-01T00:00:00Z',\n", " asynchronous=True,\n", ").as_xarray()\n", "\n", "\n", "# ---------\n", "\n", "print(data)\n", "\n", "text_properties = dict(\n", " fontsize='xx-small',\n", " fontstretch='condensed',\n", " horizontalalignment='center',\n", " verticalalignment='baseline',\n", " rotation=10,\n", " color='tab:red',\n", ")\n", "\n", "def add_features(ax):\n", " ax.add_feature(LAND, facecolor=(1.0, 1.0, 0.9))\n", " ax.add_feature(OCEAN, facecolor=(0.9, 1.0, 1.0))\n", " ax.add_feature(COASTLINE, edgecolor='silver')\n", " return ax\n", "\n", "%matplotlib inline\n", "fig = figure(figsize=(18, 18), dpi=100)\n", "\n", "times = data['Timestamp'].values\n", "idx = (times == times.max()).nonzero()[0]\n", "\n", "\n", "ax = add_features(subplot(2, 1, 1, projection=Mollweide()))\n", "for lat, lon, code in zip(data['Latitude'].values[idx], data['Longitude'].values[idx], data['SiteCode'].values[idx]):\n", " ax.plot(lon, lat, '.', ms=6, alpha=0.5, color='tab:blue', transform=PlateCarree())\n", " ax.text(lon, lat, code, transform=PlateCarree(), **text_properties )\n", "\n", "ax = add_features(subplot(2, 2, 3, projection=Orthographic(0, 90)))\n", "for lat, lon, code in zip(data['Latitude'].values[idx], data['Longitude'].values[idx], data['SiteCode'].values[idx]):\n", " if lat < 0: continue\n", " ax.plot(lon, lat, '.', ms=6, alpha=0.5, color='tab:blue', transform=PlateCarree())\n", " ax.text(lon, lat, code, transform=PlateCarree(), **text_properties )\n", "\n", "ax = add_features(subplot(2, 2, 4, projection=Orthographic(0, -90)))\n", "for lat, lon, code in zip(data['Latitude'].values[idx], data['Longitude'].values[idx], data['SiteCode'].values[idx]):\n", " if lat > 0: continue\n", " ax.plot(lon, lat, '.', ms=6, alpha=0.5, color='tab:blue', transform=PlateCarree())\n", " ax.text(lon, lat, code, transform=PlateCarree(), **text_properties )" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## VOBS_1M vs VOBS_4M - one virtual observatory" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from datetime import datetime\n", "\n", "site = 'S77W114'\n", "\n", "request = SwarmRequest(server_url)\n", "request.set_collection(f'SW_OPER_VOBS_1M_2_:{site}')\n", "request.set_products(\n", " measurements=VOBS_VARIABLES,\n", " auxiliaries=['QDLat', 'QDLon'],\n", ")\n", "data_1m = request.get_between(\n", " start_time='2013-01-01T10:00:00Z',\n", " end_time=datetime.now(),\n", " asynchronous=False,\n", ").as_xarray()\n", "print(data_1m)\n", "\n", "# ---------\n", "\n", "request = SwarmRequest(server_url)\n", "request.set_collection(f'SW_OPER_VOBS_4M_2_:{site}')\n", "request.set_products(\n", " measurements=VOBS_VARIABLES,\n", " auxiliaries=['QDLat', 'QDLon'],\n", ")\n", "data_4m = request.get_between(\n", " start_time='2013-01-01T10:00:00Z',\n", " end_time=datetime.now(),\n", " asynchronous=False,\n", ").as_xarray()\n", "print(data_4m)\n", "\n", "# ---------\n", "\n", "request = SwarmRequest(server_url)\n", "request.set_collection(f'SW_OPER_VOBS_1M_2_:SecularVariation:{site}')\n", "request.set_products(\n", " measurements=VOBS_SV_VARIABLES,\n", " auxiliaries=['QDLat', 'QDLon'],\n", ")\n", "data_1m_sv = request.get_between(\n", " start_time='2013-01-01T10:00:00Z',\n", " end_time=datetime.now(),\n", " asynchronous=False,\n", ").as_xarray()\n", "print(data_1m)\n", "\n", "# ---------\n", "\n", "request = SwarmRequest(server_url)\n", "request.set_collection(f'SW_OPER_VOBS_4M_2_:SecularVariation:{site}')\n", "request.set_products(\n", " measurements=VOBS_SV_VARIABLES,\n", " auxiliaries=['QDLat', 'QDLon'],\n", ")\n", "data_4m_sv = request.get_between(\n", " start_time='2013-01-01T10:00:00Z',\n", " end_time=datetime.now(),\n", " asynchronous=False,\n", ").as_xarray()\n", "print(data_4m)\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "fig = figure(figsize=(18, 18), dpi=100)\n", "\n", "ax = subplot(3, 1, 1)\n", "h_cf_1m, = ax.plot(data_1m['Timestamp'].values, data_1m['B_CF'].values[:, 0], 'o', ms=4)\n", "h_ob_1m, = ax.plot(data_1m['Timestamp'].values, data_1m['B_OB'].values[:, 0], 'o', ms=5, mfc='none')\n", "h_cf_4m, = ax.plot(data_4m['Timestamp'].values, data_4m['B_CF'].values[:, 0], 's', ms=4)\n", "h_ob_4m, = ax.plot(data_4m['Timestamp'].values, data_4m['B_OB'].values[:, 0], 's', ms=5, mfc='none')\n", "\n", "ax.set_title(site)\n", "ax.set_ylabel('B_N / nT')\n", "ax.grid()\n", "ax.legend(\n", " [h_cf_1m, h_ob_1m, h_cf_4m, h_ob_4m],\n", " ['VOBS_1M - core field', 'VOBS_1M - observed field', 'VOBS_4M - core field', 'VOBS_4M - observed field']\n", ")\n", "\n", "ax = subplot(3, 1, 2)\n", "h_cf_1m, = ax.plot(data_1m['Timestamp'].values, data_1m['B_CF'].values[:, 1], 'o', ms=4)\n", "h_ob_1m, = ax.plot(data_1m['Timestamp'].values, data_1m['B_OB'].values[:, 1], 'o', ms=5, mfc='none')\n", "h_cf_4m, = ax.plot(data_4m['Timestamp'].values, data_4m['B_CF'].values[:, 1], 's', ms=4)\n", "h_ob_4m, = ax.plot(data_4m['Timestamp'].values, data_4m['B_OB'].values[:, 1], 's', ms=5, mfc='none')\n", "\n", "ax.set_title(site)\n", "ax.set_ylabel('B_E / nT')\n", "ax.grid()\n", "ax.legend(\n", " [h_cf_1m, h_ob_1m, h_cf_4m, h_ob_4m],\n", " ['VOBS_1M - core field', 'VOBS_1M - observed field', 'VOBS_4M - core field', 'VOBS_4M - observed field']\n", ")\n", "\n", "ax = subplot(3, 1, 3)\n", "h_cf_1m, = ax.plot(data_1m['Timestamp'].values, data_1m['B_CF'].values[:, 2], 'o', ms=4)\n", "h_ob_1m, = ax.plot(data_1m['Timestamp'].values, data_1m['B_OB'].values[:, 2], 'o', ms=5, mfc='none')\n", "h_cf_4m, = ax.plot(data_4m['Timestamp'].values, data_4m['B_CF'].values[:, 2], 's', ms=4)\n", "h_ob_4m, = ax.plot(data_4m['Timestamp'].values, data_4m['B_OB'].values[:, 2], 's', ms=5, mfc='none')\n", "\n", "ax.set_title(site)\n", "ax.set_ylabel('B_C / nT')\n", "ax.grid()\n", "ax.legend(\n", " [h_cf_1m, h_ob_1m, h_cf_4m, h_ob_4m],\n", " ['VOBS_1M - core field', 'VOBS_1M - observed field', 'VOBS_4M - core field', 'VOBS_4M - observed field']\n", ")\n", "\n", "show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "fig = figure(figsize=(18, 18), dpi=100)\n", "\n", "ax = subplot(3, 1, 1)\n", "h_sv_1m, = ax.plot(data_1m_sv['Timestamp'].values, data_1m_sv['B_SV'].values[:, 0], 'o', ms=4)\n", "h_sv_4m, = ax.plot(data_4m_sv['Timestamp'].values, data_4m_sv['B_SV'].values[:, 0], 'o', ms=4)\n", "\n", "ax.set_title(site)\n", "ax.set_ylabel('dB_N/dt / nT/yr')\n", "ax.grid()\n", "ax.legend([h_sv_1m, h_sv_4m], ['VOBS_1M - secular variation', 'VOBS_4M - secular variation'])\n", "\n", "ax = subplot(3, 1, 2)\n", "h_sv_1m, = ax.plot(data_1m_sv['Timestamp'].values, data_1m_sv['B_SV'].values[:, 1], 'o', ms=4)\n", "h_sv_4m, = ax.plot(data_4m_sv['Timestamp'].values, data_4m_sv['B_SV'].values[:, 1], 'o', ms=4)\n", "\n", "ax.set_title(site)\n", "ax.set_ylabel('dB_E/dt / nT/yr')\n", "ax.grid()\n", "ax.legend([h_sv_1m, h_sv_4m], ['VOBS_1M - secular variation', 'VOBS_4M - secular variation'])\n", "\n", "ax = subplot(3, 1, 3)\n", "h_sv_1m, = ax.plot(data_1m_sv['Timestamp'].values, data_1m_sv['B_SV'].values[:, 2], 'o', ms=4)\n", "h_sv_4m, = ax.plot(data_4m_sv['Timestamp'].values, data_4m_sv['B_SV'].values[:, 2], 'o', ms=4)\n", "\n", "ax.set_title(site)\n", "ax.set_ylabel('dB_C/dt / nT/yr')\n", "ax.grid()\n", "ax.legend([h_sv_1m, h_sv_4m], ['VOBS_1M - secular variation', 'VOBS_4M - secular variation'])\n", "\n", "show()" ] } ], "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.8.8" } }, "nbformat": 4, "nbformat_minor": 4 }