An earthquake cannot physically occur at a depth of 0 km or -1km (above the surface of the earth). In order for an earthquake to occur, two blocks of crust must slip past one another, and it is impossible for this to happen at or above the surface of the earth. So why do we report that the earthquake occurred at a depth of 0 km or event as a negative depth sometimes?
First of all, the depth of an earthquake is usually the most difficult part of its location to nail down with great accuracy. Since most earthquakes are deep within the crust, an error of +/- 1 or 2 km is irrelevant; in other words, it is a small error when the depth is something like 13 km. If the earthquake depth is relatively shallow, however, it becomes more of an issue. A negative depth can sometimes be an artifact of the poor resolution for a shallow event.
For quarry blasts that are recorded by the seismic network, the depth is fixed at 0 km since we can never determine a precise depth for these, but we know they are very close to the surface.
Sometimes, because of the density of the seismic network and the close proximity of the seismic stations to an earthquake epicenter, we are able to determine a very precise depth. When the earthquake depth is very shallow, it can be reported as a negative depth.
The USGS National Earthquake Information Center uses the World Geodetic System of 1984 (WGS84) geoid as a reference from which earthquake depths are calculated. But other seismic networks may use WGS84, mean sea-level, or the average elevation of the seismic stations that provided arrival-time data for the earthquake location. The choice of reference depth is dependent on the method used to locate the earthquake, which varies by seismic network.
Since the Comprehensive Earthquake Catalog (ComCat) includes data from many different seismic networks, the process for determining the depth is different for different events. The depth is the least-constrained parameter in the earthquake location, and the error bars are generally larger than the variation due to different depth determination methods.