MCPcopy Create free account

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

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

↓ 1 callersFunction_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 callersFunction_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 callersMethod_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 callersMethod_correctSolarAzimuth
Calculates solar geometry for use in the SHADE2 model Parameters ---------- lat : float Latitude [decimal degrees
watershed_workflow/stream_light.py:550
↓ 1 callersFunction_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 callersMethod_detectCalendar
Detect the calendar type from native start/end dates. Returns ------- str Calendar type ('noleap', 'stand
watershed_workflow/sources/manager_dataset.py:320
↓ 1 callersFunction_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 callersMethod_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 callersMethod_download
Downloads the data for the provided request.
watershed_workflow/sources/manager_modis_appeears.py:339
↓ 1 callersMethod_download
A default download implementation.
watershed_workflow/sources/manager_raster.py:151
↓ 1 callersMethod_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 callersMethod_downloadProperties
Queries REST API for parameters by MUKEY.
watershed_workflow/sources/manager_nrcs.py:453
↓ 1 callersMethod_extractCoordinates
Extract longitude, latitude, and elevation from Basin3D feature. Parameters ---------- feature : MonitoringFeature
watershed_workflow/sources/manager_basin3d.py:253
↓ 1 callersMethod_fetchDataset
Implementation of abstract method to fetch AORC data. Parameters ---------- request : ManagerDataset.Request Requ
watershed_workflow/sources/manager_aorc.py:240
↓ 1 callersMethod_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 callersFunction_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 callersFunction_findContainingPolygon
Find the polygon that contains the largest portion of linestring. Parameters ---------- hucs : SplitHUCs Split HUCs object contai
watershed_workflow/hydrography.py:515
↓ 1 callersFunction_findHUC
Searches in hint to find shp.
watershed_workflow/__init__.py:96
↓ 1 callersMethod_fromDistance
(self, dist)
watershed_workflow/resampling.py:97
↓ 1 callersFunction_generateRings
(coords)
watershed_workflow/utils.py:1077
↓ 1 callersMethod_getProperties
Download and aggregate properties for a given set of mukeys, storing raw data in filename.
watershed_workflow/sources/manager_nrcs.py:503
↓ 1 callersMethod_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 callersMethod_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 callersMethod_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 callersMethod_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 callersFunction_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 callersFunction_isStringLike
(anobj)
watershed_workflow/tinytree.py:40
↓ 1 callersMethod_makeContinuous
(self, child: River)
watershed_workflow/river_tree.py:608
↓ 1 callersFunction_modisName
(modis_id)
watershed_workflow/land_cover_properties.py:236
↓ 1 callersFunction_name
(id)
watershed_workflow/land_cover_properties.py:271
↓ 1 callersFunction_nlcdName
(nlcd_id)
watershed_workflow/land_cover_properties.py:241
↓ 1 callersMethod_openFiles
Open all files and concatenate them into a single xarray dataset.
watershed_workflow/sources/manager_daymet.py:201
↓ 1 callersFunction_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 callersFunction_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 callersMethod_postprocessDataset
Time dtype converions and clipping, check CRS is applied, and check post conditions.
watershed_workflow/sources/manager_dataset.py:458
↓ 1 callersMethod_preprocessParameters
Process and validate parameters for getDataset calls. Parameters ---------- geometry : shapely.geometry.Polygon | gpd
watershed_workflow/sources/manager_dataset.py:389
↓ 1 callersMethod_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 callersMethod_prerequestDataset
(self)
watershed_workflow/sources/manager_raster.py:65
↓ 1 callersFunction_read_fields
(f, num_fields, is_ascii)
watershed_workflow/vtk_io.py:315
↓ 1 callersFunction_read_scalar_field
(f, num_data, split)
watershed_workflow/vtk_io.py:275
↓ 1 callersFunction_read_tensor_field
(f, num_data, split)
watershed_workflow/vtk_io.py:305
↓ 1 callersFunction_read_vector_field
(f, num_data, split)
watershed_workflow/vtk_io.py:295
↓ 1 callersMethod_requestDataset
Managers should overload this method to request the data. Parameters ---------- Request Dataset request storing t
watershed_workflow/sources/manager_dataset.py:287
↓ 1 callersFunction_shrinkLS
(ls)
watershed_workflow/hydrography.py:624
↓ 1 callersFunction_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 callersFunction_truncated_tree_iter
(n)
watershed_workflow/river_tree.py:1225
↓ 1 callersFunction_tryRename
(df, old, new)
watershed_workflow/sources/manager_nhd.py:57
↓ 1 callersFunction_unwhiten
Applies the inverse of whitening transformation. Parameters ---------- observations : np.ndarray Whitened observations to transfo
watershed_workflow/soil_properties.py:183
↓ 1 callersFunction_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 callersMethod_validateLocation
Validate location parameter.
watershed_workflow/sources/manager_nlcd.py:94
↓ 1 callersMethod_validateYear
Validate year for given location.
watershed_workflow/sources/manager_nlcd.py:101
↓ 1 callersFunction_whiten
Returns whitened observations and statistics for use in unwhiten. Parameters ---------- observations : np.ndarray Input observati
watershed_workflow/soil_properties.py:159
↓ 1 callersFunction_write_cells
(f, cells, write_binary)
watershed_workflow/vtk_io.py:436
↓ 1 callersFunction_write_points
(f, points, write_binary)
watershed_workflow/vtk_io.py:421
↓ 1 callersFunction_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 callersMethodadd
Adds nodes and edges from obj into collection.
watershed_workflow/triangulation.py:116
↓ 1 callersMethodaddItem
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 callersFunctionaddPolygonalRegions
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 callersFunctionaggregateComponentValues
Aggregate horizon value by layer thickness to get component property. Parameters ---------- df_chorizon : pandas dataframe hor
watershed_workflow/sources/manager_nrcs.py:113
↓ 1 callersFunctionaggregateMukeyValues
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 callersFunctionburnInRiver
Reduce reach elevations by a float or function.
watershed_workflow/condition.py:630
↓ 1 callersFunctionchain_iter
(p)
watershed_workflow/colors.py:153
↓ 1 callersMethodcheck
Checks consistency of the internal representation.
watershed_workflow/triangulation.py:137
↓ 1 callersFunctioncheck3
(hucs, rivers, extra_point=None)
watershed_workflow/test/test_05_hydrography.py:329
↓ 1 callersMethodcheckHandedness
Ensures all cells are oriented via the right-hand-rule, i.e. in the +z direction.
watershed_workflow/mesh.py:371
↓ 1 callersFunctioncm_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 callersFunctioncm_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 callersFunctioncomputeAverageYear_DataArray
Average DataArray values across years and repeat for specified number of years. Parameters ---------- da : xr.DataArray
watershed_workflow/data.py:851
↓ 1 callersFunctioncomputeAverageYear_DataFrame
Average DataFrame values across years and repeat for specified number of years. Parameters ---------- df : pandas.DataFrame
watershed_workflow/data.py:798
↓ 1 callersFunctioncomputeAverageYear_Dataset
Average Dataset values across years and repeat for specified number of years. Parameters ---------- ds : xr.Dataset Inpu
watershed_workflow/data.py:916
↓ 1 callersFunctioncomputeCrosswalkCorrelation
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 callersFunctioncomputeDistance
Compute Euclidean distance between two points. Parameters ---------- p1 : tuple of float First point as (x, y) coordinates.
watershed_workflow/utils.py:39
↓ 1 callersMethodcomputeEnergyStream
(self)
watershed_workflow/stream_light.py:700
↓ 1 callersMethodcomputeRadiativeTransferEstimates
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 callersMethodcomputeRiparianStreamShading
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 callersMethodcomputeSolarAngles
(self)
watershed_workflow/stream_light.py:120
↓ 1 callersFunctioncomputeVanGenuchtenModel_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 callersFunctionconditionRiverMesh
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 callersFunctionconnectRoundTrip
Connect indices in edges in a round-trip fashion
watershed_workflow/triangulation.py:70
↓ 1 callersMethodconstructRiversByDataFrame
Create a list of rivers from a dataframe that includes a 'parent' column. Parameters ---------- df : gpd.GeoDataFrame
watershed_workflow/river_tree.py:873
↓ 1 callersFunctionconvertTimesToCFTime
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 callersFunctioncreateDepressionFunction
(arg)
watershed_workflow/condition.py:425
↓ 1 callersFunctioncreate_env_local
Creates the environment locally.
environments/create_envs.py:179
↓ 1 callersFunctiondate_str
Gets the date in a preferred format for writing env names
environments/create_envs.py:87
↓ 1 callersFunctiondistributeProfileToMesh
Take reach profile elevations and move them out to the mesh vertices.
watershed_workflow/condition.py:640
↓ 1 callersFunctiondo_setup
Do main VCS-independent setup function for installing Versioneer.
versioneer.py:1978
↓ 1 callersFunctiondo_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 callersFunctiondump_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 callersFunctionenforceBankIntegrity
Forces banks at least bank_integrity_elevation higher than the channel elevation.
watershed_workflow/condition.py:651
↓ 1 callersFunctionenforceLocalMonotonicity
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 callersFunctionenforceMonotonicity
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 callersFunctionenforce_delaunay
(parser)
watershed_workflow/ui.py:239
↓ 1 callersFunctionenumerated_colors
Gets an enumerated list of count independent colors. Parameters ---------- count : int Number of colors to return. palette :
watershed_workflow/colors.py:119
↓ 1 callersMethodexplore
Open a map!
watershed_workflow/split_hucs.py:279
↓ 1 callersFunctionfillPits1
This is the origional, 2-pass algorithm, and is likely inefficient.
watershed_workflow/condition.py:75
↓ 1 callersFunctionfillPits2
This is a refactored, single pass algorithm that leverages a sorted list.
watershed_workflow/condition.py:115
↓ 1 callersFunctionfillPits3
This algorithm is based on a boundary marching method
watershed_workflow/condition.py:142
↓ 1 callersFunctionfilterLeapDay_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 callersFunctionfilterLeapDay_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 callersFunctionfindBiggest
Finds the biggest (by area) polygon.
watershed_workflow/split_hucs.py:580
← previousnext →201–300 of 1,294, ranked by callers