Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ jobs:
os: ["ubuntu-24.04", "macos-14", "windows-2022"]
python-version: ["3.10", "3.11", "3.12"]
include:
- os: ubuntu-22.04
python-version: 3.7
- os: ubuntu-24.04
python-version: 3.8
- os: ubuntu-24.04
python-version: 3.9
- os: ubuntu-24.04
Expand Down
7 changes: 5 additions & 2 deletions docs/available_parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,17 @@ SW_OPER_VOBS_1M_2\_:SecularVariation ``SiteCode,B_SV,sigma_SV``
``models``
----------

Models are evaluated along the satellite track at the positions of the time series that has been requested. These must be used together with one of the MAG collections, and one or both of the "F" and "B_NEC" measurements. This can yield either the model values together with the measurements, or the data-model residuals.
When requesting a MAG-type collection, geomagnetic models can be evaluated on-demand along the satellite track (i.e. at the same times and positions as the data). You have the choice of receiving either the model values together with the measurements (i.e. ``B_NEC`` & ``B_NEC_Model``), or simply the data-model residuals (i.e. ``B_NEC_res_Model``).

To evaluate models at arbitrary coordinates (i.e. without a data request), see :py:meth:`viresclient.SwarmRequest.eval_model` and :py:meth:`viresclient.SwarmRequest.eval_model_for_cdf_file`.

.. note::

For a good estimate of the ionospheric field measured by a Swarm satellite (with the core, crust and magnetosphere effects removed) use a composed model defined as:
``models=["'CHAOS-full' = 'CHAOS-Core' + 'CHAOS-Static' + 'CHAOS-MMA-Primary' + 'CHAOS-MMA-Secondary'"]``
`(click for more info) <https://github.com/klaundal/notebooks/blob/master/get_external_field.ipynb>`_

This composed model can also be accessed by an alias: ``models=["CHAOS"]`` which represents the full CHAOS model
This composed model (core + crust + magnetosphere) can also be accessed by an alias: ``models=["CHAOS"]``. Note that this does not include the ionospheric part (``"CHAOS-MIO"``) which was added to the CHAOS series in `CHAOS-8 <http://www.spacecenter.dk/files/magnetic-models/CHAOS-8/>`_.

See `Magnetic Earth <https://magneticearth.org/pages/models.html>`_ for an introduction to geomagnetic models.

Expand All @@ -326,6 +328,7 @@ Models are evaluated along the satellite track at the positions of the time seri
CHAOS-Core, # Core
CHAOS-Static, # Lithosphere
CHAOS-MMA-Primary, CHAOS-MMA-Secondary # Magnetosphere
CHAOS-MIO # Polar ionosphere

# Other lithospheric models:
MF7, LCS-1
Expand Down
11 changes: 11 additions & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ Release notes
Change log
----------

Changes from 0.13.0 to 0.14.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Coinciding with `VirES server version 3.16 <https://vires.services/changelog>`_

- Added ``"CHAOS-MIO"`` magnetic model - the new ionospheric part of CHAOS. Note that the alias ``"CHAOS"`` does not include this ``"CHAOS-MIO"``
- Support for new feature to evaluate models at arbitrary coordinates. See:
- :py:meth:`viresclient.SwarmRequest.eval_model`
- :py:meth:`viresclient.SwarmRequest.eval_model_for_cdf_file`
- Added support for spline interpolation of magnetic models when requesting ``MAGx_HR`` data. Can be disabled with the ``do_not_interpolate_models`` option in :py:meth:`viresclient.SwarmRequest.set_products`

Changes from 0.12.3 to 0.13.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -38,6 +36,7 @@ classifiers = [
dynamic = ["version"]
dependencies = [
"cdflib >= 0.3.9",
"h5py >= 3.12.1",
"Jinja2 >= 2.10",
"netCDF4 >= 1.5.3; python_version>='3.8'",
"netCDF4 >= 1.5.3, <= 1.5.8; python_version<='3.7'",
Expand Down
2 changes: 1 addition & 1 deletion src/viresclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
from ._config import ClientConfig, set_token
from ._data_handling import ReturnedData, ReturnedDataFile

__version__ = "0.13.0"
__version__ = "0.14.0"
16 changes: 14 additions & 2 deletions src/viresclient/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ def _get(
message=None,
show_progress=True,
leave_progress_bar=True,
content_type=None,
headers=None,
):
"""Make a request and handle response according to response_handler

Expand All @@ -484,13 +486,23 @@ def _get(
request,
handler=response_handler,
status_handler=progressbar.update,
content_type=content_type,
headers=headers,
)
else:
return self._wps_service.retrieve_async(
request, handler=response_handler
request,
handler=response_handler,
content_type=content_type,
headers=headers,
)
else:
return self._wps_service.retrieve(request, handler=response_handler)
return self._wps_service.retrieve(
request,
handler=response_handler,
content_type=content_type,
headers=headers,
)
except WPSError:
raise RuntimeError(
"Server error. Or perhaps the request is invalid? "
Expand Down
Loading
Loading