Hi @taylor13 Thank you very much or your [comments](https://urldefense.us/v3/__https://github.com/cf-convention/discuss/issues/37*issuecomment-832780564__;Iw!!G2kpM7uM-TzIFchu!lLfxA-1u7BwCI_w6J1bYPrIbNQuDCLnaPErHAUz5vBwAAZn2Z7S69d6LTvuHUjDOgIwCD7NGM8M$ ). We did have a flaw or a weakness in the algorithm, which we have corrected following your comments.
To briefly explain: the methods of the proposal stores coordinates at a set of tie points, from which the coordinates in the target domain may then be reconstituted by interpolation. The source of the problem was the computation of the distance squared between two such tie points. The distance will never be zero and could for example be in the order of a few kilometers. As the line between the two tie points forms a right triangle with two other lines of known length, the fastest way to compute the distance squared is to use Pythagoras's theorem. However, as the two other sides both of a length significantly larger than the one we wish to calculate, the result was very sensitive to rounding in 32-bit floating-point calculations and occasionally returned zero. We have now changed the algorithm to compute the distance squared as (x*x + y*y + z*z), where (x, y, z) is the vector between the two tie points. This expression does not have the weakness explained above and has now been tested to work well. In terms of accuracy of how well the method reconstitutes the original coordinates, the change improved the performance of the internal calculations being calculated in 32-bit floating-point. However, still with errors a couple of times larger than when using 64-bit floating-point calculations. I would therefore support the [proposal ](https://urldefense.us/v3/__https://github.com/cf-convention/discuss/issues/37*issuecomment-832816324__;Iw!!G2kpM7uM-TzIFchu!lLfxA-1u7BwCI_w6J1bYPrIbNQuDCLnaPErHAUz5vBwAAZn2Z7S69d6LTvuHUjDOgIwC8Ualx30$ ) put forward by @davidhassell. The proposal avoids setting a general rule, which, as you point out, may not cover all cases. It permits setting a requirement when needed to reconstitute data with the accuracy intended by the data creator. Once again, thank you very much for your comments – further comments from your side on the proposal would be highly welcome! Cheers Anders -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://urldefense.us/v3/__https://github.com/cf-convention/cf-conventions/issues/327*issuecomment-835837958__;Iw!!G2kpM7uM-TzIFchu!lLfxA-1u7BwCI_w6J1bYPrIbNQuDCLnaPErHAUz5vBwAAZn2Z7S69d6LTvuHUjDOgIwC3o24DvM$ This list forwards relevant notifications from Github. It is distinct from cf-metad...@cgd.ucar.edu, although if you do nothing, a subscription to the UCAR list will result in a subscription to this list. To unsubscribe from this list only, send a message to cf-metadata-unsubscribe-requ...@listserv.llnl.gov.