UXARRAY / uxarray

Xarray extension for unstructured climate and global weather data analysis and visualization.
https://uxarray.readthedocs.io/
Apache License 2.0
148 stars 31 forks source link

Accurate Spherical Operator User Guide #858

Open hongyuchen1030 opened 1 month ago

hongyuchen1030 commented 1 month ago

Proposed new feature or change:

Issue: Create User Guide for Accurate Spherical Operator

Description

We have designed a suite of accurate operators specifically tailored for calculations on spherical surfaces. These operators significantly enhance the precision of computations involving normal vectors, intersections of geodesic arcs (GCAs), and intersections between geodesic arcs and constant latitude lines.

Features

Achieves an error tolerance as low as half the precision. For float64, this global error tolerance is approximately (10^{-8}).

  1. Accurate Normal Vector Calculation:

    • Our algorithm calculates the normal vector on a spherical surface with remarkable accuracy using floating-point arithmetic.
  2. Spherical Bounding Box:

    • Efficiently and accurately bounds each face within a lat-lon box on a unit sphere.
    • Minimizes rounding errors and adeptly handles pole point detection within polygons and antimeridian cases.
  3. GCA-GCA Intersection:

    • Computes the intersection points of two geodesic arcs with high precision.
    • Maintains the global error tolerance within the specified limits, ensuring reliable results in geospatial analysis.
  4. GCA-ConstLat Intersection:

    • Faster and more accurate than traditional methods, including those used in Climate Data Operators (CDO).
    • Ensures stability and precision, particularly around the poles.
    • Achieves the global error tolerance.

Objectives

These advancements address long-standing geoscience issues, including the degeneration of closely positioned points, inconsistent intersection points, and other geometry problems caused by error propagation. As a result, our work significantly enhances the reliability of geospatial analysis. The enhanced methodologies are prepared for integration into UXarray, an open-source Python package for the automated analysis of various climate data inputs.