Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/environmental-modeling-workflows/watershed-workflow
/ functions
Functions
1,294 in github.com/environmental-modeling-workflows/watershed-workflow
⨍
Functions
1,294
◇
Types & classes
71
↳
Endpoints
3
↓ 1 callers
Function
_computeExpectedNumCoords
Compute the number of expected coordinates for river mesh. Parameters ---------- river : River River network to compute coordinat
watershed_workflow/river_mesh.py:48
↓ 1 callers
Function
_computeExpectedNumElems
Compute the number of expected elements for river mesh. Parameters ---------- river : River River network to compute elements for
watershed_workflow/river_mesh.py:72
↓ 1 callers
Method
_computeIntegralFunction
Function to calculate the integral in Eq. 4 of Savoy et al. (2021) Parameters ---------- angle : float so
watershed_workflow/stream_light.py:363
↓ 1 callers
Method
_correctSolarAzimuth
Calculates solar geometry for use in the SHADE2 model Parameters ---------- lat : float Latitude [decimal degrees
watershed_workflow/stream_light.py:550
↓ 1 callers
Function
_cutAndSnapInteriorCrossing
Cut and snap reach at interior HUC boundary crossings. Helper function for cutAndSnapCrossings(). Modifies no geometry, only topology. P
watershed_workflow/hydrography.py:396
↓ 1 callers
Method
_detectCalendar
Detect the calendar type from native start/end dates. Returns ------- str Calendar type ('noleap', 'stand
watershed_workflow/sources/manager_dataset.py:320
↓ 1 callers
Function
_distance_along_line
Find point at a distance from start on the linestring from start to end. It doesn't matter which coordinate system start is given in, as long
watershed_workflow/scalebar.py:84
↓ 1 callers
Method
_download
Download a NetCDF file covering the bounds. Parameters ---------- var : str Name the variable, see table in the cla
watershed_workflow/sources/manager_daymet.py:99
↓ 1 callers
Method
_download
Downloads the data for the provided request.
watershed_workflow/sources/manager_modis_appeears.py:339
↓ 1 callers
Method
_download
A default download implementation.
watershed_workflow/sources/manager_raster.py:151
↓ 1 callers
Method
_downloadFile
Download a file if it doesn't exist. Parameters ---------- base_variable : str Base variable name
watershed_workflow/sources/manager_soilgrids_2017.py:204
↓ 1 callers
Method
_downloadProperties
Queries REST API for parameters by MUKEY.
watershed_workflow/sources/manager_nrcs.py:453
↓ 1 callers
Method
_extractCoordinates
Extract longitude, latitude, and elevation from Basin3D feature. Parameters ---------- feature : MonitoringFeature
watershed_workflow/sources/manager_basin3d.py:253
↓ 1 callers
Method
_fetchDataset
Implementation of abstract method to fetch AORC data. Parameters ---------- request : ManagerDataset.Request Requ
watershed_workflow/sources/manager_aorc.py:240
↓ 1 callers
Method
_fetchDataset
Managers should overload this method to get the data. Parameters ---------- Request Dataset request storing the i
watershed_workflow/sources/manager_dataset.py:304
↓ 1 callers
Function
_findBankVerticesFromElem
For a given m2 mesh and id of river-corridor element, returns longitudinal edges of the river-corridor element.
watershed_workflow/condition.py:669
↓ 1 callers
Function
_findContainingPolygon
Find the polygon that contains the largest portion of linestring. Parameters ---------- hucs : SplitHUCs Split HUCs object contai
watershed_workflow/hydrography.py:515
↓ 1 callers
Function
_findHUC
Searches in hint to find shp.
watershed_workflow/__init__.py:96
↓ 1 callers
Method
_fromDistance
(self, dist)
watershed_workflow/resampling.py:97
↓ 1 callers
Function
_generateRings
(coords)
watershed_workflow/utils.py:1077
↓ 1 callers
Method
_getProperties
Download and aggregate properties for a given set of mukeys, storing raw data in filename.
watershed_workflow/sources/manager_nrcs.py:503
↓ 1 callers
Method
_getShapes
Fetch all shapes in a dataset. Returns ------- gpd.GeoDataFrame Raw GeoDataFrame with native column names and CRS
watershed_workflow/sources/manager_shapes.py:295
↓ 1 callers
Method
_getShapesByGeometry
Fetch shapes for the given geometry. This method should be implemented by derived classes to fetch shapes from their specific data so
watershed_workflow/sources/manager_shapes.py:307
↓ 1 callers
Method
_getShapesByID
Fetch shapes by ID list. This method should be implemented by derived classes to fetch shapes by their ID values. Parameters
watershed_workflow/sources/manager_shapes.py:327
↓ 1 callers
Method
_getShapesByID
Fetch NHD shapes by ID, including catchments if requested. Parameters ---------- ids : List[str] List of IDs to r
watershed_workflow/sources/manager_nhd.py:238
↓ 1 callers
Function
_isNonoverlapping
Check if a set of polygon shapes are nonoverlapping. Parameters ---------- points : np.ndarray Array of coordinate points. el
watershed_workflow/river_mesh.py:25
↓ 1 callers
Function
_isStringLike
(anobj)
watershed_workflow/tinytree.py:40
↓ 1 callers
Method
_makeContinuous
(self, child: River)
watershed_workflow/river_tree.py:608
↓ 1 callers
Function
_modisName
(modis_id)
watershed_workflow/land_cover_properties.py:236
↓ 1 callers
Function
_name
(id)
watershed_workflow/land_cover_properties.py:271
↓ 1 callers
Function
_nlcdName
(nlcd_id)
watershed_workflow/land_cover_properties.py:241
↓ 1 callers
Method
_openFiles
Open all files and concatenate them into a single xarray dataset.
watershed_workflow/sources/manager_daymet.py:201
↓ 1 callers
Function
_plotRiver
Plot the river and elements for a debugging plot. Parameters ---------- river : River River network to plot. coords : np.ndar
watershed_workflow/river_mesh.py:117
↓ 1 callers
Function
_point_along_line
Find point at a given distance from start at a given angle. Parameters ---------- ax : matplotlib.axes.Axes CartoPy axes object.
watershed_workflow/scalebar.py:140
↓ 1 callers
Method
_postprocessDataset
Time dtype converions and clipping, check CRS is applied, and check post conditions.
watershed_workflow/sources/manager_dataset.py:458
↓ 1 callers
Method
_preprocessParameters
Process and validate parameters for getDataset calls. Parameters ---------- geometry : shapely.geometry.Polygon | gpd
watershed_workflow/sources/manager_dataset.py:389
↓ 1 callers
Method
_prerequestDataset
Managers should overload this method to do stuff prior to processing. This can be used to update native variables if they cannot be k
watershed_workflow/sources/manager_dataset.py:277
↓ 1 callers
Method
_prerequestDataset
(self)
watershed_workflow/sources/manager_raster.py:65
↓ 1 callers
Function
_read_fields
(f, num_fields, is_ascii)
watershed_workflow/vtk_io.py:315
↓ 1 callers
Function
_read_scalar_field
(f, num_data, split)
watershed_workflow/vtk_io.py:275
↓ 1 callers
Function
_read_tensor_field
(f, num_data, split)
watershed_workflow/vtk_io.py:305
↓ 1 callers
Function
_read_vector_field
(f, num_data, split)
watershed_workflow/vtk_io.py:295
↓ 1 callers
Method
_requestDataset
Managers should overload this method to request the data. Parameters ---------- Request Dataset request storing t
watershed_workflow/sources/manager_dataset.py:287
↓ 1 callers
Function
_shrinkLS
(ls)
watershed_workflow/hydrography.py:624
↓ 1 callers
Function
_smooth2D_Array
Apply 2D spatial smoothing to data. Parameters ---------- data : numpy.ndarray 3D or higher array where the last two dim
watershed_workflow/data.py:1469
↓ 1 callers
Function
_truncated_tree_iter
(n)
watershed_workflow/river_tree.py:1225
↓ 1 callers
Function
_tryRename
(df, old, new)
watershed_workflow/sources/manager_nhd.py:57
↓ 1 callers
Function
_unwhiten
Applies the inverse of whitening transformation. Parameters ---------- observations : np.ndarray Whitened observations to transfo
watershed_workflow/soil_properties.py:183
↓ 1 callers
Function
_upper_bound
Find a point farther than distance from start, in the given direction. It doesn't matter which coordinate system start is given in, as long a
watershed_workflow/scalebar.py:39
↓ 1 callers
Method
_validateLocation
Validate location parameter.
watershed_workflow/sources/manager_nlcd.py:94
↓ 1 callers
Method
_validateYear
Validate year for given location.
watershed_workflow/sources/manager_nlcd.py:101
↓ 1 callers
Function
_whiten
Returns whitened observations and statistics for use in unwhiten. Parameters ---------- observations : np.ndarray Input observati
watershed_workflow/soil_properties.py:159
↓ 1 callers
Function
_write_cells
(f, cells, write_binary)
watershed_workflow/vtk_io.py:436
↓ 1 callers
Function
_write_points
(f, points, write_binary)
watershed_workflow/vtk_io.py:421
↓ 1 callers
Function
_zipperSiblings
This function assumes that the list of reaches are siblings, share a common endpoint, and the angle between their linestrings as they leave th
watershed_workflow/angles.py:526
↓ 1 callers
Method
add
Adds nodes and edges from obj into collection.
watershed_workflow/triangulation.py:116
↓ 1 callers
Method
addItem
Adds an item to the list of things to label. Parameters ---------- data : List[Any] A list of objects being label
watershed_workflow/plot.py:136
↓ 1 callers
Function
addPolygonalRegions
Label m2 with region(s) for each polygon. Always adds a surface region; if volume also adds a volume region for extrusion in 3D. Paramet
watershed_workflow/regions.py:47
↓ 1 callers
Function
aggregateComponentValues
Aggregate horizon value by layer thickness to get component property. Parameters ---------- df_chorizon : pandas dataframe hor
watershed_workflow/sources/manager_nrcs.py:113
↓ 1 callers
Function
aggregateMukeyValues
Aggregate component values by component percentage to get MUKEY property. Parameters ---------- df : pandas dataframe The list of h
watershed_workflow/sources/manager_nrcs.py:192
↓ 1 callers
Function
burnInRiver
Reduce reach elevations by a float or function.
watershed_workflow/condition.py:630
↓ 1 callers
Function
chain_iter
(p)
watershed_workflow/colors.py:153
↓ 1 callers
Method
check
Checks consistency of the internal representation.
watershed_workflow/triangulation.py:137
↓ 1 callers
Function
check3
(hucs, rivers, extra_point=None)
watershed_workflow/test/test_05_hydrography.py:329
↓ 1 callers
Method
checkHandedness
Ensures all cells are oriented via the right-hand-rule, i.e. in the +z direction.
watershed_workflow/mesh.py:371
↓ 1 callers
Function
cm_discrete
Calculate a discrete colormap with N entries from the continuous colormap cmap. Parameters ---------- ncolors : int Number of color
watershed_workflow/colors.py:314
↓ 1 callers
Function
cm_mapper
Provide a function that maps scalars to colors in a given colormap. Parameters ---------- vmin, vmax : scalar Min and max scalars t
watershed_workflow/colors.py:271
↓ 1 callers
Function
computeAverageYear_DataArray
Average DataArray values across years and repeat for specified number of years. Parameters ---------- da : xr.DataArray
watershed_workflow/data.py:851
↓ 1 callers
Function
computeAverageYear_DataFrame
Average DataFrame values across years and repeat for specified number of years. Parameters ---------- df : pandas.DataFrame
watershed_workflow/data.py:798
↓ 1 callers
Function
computeAverageYear_Dataset
Average Dataset values across years and repeat for specified number of years. Parameters ---------- ds : xr.Dataset Inpu
watershed_workflow/data.py:916
↓ 1 callers
Function
computeCrosswalkCorrelation
Compute a map from NLCD indices to MODIS indices using correlation of the two rasters. Parameters ---------- modis_profile : xarray.D
watershed_workflow/land_cover_properties.py:77
↓ 1 callers
Function
computeDistance
Compute Euclidean distance between two points. Parameters ---------- p1 : tuple of float First point as (x, y) coordinates.
watershed_workflow/utils.py:39
↓ 1 callers
Method
computeEnergyStream
(self)
watershed_workflow/stream_light.py:700
↓ 1 callers
Method
computeRadiativeTransferEstimates
This function calculates below canopy PAR. Main references are 1) Campbell & Norman (1998) An introduction to Environmental biophysics (ab
watershed_workflow/stream_light.py:197
↓ 1 callers
Method
computeRiparianStreamShading
SHADE2 model from Li et al. (2012) Modeled riparian stream shading: Agreement with field measurements and sensitivity to riparian conditions
watershed_workflow/stream_light.py:407
↓ 1 callers
Method
computeSolarAngles
(self)
watershed_workflow/stream_light.py:120
↓ 1 callers
Function
computeVanGenuchtenModel_Rosetta
Return van Genuchten model parameters using Rosetta v3 model. (Zhang and Schaap, 2017 WRR) Parameters ---------- data : numpy.n
watershed_workflow/soil_properties.py:23
↓ 1 callers
Function
conditionRiverMesh
Condition, IN PLACE, the elevations of stream-corridor elements to ensure connectivity throgh culverts, skips ponds, maintain monotonicity, or o
watershed_workflow/condition.py:437
↓ 1 callers
Function
connectRoundTrip
Connect indices in edges in a round-trip fashion
watershed_workflow/triangulation.py:70
↓ 1 callers
Method
constructRiversByDataFrame
Create a list of rivers from a dataframe that includes a 'parent' column. Parameters ---------- df : gpd.GeoDataFrame
watershed_workflow/river_tree.py:873
↓ 1 callers
Function
convertTimesToCFTime
Convert an iterable of datetime objects to cftime object. This function accepts various datetime types and converts them to cftime Gregor
watershed_workflow/data.py:30
↓ 1 callers
Function
createDepressionFunction
(arg)
watershed_workflow/condition.py:425
↓ 1 callers
Function
create_env_local
Creates the environment locally.
environments/create_envs.py:179
↓ 1 callers
Function
date_str
Gets the date in a preferred format for writing env names
environments/create_envs.py:87
↓ 1 callers
Function
distributeProfileToMesh
Take reach profile elevations and move them out to the mesh vertices.
watershed_workflow/condition.py:640
↓ 1 callers
Function
do_setup
Do main VCS-independent setup function for installing Versioneer.
versioneer.py:1978
↓ 1 callers
Function
do_vcs_install
Git-specific installation logic for Versioneer. For Git, this means creating/changing .gitattributes to mark _version.py for export-subst key
versioneer.py:1285
↓ 1 callers
Function
dump_env_local
Dumps the env into an appropriate filename. This would be improved by a solution to: https://github.com/conda/conda/issues/9399 but ins
environments/create_envs.py:141
↓ 1 callers
Function
enforceBankIntegrity
Forces banks at least bank_integrity_elevation higher than the channel elevation.
watershed_workflow/condition.py:651
↓ 1 callers
Function
enforceLocalMonotonicity
Ensures that the streambed-profile elevations are monotonically increasing as we move upstream, or decreasing as we move downstream.
watershed_workflow/condition.py:567
↓ 1 callers
Function
enforceMonotonicity
Sweep the river network from each headwater reach (leaf node) to the watershed outlet (root node), removing aritificial obstructions in the ri
watershed_workflow/condition.py:591
↓ 1 callers
Function
enforce_delaunay
(parser)
watershed_workflow/ui.py:239
↓ 1 callers
Function
enumerated_colors
Gets an enumerated list of count independent colors. Parameters ---------- count : int Number of colors to return. palette :
watershed_workflow/colors.py:119
↓ 1 callers
Method
explore
Open a map!
watershed_workflow/split_hucs.py:279
↓ 1 callers
Function
fillPits1
This is the origional, 2-pass algorithm, and is likely inefficient.
watershed_workflow/condition.py:75
↓ 1 callers
Function
fillPits2
This is a refactored, single pass algorithm that leverages a sorted list.
watershed_workflow/condition.py:115
↓ 1 callers
Function
fillPits3
This algorithm is based on a boundary marching method
watershed_workflow/condition.py:142
↓ 1 callers
Function
filterLeapDay_DataFrame
Remove day 366 (Dec 31) from leap years and convert time column to CFTime noleap calendar. Parameters ---------- df Input Dat
watershed_workflow/data.py:273
↓ 1 callers
Function
filterLeapDay_xarray
Remove day 366 (Dec 31) from leap years and convert time dimension to CFTime noleap calendar. Parameters ---------- da : xr.DataArray
watershed_workflow/data.py:332
↓ 1 callers
Function
findBiggest
Finds the biggest (by area) polygon.
watershed_workflow/split_hucs.py:580
← previous
next →
201–300 of 1,294, ranked by callers