geodezyx 5.2.0__tar.gz → 5.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {geodezyx-5.2.0/geodezyx.egg-info → geodezyx-5.2.2}/PKG-INFO +3 -3
- {geodezyx-5.2.0 → geodezyx-5.2.2}/README.md +2 -2
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/__init__.py +1 -1
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/marine/export_obp.py +211 -87
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/spotgins_run.py +1 -1
- {geodezyx-5.2.0 → geodezyx-5.2.2/geodezyx.egg-info}/PKG-INFO +3 -3
- {geodezyx-5.2.0 → geodezyx-5.2.2}/pyproject.toml +17 -2
- {geodezyx-5.2.0 → geodezyx-5.2.2}/LICENSE +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/MANIFEST.in +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/atmo/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/atmo/atmo.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/atmo/vmf1_compute.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/bin/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/bin/date_conv.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/conv_angle.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/conv_constant.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/conv_coords.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/conv_geometric.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/conv_proj_lambert.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/conv_proj_utm.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/conv_rinex.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/conv_rotation_matrices.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/conv_time.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/conv_time_leap_sec.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/conv/conv_time_orig.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/geo_files_converter_lib.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_antex.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_atmo.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_coords_epos_gfz.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_coords_gins_cnes.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_coords_gipsyx_jpl.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_coords_misc.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_coords_rtklib.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_eop.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_gnss_prods.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_gnss_qc.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_igs_combi.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_logsheets.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_rinex.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_rinex_nav.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_sinex.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_slr.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/read/read_stats_rtklib.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/write/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/write/write_geo_files.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/write/write_rinex.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/files_rw/write/write_tropo_spotgins.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/geodyn/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/geodyn/emsgfz_load_interp.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/geodyn/euler_pole_calc.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/geodyn/velo_field_map_plt.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/geodyn/volcano_mogi.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/gnss_edu/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/gnss_edu/gnss_edu.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/gnss_edu/gpt3.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/gnss_edu/klobuchar.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/gnss_edu/read_vmf1_grid.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/interp/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/interp/interp.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/logconfig/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/logconfig/loggzyx.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/marine/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/marine/dac.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/marine/marine.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/marine/obp.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/marine/obscom.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/bin_opera/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/bin_opera/download_gnss_products.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/bin_opera/download_gnss_rinex.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/bin_opera/rtklib_merge_parquet.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/bin_opera/rtklib_parquet.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/bin_opera/rtklib_parquet2csv.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/bin_opera/rtklib_run_cli.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/cluster_gfz.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/download_cddis.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/download_dropbox.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/download_gnss/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/download_gnss/download_prods.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/download_gnss/download_rinex.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/download_gnss/download_utils.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/download_gnss/servers_prods.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/download_gnss/servers_rinex.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/download_ngl.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/gins_bd_update.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/gins_common.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/gins_dirs_gen.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/gins_dirs_run.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/gins_orbclk_concat.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/gins_prairie.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/legacy/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/legacy/gins_double_diff.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/legacy/gins_legacy.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/legacy/gins_orbclk_convert.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/rnxs_eost.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/singugins_run.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/testgins_run.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/local_find_files.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/rinex_check.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/rinex_lister_plotter.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/rinex_utils.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/rinex_utils_legacy.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/soft_frontend/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/soft_frontend/anubis_frontend.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/soft_frontend/common_frontend.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/soft_frontend/groops_frontend.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/soft_frontend/hector_frontend.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/soft_frontend/midas_frontend.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/soft_frontend/pride_pppar_frontend.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/soft_frontend/rtklib_frontend.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/soft_frontend/rtklib_frontend_legacy.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/soft_frontend/track_frontend.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/reffram/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/reffram/compar_clk.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/reffram/compar_orb.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/reffram/compar_snx.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/reffram/geometry.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/reffram/gnss_products.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/reffram/kepler_gzyx.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/reffram/quaternions.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/stats/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/stats/least_squares.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/stats/stats.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/time_series/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/time_series/ts_class.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/time_series/ts_class_xtra.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/time_series/ts_export.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/time_series/ts_fcts.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/utils/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/utils/dict_utils.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/utils/list_utils.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/utils/shell_like.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/utils/uncompress.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/utils/utils_core.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/utils_xtra/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/utils_xtra/pandas_utils.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/utils_xtra/plot_utils.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/volc_deform/__init__.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/volc_deform/calc_bl.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/volc_deform/map_stations.py +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx.egg-info/SOURCES.txt +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx.egg-info/dependency_links.txt +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx.egg-info/entry_points.txt +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx.egg-info/requires.txt +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx.egg-info/top_level.txt +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx_toolbox_logo.png +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/requirements.txt +0 -0
- {geodezyx-5.2.0 → geodezyx-5.2.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: geodezyx
|
|
3
|
-
Version: 5.2.
|
|
3
|
+
Version: 5.2.2
|
|
4
4
|
Summary: geodezyx (formerly known as The GeodeZYX toolbox) aims to provide simple but useful functions for Geodesy and Geophysics.
|
|
5
5
|
Author-email: Pierre Sakic <sakic@ipgp.fr>, Gustavo Mansur <mansur@gfz-potsdam.de>
|
|
6
6
|
License-Expression: LGPL-3.0-or-later
|
|
@@ -61,8 +61,8 @@ Dynamic: license-file
|
|
|
61
61
|
|
|
62
62
|
# geodezyx
|
|
63
63
|
|
|
64
|
-
**Version: 5.2.
|
|
65
|
-
**Date: 2026-
|
|
64
|
+
**Version: 5.2.2**
|
|
65
|
+
**Date: 2026-11-25**
|
|
66
66
|
|
|
67
67
|
**Authors:**
|
|
68
68
|
* Pierre Sakic (IPGP, Paris, France)
|
|
@@ -7,7 +7,7 @@ import logging.config # MUST remain logging.config for < v3.10
|
|
|
7
7
|
import os
|
|
8
8
|
from os import path
|
|
9
9
|
|
|
10
|
-
__version__='5.2.
|
|
10
|
+
__version__='5.2.2' ## increase it with bump-my-version !!!
|
|
11
11
|
|
|
12
12
|
#### IMPORT CONFIG FOR LOGGER
|
|
13
13
|
log_file_path = os.path.join(path.dirname(path.abspath(__file__)),'logconfig','loggzyx.py')
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Created on 06/12/2025 21:28:55
|
|
5
5
|
|
|
6
|
-
@author: psakic
|
|
6
|
+
@author: psakic, rjoyard
|
|
7
7
|
|
|
8
|
-
Create NetCDF files following CF-1.
|
|
8
|
+
Create NetCDF files following CF-1.13 Convention
|
|
9
9
|
This script generates ocean bottom pressure and temperature time series data
|
|
10
10
|
with support for different instrument types and configurations.
|
|
11
11
|
|
|
@@ -17,6 +17,7 @@ The script supports:
|
|
|
17
17
|
|
|
18
18
|
import logging
|
|
19
19
|
import os
|
|
20
|
+
import json
|
|
20
21
|
|
|
21
22
|
import numpy as np
|
|
22
23
|
from netCDF4 import Dataset
|
|
@@ -31,7 +32,6 @@ from geodezyx import conv, utils
|
|
|
31
32
|
# NETCDF EXPORT FUNCTION
|
|
32
33
|
# =============================================================================
|
|
33
34
|
|
|
34
|
-
|
|
35
35
|
def export_obp_to_netcdf(
|
|
36
36
|
df_obp: pd.DataFrame,
|
|
37
37
|
column_mapping: Dict[str, Optional[List[str]]],
|
|
@@ -43,7 +43,7 @@ def export_obp_to_netcdf(
|
|
|
43
43
|
force: bool = False,
|
|
44
44
|
) -> str:
|
|
45
45
|
"""
|
|
46
|
-
Export ocean bottom pressure data to CF-1.
|
|
46
|
+
Export ocean bottom pressure data to a CF-1.13 NetCDF file.
|
|
47
47
|
|
|
48
48
|
Parameters
|
|
49
49
|
----------
|
|
@@ -52,7 +52,7 @@ def export_obp_to_netcdf(
|
|
|
52
52
|
column_mapping : dict
|
|
53
53
|
Dictionary mapping standard variable names to dataframe column names:
|
|
54
54
|
- "time": time column name
|
|
55
|
-
- "
|
|
55
|
+
- "pressure_sensor": pressure column name(s) (str or list of str)
|
|
56
56
|
- "temperature_sensor": internal temperature column name(s) (str or list of str)
|
|
57
57
|
- "temperature_seawater": seawater temperature column name(s) (str or list of str)
|
|
58
58
|
- "pressure_barometer": barometer pressure column name(s) (str or list of str, optional)
|
|
@@ -66,11 +66,10 @@ def export_obp_to_netcdf(
|
|
|
66
66
|
- longitude: float (MANDATORY)
|
|
67
67
|
- depth: float (MANDATORY, meters)
|
|
68
68
|
- institution: str (MANDATORY)
|
|
69
|
-
-
|
|
69
|
+
- project: str (MANDATORY)
|
|
70
70
|
- references: str (MANDATORY)
|
|
71
71
|
- station_name: str (MANDATORY)
|
|
72
72
|
- comment: str (MANDATORY)
|
|
73
|
-
- project: str (MANDATORY)
|
|
74
73
|
- creator_name: str (MANDATORY)
|
|
75
74
|
- creator_email: str (MANDATORY)
|
|
76
75
|
- creator_url: str (MANDATORY)
|
|
@@ -85,7 +84,7 @@ def export_obp_to_netcdf(
|
|
|
85
84
|
keep_sensor_dimension : bool
|
|
86
85
|
Whether to keep sensor dimension even for single sensor
|
|
87
86
|
quality_flags : np.ndarray, optional
|
|
88
|
-
Quality control flags array (0=
|
|
87
|
+
Quality control flags array (0=not_evaluated, 1=good, 2=questionable, 3=bad)
|
|
89
88
|
force : bool
|
|
90
89
|
Whether to overwrite existing file if it already exists
|
|
91
90
|
|
|
@@ -98,7 +97,7 @@ def export_obp_to_netcdf(
|
|
|
98
97
|
# Set default conversion factors
|
|
99
98
|
if conversion_factors is None:
|
|
100
99
|
conversion_factors = {
|
|
101
|
-
"pressure": 0
|
|
100
|
+
"pressure": 1.0, # 0.01 for hPa to dbar
|
|
102
101
|
"temperature_seawater": 1.0,
|
|
103
102
|
"pressure_barometer": 0.01,
|
|
104
103
|
}
|
|
@@ -123,7 +122,7 @@ def export_obp_to_netcdf(
|
|
|
123
122
|
num_days = (end_date - start_date).days
|
|
124
123
|
|
|
125
124
|
# Convert time to POSIX timestamps
|
|
126
|
-
val_time = conv.dt2posix(df_obp[colnam_time].dt.to_pydatetime())
|
|
125
|
+
val_time = conv.dt2posix(np.array(df_obp[colnam_time].dt.to_pydatetime()))
|
|
127
126
|
|
|
128
127
|
##### Extract data arrays
|
|
129
128
|
def _stdvarnam2val(std_var_name, optional=False):
|
|
@@ -137,7 +136,7 @@ def export_obp_to_netcdf(
|
|
|
137
136
|
----------
|
|
138
137
|
std_var_name : str
|
|
139
138
|
Standard variable name key to lookup in column_mapping
|
|
140
|
-
(e.g., "
|
|
139
|
+
(e.g., "pressure_sensor", "temperature_sensor")
|
|
141
140
|
optional : bool, optional
|
|
142
141
|
If True, use dict.get() for safe lookup (returns None if key missing).
|
|
143
142
|
If False, use direct dict access (raises KeyError if key missing).
|
|
@@ -150,7 +149,7 @@ def export_obp_to_netcdf(
|
|
|
150
149
|
Returns None if no column names are found.
|
|
151
150
|
val_out : np.ndarray or None
|
|
152
151
|
Processed data values with conversion factor applied and transposed to
|
|
153
|
-
(sensor, time) dimension ordering
|
|
152
|
+
(sensor, time) dimension ordering.
|
|
154
153
|
Returns None if input column name is None.
|
|
155
154
|
|
|
156
155
|
Notes
|
|
@@ -180,14 +179,14 @@ def export_obp_to_netcdf(
|
|
|
180
179
|
val_out = df_obp[colnam_out].values
|
|
181
180
|
# Apply conversion factor (e.g., hPa to dbar)
|
|
182
181
|
val_out = val_out * conv_fact
|
|
183
|
-
# Transpose to (sensor, time) ordering
|
|
182
|
+
# Transpose to (sensor, time) ordering
|
|
184
183
|
val_out = np.transpose(val_out)
|
|
185
184
|
|
|
186
185
|
return colnam_out, val_out
|
|
187
186
|
|
|
188
|
-
colnam_pres, val_pres = _stdvarnam2val("
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
colnam_pres, val_pres = _stdvarnam2val("pressure_sensor")
|
|
188
|
+
colnam_temp_sens, val_temp_sens = _stdvarnam2val("temperature_sensor")
|
|
189
|
+
colnam_temp_seaw, val_temp_seaw = _stdvarnam2val("temperature_seawater")
|
|
191
190
|
|
|
192
191
|
# Barometer data (optional)
|
|
193
192
|
colnam_pres_baro, val_pres_baro = _stdvarnam2val("pressure_barometer", True)
|
|
@@ -195,14 +194,27 @@ def export_obp_to_netcdf(
|
|
|
195
194
|
|
|
196
195
|
num_sensors = len(colnam_pres) if utils.is_iterable(colnam_pres) else 1
|
|
197
196
|
|
|
198
|
-
# Quality flags (0 =
|
|
197
|
+
# Quality flags (0 = not evaluated, 1 = good, 2 = questionable, 3 = bad)
|
|
198
|
+
# Raw data are not assumed to be 'good' before a QC procedure has been applied.
|
|
199
199
|
if quality_flags is None:
|
|
200
200
|
quality_flags = np.zeros(num_samples, dtype=np.int8)
|
|
201
|
+
else:
|
|
202
|
+
quality_flags = np.asarray(quality_flags, dtype=np.int8)
|
|
203
|
+
if quality_flags.shape != (num_samples,):
|
|
204
|
+
raise ValueError(
|
|
205
|
+
f"quality_flags must contain one value per time sample "
|
|
206
|
+
f"({num_samples} expected, got {quality_flags.size})."
|
|
207
|
+
)
|
|
208
|
+
if not np.isin(quality_flags, [0, 1, 2, 3]).all():
|
|
209
|
+
raise ValueError(
|
|
210
|
+
"quality_flags values must be one of: "
|
|
211
|
+
"0=not_evaluated, 1=good, 2=questionable, 3=bad."
|
|
212
|
+
)
|
|
201
213
|
|
|
202
214
|
# Create NetCDF file
|
|
203
|
-
srt_str = conv.dt2str(start_date, "%Y%m%d%H%M
|
|
204
|
-
end_str = conv.dt2str(end_date, "%Y%m%d%H%M
|
|
205
|
-
output_file = f"{metadata_dict['station_id']}_{srt_str}_{end_str}_{sampling_interval_seconds}
|
|
215
|
+
srt_str = conv.dt2str(start_date, "%Y%m%d%H%M")
|
|
216
|
+
end_str = conv.dt2str(end_date, "%Y%m%d%H%M")
|
|
217
|
+
output_file = f"{metadata_dict['station_id']}_{srt_str}_{end_str}_{sampling_interval_seconds:04d}S.nc"
|
|
206
218
|
output_path = output_dir + "/" + output_file
|
|
207
219
|
|
|
208
220
|
if os.path.isfile(output_path):
|
|
@@ -224,7 +236,7 @@ def export_obp_to_netcdf(
|
|
|
224
236
|
dim_sens_tup = ("sensor", "time")
|
|
225
237
|
else:
|
|
226
238
|
dim_sens_tup = ("time",)
|
|
227
|
-
|
|
239
|
+
barometer_dim = nc.createDimension("barometer", 1)
|
|
228
240
|
string_dim = nc.createDimension("string_length", 50)
|
|
229
241
|
|
|
230
242
|
# Create coordinate variables
|
|
@@ -237,29 +249,18 @@ def export_obp_to_netcdf(
|
|
|
237
249
|
var_time[:] = val_time
|
|
238
250
|
|
|
239
251
|
# Create data variables - Pressure (bottom pressure in dbar)
|
|
240
|
-
var_pres = nc.createVariable(
|
|
241
|
-
"pressure_seafloor", "f4", dim_sens_tup, fill_value=-9999.0
|
|
242
|
-
)
|
|
252
|
+
var_pres = nc.createVariable("pressure_sensor", "f4", dim_sens_tup, fill_value=-9999.0)
|
|
243
253
|
var_pres.units = "dbar"
|
|
244
254
|
var_pres.long_name = "Bottom Pressure"
|
|
245
255
|
var_pres.standard_name = "sea_water_pressure_at_sea_floor"
|
|
246
|
-
var_pres.positive = "down"
|
|
247
256
|
var_pres.valid_min = np.float32(val_pres.min())
|
|
248
257
|
var_pres.valid_max = np.float32(val_pres.max())
|
|
249
258
|
var_pres.comment = "Sea water pressure at seafloor"
|
|
259
|
+
#var_pres.coordinates = "latitude longitude depth"
|
|
260
|
+
var_pres.ancillary_variables = "quality_flag"
|
|
250
261
|
var_pres[...] = val_pres.astype(np.float32)
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
var_temp_seaw = nc.createVariable(
|
|
254
|
-
"temperature_seawater", "f4", ("time",), fill_value=-9999.0
|
|
255
|
-
)
|
|
256
|
-
var_temp_seaw.units = "degrees_Celsius"
|
|
257
|
-
var_temp_seaw.long_name = "Seawater Temperature"
|
|
258
|
-
var_temp_seaw.standard_name = "sea_water_temperature"
|
|
259
|
-
var_temp_seaw.valid_min = np.float32(val_temp_seaw.min())
|
|
260
|
-
var_temp_seaw.valid_max = np.float32(val_temp_seaw.max())
|
|
261
|
-
var_temp_seaw.comment = "Sea water temperature at seafloor"
|
|
262
|
-
var_temp_seaw[...] = val_temp_seaw.astype(np.float32)
|
|
262
|
+
add_statistics(var_pres, val_pres, axis=1)
|
|
263
|
+
var_pres.statistics_dimension = "sensor"
|
|
263
264
|
|
|
264
265
|
# Sensor Internal Temperature
|
|
265
266
|
if val_temp_sens is not None:
|
|
@@ -271,35 +272,39 @@ def export_obp_to_netcdf(
|
|
|
271
272
|
var_temp_sens.valid_min = np.float32(val_temp_sens.min())
|
|
272
273
|
var_temp_sens.valid_max = np.float32(val_temp_sens.max())
|
|
273
274
|
var_temp_sens.comment = "Internal temperature of the pressure sensor"
|
|
275
|
+
#var_temp_sens.coordinates = "latitude longitude depth"
|
|
276
|
+
var_temp_sens.ancillary_variables = "quality_flag"
|
|
274
277
|
var_temp_sens[...] = val_temp_sens.astype(np.float32)
|
|
278
|
+
add_statistics(var_temp_sens, val_temp_sens, axis=1)
|
|
279
|
+
var_temp_sens.statistics_dimension = "sensor"
|
|
275
280
|
|
|
276
281
|
# Barometer pressure (optional)
|
|
277
282
|
if val_pres_baro is not None:
|
|
278
283
|
var_pres_baro = nc.createVariable(
|
|
279
284
|
"pressure_barometer",
|
|
280
285
|
"f4",
|
|
281
|
-
("time"
|
|
286
|
+
("barometer", "time"),
|
|
282
287
|
fill_value=-9999.0,
|
|
283
288
|
zlib=True,
|
|
284
289
|
complevel=4,
|
|
285
290
|
)
|
|
286
|
-
var_pres_baro.units = "
|
|
291
|
+
var_pres_baro.units = "dbar"
|
|
287
292
|
var_pres_baro.long_name = "Internal Barometer Pressure"
|
|
288
293
|
var_pres_baro.standard_name = "air_pressure"
|
|
289
294
|
var_pres_baro.valid_min = np.float32(val_pres_baro.min())
|
|
290
295
|
var_pres_baro.valid_max = np.float32(val_pres_baro.max())
|
|
291
|
-
var_pres_baro.comment = (
|
|
292
|
-
|
|
293
|
-
)
|
|
294
|
-
var_pres_baro.ancillary_variables = "temperature_barometer"
|
|
296
|
+
var_pres_baro.comment = ("Internal atmospheric pressure for leak detection and quality control")
|
|
297
|
+
var_pres_baro.ancillary_variables = "temperature_barometer quality_flag"
|
|
295
298
|
var_pres_baro[:] = val_pres_baro.astype(np.float32)
|
|
299
|
+
add_statistics(var_pres_baro, val_pres_baro, axis=1)
|
|
300
|
+
var_pres_baro.statistics_dimension = "barometer"
|
|
296
301
|
|
|
297
302
|
# Barometer temperature (optional)
|
|
298
303
|
if val_temp_baro is not None:
|
|
299
304
|
var_temp_baro = nc.createVariable(
|
|
300
305
|
"temperature_barometer",
|
|
301
306
|
"f4",
|
|
302
|
-
("time"
|
|
307
|
+
("barometer", "time"),
|
|
303
308
|
fill_value=-9999.0,
|
|
304
309
|
zlib=True,
|
|
305
310
|
complevel=4,
|
|
@@ -309,18 +314,59 @@ def export_obp_to_netcdf(
|
|
|
309
314
|
var_temp_baro.valid_min = np.float32(val_temp_baro.min())
|
|
310
315
|
var_temp_baro.valid_max = np.float32(val_temp_baro.max())
|
|
311
316
|
var_temp_baro.comment = "Internal temperature of the barometer"
|
|
317
|
+
var_temp_baro.ancillary_variables = "quality_flag"
|
|
312
318
|
var_temp_baro[:] = val_temp_baro.astype(np.float32)
|
|
319
|
+
add_statistics(var_temp_baro, val_temp_baro, axis=1)
|
|
320
|
+
var_temp_baro.statistics_dimension = "barometer"
|
|
313
321
|
|
|
314
|
-
#
|
|
322
|
+
# Seawater Temperature
|
|
323
|
+
var_temp_seaw = nc.createVariable(
|
|
324
|
+
"temperature_seawater", "f4", ("time",), fill_value=-9999.0
|
|
325
|
+
)
|
|
326
|
+
var_temp_seaw.units = "degrees_Celsius"
|
|
327
|
+
var_temp_seaw.long_name = "Seawater Temperature"
|
|
328
|
+
var_temp_seaw.standard_name = "sea_water_temperature"
|
|
329
|
+
var_temp_seaw.valid_min = np.float32(val_temp_seaw.min())
|
|
330
|
+
var_temp_seaw.valid_max = np.float32(val_temp_seaw.max())
|
|
331
|
+
var_temp_seaw.comment = "Sea water temperature at seafloor"
|
|
332
|
+
#var_temp_seaw.coordinates = "latitude longitude depth"
|
|
333
|
+
var_temp_seaw.ancillary_variables = "quality_flag"
|
|
334
|
+
var_temp_seaw[...] = val_temp_seaw.astype(np.float32)
|
|
335
|
+
add_statistics(var_temp_seaw, val_temp_seaw)
|
|
336
|
+
|
|
337
|
+
# Quality flag
|
|
338
|
+
# CF defines how a flag variable must be described, but does not require
|
|
339
|
+
# raw data to be assigned a quality assessment before QC has been performed.
|
|
315
340
|
var_qc = nc.createVariable("quality_flag", "i1", ("time",))
|
|
316
|
-
var_qc.long_name = "Quality
|
|
317
|
-
var_qc.
|
|
318
|
-
var_qc.
|
|
319
|
-
var_qc.
|
|
341
|
+
var_qc.long_name = "Data Quality Flag"
|
|
342
|
+
var_qc.standard_name = "quality_flag"
|
|
343
|
+
var_qc.flag_values = np.array([0, 1, 2, 3], dtype=np.int8)
|
|
344
|
+
var_qc.flag_meanings = "not_evaluated good questionable bad"
|
|
345
|
+
var_qc.valid_range = np.array([0, 3], dtype=np.int8)
|
|
346
|
+
var_qc.comment = (
|
|
347
|
+
"0=not_evaluated, 1=good, 2=questionable, 3=bad. "
|
|
348
|
+
"Raw observations are set to 0 until a quality-control procedure is applied."
|
|
349
|
+
)
|
|
320
350
|
var_qc[:] = quality_flags
|
|
321
351
|
|
|
352
|
+
# Sensor IDs
|
|
353
|
+
if "sensor_ids" in metadata_dict:
|
|
354
|
+
sensor_ids = metadata_dict["sensor_ids"]
|
|
355
|
+
bpr_sensor_ids = np.array([sensor_ids["BPR1"], sensor_ids["BPR2"]], dtype=np.int32)
|
|
356
|
+
var_sensor = nc.createVariable("sensor", "i4", ("sensor",))
|
|
357
|
+
var_sensor.long_name = "BPR pressure sensor serial number"
|
|
358
|
+
var_sensor[:] = bpr_sensor_ids
|
|
359
|
+
barometer_id = metadata_dict["sensor_ids"]["Barometer"]
|
|
360
|
+
var_barometer = nc.createVariable(
|
|
361
|
+
"barometer",
|
|
362
|
+
"i4",
|
|
363
|
+
("barometer",)
|
|
364
|
+
)
|
|
365
|
+
var_barometer.long_name = "Barometer sensor serial number"
|
|
366
|
+
var_barometer[:] = [barometer_id]
|
|
367
|
+
|
|
322
368
|
# Add global attributes
|
|
323
|
-
nc.Conventions = "CF-1.
|
|
369
|
+
nc.Conventions = "CF-1.13"
|
|
324
370
|
nc.title = metadata_dict.get(
|
|
325
371
|
"title", f'Ocean Bottom Pressure Data - Station {metadata_dict["station_id"]}'
|
|
326
372
|
)
|
|
@@ -335,12 +381,13 @@ def export_obp_to_netcdf(
|
|
|
335
381
|
nc.time_coverage_resolution = f"PT{sampling_interval_seconds}S"
|
|
336
382
|
|
|
337
383
|
# Add geospatial attributes
|
|
338
|
-
|
|
384
|
+
# On garde ?
|
|
385
|
+
'''nc.geospatial_lat_min = metadata_dict.get("latitude", -9999.0)
|
|
339
386
|
nc.geospatial_lat_max = metadata_dict.get("latitude", -9999.0)
|
|
340
387
|
nc.geospatial_lon_min = metadata_dict.get("longitude", -9999.0)
|
|
341
388
|
nc.geospatial_lon_max = metadata_dict.get("longitude", -9999.0)
|
|
342
389
|
nc.geospatial_vertical_min = metadata_dict.get("depth", -9999.0)
|
|
343
|
-
nc.geospatial_vertical_max = metadata_dict.get("depth", -9999.0)
|
|
390
|
+
nc.geospatial_vertical_max = metadata_dict.get("depth", -9999.0)'''
|
|
344
391
|
nc.geospatial_vertical_units = "m"
|
|
345
392
|
nc.geospatial_vertical_positive = "down"
|
|
346
393
|
|
|
@@ -352,11 +399,10 @@ def export_obp_to_netcdf(
|
|
|
352
399
|
"longitude",
|
|
353
400
|
"depth",
|
|
354
401
|
"institution",
|
|
355
|
-
"
|
|
402
|
+
"project",
|
|
356
403
|
"references",
|
|
357
404
|
"station_name",
|
|
358
405
|
"comment",
|
|
359
|
-
"project",
|
|
360
406
|
"creator_name",
|
|
361
407
|
"creator_email",
|
|
362
408
|
"creator_url",
|
|
@@ -368,36 +414,19 @@ def export_obp_to_netcdf(
|
|
|
368
414
|
for attr in mandatory_attrs:
|
|
369
415
|
if attr not in metadata_dict.keys():
|
|
370
416
|
metadata_dict[attr] = "NOT_PROVIDED"
|
|
371
|
-
warnings.warn(
|
|
372
|
-
f"Missing mandatory attributes in metadata_dict: {attr}. ", UserWarning
|
|
373
|
-
)
|
|
417
|
+
warnings.warn(f"Missing mandatory attributes in metadata_dict: {attr}. ", UserWarning)
|
|
374
418
|
|
|
375
419
|
for config_key, attr_val in metadata_dict.items():
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
var_lon = nc.createVariable("longitude", "f8")
|
|
388
|
-
var_lon.units = "degrees_east"
|
|
389
|
-
var_lon.long_name = "Station Longitude"
|
|
390
|
-
var_lon.standard_name = "longitude"
|
|
391
|
-
var_lon.valid_min = -180.0
|
|
392
|
-
var_lon.valid_max = 180.0
|
|
393
|
-
var_lon[:] = metadata_dict.get("longitude", -9999.0)
|
|
394
|
-
|
|
395
|
-
var_depth = nc.createVariable("depth", "f8")
|
|
396
|
-
var_depth.units = "m"
|
|
397
|
-
var_depth.long_name = "Station Depth"
|
|
398
|
-
var_depth.standard_name = "depth"
|
|
399
|
-
var_depth.positive = "down"
|
|
400
|
-
var_depth[:] = metadata_dict.get("depth", -9999.0)
|
|
420
|
+
if config_key == "sensor_ids":
|
|
421
|
+
sensor_ids = attr_val
|
|
422
|
+
nc.setncattr(
|
|
423
|
+
"sensor_ids",
|
|
424
|
+
f"BPR1 : {sensor_ids['BPR1']}, "
|
|
425
|
+
f"BPR2 : {sensor_ids['BPR2']}, "
|
|
426
|
+
f"Barometer : {sensor_ids['Barometer']}"
|
|
427
|
+
)
|
|
428
|
+
else:
|
|
429
|
+
nc.setncattr(config_key, attr_val)
|
|
401
430
|
|
|
402
431
|
# Close the file
|
|
403
432
|
nc.close()
|
|
@@ -406,9 +435,7 @@ def export_obp_to_netcdf(
|
|
|
406
435
|
print(f"Number of samples: {num_samples}")
|
|
407
436
|
print(f"Time range: {start_date} to {end_date}")
|
|
408
437
|
print(f"Sampling interval: {sampling_interval_seconds} seconds")
|
|
409
|
-
print(
|
|
410
|
-
f"Station location: {metadata_dict.get('latitude', 'N/A')}°N, {metadata_dict.get('longitude', 'N/A')}°E at {metadata_dict.get('depth', 'N/A')}m depth"
|
|
411
|
-
)
|
|
438
|
+
print(f"Station location: {metadata_dict.get('latitude', 'N/A')}°N, {metadata_dict.get('longitude', 'N/A')}°E at {metadata_dict.get('depth', 'N/A')}m depth")
|
|
412
439
|
|
|
413
440
|
return output_path
|
|
414
441
|
|
|
@@ -417,7 +444,6 @@ def export_obp_to_netcdf(
|
|
|
417
444
|
# DATA READER FUNCTIONS
|
|
418
445
|
# =============================================================================
|
|
419
446
|
|
|
420
|
-
|
|
421
447
|
def read_halios_first_deploy(
|
|
422
448
|
path_pressure: str,
|
|
423
449
|
path_temp_sensor: str,
|
|
@@ -487,7 +513,7 @@ def read_halios_first_deploy(
|
|
|
487
513
|
# Create column mapping
|
|
488
514
|
column_mapping_out = {
|
|
489
515
|
"time": time_col,
|
|
490
|
-
"
|
|
516
|
+
"pressure_sensor": pressure_col,
|
|
491
517
|
"temperature_sensor": temp_sensor_col,
|
|
492
518
|
"temperature_seawater": temp_seawater_col,
|
|
493
519
|
"pressure_barometer": None,
|
|
@@ -495,3 +521,101 @@ def read_halios_first_deploy(
|
|
|
495
521
|
}
|
|
496
522
|
|
|
497
523
|
return df_out, column_mapping_out
|
|
524
|
+
|
|
525
|
+
def get_metadata_info(metadata_path):
|
|
526
|
+
"""
|
|
527
|
+
Read an RBR metadata file and extract instrument information.
|
|
528
|
+
|
|
529
|
+
Returns
|
|
530
|
+
-------
|
|
531
|
+
sensor_ids : list
|
|
532
|
+
Sensor serial numbers ordered as [BPR1, BPR2, Barometer].
|
|
533
|
+
instrument_serial : int
|
|
534
|
+
RBR instrument serial number.
|
|
535
|
+
instrument_model : str
|
|
536
|
+
RBR instrument model.
|
|
537
|
+
firmware_version : str
|
|
538
|
+
Instrument firmware version.
|
|
539
|
+
ruskin_version : str
|
|
540
|
+
Ruskin software version.
|
|
541
|
+
sampling_mode : str
|
|
542
|
+
Instrument sampling mode.
|
|
543
|
+
"""
|
|
544
|
+
|
|
545
|
+
with open(metadata_path, "r", encoding="utf-8") as f:
|
|
546
|
+
metadata = json.load(f)
|
|
547
|
+
|
|
548
|
+
dataheader = metadata["dataheader"]
|
|
549
|
+
|
|
550
|
+
# Sensor IDs
|
|
551
|
+
sensor_ids = []
|
|
552
|
+
|
|
553
|
+
# BPR sensors first
|
|
554
|
+
for entry in dataheader:
|
|
555
|
+
if entry.get("name") == "BPR pressure" and "sensor" in entry:
|
|
556
|
+
sensor_id = int(entry["sensor"])
|
|
557
|
+
if sensor_id not in sensor_ids:
|
|
558
|
+
sensor_ids.append(sensor_id)
|
|
559
|
+
|
|
560
|
+
# Barometer sensor last
|
|
561
|
+
for entry in dataheader:
|
|
562
|
+
if entry.get("name") == "Barometer pressure" and "sensor" in entry:
|
|
563
|
+
sensor_id = int(entry["sensor"])
|
|
564
|
+
if sensor_id not in sensor_ids:
|
|
565
|
+
sensor_ids.append(sensor_id)
|
|
566
|
+
break
|
|
567
|
+
|
|
568
|
+
# Instrument metadata
|
|
569
|
+
instrument_serial = metadata.get("instrument", {}).get("serial")
|
|
570
|
+
instrument_model = metadata.get("instrument", {}).get("model")
|
|
571
|
+
firmware_version = metadata.get("instrument", {}).get("fwversion")
|
|
572
|
+
|
|
573
|
+
ruskin_version = metadata.get("version", {}).get("ruskin")
|
|
574
|
+
|
|
575
|
+
sampling_mode = metadata.get("sampling", {}).get("mode")
|
|
576
|
+
|
|
577
|
+
return (
|
|
578
|
+
sensor_ids,
|
|
579
|
+
instrument_serial,
|
|
580
|
+
instrument_model,
|
|
581
|
+
firmware_version,
|
|
582
|
+
ruskin_version,
|
|
583
|
+
sampling_mode,
|
|
584
|
+
)
|
|
585
|
+
|
|
586
|
+
def read_emso_tid(file_path):
|
|
587
|
+
"""
|
|
588
|
+
Read an EMSO/SBE .tid file without header.
|
|
589
|
+
Expected format:
|
|
590
|
+
index date time pressure temperature
|
|
591
|
+
"""
|
|
592
|
+
df = pd.read_csv(file_path, sep=r"\s+", header=None,
|
|
593
|
+
names=[
|
|
594
|
+
"index",
|
|
595
|
+
"date",
|
|
596
|
+
"time",
|
|
597
|
+
"pressure",
|
|
598
|
+
"temperature"
|
|
599
|
+
]
|
|
600
|
+
)
|
|
601
|
+
# Create datetime
|
|
602
|
+
df["datetime"] = pd.to_datetime(df["date"] + " " + df["time"], format="%m/%d/%Y %H:%M:%S")
|
|
603
|
+
# Remove columns not needed anymore
|
|
604
|
+
df = df.drop(columns=["index", "date", "time"])
|
|
605
|
+
# Put datetime first
|
|
606
|
+
df = df[["datetime", "pressure", "temperature"]]
|
|
607
|
+
return df
|
|
608
|
+
|
|
609
|
+
# =============================================================================
|
|
610
|
+
# STATISTICS
|
|
611
|
+
# =============================================================================
|
|
612
|
+
|
|
613
|
+
def add_statistics(var_nc, values, axis=None):
|
|
614
|
+
values = np.asarray(values, dtype=float)
|
|
615
|
+
var_nc.stat_min = np.asarray(np.nanmin(values, axis=axis), dtype=np.float32)
|
|
616
|
+
var_nc.stat_max = np.asarray(np.nanmax(values, axis=axis), dtype=np.float32)
|
|
617
|
+
var_nc.stat_mean = np.asarray(np.nanmean(values, axis=axis), dtype=np.float32)
|
|
618
|
+
var_nc.stat_median = np.asarray(np.nanmedian(values, axis=axis), dtype=np.float32)
|
|
619
|
+
var_nc.stat_std = np.asarray(np.nanstd(values, axis=axis), dtype=np.float32)
|
|
620
|
+
var_nc.stat_count = np.asarray(np.sum(np.isfinite(values), axis=axis), dtype=np.int64)
|
|
621
|
+
var_nc.stat_missing = np.asarray(np.sum(~np.isfinite(values), axis=axis), dtype=np.int64)
|
|
@@ -33,7 +33,7 @@ import logging
|
|
|
33
33
|
log = logging.getLogger("geodezyx")
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
LAST_VERSION_VALIDE = "
|
|
36
|
+
LAST_VERSION_VALIDE = "VALIDE_26_1"
|
|
37
37
|
# DIR_SPOTGINS_DEFAULT = ""DIR_SPOTGINS_G20_GE.yml""
|
|
38
38
|
#DIR_SPOTGINS_DEFAULT = "DIR_SPOTGINS_G20_GE_VALIDE_25_1.yml"
|
|
39
39
|
DIR_SPOTGINS_DEFAULT = "DIR_SPOTGINS_G20_GE_VALIDE_25_2.yml"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: geodezyx
|
|
3
|
-
Version: 5.2.
|
|
3
|
+
Version: 5.2.2
|
|
4
4
|
Summary: geodezyx (formerly known as The GeodeZYX toolbox) aims to provide simple but useful functions for Geodesy and Geophysics.
|
|
5
5
|
Author-email: Pierre Sakic <sakic@ipgp.fr>, Gustavo Mansur <mansur@gfz-potsdam.de>
|
|
6
6
|
License-Expression: LGPL-3.0-or-later
|
|
@@ -61,8 +61,8 @@ Dynamic: license-file
|
|
|
61
61
|
|
|
62
62
|
# geodezyx
|
|
63
63
|
|
|
64
|
-
**Version: 5.2.
|
|
65
|
-
**Date: 2026-
|
|
64
|
+
**Version: 5.2.2**
|
|
65
|
+
**Date: 2026-11-25**
|
|
66
66
|
|
|
67
67
|
**Authors:**
|
|
68
68
|
* Pierre Sakic (IPGP, Paris, France)
|
|
@@ -32,7 +32,7 @@ name = "geodezyx" # REQUIRED, is the only field that cannot be marked as dynamic
|
|
|
32
32
|
#
|
|
33
33
|
# For a discussion on single-sourcing the version, see
|
|
34
34
|
# https://packaging.python.org/guides/single-sourcing-package-version/
|
|
35
|
-
version = "5.2.
|
|
35
|
+
version = "5.2.2" # REQUIRED, although can be dynamic
|
|
36
36
|
|
|
37
37
|
# This is a one-line description or tagline of what your project does. This
|
|
38
38
|
# corresponds to the "Summary" metadata field:
|
|
@@ -186,7 +186,7 @@ include = ["geodezyx*"] # package names should match these glob patterns (["*"]
|
|
|
186
186
|
#namespaces = false # to disable scanning PEP 420 namespaces (true by default)
|
|
187
187
|
|
|
188
188
|
[tool.bumpversion]
|
|
189
|
-
current_version = "5.2.
|
|
189
|
+
current_version = "5.2.2"
|
|
190
190
|
|
|
191
191
|
|
|
192
192
|
##### SIMPLE CYCLE - MAJOR.MINOR.PATCH #####
|
|
@@ -194,6 +194,8 @@ current_version = "5.2.0"
|
|
|
194
194
|
#serialize = ["{major}.{minor}.{patch}"]
|
|
195
195
|
|
|
196
196
|
##### MORE COMPLEX CYCLE - MAJOR.MINOR.PATCH-PRERELEASE #####
|
|
197
|
+
# respect PEP 440: https://peps.python.org/pep-0440/
|
|
198
|
+
|
|
197
199
|
parse = """(?x)
|
|
198
200
|
(?P<major>0|[1-9]\\d*)\\.
|
|
199
201
|
(?P<minor>0|[1-9]\\d*)\\.
|
|
@@ -258,9 +260,22 @@ filename = "pyproject.toml"
|
|
|
258
260
|
search = 'version = "{current_version}"'
|
|
259
261
|
replace = 'version = "{new_version}"'
|
|
260
262
|
|
|
263
|
+
[[tool.bumpversion.files]]
|
|
264
|
+
filename = "codemeta.json"
|
|
265
|
+
search = '"version": "{current_version}"'
|
|
266
|
+
replace = '"version": "{new_version}"'
|
|
267
|
+
|
|
268
|
+
[[tool.bumpversion.files]]
|
|
269
|
+
filename = "codemeta.json"
|
|
270
|
+
search = '"dateModified": "[0-9]{{4}}-[0-9]{{2}}-[0-9]{{2}}"'
|
|
271
|
+
replace = '"dateModified": "{now:%Y-%m-%d}"'
|
|
272
|
+
regex = true
|
|
273
|
+
|
|
261
274
|
#[[tool.bumpversion.files]]
|
|
262
275
|
#filename = "setup.py"
|
|
263
276
|
#parse = "(?p<major>\\d+)\\.(?p<minor>\\d+)\\.(?p<patch>\\d+)"
|
|
264
277
|
#serialize = ["{major}.{minor}.{patch}"]
|
|
265
278
|
#search = "version='{current_version}'"
|
|
266
279
|
#replace = "version='{new_version}'"
|
|
280
|
+
|
|
281
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/legacy/gins_double_diff.py
RENAMED
|
File without changes
|
|
File without changes
|
{geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/gins_runner/legacy/gins_orbclk_convert.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/soft_frontend/pride_pppar_frontend.py
RENAMED
|
File without changes
|
|
File without changes
|
{geodezyx-5.2.0 → geodezyx-5.2.2}/geodezyx/operational/soft_frontend/rtklib_frontend_legacy.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|