Skip to content

Add support for etc detailed index files (core and synthetic BGC) - #621

Draft
gmaze wants to merge 17 commits into
masterfrom
add-detailed-index
Draft

gmaze wants to merge 17 commits into
masterfrom
add-detailed-index

Conversation

@gmaze

@gmaze gmaze commented May 19, 2026

Copy link
Copy Markdown
Member

This PR should close #555 providing support for 2 new index files from the etc folder:

  • etc/argo-index/argo_profile_detailled_index.txt with columns: file,date,latitude,longitude,ocean,profiler_type,institution,date_update,profile_temp_qc,profile_psal_qc,profile_doxy_qc,ad_psal_adjustment_mean,ad_psal_adjustment_deviation,gdac_date_creation,gdac_date_update,n_levels.
  • etc/argo-index/argo_synthetic-profile_detailled_index.txt, with columns: file,date,latitude,longitude,ocean,profiler_type,institution,parameters,parameter_data_mode,parameter_quality,date_update,gdac_date_creation,gdac_date_update,n_levels.

New API

Search profile qc:

idx = ArgoIndex(index_file='core+')
# idx = ArgoIndex(index_file='etc/argo-index/argo_profile_detailled_index.txt')

data = [] 
for qc in ['', '1', 'A', 'B', 'C', 'D', 'E', 'F']:
    data.append({'qc': qc, 'n': idx.query.profile_qc({'TEMP': qc}).N_MATCH})
data

[{'qc': '', 'n': 3298},
 {'qc': '1', 'n': 48},
 {'qc': 'A', 'n': 2601276},
 {'qc': 'B', 'n': 520228},
 {'qc': 'C', 'n': 8250},
 {'qc': 'D', 'n': 3782},
 {'qc': 'E', 'n': 1005},
 {'qc': 'F', 'n': 110495}]

(and yes, '1' should not be there, it's from float 4900566)

Search psal adjustment by bounds:

idx = ArgoIndex(index_file='core+')
idx.query.psal_adj(le=0.1) # Upper bound on mean psal adjustment
idx.query.psal_adj(ge=0.1) # Lower bound on mean psal adjustment
idx.query.psal_adj(ge=.1, le=0.2)

# Also search the adjusment std:
idx.query.psal_adj(le=0.1, where='std') 

Search maximum number of pressure levels contained in a profile:

idx = ArgoIndex(index_file='core+')
idx.query.n_levels(ge=2000) # Lower bound 
idx.query.n_levels(le=100) # Upper bound
idx.query.n_levels(ge=1, le=1000)

@gmaze gmaze linked an issue May 19, 2026 that may be closed by this pull request
@gmaze gmaze self-assigned this May 19, 2026
@gmaze gmaze moved this from Queued to Todo in Argopy Management Dashboard May 19, 2026
@gmaze gmaze added enhancement New feature or request, development argo-BGC About biogeochemical variables argo-core About core variables (P, T, S) argo-deep About deep variables (anything below 2000db) next-release Strongly needed for the next release labels May 19, 2026
@gmaze
gmaze marked this pull request as draft May 19, 2026 06:25
@gmaze gmaze changed the title Add support for the detailed index (core and synthetic BGC) Add support for etc detailed index files (core and synthetic BGC) May 31, 2026
@gmaze gmaze removed the next-release Strongly needed for the next release label Jul 15, 2026
@gmaze gmaze moved this from Todo to Stalled in Argopy Management Dashboard Jul 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

argo-BGC About biogeochemical variables argo-core About core variables (P, T, S) argo-deep About deep variables (anything below 2000db) enhancement New feature or request, development

Projects

Status: Stalled

Development

Successfully merging this pull request may close these issues.

Add detailed index to the index feature

1 participant