euroargodev / euroargodev/argopy
Export Netcdf file
- Dominant language
- Python
- Stars
- 229
- Forks
- 52
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 8
Description
As of now, Argopy has focused on accessing/reading/loading Argo data as xarray datasets.
But for operators who modify the content of a dataset, by adding calibration information for instance, there is a need to be able export these updated/augmented xarray datasets to netcdf files, following the Argo conventions for variables encoding.
This should requires a static dictionary asset with all possible Argo variables and the corresponding encoding information.
One tricky part is for string variables.
For instance:`DATA_TYPE` is encoded as an array of `dtype('S1')` with length 16, along a `STRING16` dimensions, in netcdf files
Hence, when decoded abruptly with xarray, it is returned as 16 values with `dtype=|S1]`, along a `STRING16` dimensions of length 16.
But after variable casting by argopy, this variable is more appropriately returned as 1 value with `dtype=
Contributor guide
Research direction
Start by locating ArgoFloat(WMO).open_dataset('prof') and the xarray casting behavior for variables such as DATA_TYPE. Review the proposed ds.argo.to_netcdf API and determine how the static Argo-variable encoding asset should support string variables. Done means an updated dataset exports to NetCDF, follows the stated Argo conventions, and passes the Argo file checker for DAC submission.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100