kvos / CoastSat.slope

Beach-face slope estimation from satellite-derived shorelines, extension of the CoastSat toolbox.
http://coastsat.wrl.unsw.edu.au/
GNU General Public License v3.0
59 stars 17 forks source link

Slope estimation with Sentinel-2 satellite-derived shorelines (not only Landsat) #17

Closed seamuslo closed 4 months ago

seamuslo commented 2 years ago

Hi @kvos , thanks very much for your help up to this point with navigating issues with running the script and getting FES model to work. I am able to run the slope estimation script end-to-end now, but I am concerned that the final output is not accurate.

Of particular concern to me are 1) that the Power Spectrum and "Inset into the tidal peak frequency bands" plots look very different from the example script outputs, 2) the confidence bands on the slope estimates are very large, 3) the estimate is the same for each transect.

I have attached the full output of my script here slope_code_outpu.pdf

As well as the Output.pkl file Pekalongan_longer_time_output.zip

and the tidal data CSVs tide_fes.csv tide_sat.csv date_fes_ts.csv date_sat_ts.csv

I am continuing to read through the documentation and publications, but do you have any intuition as to what might be the issue here @kvos to point me in the right direction?

kvos commented 2 years ago

hi seamus, I had a look at your document and the issue showed up immediately and is here: image You need the 8-days revisits to be able to capture the sping-neap fortnightly tidal cycles, unfortunately in your dataset most intervals are at 16 days. With 16 days you cannot capture the tidal cycle, that's why there is no peak in your spectrum. Good though that the algorithm flagged this with large confidence bands. Is there something you can try to get more revisits at your site?

seamuslo commented 2 years ago

@kvos thanks for that information, its good to know that 8-day revisits are necessary for this analysis to run properly.

The first thing that comes to mind is including Sentinel data to get more revisits. Is that possible? Or will this algorithm only work with landsat?

seamuslo commented 2 years ago

Hi @kvos , to see if I could use Sentinel data to get more revisits, I reran the script including Sentinel images. To implement this, I commented out the lines that exclude Sentinel in section 1:

`#remove S2 shorelines (the slope estimation algorithm needs only Landsat shorelines)

if 'S2' in output['satname']: idxS2 = np.array([ == 'S2' for in output['satname']]) for key in output.keys(): output[key] = [output[key][] for _ in np.where(~idx_S2)[0]]`

and then utilizing an version of the alternate environment script to generate tide_sat that also included sentinel images (because the creation of tidesat is in the "Option 1" Tide FES section of the code, that does not work with Coastsat due to pyfes conflicts).

I now see more revisits in the lower end of the range, but now the final output of the code seems broken. Could you provide any insight into this?

My full code output is attached pekalongan script output with sentinel images.pdf

seamuslo commented 2 years ago

My apologies for the double message @kvos , but I made some edits to the code that resulted in the a new final beach slope estimate.

I think the reason that there was no output in the version of the script from my previous comment is because I had circumvented the portion of the code in Part 5 that removes NaNs. I made a change so that the code removes NaNs again from the dates, tide, and composite variables.

Now I am getting an output of an estimated beach slope from the final portion of the code (see attached). However, the confidence band is still rather large, and the beach slope estimate is the same for each transect.

Do you have any thoughts as to how these results look to you and whether you feel that the code is running properly?

Full output here: pekalongan script output with sentinel images_nan_code_added.pdf

kvos commented 2 years ago

hi @seamuslo ,

It would be interesting to test if it's possible to use S2 as well. The current algorithm was specifically designed to use with Landsat and that theoretical 8-days revisit period is the key (to capture the fortnightly tidal cycles). If you include S2, the revisits become very irregular, as you see in your plots. I think it needs some development and testing to be used with S2 as well since the intervals are now very different from the Landsat-only shorelines. You need to test different frequency grids and see which tidal components can be captured and focus on the frequency at which the tidal energy is large. In your plot below the selected band looks quite weak. Good luck, it's a cool project.

image

juni666666 commented 2 years ago

where did you get these cvs ?