lat/lon and local-cartesian regridding
regridcart Regridding lat/lon to local Cartesian coordinates
This package takes care of regridding data defined with latitude/longitude
coordinates onto a local Cartesian grid of a fixed resolution. To use it you
simply define the domain you want to regrid onto and then call the
import regridcart as rc import xaray as xr da_src = xr.open_dataarray("...") target_domain = rc.LocalCartesianDomain( central_latitude=lat0, central_longitude=lon0, l_meridional=1000.0e3, l_zonal=3000.0e3, ) dx = 1.0e3 # new resoluion 1km da_regridded = rc.resample(target_domain, da=da_src, dx=dx)
The provided data-array is assumed to have latitude/longitude coordinates defined by one of the following:
loncoordinates along which the data is aligned, i.e.
lonare given as 1D arrays
lonare given as auxilliary variables so that the data isn't aligned along the lat/lon directions, but rather the
lonof every datapoint is given
- the data-array has projection information defined in a CF-compliant
manner using the
- the data-array was loaded from a raster-file using
rioxarray.open_rasterioso that the projection information is available via
The package also implements cropping (
domain outline (
domain.plot_outline) and can also with data already on a
Cartesian grid with
notebooks/examples.ipynb for detailed examples.
conda install xarray cartopy xesmf -c conda-forge pip install regridcart
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for regridcart-0.1.1-py3-none-any.whl