... your project is now done for a single contour in "metric area". The previous version will surely fail for Mathcad 14 because of the MuPad, and it applies to mathematical function f(x,y). This is not general enough as the surface area may result from square/rectangular data sets, mostly smoothed, therefore, the sole contour extractor will be this one attached, though here for your particular project, it is applied on your function. Compacting the entire thing in a single program is always prone to failure, not knowing where and why it fails, thus the proposal is left in modular construct, much easier to debug. Rarely, programs can be "general-general-general...".
As is ... but not limited to refinements.
Jean