Class CoordinateAxis2D

    • Method Detail

      • getCoordValue

        public double getCoordValue​(int j,
                                    int i)
        Get the coordinate value at the i, j index.
        Parameters:
        i - index 0 (fastest varying, right-most)
        j - index 1
        Returns:
        midpoint.get(j, i).
      • isInterval

        public boolean isInterval()
        Description copied from class: CoordinateAxis
        An interval coordinate consists of two numbers, bound1 and bound2. The coordinate value must lie between them, but otherwise is somewhat arbitrary. If not interval, then it has one number, the coordinate value.
        Overrides:
        isInterval in class CoordinateAxis
        Returns:
        true if its an interval coordinate.
      • getCoordValues

        public double[] getCoordValues()
        Get the coordinate values as a 1D double array, in canonical order.
        Returns:
        coordinate values
        Throws:
        UnsupportedOperationException - if !isNumeric()
      • section

        public CoordinateAxis2D section​(Range r1,
                                        Range r2)
                                 throws InvalidRangeException
        Create a new CoordinateAxis2D as a section of this CoordinateAxis2D.
        Parameters:
        r1 - the section on the first index
        r2 - the section on the second index
        Returns:
        a section of this CoordinateAxis2D
        Throws:
        InvalidRangeException - if specified Ranges are invalid
      • getCoordBoundsArray

        public ArrayDouble.D3 getCoordBoundsArray()
        Only call if isInterval()
        Returns:
        bounds array pr null if not an interval
      • makeEdges

        public static ArrayDouble.D2 makeEdges​(ArrayDouble.D2 midpoints)
        Normal case: do something reasonable in deciding on the edges when we have the midpoints of a 2D coordinate.
        Parameters:
        midpoints - values of midpoints with shape (ny, nx)
        Returns:
        values of edges with shape (ny+1, nx+1)
      • makeXEdgesRotated

        public static ArrayDouble.D2 makeXEdgesRotated​(ArrayDouble.D2 midx)
        Experimental: for WRF rotated (NMM "E") Grids
        Parameters:
        midx - x coordinates of midpoints
        Returns:
        x coordinates of edges with shape (ny+2, nx+1)
      • makeYEdgesRotated

        public static ArrayDouble.D2 makeYEdgesRotated​(ArrayDouble.D2 midy)
        Experimental: for WRF rotated (NMM "E") Grids
        Parameters:
        midy - y coordinates of midpoints
        Returns:
        y coordinates of edges with shape (ny+2, nx+1)
      • findTimeIndexFromCalendarDate

        public int findTimeIndexFromCalendarDate​(int run_idx,
                                                 CalendarDate want)
      • builder

        public static CoordinateAxis2D.Builder<?> builder()
        Get Builder for this class that allows subclassing.
        See Also:
        "https://community.oracle.com/blogs/emcmanus/2010/10/24/using-builder-pattern-subclasses"