OSOceanAcoustics / echopype

Enabling interoperability and scalability in ocean sonar data analysis
https://echopype.readthedocs.io/
Apache License 2.0
96 stars 72 forks source link

Overhaul AZFP Environnment group #1225

Closed emiliom closed 10 months ago

emiliom commented 10 months ago

Currently the AZFP Environment group is created with temperature and pressure variables, even if the variables have no valid data. Since pressure data are almost never present, and these variables are not defined by SONAR-netCDF4, always creating these variables is unnecessary and wasteful.

Also, the mandatory variables absorption_indicative and sound_speed_indicative are not created.

The attributes for absorption_indicative and sound_speed_indicative are taken from the convention:

# absorption_indicative
{
    "long_name": "Indicative acoustic absorption",
    "units": "dB/m",
    "valid_min": 0.0,
}
# sound_speed_indicative
{
    "long_name": "Indicative sound speed",
    "standard_name": "speed_of_sound_in_sea_water",
    "units": "m/s",
    "valid_min": 0.0,
}

Note that if neither temperature nor pressure contain valid data, the variables won't be created, and the time dimension and coordinate variable should not be created either.

leewujung commented 10 months ago

This can be closed now since #1226 is merged.