Leap Seconds

Leap seconds are an important problem to be aware of in OBS data. Seismometers on land use continuously powered GPS for timing, which can handle a leap second correction in real time. Since the OBS on the ocean floor use attached clocks for timing, the leap seconds that are added on land must be taken into account after the fact. This can be done in several different ways. The most straightforward or "brute force" way to apply a correction is to remove the one second of data that occurs during the leap second, then add one second to each data point beyond. 

no leap-second:    58,   59,   00,   01,   02,   03
    leap-second:     58,   59,   60,   00,   01,   02 

Data is cut at the last sample with a time tag of 59.xxxxx, the one second of data following that should be tagged with 60.xxxx is ignored, then one second is added to each miniseed header of all data following with time tags equal to or later than second 01.xxxx of the following day. This method has been implemented in WHOI, LDEO, and older SIO datasets.

MiniSEED headers have flags to indicate leap seconds. The activity flag can be set for a blockette of data that contains a leap second, and then the time correction flag can be set for -1000 ms, or one full second forward in time. This allows the time tags to remain untouched and simply use the activity flags to describe how the data should be interpreted. This method has been implemented in SIO datasets following the Cascadia Initiative.