cordex.transform

Contents

cordex.transform#

transform(x, y, src_crs, trg_crs=None)[source]#

Coordinate transformation using pyproj.

Transforms the coordinates x, y from the source crs into a target crs using pyproj.

Parameters:
  • x (DataArray) – X coordinate.

  • y (DataArray) – Y coordinate.

  • src_crs (pyproj.CRS) – Source coordinate reference system in which x and y are defined.

  • trg_crs (pyproj.CRS) – Target coordinate reference system into which x and y should be transformed. If not supplied, EPSG:4326 is the default.

Returns:

  • xt (DataArray) – Transformed x coordinate.

  • yt (DataArray) – Transformed y coordinate.