diff --git a/DEA_products/DEA_GeoMAD.ipynb b/DEA_products/DEA_GeoMAD.ipynb index 6330f7d5..c5f1944e 100644 --- a/DEA_products/DEA_GeoMAD.ipynb +++ b/DEA_products/DEA_GeoMAD.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# DEA Geomedian and Median Absolute Deviations \n", + "# Introduction to DEA Geomedian and Median Absolute Deviations \n", "\n", "* [**Sign up to the DEA Sandbox**](https://docs.dea.ga.gov.au/setup/sandbox.html) to run this notebook interactively from a browser\n", "* **Compatibility:** Notebook currently compatible with the `DEA Sandbox` environment\n", diff --git a/DEA_products/DEA_Wetlands_Insight_Tool.ipynb b/DEA_products/DEA_Wetlands_Insight_Tool.ipynb index c5759807..8b069eaa 100755 --- a/DEA_products/DEA_Wetlands_Insight_Tool.ipynb +++ b/DEA_products/DEA_Wetlands_Insight_Tool.ipynb @@ -134,7 +134,7 @@ "
\n", "
\n", "

Client

\n", - "

Client-98138099-4260-11ef-8124-a65cf44136ef

\n", + "

Client-13b76067-4a25-11ef-809c-2ece1b33e086

\n", " \n", "\n", " \n", @@ -147,7 +147,7 @@ " \n", " \n", " \n", " \n", " \n", @@ -156,7 +156,7 @@ "
\n", - " Dashboard: /user/bex.dunn@ga.gov.au/proxy/8787/status\n", + " Dashboard: /user/lauren.schenk@ga.gov.au/proxy/8787/status\n", "
\n", "\n", " \n", - " \n", " \n", @@ -169,11 +169,11 @@ "
\n", "
\n", "

LocalCluster

\n", - "

94443c02

\n", + "

729d0a1a

\n", " \n", " \n", " \n", "
\n", - " Dashboard: /user/bex.dunn@ga.gov.au/proxy/8787/status\n", + " Dashboard: /user/lauren.schenk@ga.gov.au/proxy/8787/status\n", " \n", " Workers: 1\n", @@ -206,11 +206,11 @@ "
\n", "
\n", "

Scheduler

\n", - "

Scheduler-2c16632d-4e2b-4011-9348-112985ec9a13

\n", + "

Scheduler-aca6db24-c519-4ea3-ad9a-4fd1a9e3a9c6

\n", " \n", " \n", " \n", " \n", " \n", " \n", "
\n", - " Comm: tcp://127.0.0.1:41721\n", + " Comm: tcp://127.0.0.1:35857\n", " \n", " Workers: 1\n", @@ -218,7 +218,7 @@ "
\n", - " Dashboard: /user/bex.dunn@ga.gov.au/proxy/8787/status\n", + " Dashboard: /user/lauren.schenk@ga.gov.au/proxy/8787/status\n", " \n", " Total threads: 2\n", @@ -252,7 +252,7 @@ " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", @@ -301,7 +301,7 @@ "" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -362,7 +362,9 @@ }, "source": [ "### Analysis parameters\n", - "* `poly`: The polygon of your wetland of interest. This can be a shapefile or a GeoJSON. User will need to drag and drop the file into the sandbox and update the file path. Your polygon should be in EPSG:3577 [GDA94 Australian Albers](https://epsg.io/3577)." + "* `poly`: The polygon of your wetland of interest. This can be a shapefile or a GeoJSON. User will need to drag and drop the file into the sandbox and update the file path. Your polygon should be in EPSG:3577 [GDA94 Australian Albers](https://epsg.io/3577).\n", + "\n", + "> **Note:** Ensure that input shapefiles contain only 2D polygon geometries with no \"z\" dimension/coordinates. If this is not the case, \"z\" coordinates will need to be removed before the WIT notebook can be run." ] }, { @@ -854,7 +856,7 @@ " nbart_swir_2 (time, y, x) float32 1MB 2.41e+03 2.291e+03 ... nan nan\n", "Attributes:\n", " crs: EPSG:3577\n", - " grid_mapping: spatial_ref
  • crs :
    EPSG:3577
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ " Size: 8MB\n", @@ -1254,14 +1256,6 @@ "tags": [] }, "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/env/lib/python3.10/site-packages/rasterio/warp.py:344: NotGeoreferencedWarning: Dataset has no geotransform, gcps, or rpcs. The identity matrix will be returned.\n", - " _reproject(\n" - ] - }, { "data": { "text/html": [ @@ -1642,7 +1636,7 @@ " ue (time, y, x) uint8 589kB 9 10 10 9 8 8 9 10 ... 3 4 4 4 4 4 3 4\n", "Attributes:\n", " crs: PROJCS["GDA94 / Australian Albers",GEOGCS["GDA94",DATUM["G...\n", - " grid_mapping: spatial_ref
  • crs :
    PROJCS["GDA94 / Australian Albers",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",132],PARAMETER["standard_parallel_1",-18],PARAMETER["standard_parallel_2",-36],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","3577"]]
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ " Size: 2MB\n", diff --git a/DEA_products/README.rst b/DEA_products/README.rst index 16ec43c6..afaebfc2 100644 --- a/DEA_products/README.rst +++ b/DEA_products/README.rst @@ -8,15 +8,16 @@ Notebooks introducing DEA's satellite datasets and derived products, including h DEA_Landsat_Surface_Reflectance.ipynb DEA_Sentinel2_Surface_Reflectance.ipynb - DEA_Water_Observations.ipynb - DEA_Fractional_Cover.ipynb - DEA_Intertidal.ipynb DEA_Land_Cover.ipynb - DEA_High_and_Low_Tide_Imagery.ipynb - DEA_Coastlines.ipynb - DEA_Waterbodies.ipynb - DEA_Wetlands_Insight_Tool.ipynb + DEA_Fractional_Cover.ipynb + DEA_GeoMAD.ipynb DEA_Mangroves.ipynb + DEA_Wetlands_Insight_Tool.ipynb + DEA_Water_Observations.ipynb + DEA_Waterbodies.ipynb + DEA_Coastlines.ipynb + DEA_High_and_Low_Tide_Imagery.ipynb + DEA_Intertidal.ipynb Citing DEA Notebooks -------------------- diff --git a/Tools/dea_tools/coastal.py b/Tools/dea_tools/coastal.py index b64367c5..24bf9545 100644 --- a/Tools/dea_tools/coastal.py +++ b/Tools/dea_tools/coastal.py @@ -238,6 +238,7 @@ def _model_tides( time, directory, crs, + crop, method, extrapolate, cutoff, @@ -278,6 +279,15 @@ def _model_tides( # Convert datetime timescale = pyTMD.time.timescale().from_datetime(time.flatten()) + # Calculate bounds for cropping + buffer = 1 # one degree on either side + bounds = [ + lon.min() - buffer, + lon.max() + buffer, + lat.min() - buffer, + lat.max() + buffer, + ] + # Read tidal constants and interpolate to grid points if pytmd_model.format in ("OTIS", "ATLAS", "TMD3"): amp, ph, D, c = pyTMD.io.OTIS.extract_constants( @@ -287,6 +297,8 @@ def _model_tides( pytmd_model.model_file, pytmd_model.projection, type=pytmd_model.type, + crop=crop, + bounds=bounds, method=method, extrapolate=extrapolate, cutoff=cutoff, @@ -303,6 +315,8 @@ def _model_tides( pytmd_model.grid_file, pytmd_model.model_file, type=pytmd_model.type, + crop=crop, + bounds=bounds, method=method, extrapolate=extrapolate, cutoff=cutoff, @@ -318,6 +332,8 @@ def _model_tides( lon, lat, pytmd_model.model_file, + crop=crop, + bounds=bounds, method=method, extrapolate=extrapolate, cutoff=cutoff, @@ -335,6 +351,8 @@ def _model_tides( pytmd_model.model_file, type=pytmd_model.type, version=pytmd_model.version, + crop=crop, + bounds=bounds, method=method, extrapolate=extrapolate, cutoff=cutoff, @@ -584,6 +602,7 @@ def model_tides( model="FES2014", directory=None, crs="EPSG:4326", + crop=True, method="spline", extrapolate=True, cutoff=None, @@ -674,6 +693,10 @@ def model_tides( crs : str, optional Input coordinate reference system for x and y coordinates. Defaults to "EPSG:4326" (WGS84; degrees latitude, longitude). + crop : bool optional + Whether to crop tide model constituent files on-the-fly to + improve performance. Cropping will be performed based on a + 1 degree buffer around all input points. Defaults to True. method : string, optional Method used to interpolate tidal constituents from model files. Options include: @@ -831,6 +854,7 @@ def model_tides( _model_tides, directory=directory, crs=crs, + crop=crop, method=method, extrapolate=extrapolate, cutoff=np.inf if cutoff is None else cutoff,
    \n", - " Comm: tcp://127.0.0.1:42815\n", + " Comm: tcp://127.0.0.1:40943\n", " \n", " Total threads: 2\n", @@ -260,7 +260,7 @@ "
    \n", - " Dashboard: /user/bex.dunn@ga.gov.au/proxy/37117/status\n", + " Dashboard: /user/lauren.schenk@ga.gov.au/proxy/37419/status\n", " \n", " Memory: 12.21 GiB\n", @@ -268,13 +268,13 @@ "
    \n", - " Nanny: tcp://127.0.0.1:35379\n", + " Nanny: tcp://127.0.0.1:45195\n", "
    \n", - " Local directory: /tmp/dask-scratch-space/worker-7h0yz79u\n", + " Local directory: /tmp/dask-scratch-space/worker-_yws9zfw\n", "