Skip to content

ArgoFloat handling of mono-cycle profile files#590

Open
gmaze wants to merge 12 commits intomasterfrom
argofloat-open-profile
Open

ArgoFloat handling of mono-cycle profile files#590
gmaze wants to merge 12 commits intomasterfrom
argofloat-open-profile

Conversation

@gmaze
Copy link
Copy Markdown
Member

@gmaze gmaze commented Feb 18, 2026

This PR brings new methods to the ArgoFloat class to list, describe and open one or mono-cycle profile files.

from argopy import ArgoFloat
af = ArgoFloat(WMO)
af = ArgoFloat(WMO, aux=True)

af.describe_profiles()  # Pandas DataFrame describing all available profile files

af.lsp() # Return the full list of profile files

af.ls_profiles() # Return a dictionary with all available mono-cycle profile files (everything under the 'profiles' sub-folder)

# To load one single file, use keys from af.ls_profiles():
ds = af.open_profile(12) # cycle number 12, core file
ds = af.open_profile('1D') # cycle number 1, descending core file
ds = af.open_profile('B15') # cycle number 15, BGC file
ds = af.open_profile('B1D') # cycle number 1, descending BGC file
ds = af.open_profile('S28') # cycle number 28, BGC synthetic file

# To load one or more files, provide cycle number(s) and other attributes:
ds_list = af.open_profiles([1,2,3])
ds_list = af.open_profiles([1,2,3], direction='D')
ds_list = af.open_profiles([1,2,3], dataset='B') # Return 'BGC' B files
ds_list = af.open_profiles([1,2,3], dataset='B', direction='D') # Return 'BGC' B files, descending
ds_list = af.open_profiles([1,2,3], dataset='S') # Return 'BGC' Synthetic files

# If you don't specify cycle numbers, all cycles are loaded:
ds_list = af.open_profiles(direction='D') # Return *all* core descending files

‼️ This PR does not update the documentation and does not implement unit tests.

- deprec lsprofiles
- update describe_profiles
- new ls_profiles_for
- new ls_profiles
- new open_profile
- fix bug whereby the default ascending direction was not set
- refactor toward: open_profile and open_profiles methods
- more private place holder for perf.
- better docstrings
update facade docstring
- improve typing
- new lsp() as a profiles counter part to ls()
- change column names in describe_profiles
@gmaze gmaze self-assigned this Feb 18, 2026
@gmaze gmaze added the enhancement New feature or request, development label Feb 18, 2026
@gmaze gmaze moved this from Queued to In Progress in Argopy Management Dashboard Feb 18, 2026
@gmaze gmaze added the next-release Strongly needed for the next release label Feb 19, 2026
@gmaze gmaze moved this from In Progress to Stalled in Argopy Management Dashboard Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request, development next-release Strongly needed for the next release

Projects

Status: Stalled

Development

Successfully merging this pull request may close these issues.

1 participant