-
Notifications
You must be signed in to change notification settings - Fork 0
Argo ‐ GDAC synch
- Extraction of metadata from GDAC
- Reporting of additions
- upload in the data base
1. Extraction of metadata from GDAC - Operational Argo Float Metadata Extraction – User Documentation
This notebook extracts metadata and configuration information for recently active Argo floats using the argopy library and exports the results into a CSV file.
The workflow:
-
Loads the global Argo profile index
-
Identifies floats that produced profiles during the last N days
-
Retrieves:
- General metadata (
meta.nc) - Latest profile information (
prof.nc)
- General metadata (
-
Extracts selected configuration parameters from the latest mission
-
Generates a clean CSV file for further manual updates and operational use
Notebook directory:
C:\Users\vturpin\Documents\Mes Notebooks
Notebook file:
GetOperationalFloatMetadata_V6-1.ipynb
(previously GetOperationalFloatMetadata_V6.ipynb)
Select the environment:
ArgoPY-env
From Anaconda Navigator:
- Open JupyterLab
- Create or open a Python 3 Notebook
Python 3 ipykernel
Navigate to:
Mes Notebooks
Open:
GetOperationalFloatMetadata_V6-1.ipynb
Before execution, update the CSV filename with the current month if necessary.
Example:
df.to_csv("argo_metadata_last_config_clean_202604.csv", index=False)Run all notebook cells sequentially.
The script will:
- Load the Argo GDAC index
- Identify recently active floats
- Retrieve metadata and latest configuration parameters
- Export the results into a CSV file
Once the V6 CSV file has been generated:
-
Transfer the CSV file to Magali
-
Manual updates are then performed for:
- Configuration parameters
- PI information
- Sensor model
- Sensor serial number
- Platform model
- Special features
- Customization fields
If the notebook fails because of argopy dependency issues:
Run:
conda activate argopy_env
pip install --upgrade argopyThen:
- Restart JupyterLab
- Restart the notebook kernel
- Rerun the notebook
The script uses:
numpypandasdatetimexarraynetCDF4argopy
Warnings related to large integer conversion are ignored to avoid unnecessary console messages.
Cleans metadata values extracted from Argo meta.nc files.
- Removes padding spaces
- Converts arrays/lists into compact strings
- Handles missing values safely
A cleaned string suitable for CSV export.
days_back = 14Only floats that produced profiles within the last 14 days are processed.
The script loads the global Argo profile index:
idx = ArgoIndex(index_file="ar_index_global_prof.txt")Then:
- Converts dates to pandas datetime objects
- Filters profiles more recent than
days_back - Extracts unique WMO float identifiers
The following metadata fields are retrieved from meta.nc:
PI_NAME
FLOAT_OWNER
OPERATING_INSTITUTION
PROJECT_NAME
PLATFORM_NUMBER
PLATFORM_TYPE
SENSOR_MODEL
SENSOR_SERIAL_NO
SPECIAL_FEATURES
CUSTOMISATIONThe script extracts selected mission configuration parameters:
CONFIG_ParkPressure_dbar
CONFIG_IceDetection_degC
CONFIG_CycleTime_hours
CONFIG_ProfilePressure_dbarThese values are taken from the latest mission configuration associated with the latest profile.
For each float WMO:
af = ArgoFloat(wmo, aux=True)The script opens:
prof.nc
and identifies the latest profile using:
-
JULDor CYCLE_NUMBER
The latest mission configuration number is extracted from:
CONFIG_MISSION_NUMBER
The script opens:
meta.nc
and extracts:
- Metadata fields
- Configuration parameters
The script:
- Searches the latest mission configuration
- Identifies target parameters
- Stores their values individually
If a float cannot be processed:
except Exception as e:the script logs the error and continues processing the remaining floats.
All extracted records are stored in a pandas DataFrame and exported as:
argo_metadata_last_config_clean_YYYYMM.csv
Example:
argo_metadata_last_config_clean_202604.csv
The generated CSV contains:
- One row per operational float
- General metadata
- Latest mission configuration parameters
This file is intended for:
- Operational monitoring
- Metadata harmonization
- Manual completion/update workflows
- The script depends on online access to Argo GDAC resources through
argopy. - Processing time depends on the number of active floats.
- Some metadata fields may be empty if unavailable in
meta.nc.