First plot the S21 Magnitude in dB & then find the two highest peaks in |S21|.
The frequency of the first peak (lower frequency) is called F_low.
The frequency of the second peak (high frequency) is called F_high.
Then use the output equation to calculate coupling coefficient
K =
(F_high^2-F_low^2)/(F_high^2+F_low^2)
This formula is from the Daniel G. Swanson Jr. article entitled
"Narrow-Band Microwave Filter Design. IEEE Microwave Magazine. www.macom.com/TechApps/pdf/NarrowBandFilterDesign10_07.pdf
See the extracted pictures…
Then finally sweep the spacing between the resonators (S) & plot the coupling coefficient vs Spacing on a graph…