API reference

This page provides an auto-generated summary of the pyremap API.

Mesh Descriptors

interp_extrap_corner(inField)

Interpolate/extrapolate a 1D field from grid centers to grid corners

interp_extrap_corners_2d(inField)

Interpolate/extrapolate a 1D field from grid centers to grid corners

MpasMeshDescriptor(fileName[, meshName, ...])

A class for describing an MPAS cell mesh (which also supports non-conservative remapping from vertices)

MpasMeshDescriptor.to_scrip(scripFileName)

Given an MPAS mesh file, create a SCRIP file based on the mesh.

MpasMeshDescriptor.to_esmf(esmfFileName)

Create an ESMF mesh file for the mesh

MpasEdgeMeshDescriptor(fileName[, meshName])

A class for describing an MPAS edge mesh

MpasEdgeMeshDescriptor.to_scrip(scripFileName)

Given an MPAS mesh file, create a SCRIP file based on the mesh.

MpasEdgeMeshDescriptor.to_esmf(esmfFileName)

Create an ESMF mesh file for the mesh

get_lat_lon_descriptor(dLon, dLat[, lonMin, ...])

Get a descriptor of a lat-lon grid, used for remapping

LatLonGridDescriptor([meshName, regional])

A class for describing a lat-lon grid

LatLonGridDescriptor.read([fileName, ds, ...])

Read the lat-lon grid from a file with the given lat/lon var names.

LatLonGridDescriptor.create(latCorner, lonCorner)

Create the lat-lon grid with the given arrays and units.

LatLonGridDescriptor.to_scrip(scripFileName)

Given a lat-lon grid file, create a SCRIP file based on the grid.

LatLonGridDescriptor.to_esmf(esmfFileName)

Create an ESMF mesh file for the mesh

LatLon2DGridDescriptor([meshName, regional])

A class for describing a lat-lon grid that may not be a tensor grid (lat/lon are 2D arrays).

LatLon2DGridDescriptor.read([fileName, ds, ...])

Read the lat-lon grid from a file with the given lat/lon var names.

LatLon2DGridDescriptor.to_scrip(scripFileName)

Create a SCRIP file based on the grid.

ProjectionGridDescriptor(projection[, meshName])

A class for describing a general logically rectangular grid that can be defined by a pyproj projection.

ProjectionGridDescriptor.read(projection, ...)

Given a grid file with x and y coordinates defining the axes of the logically rectangular grid, read in the x and y coordinates and interpolate/extrapolate to locate corners.

ProjectionGridDescriptor.create(projection, ...)

Given x and y coordinates defining the axes of the logically rectangular grid, save the coordinates interpolate/extrapolate to locate corners.

ProjectionGridDescriptor.to_scrip(scripFileName)

Create a SCRIP file based on the grid and projection.

ProjectionGridDescriptor.to_esmf(esmfFileName)

Create an ESMF mesh file for the mesh

PointCollectionDescriptor(lats, lons, ...[, ...])

A class for describing a collection of points

PointCollectionDescriptor.to_scrip(scripFileName)

Given an MPAS mesh file, create a SCRIP file based on the mesh.

PointCollectionDescriptor.to_esmf(esmfFileName)

Create an ESMF mesh file for the mesh

Remapping

Remapper(sourceDescriptor, destinationDescriptor)

A class for remapping fields using a given mapping file.

Polar projections

get_arctic_stereographic_projection()

Get a projection for an Arctic stereographic comparison grid

get_antarctic_stereographic_projection()

Get a projection for an Antarctic steregraphic grid

get_polar_descriptor_from_file(fileName[, ...])

Get a descriptor of a polar stereographic grid used for remapping

get_polar_descriptor(Lx, Ly, dx, dy[, ...])

Get a descriptor of a polar stereographic grid used for remapping

to_polar(points)

from_polar(points)