export#
- hydromodpy.export(sim, var, dest, *, fmt=None, time=None, layer=None, resolution=None, crs=None, nodata=-9999.0)[source]#
Export a variable from a simulation to a standalone file.
Functional mirror of
read(): same selector (sim/var/time/layer) plus an output format and destination.simmust be aRun, as returned byhmp.open(workspace)[ref]orcatalog.latest().fmtis optional whendestcarries a known extension (.nc-> netcdf,.tif-> geotiff,.csv-> csv,.shp-> shapefile,.vtu-> vtu,.hmp-> portable package).- Return type:
- Parameters:
Examples#
>>> import hydromodpy as hmp >>> run = hmp.open("~/hmp_workspace")["transient_nwt"] >>> hmp.export( ... run, "head", "head.tif", time="last", resolution=50 ... ) >>> hmp.export( ... run, ["head", "watertable_depth"], "fields.nc", time="all" ... )
- param sim:
- type sim:
- param var:
- type var:
- param dest:
- type dest:
- param fmt:
- type fmt:
- param time:
- type time:
- param layer:
- type layer:
- param resolution:
- type resolution:
- param crs:
- type crs:
- param nodata:
- type nodata: