Skip to content

Diagnosing missing data

Nick edited this page Aug 11, 2022 · 1 revision

Sometimes there are data gaps in downloaded or interpolated data.

From the pdb terminal: assume the netcdf time variable is called time and dt is the proper time step

dt = 6
np.unique(np.diff(time))  # <- should be length 1
breaks = np.where(np.diff(time) != dt)
breakpoints = nc.num2date(time[breaks], time.units, time.calendar)

Clone this wiki locally