add BGC-Argo+ dataset support to ArgoFloat.open_dataset()#623
add BGC-Argo+ dataset support to ArgoFloat.open_dataset()#623RaphaelBajon wants to merge 5 commits into
ArgoFloat.open_dataset()#623Conversation
|
Hi @RaphaelBajon ! before that, do you think it is ready for merge and review ? |
| #: Path template on the FTP server. | ||
| #: ``{version}`` can be overridden via :attr:`BGCArgoPlusStore.version`. | ||
| BGCARGO_PLUS_PATH_TEMPLATE = ( | ||
| "/bgc_argo_plus/outliers_removed/{version}/{wmo}_Sprof_BGCArgoPlus.nc" |
There was a problem hiding this comment.
@RaphaelBajon are you sure of the url ?
I guess it should read:
'/bgc_argo_plus/outliers_removed/{version}/Individual_Floats/{wmo}_Sprof_BGCArgoPlus.nc'There was a problem hiding this comment.
Hey @gmaze ,
Yes, you were right. The path depends on the version of dataset I add something hardcoded in bgcargo_plus.py to handle this:
path = BGCARGO_PLUS_PATH_TEMPLATE.format(wmo=wmo, version=version) if version != 'v0.1_2026_04' else BGCARGO_PLUS_PATH_TEMPLATE.format(wmo=wmo, version=version+"/Individual_Floats").
|
I was not able to compute Is there other function already implemented in WMO = 6903091
af = ArgoFloat(WMO)
ds_bgcargoplus = af.open_dataset(name='BGCArgoPlus', version='v0.1_2026_04')
ds_point = ds_bgcargoplus.argo.profile2point()
ds_profback = ds_point.argo.point2profile()with: argopy.show_versions()
SYSTEM
------
commit: None
python: 3.12.13 | packaged by conda-forge | (main, Mar 5 2026, 17:06:14) [Clang 19.1.7 ]
python-bits: 64
OS: Darwin
OS-release: 25.5.0
machine: arm64
processor: arm
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
libhdf5: 1.14.6
libnetcdf: 4.9.3
INSTALLED VERSIONS: CORE
------------------------
aiohttp : 3.12.15
argopy : 1.4.0
decorator : 5.3.1
erddapy : 3.2.0
fsspec : 2026.4.0
h5netcdf : 1.8.1
netCDF4 : 1.7.4
packaging : 26.2
requests : 2.34.2
scipy : 1.17.1
toolz : 1.1.0
xarray : 2025.9.0
INSTALLED VERSIONS: EXT.UTIL
----------------------------
gsw : -
pyco2sys : -
tqdm : 4.67.3
INSTALLED VERSIONS: EXT.FILES
-----------------------------
boto3 : -
kerchunk : -
numcodecs : -
s3fs : -
zarr : -
INSTALLED VERSIONS: EXT.PERF
----------------------------
dask : -
distributed : -
joblib : -
numba : -
pyarrow : -
INSTALLED VERSIONS: EXT.PLOT
----------------------------
IPython : 9.13.0
cartopy : -
ipykernel : 7.2.0
ipywidgets : 8.1.8
matplotlib : -
pyproj : -
seaborn : -
INSTALLED VERSIONS: DEV
-----------------------
aiofiles : -
black : -
bottleneck : -
cfgrib : -
cftime : 1.6.5
codespell : -
flake8 : -
numpy : 2.4.6
pandas : 3.0.3
pip : 26.1.1
pytest : 9.0.3
pytest_cov : -
pytest_env : -
pytest_localftpserver: 1.5.0
setuptools : 82.0.1
sphinx : -
INSTALLED VERSIONS: PIP
-----------------------
pytest-reportlog: - |
|
@RaphaelBajon does the what do you mean by other utilities ? |
| from ...utils import check_wmo | ||
|
|
||
|
|
||
| def _decode_bytes_dataset(ds: xr.Dataset) -> xr.Dataset: |
There was a problem hiding this comment.
@gmaze yes the .argo extension recognizes the dataset. I just created another hardcoded function _decode_bytes_dataset while loading the 'BGCArgoPlus' data to be able to go through .argo.profile2point() and back to .argo.point2profile().
I was thinking you would have something already implemented in argopy utils that handles the decode byte-string variables to str function of _decode_bytes_dataset.
You can start a review, all pytests are working on my local machine.
|
@RaphaelBajon , before the review to start, the Argopy team needs to publish a formal framework:
Setting the path with regard to these 2 issues from the very beginning is very important to us. poke @quai20 |
|
hi @RaphaelBajon ! Can you please check if your PR follows our new AI policy ? Also, we're still working on #638 , we'll get back to you asap ! g |
|
Hi @gmaze ! I updated the PR and disclosed the use of which AI model in the code for I guess some changes will be needed if you restructure the |
Signed-off-by: Raphaël Bajon <94925217+RaphaelBajon@users.noreply.github.com>
Integrate the BGC-Argo+ dataset (https://www.bgc-argo-plus.info) into argopy so that users can load QC-processed, outlier-removed BGC float files directly from the SOEST FTP server via the familiar ArgoFloat API:
Changes