Skip to content

Commit 9805871

Browse files
committed
Merge branch 'staging' into nix_and_tix_products
2 parents bdc9141 + 061b896 commit 9805871

File tree

3 files changed

+217
-3
lines changed

3 files changed

+217
-3
lines changed

docs/available_parameters.rst

+27
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,33 @@ SW_OPER_NIX_TMS_2F NIX_TMS
122122
SW_OPER_TIX_TMS_2F TIX_TMS
123123
============================== ================
124124

125+
The `TIRO project <https://earth.esa.int/eogateway/activities/tiro>`_ provides products for TEC and Ne derived from CHAMP, GRACE, and GRACE-FO:
126+
============================== ================
127+
Collection full name Collection type
128+
============================== ================
129+
CH_OPER_TEC_TMS_2F TEC_TIRO
130+
GR_OPER_TECxTMS_2F TEC_TIRO
131+
GF_OPER_TECxTMS_2F TEC_TIRO
132+
GR_OPER_NE__KBR_2F NE_TIRO
133+
GF_OPER_NE__KBR_2F NE_TIRO
134+
============================== ================
135+
136+
`ULF wave products <https://earth.esa.int/eogateway/activities/swarm-ulf-ionosphere>`_ are provided as:
137+
138+
================================= ===================
139+
Collection full name Collection type
140+
================================= ===================
141+
SW_OPER_ULFxMAG_2F ULF_MAG
142+
SW_OPER_ULFxMAG_2F:event ULF_MAG:event
143+
SW_OPER_ULFxMAG_2F:event_mean ULF_MAG:event_mean
144+
SW_OPER_PC1xMAG_2F:Bp_event PC1_MAG:event
145+
SW_OPER_PC1xMAG_2F:Br_event PC1_MAG:event
146+
SW_OPER_PC1xMAG_2F:Ba_event PC1_MAG:event
147+
SW_OPER_PC1xMAG_2F:Bp_event_mean PC1_MAG:event_mean
148+
SW_OPER_PC1xMAG_2F:Br_event_mean PC1_MAG:event_mean
149+
SW_OPER_PC1xMAG_2F:Ba_event_mean PC1_MAG:event_mean
150+
================================= ===================
151+
125152
The AUX_OBS collections contain ground magnetic observatory data from `INTERMAGNET <https://intermagnet.github.io/data_conditions.html>`_ and `WDC <http://www.wdc.bgs.ac.uk/>`_. Please note that these data are provided under different usage terms than the ESA data, and must be acknowledged accordingly.
126153

127154
======================== ================ ==============================================================

src/viresclient/_client_swarm.py

+187-2
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,17 @@
218218
"MM_CON_EPH_2_": ("https://swarmhandbook.earth.esa.int/catalogue/MM_CON_EPH_2_",),
219219
"NIX_TMS": ("https://swarmhandbook.earth.esa.int/catalogue/SW_NIX_TMS_2F",),
220220
"TIX_TMS": ("https://swarmhandbook.earth.esa.int/catalogue/SW_TIX_TMS_2F",),
221+
"TEC_TIRO": (
222+
"https://swarmhandbook.earth.esa.int/catalogue/CH_TEC_TMS_2F",
223+
"https://swarmhandbook.earth.esa.int/catalogue/GR_TECxTMS_2F",
224+
"https://swarmhandbook.earth.esa.int/catalogue/GR_TECxTMS_2F",
225+
),
226+
"NE_TIRO": (
227+
"https://swarmhandbook.earth.esa.int/catalogue/GR_NE__KBR_2F",
228+
"https://swarmhandbook.earth.esa.int/catalogue/GF_NE__KBR_2F",
229+
),
230+
"ULF_MAG": ("https://swarmhandbook.earth.esa.int/catalogue/SW_ULFxMAG_2F",),
231+
"PC1_MAG": ("https://swarmhandbook.earth.esa.int/catalogue/SW_PC1xMAG_2F",),
221232
}
222233
for mission in ("SW", "OR", "CH", "CR", "CO"):
223234
for cadence in ("1M", "4M"):
@@ -630,6 +641,18 @@ class SwarmRequest(ClientRequest):
630641
"MAG_GFO_ML": ["GF1_MAG_ACAL_CORR_ML", "GF2_MAG_ACAL_CORR_ML"],
631642
"MAG_GOCE": ["GO_MAG_ACAL_CORR"],
632643
"MAG_GOCE_ML": ["GO_MAG_ACAL_CORR_ML"],
644+
# Multi-mission TEC and NE products
645+
"TEC_TIRO": [
646+
"CH_OPER_TEC_TMS_2F",
647+
"GR_OPER_TEC1TMS_2F",
648+
"GR_OPER_TEC2TMS_2F",
649+
"GF_OPER_TEC1TMS_2F",
650+
"GF_OPER_TEC2TMS_2F",
651+
],
652+
"NE_TIRO": [
653+
"GR_OPER_NE__KBR_2F",
654+
"GF_OPER_NE__KBR_2F",
655+
],
633656
# Swarm spacecraft positions
634657
"MOD_SC": [
635658
*(f"SW_OPER_MOD{x}_SC_1B" for x in "ABC"),
@@ -650,6 +673,24 @@ class SwarmRequest(ClientRequest):
650673
"MM_CON_EPH_2_:plane_alignment": ["MM_OPER_CON_EPH_2_:plane_alignment"],
651674
"NIX_TMS": ["SW_OPER_NIX_TMS_2F"],
652675
"TIX_TMS": ["SW_OPER_TIX_TMS_2F"],
676+
# ULF and PC1 products
677+
"ULF_MAG": [f"SW_OPER_ULF{spacecraft}MAG_2F" for spacecraft in "ABC"],
678+
"ULF_MAG:event": [
679+
f"SW_OPER_ULF{spacecraft}MAG_2F:event" for spacecraft in "ABC"
680+
],
681+
"ULF_MAG:event_mean": [
682+
f"SW_OPER_ULF{spacecraft}MAG_2F:event_mean" for spacecraft in "ABC"
683+
],
684+
"PC1_MAG:event": [
685+
*(f"SW_OPER_PC1{spacecraft}MAG_2F:Bp_event" for spacecraft in "ABC"),
686+
*(f"SW_OPER_PC1{spacecraft}MAG_2F:Br_event" for spacecraft in "ABC"),
687+
*(f"SW_OPER_PC1{spacecraft}MAG_2F:Ba_event" for spacecraft in "ABC"),
688+
],
689+
"PC1_MAG:event_mean": [
690+
*(f"SW_OPER_PC1{spacecraft}MAG_2F:Bp_event_mean" for spacecraft in "ABC"),
691+
*(f"SW_OPER_PC1{spacecraft}MAG_2F:Br_event_mean" for spacecraft in "ABC"),
692+
*(f"SW_OPER_PC1{spacecraft}MAG_2F:Ba_event_mean" for spacecraft in "ABC"),
693+
],
653694
}
654695

655696
OBS_COLLECTIONS = [
@@ -679,7 +720,9 @@ class SwarmRequest(ClientRequest):
679720
]
680721

681722
# These are not necessarily real sampling steps, but are good enough to use
682-
# for splitting long requests into chunks
723+
# for splitting long requests into chunks.
724+
# The time step set here should be equal to or shorter than the real sampling
725+
# (defaults to PT1S if not set)
683726
COLLECTION_SAMPLING_STEPS = {
684727
"MAG": "PT1S",
685728
"MAG_HR": "PT0.019S", # approx 50Hz (the sampling is not exactly 50Hz)
@@ -689,7 +732,7 @@ class SwarmRequest(ClientRequest):
689732
"EFI_TCT02": "PT0.5S",
690733
"EFI_TCT16": "PT0.0625S",
691734
"IBI": "PT1S",
692-
"TEC": "PT1S", # Actually more complicated
735+
"TEC": "PT1S", # Actually more complicated - non-unique samples
693736
"FAC": "PT1S",
694737
"EEF": "PT90M",
695738
"IPD": "PT1S",
@@ -736,6 +779,13 @@ class SwarmRequest(ClientRequest):
736779
"MM_CON_EPH_2_:plane_alignment": "P1D",
737780
"NIX_TMS": "PT8S",
738781
"TIX_TMS": "PT8S",
782+
"TEC_TIRO": "PT1S", # Actually more complicated - non-unique samples
783+
"NE_TIRO": "PT5S",
784+
"ULF_MAG": "PT1M",
785+
"ULF_MAG:event": "PT1S", # irregular sampling
786+
"ULF_MAG:event_mean": "PT1M", # irregular sampling
787+
"PC1_MAG:event": "PT1S", # irregular sampling
788+
"PC1_MAG:event_mean": "PT1M", # irregular sampling
739789
}
740790

741791
PRODUCT_VARIABLES = {
@@ -908,6 +958,31 @@ class SwarmRequest(ClientRequest):
908958
"DCB",
909959
"DCB_Error",
910960
],
961+
"TEC_TIRO": [
962+
"GPS_Position",
963+
"LEO_Position",
964+
"PRN",
965+
"L1",
966+
"L2",
967+
"P1",
968+
"P2",
969+
"S1_C_N0",
970+
"S2_C_N0",
971+
"Elevation_Angle",
972+
"Absolute_VTEC",
973+
"Absolute_STEC",
974+
"Relative_STEC",
975+
"Relative_STEC_RMS",
976+
"DCB",
977+
"DCB_Error",
978+
],
979+
"NE_TIRO": [
980+
"LEO_Position",
981+
"Distance",
982+
"Relative_Hor_TEC",
983+
"Relative_Ne",
984+
"Absolute_Ne",
985+
],
911986
"FAC": [
912987
"IRC",
913988
"IRC_Error",
@@ -1304,6 +1379,116 @@ class SwarmRequest(ClientRequest):
13041379
"Flag_Tegix",
13051380
"Orbit_Label",
13061381
],
1382+
"ULF_MAG": [
1383+
"Timestamp",
1384+
"Latitude",
1385+
"Longitude",
1386+
"Radius",
1387+
"Latitude_QD",
1388+
"Longitude_QD",
1389+
"MLT_QD",
1390+
"UT",
1391+
"SZA",
1392+
"Frequency_dominant",
1393+
"Halfwidth",
1394+
"Power",
1395+
"Prominence",
1396+
"Pc2_act",
1397+
"Pc3_act",
1398+
"Pc4_act",
1399+
"Pi2_act",
1400+
"Flag_Pc2",
1401+
"Flag_Pc3",
1402+
"Flag_Pc4",
1403+
"Flag_Pi2",
1404+
"Flag_EPB",
1405+
"Flag_FAC",
1406+
],
1407+
"ULF_MAG:event": [
1408+
"Timestamp",
1409+
"Latitude",
1410+
"Longitude",
1411+
"Radius",
1412+
"Latitude_QD",
1413+
"Longitude_QD",
1414+
"MLT_QD",
1415+
"SZA",
1416+
"ID",
1417+
"ORB",
1418+
"DIR",
1419+
"Frequency",
1420+
"Halfwidth",
1421+
"Power",
1422+
"Prominence",
1423+
"EPB",
1424+
"FAC",
1425+
"Flag_B",
1426+
"Quality",
1427+
],
1428+
"ULF_MAG:event_mean": [
1429+
"Timestamp",
1430+
"Latitude",
1431+
"Longitude",
1432+
"Radius",
1433+
"Latitude_QD",
1434+
"Longitude_QD",
1435+
"MLT_QD",
1436+
"SZA",
1437+
"ID",
1438+
"ORB",
1439+
"DIR",
1440+
"Duration",
1441+
"Frequency",
1442+
"Freq_std",
1443+
"Halfwidth",
1444+
"Power",
1445+
"Prominence",
1446+
"EPB",
1447+
"FAC",
1448+
"Flag_B",
1449+
"Quality",
1450+
],
1451+
"PC1_MAG:event": [
1452+
"ID",
1453+
"Timestamp",
1454+
"Latitude",
1455+
"Longitude",
1456+
"Radius",
1457+
"Latitude_QD",
1458+
"Longitude_QD",
1459+
"MLT_QD",
1460+
"SZA",
1461+
"ORB",
1462+
"DIR",
1463+
"Frequency",
1464+
"Halfwidth",
1465+
"Power",
1466+
"Prominence",
1467+
"Quality_B",
1468+
"Quality_p",
1469+
"Quality_n",
1470+
],
1471+
"PC1_MAG:event_mean": [
1472+
"Timestamp",
1473+
"Latitude",
1474+
"Longitude",
1475+
"Radius",
1476+
"Latitude_QD",
1477+
"Longitude_QD",
1478+
"MLT_QD",
1479+
"SZA",
1480+
"ID",
1481+
"ORB",
1482+
"DIR",
1483+
"Duration",
1484+
"Frequency",
1485+
"Freq_std",
1486+
"Halfwidth",
1487+
"Power",
1488+
"Prominence",
1489+
"ROFC",
1490+
"Quality",
1491+
],
13071492
}
13081493

13091494
AUXILIARY_VARIABLES = [

src/viresclient/_data_handling.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ def get_variable(self, var):
164164
return data
165165

166166
def get_variable_units(self, var):
167-
return self._varatts[var].get("UNITS", "")
167+
units = self._varatts[var].get("UNITS", "")
168+
unit = self._varatts[var].get("UNIT", "")
169+
return unit or units
168170

169171
def get_variable_description(self, var):
170172
desc = self._varatts[var].get("DESCRIPTION", "")

0 commit comments

Comments
 (0)