pyremap.descriptor.PointCollectionDescriptor

class pyremap.descriptor.PointCollectionDescriptor(lats, lons, collection_name, units='degrees', out_dimension='n_points')[source]

A class for describing a collection of points

Variables:
  • lat (Optional[numpy.ndarray]) – The latitude of each point

  • lon (Optional[numpy.ndarray]) – The longitude of each point

  • units (Optional[{'degrees', 'radians'}]) – The units of lats and lons

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

__init__(lats, lons, collection_name, units='degrees', out_dimension='n_points')[source]

Constructor stores

Parameters:
  • lats (numpy.ndarray) – The latitude of each point

  • lons (numpy.ndarray) – The longitude of each point

  • collection_name (str) – A unique name for the collection of transects, used in the names of files containing data mapped to these points.

  • units ({'degrees', 'radians'}, optional) – The units of lats and lons

  • out_dimension (str, optional) – The name of the dimension corresponding to the points (i.e. the “horizontal” dimension of the point collection)

Methods

__init__(lats, lons, collection_name[, ...])

Constructor stores

mesh_name_from_attr(ds)

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

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

Write a SCRIP file for the point collection

write_netcdf(ds, filename)

Write the mesh to a NetCDF file