rcatool.utils.grids.calc_vertices

rcatool.utils.grids.calc_vertices(lons, lats, write_to_file=False, filename=None)[source]

Estimate the cell boundaries from the cell location of regular grids

Parameters:
  • lons (arrays) – Longitude and latitude values

  • lats (arrays) – Longitude and latitude values

  • write_to_file (bool) – If True lat/lon information, including vertices, is written to file following the structure given by cdo commmand ‘griddes’

  • filename (str) – Name of text file for the grid information. Only used if write_to_file is True. If not provided, a default name will be used.

Returns:

lon_bnds, lat_bnds – Arrays of dimension [4, nlat, nlon] containing cell boundaries of each gridcell in lons and lats

Return type:

arrays