pyremap.descriptor.MpasVertexMeshDescriptor

class pyremap.descriptor.MpasVertexMeshDescriptor(filename, mesh_name=None)[source]

A class for describing an MPAS vertex mesh

Variables:
  • filename (Optional[str]) – The path of the file containing the MPAS mesh

  • history (Optional[str]) – The history attribute written to SCRIP files

  • mesh_name (Optional[str]) – The name of the MPAS mesh

__init__(filename, mesh_name=None)[source]

Constructor stores the file name

Parameters:
  • filename (str) – The path of the file containing the MPAS mesh

  • mesh_name (str, optional) – The name of the MPAS mesh (e.g. 'oEC60to30' or 'oRRS18to6'). If not provided, the data set in filename must have a global attribute mesh_name that will be used instead.

Methods

__init__(filename[, mesh_name])

Constructor stores the file name

mesh_name_from_attr(ds)

Get the mesh name from the dataset attributes if not already set

to_scrip(scrip_filename[, expand_dist, ...])

Create a SCRIP file from the MPAS mesh.

write_netcdf(ds, filename)

Write the mesh to a NetCDF file