I am trying to parse through NOAA buoy NetCDF files and depending on when they were launched, the data is recorded every 10 min, 30 min, or hourly. I need all of them to be consistently hourly in Python. So, anything less than an hour needs to be averaged. I've seen methods using cdo and resample but I can't seem to get much to work.
Sample 10 min nc file I'm working with: https://dods.ndbc.noaa.gov/thredds/fileServer/data/stdmet/41053/41053h9999.nc
The three variables I care about are wave_height, average_wpd, and mean_wave_dir. I'm fine if I can replace NaNs with a number like 9999. I need a function that can convert and average any time series into hourly.