fetch_mas_data#
- fetch_mas_data(*, domains='cor', variables='br', hdf=5)#
Fetch MAS magnetohydrodynamic model output for the given domains and variables.
Downloads the requested MAS field files from the Carrington rotation 2309 standard run and returns their cached paths. One file is fetched for each requested
(domain, variable)pair.- Parameters:
- domains
str|Iterable|None, optional Model domain(s) to fetch:
"cor"(corona) and/or"hel"(heliosphere). Accepts a comma-separated string, an iterable of domain names, orNoneto fetch both domains. Default is"cor".- variables
str|Iterable|None, optional Physical variable(s) to fetch, such as the magnetic field components
"br","bt","bp"(\(\mathbf{B}\)) or the velocity components"vr","vt","vp"(\(\mathbf{v}\)). Accepts a comma-separated string, an iterable of variable names, orNoneto fetch every variable common to all requested domains. Default is"br".- hdf
int, optional HDF format version to download:
4(.hdf) or5(.h5). Default is5.
- domains
- Returns:
- Raises:
ValueErrorIf hdf is not a supported HDF version.
KeyErrorIf variables is
Noneand a requested domain is not present inDOM_VAR_MAP.
See also
fetch_pot3d_dataFetch POT3D potential-field components.
fetch_mas_quantitiesFetch derived MAS quantities at the inner boundary.
Examples
>>> from psi_data import fetch_mas_data >>> paths = fetch_mas_data(domains="cor,hel", variables="br,vr") >>> paths.cor_br PosixPath('.../cor/mhd/br002.h5')