MCPcopy Create free account

hub / github.com/environmental-modeling-workflows/watershed-workflow / functions

Functions1,294 in github.com/environmental-modeling-workflows/watershed-workflow

Method_getShapes
Fetch all shapes in a dataset. Returns ------- gpd.GeoDataFrame Raw GeoDataFrame with native column names and CRS
watershed_workflow/sources/manager_hyriver.py:67
Method_getShapes
Fetch all shapes in a dataset. Returns ------- gpd.GeoDataFrame Raw GeoDataFrame with native column names and CRS
watershed_workflow/sources/manager_nrcs.py:306
Method_getShapes
Fetch all shapes in a dataset. Returns ------- gpd.GeoDataFrame Raw GeoDataFrame with native column names and CRS
watershed_workflow/sources/manager_basin3d.py:89
Method_getShapesByGeometry
Fetch shapes for the given geometry, ensuring file exists first. Parameters ---------- geometry_gdf : geopandas.GeoDataFrame
watershed_workflow/sources/manager_glhymps.py:64
Method_getShapesByGeometry
Fetch NHD shapes by geometry, including catchments if requested. Parameters ---------- geometry_gdf : gpd.GeoDataFrame
watershed_workflow/sources/manager_nhd.py:216
Method_getShapesByGeometry
Fetch shapes for the given geometry. Parameters ---------- geometry_gdf : gpd.GeoDataFrame GeoDataFrame with geom
watershed_workflow/sources/manager_shapefile.py:101
Method_getShapesByGeometry
Fetch shapes for the given geometry using HyRiver API. Parameters ---------- geometry_gdf : gpd.GeoDataFrame GeoD
watershed_workflow/sources/manager_hyriver.py:78
Method_getShapesByGeometry
Fetch NRCS soil shapes and properties for the given geometry. Parameters ---------- geometry_gdf : gpd.GeoDataFrame
watershed_workflow/sources/manager_nrcs.py:317
Method_getShapesByGeometry
Query Basin3D monitoring features by bounding box. Parameters ---------- geometry_gdf : gpd.GeoDataFrame
watershed_workflow/sources/manager_basin3d.py:100
Method_getShapesByID
Finds all HUs in the WBD dataset of a given level contained in a list of HUCs.
watershed_workflow/sources/manager_wbd.py:38
Method_getShapesByID
Fetch shapes by ID list, ensuring file exists first. Parameters ---------- ids : list[str] List of IDs to retriev
watershed_workflow/sources/manager_glhymps.py:82
Method_getShapesByID
Fetch shapes by ID list. Parameters ---------- ids : List[str] List of IDs to retrieve. Returns
watershed_workflow/sources/manager_shapefile.py:119
Method_getShapesByID
Fetch shapes by ID list using HyRiver API. Parameters ---------- ids : List[str] List of IDs to retrieve.
watershed_workflow/sources/manager_hyriver.py:96
Method_getShapesByID
Fetch NRCS shapes by MUKEY IDs. Parameters ---------- ids : List[str] List of MUKEY IDs to retrieve. Ret
watershed_workflow/sources/manager_nrcs.py:365
Method_getShapesByID
Query Basin3D monitoring features by specific IDs. Note: Basin3D ID queries have complex behavior and may not work as expecte
watershed_workflow/sources/manager_basin3d.py:135
Function_is_iter
Check if an object is iterable. Parameters ---------- obj : Any Object to test for iterability. Returns ------- bool
watershed_workflow/plot.py:32
Function_lines
(p)
watershed_workflow/test/crs_fixtures.py:28
Method_parent_index
(n)
watershed_workflow/river_tree.py:719
Function_points
(p)
watershed_workflow/test/crs_fixtures.py:19
Function_polygons
(p)
watershed_workflow/test/crs_fixtures.py:41
Method_prerequestDataset
(self)
watershed_workflow/sources/manager_shapefile.py:68
Method_requestDataset
Request DayMet data - check if files exist or need downloading. Parameters ---------- request : ManagerDataset.Reques
watershed_workflow/sources/manager_daymet.py:154
Method_requestDataset
Request AORC data - ready upon download completion. Parameters ---------- request : ManagerDataset.Request
watershed_workflow/sources/manager_aorc.py:206
Method_requestDataset
Request MODIS data from AppEEARS - may not be ready immediately. Parameters ---------- request : ManagerDataset.Reque
watershed_workflow/sources/manager_modis_appeears.py:386
Method_requestDataset
Download all required files for the request. Parameters ---------- request : ManagerDataset.Request The d
watershed_workflow/sources/manager_soilgrids_2017.py:86
Method_requestDataset
Request NLCD data - ready immediately. Parameters ---------- request : ManagerDataset.Request Dataset req
watershed_workflow/sources/manager_nlcd.py:118
Method_requestDataset
Request the data -- ready upon request.
watershed_workflow/sources/manager_3dep.py:50
Method_requestDataset
Request the data -- ready upon request.
watershed_workflow/sources/manager_raster.py:104
Methodaccumulate
Accumulates a property across the river tree. Parameters ---------- to_accumulate : str Name of the propert
watershed_workflow/river_tree.py:528
FunctionaccumulateCatchments
Given a dataframe of outlets, compute contributing areas for each one. Parameters ---------- rivers : list[River] Rivers from
watershed_workflow/river_tree.py:1125
FunctionaccumulateIncrementalCatchments
Given a list of outlet_indices, form the incremental contributing areas. Parameters ---------- rivers : list[River] Rivers fr
watershed_workflow/river_tree.py:1180
FunctionaddReachIDRegions
Add labeled sets to m2 for reaches of each stream order . Parameters: ----------- m2: Mesh2D 2D mesh elevated on DEMs rive
watershed_workflow/regions.py:257
FunctionaddRiverCorridorRegions
Add labeled sets to m2 for each river corridor. Parameters: ----------- m2: Mesh2D 2D mesh elevated on DEMs rivers: list(w
watershed_workflow/regions.py:199
FunctionaddStreamOrderRegions
Add labeled sets to m2 for reaches of each stream order . Parameters: ----------- m2: Mesh2D 2D mesh elevated on DEMs rive
watershed_workflow/regions.py:228
FunctionaddSurfaceRegions
Add labeled sets to a mesh -- one per unique color. Parameters ---------- m2 : mesh.Mesh2D The mesh to label. names : dict, opt
watershed_workflow/regions.py:21
FunctionaddWatershedAndOutletRegions
Add four labeled sets to m2 for each polygon: - cells in the polygon, to be extruded - cells in the polygon, to be kept as faces upon extrusi
watershed_workflow/regions.py:104
Methodangle
Returns the angle, in radians, from node.parent.linestring to node.linestring, in a clockwise sense.
watershed_workflow/river_tree.py:166
Functionaorc_crs
CRS for AORC data (WGS84).
watershed_workflow/sources/test/test_manager_aorc.py:24
Functionaorc_manager
Standard AORC manager for testing.
watershed_workflow/sources/test/test_manager_aorc.py:30
FunctionapplyCrosswalk
Given a crosswalk from unique NLCD IDs to MODIS, computes time series data for each NLCD ID based on the MODIS LAI data. Parameters ---------
watershed_workflow/land_cover_properties.py:214
Functionassert_close
(s1, s2, tol=_tol)
watershed_workflow/test/shapes.py:11
MethodassignOrder
Working from leaves to trunk, assign stream order property. This method assigns stream order values to all reaches in the river netwo
watershed_workflow/river_tree.py:567
Functionbasemap
Add a basemap to the axis. Uses cartopy to add political and natural boundaries and shapes to the axes image. Parameters ----------
watershed_workflow/plot.py:291
Functionbasin3d_mgr
Create Basin3D manager with USGS plugin.
watershed_workflow/sources/test/test_manager_basin3d.py:18
Functionbasin3d_mgr_multi
Create Basin3D manager with multiple feature types.
watershed_workflow/sources/test/test_manager_basin3d.py:24
Functionblackzerojet_cmap
Create a jet colormap with zero values set to black. Parameters ---------- data : np.ndarray Data array used to determine color s
watershed_workflow/colors.py:165
Methodboundary_edges
Return edges in the boundary of the mesh, ordered around the boundary.
watershed_workflow/mesh.py:344
Methodboundary_vertices
(self)
watershed_workflow/mesh.py:368
Functionbounds
Warp a bounding box from old_crs to new_crs. Parameters ---------- bounds : tuple of float Bounding box as (minx, miny,
watershed_workflow/warp.py:81
Functionbraided_stream
()
watershed_workflow/test/shapes.py:57
MethodbreadthFirstOrder
Generates nodes in a breadth-first ordering.
watershed_workflow/tinytree.py:260
FunctionbreakLineStringCollinearity
Remove collinearity from linestring by adding small orthogonal perturbations. Parameters ---------- linestring_coords : np.ndarray
watershed_workflow/utils.py:529
Functioncache
A caching decorator for instance methods. This decorator caches the result of a method call in an instance attribute. Note: Only works wi
watershed_workflow/mesh.py:50
Functioncache_func
(self)
watershed_workflow/mesh.py:67
Methodcell_to_face_conn
(self)
watershed_workflow/mesh.py:1041
Functioncenter_options
Adds option to center the output mesh
watershed_workflow/ui.py:270
Methodcentroids
Calculate surface mesh centroids.
watershed_workflow/mesh.py:429
Methodcircumcenter
(p1, p2, p3)
watershed_workflow/mesh.py:715
Functioncluster
Cluster points based on distance tolerance. Parameters ---------- points : np.ndarray Array of points to cluster, shape (n, 2
watershed_workflow/utils.py:269
Functioncluster
Given a bunch of raster bands, cluster into nbins. Returns the coloring map of the clusters. This is used to fill in missing soil property d
watershed_workflow/soil_properties.py:203
FunctioncombineSiblings
Combines two sibling nodes, merging catchments and metadata. Parameters ---------- n1 : River First sibling node to combine.
watershed_workflow/river_tree.py:928
FunctioncomputeAngle
Compute the angle (in degrees) of v2 relative to v1 in clockwise direction. Parameters ---------- v1 : tuple of float or shapely.geom
watershed_workflow/utils.py:144
FunctioncomputeArclengths
Compute cumulative arc length at each coordinate in a LineString. Parameters ---------- ls : shapely.geometry.LineString Line
watershed_workflow/utils.py:976
FunctioncomputeArea
Compute the area of a polygon given its vertices. Parameters ---------- vertices : iterable of tuple Vertices of the polygon
watershed_workflow/utils.py:127
FunctioncomputeAverageYear
(data: xr.Dataset, time_column: str, start_year: int,
watershed_workflow/data.py:1008
FunctioncomputeCrosswalk
Uses a correlation matrix to compute a crosswalk. Given MODIS and NLCD LU/LC arrays, computes the correlations of the two. Returns, for
watershed_workflow/land_cover_properties.py:182
FunctioncomputeMidpoint
Compute the midpoint between two points. Parameters ---------- p1 : tuple of float First point as (x, y) coordinates. p2
watershed_workflow/utils.py:229
FunctioncomputeMode
Compute the mode along the time dimension of a DataArray. Parameters ---------- da : xr.DataArray Input DataArray. Can contai
watershed_workflow/data.py:199
FunctioncomputeTelescopeFactor
Calculates a telescoping factor to fill a given layer. Calculates a constant geometric factor, such that a layer of thickness layer_dz is per
watershed_workflow/mesh.py:1647
FunctioncomputeTimeSeries
Computes a time-series of LAI for each land cover type that appears in the raster. Parameters ---------- lai : xarray.DataArray
watershed_workflow/land_cover_properties.py:21
FunctioncomputeTriangleArea
Compute the area of a triangle given three vertices. Parameters ---------- p1 : tuple of float First vertex as (x, y) coordin
watershed_workflow/utils.py:57
FunctioncomputeTriangleCentroid
Compute the centroid of a triangle given three vertices. Parameters ---------- p1 : tuple of float First vertex as (x, y) coo
watershed_workflow/utils.py:79
FunctioncomputeVanGenuchtenModelFromSSURGO
Get van Genutchen model parameters using Rosetta v3. Parameters ---------- df : pd.DataFrame SSURGO properties dataframe, from
watershed_workflow/soil_properties.py:72
FunctioncomputeWidth
(x)
watershed_workflow/test/test_10_mesh_mixed.py:105
FunctionconditionRiverMeshes
For multiple rivers, condition, IN PLACE, the elevations of stream-corridor elements to ensure connectivity throgh culverts, skips ponds, main
watershed_workflow/condition.py:413
Methodconn
Note that conn is immutable because changing this breaks all the other properties, which may be cached. To change topology, one must construc
watershed_workflow/mesh.py:240
FunctionconstructFromList
:lst a nested list of Tree objects Returns a list consisting of the nodes at the base of each tree. Trees are constructed "
watershed_workflow/tinytree.py:294
Functioncontains
Check if one geometry contains another with tolerance for roundoff issues. Parameters ---------- s1 : BaseGeometry Container
watershed_workflow/utils.py:704
FunctionconvertAORCToATS
Convert xarray.Dataset AORC datasets to standard ATS format output. - computes specific humidity and surface pressure to vapor pressure - com
watershed_workflow/meteorology.py:92
FunctionconvertDayMetToATS
Convert xarray.Dataset Daymet datasets to daily average data in standard form. This: - takes tmin and tmax to compute a mean - splits rai
watershed_workflow/meteorology.py:48
FunctionconvertRosettaToATS
Converts units from aggregated, Rosetta standard-parameters to ATS. Parameters ---------- df : pd.DataFrame DataFrame with Rosett
watershed_workflow/soil_properties.py:115
MethodcopySubtree
Returns a deep copy rooted at self.
watershed_workflow/river_tree.py:759
Functioncoweeta
()
watershed_workflow/sources/test/fixtures.py:8
Functioncoweeta_date_range
Date range that matches existing files.
watershed_workflow/sources/test/test_manager_appeears.py:38
FunctioncreateIndexedColorbar
Add an indexed colorbar based on a given colormap. This sets ticks in the middle of each color range, adds the colorbar, and sets the labels
watershed_workflow/colors.py:612
FunctioncreateIndexedColormap
Generates an indexed colormap and labels for imaging, e.g. soil indices. Parameters ---------- indices : iterable(int) Collection
watershed_workflow/colors.py:424
FunctioncreateRivers
Constructs River objects from a list of reaches. Parameters ---------- reaches : gpd.GeoDataFrame The reaches to turn into rivers
watershed_workflow/river_tree.py:1005
FunctioncreateRiversMesh
Create meshes for each river and merge them. Parameters ---------- hucs : SplitHUCs Split HUCs object for mesh adjustment. ri
watershed_workflow/river_mesh.py:137
FunctioncreateSubmesh
Given a shape that contains some cells of m2, create the submesh.
watershed_workflow/mesh.py:1740
FunctioncreateWidthFunction
Create a width function from various argument types. Parameters ---------- arg : Dict[int, float] | Callable[[int], float] | float
watershed_workflow/river_mesh.py:88
Methodcrs
(self)
watershed_workflow/river_tree.py:140
Methodcrs
(self)
watershed_workflow/split_hucs.py:217
Functioncut
Cut two LineStrings at their intersection point. Parameters ---------- line1 : shapely.geometry.LineString First LineString t
watershed_workflow/utils.py:746
FunctioncutAndSnapCrossings
Aligns river and HUC objects. 1. where a reach crosses an external boundary, cut in two and keep only internal portion. 2. where a re
watershed_workflow/hydrography.py:293
Functiondarken
Darken a color by reducing its brightness. Parameters ---------- color : Color Color to darken. fraction : float, optional
watershed_workflow/colors.py:386
Functiondata_latlon
()
watershed_workflow/test/test_02b_data.py:1774
Functiondata_xy
()
watershed_workflow/test/test_02b_data.py:1767
Functiondatadir
Fixture responsible for searching a folder with the same name of test module and, if available, moving all contents to a temporary directory so
watershed_workflow/test/source_fixtures.py:6
Functiondataset
Reproject an xarray Dataset from its current CRS to a target CRS using rioxarray. Maintains the same width and height as the original dataset
watershed_workflow/warp.py:178
Functiondaymet_manager
Standard DayMet manager for testing.
watershed_workflow/sources/test/test_manager_daymet.py:26
← previousnext →501–600 of 1,294, ranked by callers