stilt.read_footprint#
- stilt.read_footprint(path, *, chunks=None)[source]#
Read a footprint file, NetCDF or the Parquet files PYSTILT stores.
Each file holds its receptor and settings, so it needs nothing else.
- Parameters:
path (
str|Path|UPath) – A.ncfile written byfoot.stilt.to_netcdf, or a footprint file from an output directory.chunks (
Any|None) – For a NetCDF file, passed toxarray.open_dataset()to load the data lazily with dask.
- Returns:
The footprint, or
Nonefor an empty one (no particle reached the grid). A footprint from an output directory also says which PYSTILT version made it (attrs["stilt_version"]) and the settings hash of the particles it was made from (attrs["stilt_particles_hash"]), whichfoot.stilt.to_netcdfkeeps.- Return type:
Examples
>>> foot = stilt.read_footprint(sim.footprint_path) >>> foot.stilt.receptor