kvos / CoastSat

Global shoreline mapping tool from satellite imagery
http://coastsat.space
GNU General Public License v3.0
697 stars 252 forks source link

Tidal Information #535

Closed DakDune closed 1 month ago

DakDune commented 1 month ago

Hi,

I hope you're well. I have been working through this and have successfully obtained the GEE images and the Planet images through an API. I am now trying to compute the tides. I set up pyfes, and have filled all the modules with their .nc files, making sure the function knows to look through the .yaml files for their locations. I have been now running into an issue with "load_tide" as it took a few times of redownloading to get it no errors and all required .nc files. I have it now, but when loading in the configuration files I get past "ocean_tide" and then the kernal crashes. I was hoping you might have any advice on this, as I am testing this one 1 year and if this takes up too much memory then increasing the date range would never work. I am also wondering why it calls to compute for hourly tidal data for the whole of the range and not for the time of each image. I know this would require something to be changed in creating the metadata though. Any advice/help would be greatly appreciated!

kvos commented 1 month ago

hi @DakDune , I have recently been through this with FES2022 and noticed changes in the pyfes package. See the PDF attached updated instructions on how to set it up with the yaml files. coastsat_installation.pdf. Then you can see how I call the functions in the CoastSat v3.0 branch (work in progress), Tidal Correction section in this notebook https://github.com/kvos/CoastSat/blob/CoastSat-v3.0/example_jupyter.ipynb

image

It worked for me, it takes 5 minutes to load the config handler but then I could get 15 min interval tide time-series almost instantly with an average machine. I hope this helps.

kvos commented 1 month ago

see these instructions to setup fes2022: https://github.com/kvos/CoastSat/blob/CoastSat-v3.0/doc/FES2022_setup.md

DakDune commented 1 month ago

Thank you!! I got it working, also had a problem after making these changes where I was getting Nans in my tidal data and it is because the longitudes need to be given in a range from 0:360, not -180:180. Maybe this is already incorporated into the functions and I took it out when making changes, but thought I would put that down here. Thanks again.

kvos commented 1 month ago

good job!