NPIOcean / kval

Tools for analysis and processing of ocean data in Python.
MIT License
2 stars 0 forks source link

Fix time_coverage_resolution in add_range_attrs (set based on data, not 'variable') #15

Closed oyvfoss closed 2 months ago

oyvfoss commented 3 months ago

In nc_format.conventionalize.add_range_attrs, we are currently setting time_coverage_resolution to variable.

This is desirable for something like a CTD dataset, but for something with fixed (or nearly fixed) sample interval, like a mooring sensor, we should set this based on the data.

The line in question (L74 in nc_format.conventionalize in current commit)

        D.attrs['time_coverage_resolution'] = 'variable' 
        ## Note: Should not be variable for fixed sampling rate instruments!!! -> Fix this.

Notes:

oyvfoss commented 2 months ago

Fixed in 6f7a984687c0fb25fba1233f10910ab4731857ce.