diff --git a/.github/workflows/terria_preview.yaml b/.github/workflows/terria_preview.yaml index a75e91994..d2434131a 100644 --- a/.github/workflows/terria_preview.yaml +++ b/.github/workflows/terria_preview.yaml @@ -26,7 +26,7 @@ jobs: **Terria Cube preview:** https://terria-cube.terria.io/#clean&https://raw.githubusercontent.com/GeoscienceAustralia/dea-config/${{ github.head_ref }}/dev/terria/terria-cube-v8.json - DEA Maps + DEA Maps **DEA Maps preview:** https://maps.dea.ga.gov.au/#clean&https://raw.githubusercontent.com/GeoscienceAustralia/dea-config/${{ github.head_ref }}/prod/terria/dea-maps-v8.json diff --git a/_static/dea-logo-small.png b/_static/dea-logo-small.png new file mode 100644 index 000000000..2ff506249 Binary files /dev/null and b/_static/dea-logo-small.png differ diff --git a/prod/services/wms/ows_refactored/sea_ocean_coast/intertidal_c3/style_intertidal_cfg.py b/prod/services/wms/ows_refactored/sea_ocean_coast/intertidal_c3/style_intertidal_cfg.py index d4d8d1e94..6e1c21de3 100644 --- a/prod/services/wms/ows_refactored/sea_ocean_coast/intertidal_c3/style_intertidal_cfg.py +++ b/prod/services/wms/ows_refactored/sea_ocean_coast/intertidal_c3/style_intertidal_cfg.py @@ -163,6 +163,34 @@ "hot": "ta_hot", }, }, + "multi_date": [ + { + "allowed_count_range": [2, 2], + "animate": False, + "preserve_user_date_order": True, + "pass_raw_data": True, + "aggregator_function": { + "function": "ows_refactored.sea_ocean_coast.intertidal_c3.utils_intertidal.multi_date_raw_elevation", + "mapped_bands": True, + "kwargs": { + "band": "elevation", + } + }, + "mpl_ramp": "RdBu", + "range": [-0.5, 0.5], + "legend": { + "title": "Elevation change (metres)", + "begin": "-0.5", + "end": "0.5", + "ticks": [ + "-0.5", + "0.0", + "0.5", + ] + }, + "feature_info_label": "elevation_difference", + }, + ], "include_in_feature_info": False, "needed_bands": ["elevation", "ta_lot", "ta_hot"], "mpl_ramp": "viridis", diff --git a/prod/services/wms/ows_refactored/sea_ocean_coast/intertidal_c3/utils_intertidal.py b/prod/services/wms/ows_refactored/sea_ocean_coast/intertidal_c3/utils_intertidal.py index c75adf353..fcd46b3cb 100644 --- a/prod/services/wms/ows_refactored/sea_ocean_coast/intertidal_c3/utils_intertidal.py +++ b/prod/services/wms/ows_refactored/sea_ocean_coast/intertidal_c3/utils_intertidal.py @@ -41,3 +41,15 @@ def uncertainty_adaptive(data, band, lot, hot, band_mapper=None): proportion_array = data[band] / otr return proportion_array + + +def multi_date_raw_elevation(data, band, band_mapper=None): + """ + Compares two elevation layers and calculates difference in elevation. + """ + if band_mapper is not None: + band = band_mapper(band) + + data1, data2 = (data.sel(time=dt) for dt in data.coords["time"].values) + + return data2[band] - data1[band] diff --git a/prod/terria/dea-maps-v8.json b/prod/terria/dea-maps-v8.json index abedc6501..7e51ba1c8 100644 --- a/prod/terria/dea-maps-v8.json +++ b/prod/terria/dea-maps-v8.json @@ -1150,13 +1150,19 @@ "linkedWcsUrl": "https://ows.dea.ga.gov.au/", "linkedWcsCoverage": "ga_s2ls_intertidal_cyear_3", "dateFormat": "'Year: 'yyyy", + "availableDiffStyles": ["intertidal_elevation_adaptive"], "leafletUpdateInterval": 750, "tileErrorHandlingOptions": { "ignoreUnknownTileErrors": true }, "shortReport": "For more information and to download data, visit the DEA Intertidal product description", + "diffItemProperties": { + "featureInfoTemplate": { + "template": "

Digital Earth Australia Intertidal

Elevation differences are shown for pixels with data in both timesteps only.

Intertidal elevation in {{data.0.time}}:

{{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.elevation}}{{/terria.formatNumber}} metres (± {{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.elevation_uncertainty}}{{/terria.formatNumber}})

Intertidal elevation in {{data.1.time}}:

{{#terria.formatNumber}}{maximumFractionDigits:2}{{data.1.bands.elevation}}{{/terria.formatNumber}} metres (± {{#terria.formatNumber}}{maximumFractionDigits:2}{{data.1.bands.elevation_uncertainty}}{{/terria.formatNumber}})



For more information about intertidal mapping accuracy and limitations and data access options, visit the DEA Intertidal product description.

" + } + }, "featureInfoTemplate": { - "template": "

Digital Earth Australia Intertidal

This location had an elevation above modelled Mean Sea Level (MSL):

{{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.elevation}}{{/terria.formatNumber}} metres (± {{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.elevation_uncertainty}}{{/terria.formatNumber}})

It was exposed from tidal inundation for:

{{data.0.bands.exposure}}% of the {{#terria.formatDateTime}}{format: \"yyyy\"}{{data.0.time}}{{/terria.formatDateTime}} analysis period



Mapped intertidal extents can be affected by biases in the tidal conditions observed by satellites. At this location, satellites observed the coastline at tide heights ranging from {{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.ta_lot}}{{/terria.formatNumber}} to +{{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.ta_hot}}{{/terria.formatNumber}} metres above MSL, compared to the full astronomical tide range of {{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.ta_lat}}{{/terria.formatNumber}} to +{{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.ta_hat}}{{/terria.formatNumber}} metres above MSL.

This resulted in satellite data observing ~{{data.0.bands.ta_spread}}% of the astronomical tide range, and failing to observe the lowest ~{{data.0.bands.ta_offset_low}}% and highest ~{{data.0.bands.ta_offset_high}}% of tides.



For more information about intertidal mapping accuracy and limitations and data access options, visit the DEA Intertidal product description.

" + "template": "

Digital Earth Australia Intertidal

This location had an elevation above modelled Mean Sea Level (MSL):

{{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.elevation}}{{/terria.formatNumber}} metres (± {{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.elevation_uncertainty}}{{/terria.formatNumber}})

It was exposed from tidal inundation for:

{{data.0.bands.exposure}}% of the {{#terria.formatDateTime}}{format: \"yyyy\"}{{data.0.time}}{{/terria.formatDateTime}} analysis period



Mapped intertidal extents can be affected by biases in the tidal conditions observed by satellites. At this location, satellites observed the coastline at tide heights ranging from {{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.ta_lot}}{{/terria.formatNumber}} to +{{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.ta_hot}}{{/terria.formatNumber}} metres above MSL, compared to the full astronomical tide range of {{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.ta_lat}}{{/terria.formatNumber}} to +{{#terria.formatNumber}}{maximumFractionDigits:2}{{data.0.bands.ta_hat}}{{/terria.formatNumber}} metres above MSL.

This resulted in satellite data observing ~{{data.0.bands.ta_spread}}% of the astronomical tide range, and failing to observe the lowest ~{{data.0.bands.ta_offset_low}}% and highest ~{{data.0.bands.ta_offset_high}}% of tides.


Data access and download

For more information about intertidal mapping accuracy and limitations and data access options, visit the DEA Intertidal product description.

" }, "id": "ghtu564", },