mpas_tools.ocean.inject_meshDensity.inject_meshDensity_from_file

mpas_tools.ocean.inject_meshDensity.inject_meshDensity_from_file(cw_filename, mesh_filename, on_sphere=True)[source]

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

meshDensity = (minCellWidth / cellWidth)**4

Parameters:
  • cw_filename (str) – The file name to read cellWidth and coordinates from

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

  • on_sphere (bool, optional) – Whether the mesh is spherical (as opposed to planar)