Open-EO / openeo-community-examples

A community-driven effort to make examples, user-defined processes and code snippets available in a single place.
Apache License 2.0
34 stars 6 forks source link

Surface Soil Moisture #22

Closed Pratichhya closed 8 months ago

Pratichhya commented 9 months ago

In this notebook, we follow the concept presented in https://custom-scripts.sentinel-hub.com/custom-scripts/sentinel-1/soil_moisture_estimation/ to estimate the soil moisture content using the concept of change detection over three year of time interval as a openEO workflow.

It is an addtional example on doing band math using openEO

soxofaan commented 9 months ago

some notes

in the LaTeX formula's there is inconsistent usage of \operatorname and \text

import json is unused I think

As we don't want to download all of the data within the specified time interval, we need to reduce that data. Thus, we use reduce_dimension with first, min and max reducers, respectively, for current, dry reference and wet reference datacube.

The reason to do temporal reduction is because the SSM formula imposes that, it has not to do with "don't want to download all of the data ". Also, for sigma0 (current backscatter intensity), shouldn't the reducer be "last" instead of "first"?

Furthermore, to filter wet and urban areas from our soil moisture dataset, we reduce the temporal dimension of our datacube by using a mean reducer to get an average reference datacube. This is followed by normalising the backscatter values by Log with base 10. average_ref = s1_ref.reduce_dimension(dimension='t',reducer='mean') average_ref = average_ref.apply(process=lambda data: 10 * openeo.processes.log(data, base=10))

I don't know the details, but is it scientifically correct to do the temporal mean before the db conversion? With min, max, last reducer, it doesn't matter, but when using a reducer like mean, the order of taking mean and log does matter greatly.

Suppose if average of urban area is > 6db and water area if average is < -17 db , let's create a mask for these areas.

hard to understand sentence.

Also, proper abbreviation of decibel is "dB" (lower d and upper case B)

Pratichhya commented 8 months ago

in the LaTeX formula's there is inconsistent usage of \operatorname and \text

updated

import json is unused I think

removed

The reason to do temporal reduction is because the SSM formula imposes that, it has not to do with "don't want to download all of the data ". Also, for sigma0 (current backscatter intensity), shouldn't the reducer be "last" instead of "first"?

I think, that should also be ok. I updated th reducer to last.

I don't know the details, but is it scientifically correct to do the temporal mean before the db conversion? With min, max, last reducer, it doesn't matter, but when using a reducer like mean, the order of taking mean and log does matter greatly.

I am not fully sure if I am correct, here we want to calculate the average of all the observation then convert the value to log scale for thresholding. So, I guess it should be ok in this case.

hard to understand sentence.

updated

Also, proper abbreviation of decibel is "dB" (lower d and upper case B)

updated

soxofaan commented 8 months ago

If the average of the urban area is greater than -6dB and the average of the water area is less than -17dB, then we create a mask for these areas.

I still find this a very confusing sentence. I guess you want to say something like

We create a mask to filter out values above -6dB (probably urban area) and below -17dB (probably water bodies), following the thresholds suggested in https://custom-scripts.sentinel-hub.com/custom-scripts/sentinel-1/soil_moisture_estimation/ .

Pratichhya commented 8 months ago

thank you for simplifying 😅

Pratichhya commented 8 months ago

@soxofaan do you have additional feedback?

Pratichhya commented 8 months ago

@soxofaan thank you :)