xarray accessor#
The chm extension on the xarray object can be used access various commonly used functionality after loading a
ugrid file via Uxarray.
Examples#
Provides a Dataset.chm accessor for uxarray-backed VTU/UGRID datasets.
Common helpers:
df.chm.uxgrid_to_netcdf("mesh.nc"): export mesh scaffolding and global ids.df.chm.vars_to_netcdf("all_vars.nc"): dump all variables to NetCDF, without mesh scaffolding.df.chm.clip(lat=[ymin, ymax], lon=[xmin, xmax]): subset to a bounding box or supply a shapefile/geojson viashp_file_path.df.chm.regrid(dxdy=0.01): bilinear regrid face-centered variables to a structured lat/lon grid (single-node meshes only).
Run accessor methods from Python after loading data with xarray/uxarray; this module is not a standalone CLI.
Accessor#
Export mesh topology and global IDs from an uxarray dataset to NetCDF. |
|
Write all variables from the dataset (excluding mesh scaffolding) to NetCDF. |
|
|
Subset face-centered variables to a lat/lon bounding box or a geometry extent. |
Regrid face-centered variables to a structured grid via uxarray bilinear remap. |