Python client for the MIDL solar wind dataset
Project description
Merged Interplanetary Data from L1
Python client for the MIDL solar wind dataset.
Install
pip install csem-midl
Quickstart
import midl
data = midl.load("2005-01-01 00:00", "2005-01-01 01:00", 32)
print(data)
<xarray.Dataset> Size: 4kB
Dimensions: (time: 61)
Coordinates:
* time (time) datetime64[ns] 488B 2005-01-01 ... 2005-01-01T01:00:00
Data variables:
Bx (time) float64 488B -6.05 -3.94 -3.7 -3.75 ... -2.01 -1.78 -2.08
By (time) float64 488B 3.84 3.5 3.12 2.94 3.2 ... 4.97 5.3 5.29 5.2
Bz (time) float64 488B -0.93 -4.06 -4.83 -4.92 ... 1.25 2.04 2.05 2.11
Ux (time) float64 488B -422.3 -429.9 -433.6 ... -437.4 -441.8 -441.8
Uy (time) float64 488B -13.38 -12.91 -9.05 ... -28.15 -27.06 -26.68
Uz (time) float64 488B 26.93 47.59 54.86 54.99 ... 0.46 1.42 0.92
rho (time) float64 488B 5.169 5.439 5.481 5.359 ... 6.131 6.363 6.323
T (time) float64 488B 1.33e+05 1.321e+05 ... 1.159e+05 1.159e+05
Attributes:
source: MIDL
url: https://csem.engin.umich.edu/MIDL/
target: 32Re
midl_propagation: {'method': 'ballistic', 'target_re': 32.0}
# 14Re and 32Re Ballistically-propagated data are available for direct download
midl.load("2024-05-10 00:00", "2024-05-11 01:00", 14, method="ballistic")
midl.load("2024-05-10 00:00", "2024-05-11 01:00", 32, method="ballistic")
# [-70,70]Re MHD-propagated data are available for direct download
midl.load("2024-05-10 00:00", "2024-05-11 01:00", 30, method="mhd")
# Any value can be ballistically propagated client-side
midl.load("2024-05-10 00:00", "2024-05-11 01:00", 20.25, method="ballistic")
# Data at L1 can be downloaded directly as well
midl.load("2024-05-10 00:00", "2024-05-11 01:00", "L1")
Client-side MHD propagation is not supported.
Saving to file:
midl.to_csv(data, "storm.csv")
midl.to_dat(data, "storm.dat")
Data is cached locally after the first download.
Using with spacepy
MIDL Datasets convert to a spacepy SpaceData in a few lines:
import midl
from spacepy.datamodel import SpaceData, dmarray
ds = midl.load("2005-01-01 00:00", "2005-01-01 01:00", 32)
sd = SpaceData(attrs=dict(ds.attrs))
sd["Epoch"] = dmarray(ds["time"].values, attrs={"units": "UTC"})
for name, da in ds.data_vars.items():
sd[name] = dmarray(da.values, attrs=dict(da.attrs))
Tutorials
- Merging MIDL with IMP-8 — merge MIDL L1 with external satellite data to fill gaps in the 1998–2004 ACE-only era
See also
- MIDL-Pipeline — the code that produces the MIDL dataset
- MSWIM2D — 2-D MHD solar wind model (1–75 AU) driven by MIDL L1 data; Python client
mswim2d
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file csem_midl-0.6.0.tar.gz.
File metadata
- Download URL: csem_midl-0.6.0.tar.gz
- Upload date:
- Size: 7.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae7fb69b76c51eacefa54347015b2825ac8bfa896d16e501a741f52242a92850
|
|
| MD5 |
b8ed477da6f962d82bc0669337687d93
|
|
| BLAKE2b-256 |
810be609ce3ef4a2629c35bcd60243099bcd9c51d18bd69bc78debea948deda7
|
Provenance
The following attestation bundles were made for csem_midl-0.6.0.tar.gz:
Publisher:
publish.yml on connordimarco/CSEM-MIDL
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
csem_midl-0.6.0.tar.gz -
Subject digest:
ae7fb69b76c51eacefa54347015b2825ac8bfa896d16e501a741f52242a92850 - Sigstore transparency entry: 1854810799
- Sigstore integration time:
-
Permalink:
connordimarco/CSEM-MIDL@f2b743ed85dff3f4983b36ae4707ccbd1ea1c72d -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/connordimarco
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f2b743ed85dff3f4983b36ae4707ccbd1ea1c72d -
Trigger Event:
release
-
Statement type:
File details
Details for the file csem_midl-0.6.0-py3-none-any.whl.
File metadata
- Download URL: csem_midl-0.6.0-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5259e26fb2c5b9b5cee3ae03b6e05d21cc68598c5abb48dfc3b37391d8f0d0c
|
|
| MD5 |
fdd36ec6212efa6feed44963249554e5
|
|
| BLAKE2b-256 |
ef586b47d9485873e666208c52792f09cf5635db159c9647170f97760175b1c5
|
Provenance
The following attestation bundles were made for csem_midl-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on connordimarco/CSEM-MIDL
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
csem_midl-0.6.0-py3-none-any.whl -
Subject digest:
a5259e26fb2c5b9b5cee3ae03b6e05d21cc68598c5abb48dfc3b37391d8f0d0c - Sigstore transparency entry: 1854810840
- Sigstore integration time:
-
Permalink:
connordimarco/CSEM-MIDL@f2b743ed85dff3f4983b36ae4707ccbd1ea1c72d -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/connordimarco
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f2b743ed85dff3f4983b36ae4707ccbd1ea1c72d -
Trigger Event:
release
-
Statement type: