polaris.mesh.planar.compute_planar_hex_nx_ny

polaris.mesh.planar.compute_planar_hex_nx_ny(lx, ly, resolution)[source]

Compute number of grid cells in each direction for the uniform, hexagonal planar mesh with the given physical sizes and resolution. The resulting nx and ny account for the staggered nature of the hexagonal grid in the y direction, and are appropriate for passing to mpas_tools.planar_hex.make_planar_hex_mesh().

Parameters:
  • lx (float) – The size of the domain in km in the x direction

  • ly (float) – The size of the domain in km in the y direction

  • resolution (float) – The resolution of the mesh (distance between cell centers) in km

Returns:

  • nx (int) – The number of grid cells in the x direction

  • ny (int) – The number of grid cells in the y direction