## 3 Method
### Waveform Retracking Method
#### 3.2.3 Non-Specular Echo Processing
The blue line is whole waveform, the red line is the leading edge depending on the “normal ending gate of leading edge”, the yellow gate marked is the second kind of “possible ending gate of leading edge” with decreasing power. The ending gate of the rough leading edge is selected between the NEG and the PEG. If there is no PEG, the NEG is chosen. Otherwise, the PEG is chosen under the reliability judgment. The judgment criteria are that the power of the PEG is higher than that of most gates on the trailing edge and that the decay rate of the trailing edge varies significantly. Both PEGs marked in Figure 7 do not meet the criteria and cannot be taken as the ending gate of the rough leading edge. Due to coastal influence, the rough leading edge includes extra noise gates. In this study, two reference gates provide the reference ending power of the leading edge to remove noisy gates from the rough leading edge. The selection of two reference gates is introduced as follows, and a rough leading edge with fewer than three gates is not processed. The first reference gate is the first gate with increasing power after the ending of the rough leading edge. The second reference gate is decided based on the first reference gate. Both reference gates need to check whether there is a gate whose power is lower than the reference gate over 0.1 in its next five gates. Otherwise, the reference gate is replaced to avoid the reference gate being located at a wide distortion of the waveform. The second reference gate is the first gate after the first reference gate whose power meets the following relationship:  
\[P_{\text{sec}\,ond}\leq P_{first}-(i-first)\times 0.0065 \tag{4}\]  
where, the \(i\) is the ith gate after the first reference gate (\(i\) = first + 1,first + 2.80). 0.0065 is an empirical value, which is related with the theoretical waveform trailing edge with 0.3\({}^{\circ}\) mispointing angle. Before deriving the reference ending power of the accurate leading edge, the reliability of reference gates is analyzed by the parameter C, which is defined as follows:  
\[C=P_{first}-P_{\text{sec}}-(\text{sec}-first)\times 0.008 \tag{5}\]  
where 0.008 is the decay rate of theoretical waveform trailing edge with 0.3\({}^{\circ}\) mispointing angle. The range from \(-0.1\) to 0.1 is selected as the confident interval for C. C = 0 means that the second reference gate is not found within a certain search range. C > 0.1 means that the first reference gate is affected and unreliable. C < \(-0.1\) indicates that the second reference gate is affected and unreliable. The value of C only reflects the relative reliability of two reference gates. According to the more reliable reference gate and the power decay rate of approximately 0.008, the reference ending power of the leading edge is calculated using the power of the reference gate plus the power equal to the gate distance between the reference gate and the rough leading edge ending gate multiplied by 0.008. Based on the reference ending power of the leading edge, an accurate leading edge is obtained after removing the noise gates. The removed gates correspond to the edge of the circular measurement footprint, which is affected by coastal 'contamination' [32]. Furthermore, the following types of rough  
Figure 7: Examples of the invalid “possible ending gate of leading edge”. leading edges are not processed by this step: (1) there are no PEGs, and C falls in the confident interval; (2) there are no gates with power close to the reference power of the leading edge ending; and (3) the trend of the trailing edge is increasing or the trend of attenuation is not obvious. * The processing of trailing edge  
Usually, coastal 'contamination' initially appears in the annulus measurement footprint, and the circular measurement footprint survives.