mpas_tools.ocean.inject_meshDensity.inject_spherical_meshDensity

mpas_tools.ocean.inject_meshDensity.inject_spherical_meshDensity(cellWidth, lon, lat, mesh_filename)[source]

Add a meshDensity field into a spherical MPAS mesh. The mesh density is defined as:

meshDensity = (minCellWidth / cellWidth)**4

Parameters
  • cellWidth (ndarray) – m x n array of cell width in km

  • lon (ndarray) – longitude in degrees (length n and between -180 and 180)

  • lat (ndarray) – longitude in degrees (length m and between -90 and 90)

  • mesh_filename (str) – The mesh file to add meshDensity to