pyremap.descriptor.LatLonGridDescriptor

class pyremap.descriptor.LatLonGridDescriptor(meshName=None, regional=None)[source]

A class for describing a lat-lon grid

Variables:
  • lat (numpy.ndarray) – The latitude coordinate at grid-cell centers

  • lon (numpy.ndarray) – The longitude coordinate at grid-cell centers

  • latCorner (numpy.ndarray) – The latitude coordinate at grid-cell corners

  • lonCorner (numpy.ndarray) – The longitude coordinate at grid-cell corners

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

__init__(meshName=None, regional=None)[source]

Construct a mesh descriptor

meshNamestr or None, optional

The name of the mesh or grid, used to give mapping files unique names

regionalbool or None, optional

Whether this is a regional or global grid. If None, this will be determined automatically by checking the limits of the corner latitude and longitude to see if they cover the globe.

Methods

__init__([meshName, regional])

Construct a mesh descriptor

create(latCorner, lonCorner[, units, ...])

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

read([fileName, ds, latVarName, lonVarName, ...])

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

to_esmf(esmfFileName)

Create an ESMF mesh file for the mesh

to_scrip(scripFileName)

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