GeoEco.Connectivity.LarvalDispersal.LarvalDispersal.CreateSimulationFromArcGISRasters
- classmethod LarvalDispersal.CreateSimulationFromArcGISRasters(simulationDirectory, patchIDsRaster, patchCoverRaster, waterMaskRaster, crosses180=False, overwriteExisting=False)
Creates a larval dispersal simulation and initializes it with habitat patches defined in rasters.
Requires: ArcGIS Pro 3.6.0 or later or ArcGIS Server equivalent to ArcGIS Pro 3.6.0 or later, ArcGIS ‘spatial’ extension, Python numpy module.
- Parameters:
simulationDirectory (
str) –Output directory to create to contain the simulation’s data.
After creating the simulation directory, you must load ocean currents data into it using other tools before you can run the simulation. Use the MGET tools designed for this purpose. Unless you know what you are doing, do not modify the contents of the simulation directory yourself.
Minimum length꞉ 1.
patchIDsRaster (
str) –Integer raster specifying the locations and IDs of habitat patches from which larvae will be released and upon which larvae can settle.
If you wish to control which patches larvae may be released from and which they may settle upon, rather than simply having all of them serve in both roles, do not worry about that now; you can control that later. For now, you must provide a raster that defines all of the patches, regardless of their ultimate roles.
Each patch is defined as one or more cells having the same positive integer ID value. Patch IDs may range from 1 to 65535, inclusive. NoData indicates that the cell is not part of a patch or that it is land. Typically, each patch’s cells form a single contiguous region, but this is not required; the cells of a patch may be separated by NoData cells.
This raster also defines the coordinate system, extent, and cell size for the analysis. It must use a projected coordinate system, with meters as the linear unit. When ocean currents data are loaded into the simulation, they will be automatically projected and clipped as needed to exactly match this raster’s coordinate system, extent, and cell size.
Due to compatibility problems between ArcGIS and some open source GIS libraries used by MGET, we do not recommend you use any of the “Web Mercator” coordinate systems. If you were inclined to use one of those, we recommend you use one of the “World Mercator” coordinate systems instead.
A common challenge with this tool is that habitat patch data such as the locations of coral reefs are typically available at very high resolution–often 1 km cell size or finer–while ocean currents data are typically available at much lower resolution–often 10 km or coarser. In general, we recommend you conduct your simulation at the coarser resolution of the ocean currents, rather than the finer resolution of the habitat patches, for two reasons:
Although the tools provided to load currents into the simulation will automatically interpolate the currents data to the resolution of the habitat patches via bilinear or cubic spline interpolation, you have no assurance that these approaches to interpolation are realistic. Conducting the analysis at a substantially finer resolution than the ocean currents data will introduce an unknown degree of uncertainty into the results.
The memory required to run the simulation and the speed at which it runs are directly related to the number of rows and columns of the analysis. Large rasters can cause the tool to fail with an “OUT OF MEMORY” error. Even if this does not happen, large rasters can greatly increase the run time of the tool. In general, we recommend the dimensions of the analysis be less than 1000x1000 cells; ideally it should be less than 500x500 cells.
To rescale your patch IDs raster to a coarser resolution, consider using the ArcGIS Spatial Analyst Block Statistics tool, setting Statistics Type to MAJORITY. Then rescale the patch cover raster the same way with Statistics Type set to MEAN, and the water mask raster with Statistics Type set to MAXIMUM.
Minimum length꞉ 1. Must exist.
patchCoverRaster (
str) –Floating-point raster specifying the proportion of each cell’s area that is occupied by habitat from which larvae can be released or upon which larvae can settle.
The raster must have the same coordinate system, extent, and cell size as the patch IDs raster.
The raster values must be greater than or equal to 0 and less than or equal to 1. The value 1 indicates that the entire cell is occupied by suitable habitat, while 0.5 indicates that only half of it is. If the cell size was 25 km by 25 km, this would mean the cell contained either 625 or 312.5 square km of suitable habitat, respectively.
If the value is 0 or NoData, it is assumed that the cell does not contain any suitable habitat, even if the patch IDs raster indicates that suitable habitat is there. If the value is greater than 0 but the corresponding cell in the patch IDs raster contains NoData, it is assumed that the cell does not contain any suitable habitat.
If you wish to control which patches larvae may be released from and which they may settle upon, rather than simply having all of them serve in both roles, do not worry about that now; you can control that later. For now, you must provide a raster that gives the proportion of each cell that contains suitable habitat, regardless of whether that habitat will be used for spawning, settlement, or both. A limitation of this tool is that when a cell is used for both spawning and settlement, the same proportion of it is used for both roles.
Minimum length꞉ 1. Must exist.
waterMaskRaster (
str) –Raster specifying the locations of land and water. 0 or NoData indicates land; any other value indicates water.
The raster must have the same coordinate system, dimensions, and cell size as the patch IDs raster.
Minimum length꞉ 1. Must exist.
crosses180 (
bool, optional) – Set this option to True if your study area crosses the 180th meridian (i.e. 180 W / 180 E). This could happen if you are studying coral reefs in the tropical Pacific, for example.overwriteExisting (
bool, optional) – If True, the simulation directory will be deleted and recreated, if it exists. If False, a ValueError will be raised if the simulation directory exists.