pyremap.descriptor.MpasEdgeMeshDescriptor

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

A class for describing an MPAS edge mesh

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

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

__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