Skip to content

Commit 551935d

Browse files
authored
Merge pull request #132 from ESA-VirES/staging
Merge staging
2 parents 2041995 + 042560d commit 551935d

File tree

12 files changed

+534
-49
lines changed

12 files changed

+534
-49
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ jobs:
2929
os: ["ubuntu-24.04", "macos-14", "windows-2022"]
3030
python-version: ["3.10", "3.11", "3.12"]
3131
include:
32-
- os: ubuntu-22.04
33-
python-version: 3.7
34-
- os: ubuntu-24.04
35-
python-version: 3.8
3632
- os: ubuntu-24.04
3733
python-version: 3.9
3834
- os: ubuntu-24.04

docs/available_parameters.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,17 @@ SW_OPER_VOBS_1M_2\_:SecularVariation ``SiteCode,B_SV,sigma_SV``
291291
``models``
292292
----------
293293

294-
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.
294+
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``).
295+
296+
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`.
295297

296298
.. note::
297299

298300
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:
299301
``models=["'CHAOS-full' = 'CHAOS-Core' + 'CHAOS-Static' + 'CHAOS-MMA-Primary' + 'CHAOS-MMA-Secondary'"]``
300302
`(click for more info) <https://github.com/klaundal/notebooks/blob/master/get_external_field.ipynb>`_
301303

302-
This composed model can also be accessed by an alias: ``models=["CHAOS"]`` which represents the full CHAOS model
304+
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/>`_.
303305

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

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

330333
# Other lithospheric models:
331334
MF7, LCS-1

docs/release_notes.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ Release notes
44
Change log
55
----------
66

7+
Changes from 0.13.0 to 0.14.0
8+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9+
10+
Coinciding with `VirES server version 3.16 <https://vires.services/changelog>`_
11+
12+
- Added ``"CHAOS-MIO"`` magnetic model - the new ionospheric part of CHAOS. Note that the alias ``"CHAOS"`` does not include this ``"CHAOS-MIO"``
13+
- Support for new feature to evaluate models at arbitrary coordinates. See:
14+
- :py:meth:`viresclient.SwarmRequest.eval_model`
15+
- :py:meth:`viresclient.SwarmRequest.eval_model_for_cdf_file`
16+
- 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`
17+
718
Changes from 0.12.3 to 0.13.0
819
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
920

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ classifiers = [
2626
"Operating System :: OS Independent",
2727
"Programming Language :: Python",
2828
"Programming Language :: Python :: 3",
29-
"Programming Language :: Python :: 3.7",
30-
"Programming Language :: Python :: 3.8",
3129
"Programming Language :: Python :: 3.9",
3230
"Programming Language :: Python :: 3.10",
3331
"Programming Language :: Python :: 3.11",
@@ -38,6 +36,7 @@ classifiers = [
3836
dynamic = ["version"]
3937
dependencies = [
4038
"cdflib >= 0.3.9",
39+
"h5py >= 3.12.1",
4140
"Jinja2 >= 2.10",
4241
"netCDF4 >= 1.5.3; python_version>='3.8'",
4342
"netCDF4 >= 1.5.3, <= 1.5.8; python_version<='3.7'",

src/viresclient/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535
from ._config import ClientConfig, set_token
3636
from ._data_handling import ReturnedData, ReturnedDataFile
3737

38-
__version__ = "0.13.0"
38+
__version__ = "0.14.0"

src/viresclient/_client.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,8 @@ def _get(
462462
message=None,
463463
show_progress=True,
464464
leave_progress_bar=True,
465+
content_type=None,
466+
headers=None,
465467
):
466468
"""Make a request and handle response according to response_handler
467469
@@ -484,13 +486,23 @@ def _get(
484486
request,
485487
handler=response_handler,
486488
status_handler=progressbar.update,
489+
content_type=content_type,
490+
headers=headers,
487491
)
488492
else:
489493
return self._wps_service.retrieve_async(
490-
request, handler=response_handler
494+
request,
495+
handler=response_handler,
496+
content_type=content_type,
497+
headers=headers,
491498
)
492499
else:
493-
return self._wps_service.retrieve(request, handler=response_handler)
500+
return self._wps_service.retrieve(
501+
request,
502+
handler=response_handler,
503+
content_type=content_type,
504+
headers=headers,
505+
)
494506
except WPSError:
495507
raise RuntimeError(
496508
"Server error. Or perhaps the request is invalid? "

0 commit comments

Comments
 (0)