fibgrid package

Submodules

fibgrid.construction module

Construct Fibonacci grid.

fibgrid.construction.compute_fib_grid(n: int) tuple[source]

Compute Fibonacci lattice on a sphere.

Parameters:

n (int) – Number of grid points in the Fibonacci lattice.

Returns:

  • points (numpy.ndarray) – Point number from -n to +n.

  • gpi (numpy.ndarray) – Grid point index starting at 0.

  • lon (numpy.ndarray) – Longitude coordinate.

  • lat (numpy.ndarray) – Latitude coordinate.

fibgrid.construction.compute_fib_grid_wgs84(n: int) tuple[source]

Compute Fibonacci lattice on a sphere and transform coordinates (WGS84).

Parameters:

n (int) – Number of grid points in the Fibonacci lattice.

fibgrid.realization module

Download and read pre-computed Fibonacci grid files.

class fibgrid.realization.FibGrid(res: float, geodatum: str = 'WGS84', sort_order: str = 'none')[source]

Bases: CellGrid

Fibonacci grid.

class fibgrid.realization.FibLandGrid(res: float, geodatum: str = 'WGS84', sort_order: str = 'none')[source]

Bases: CellGrid

Fibonacci grid with active points over land defined by land fraction.

fibgrid.realization.read_grid_file(n: int, geodatum: str = 'WGS84', sort_order: str = 'none') tuple[source]

Read pre-computed grid files.

Parameters:
  • n (int) – Number of grid in the Fibonacci lattice used to identify a pre-computed grid.

  • geodatum (str, optional) – Definition of geodatum.

  • sort_order (str, optional) – Choose sort order of gridpoints: “none”: original order “latband”: sorting in latitude bands starting from 90S to 90N.

Returns:

  • lon (numpy.ndarray) – Longitude coordinate.

  • lat (numpy.ndarray) – Latitude coordinate.

  • cell (numpy.ndarray) – Cell number.

  • gpi (numpy.ndarray) – Grid point index starting at 0.

  • metadata (dict) – Metadata information of the grid.

Module contents