Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Allow users to upload slope for tide correction. #282

Open
2320sharon opened this issue Nov 18, 2024 · 5 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@2320sharon
Copy link
Collaborator

At many beaches the slope is not constant across the entire beach and can be fluctuate across the span of the time series. To account for this users should be able to upload their own beach slopes that can be specific to different regions on the beach or specific to different time periods. To make this easy users should be able to upload a CSV file that contains the slope for each transect and optionally a time that the slope is most associated with it.

Example 1: Slopes Specific to Each Transect with Specific Times

In this example CoastSeg will use the slope value that's closest in time to the time the shoreline was captured to perform tide correction. For example, for transect 2 slope 0.04 would be used for a shoreline captured 2021-04-07 or earlier, but for a shoreline captured 2021-04-08 or later the slope value of 0.03 would be used.

Transect ID Slope Datetime
1 0.05 2021-04-05 14:49:58+00:00
2 0.04 2021-04-07 14:49:58+00:00
2 0.03 2021-04-08 18:49:58+00:00
3 0.02 2021-04-06 14:49:58+00:00

Example 2: Slopes Specific to Each Transect

For this example the slope for each transect will be used through the entire timeseries.

Transect ID Slope
1 0.05
2 0.04
3 0.02
@2320sharon 2320sharon self-assigned this Nov 18, 2024
@2320sharon 2320sharon added the enhancement New feature or request label Nov 18, 2024
@2320sharon
Copy link
Collaborator Author

2320sharon commented Nov 18, 2024

@dbuscombe-usgs @mlundine when you plan to do tidally correction with time varying slopes what format will your data be in? What would be easiest to upload with CoastSeg?

Would it be better to have a format like this? If the End Date column is empty I could always assume it means use this value to the rest of the time series.

Transect ID Slope Start Date End Date
1 0.05 2021-04-05 2021-04-10
2 0.04 2021-04-05 2021-04-07
2 0.03 2021-04-08 2021-04-09
3 0.02 2021-04-06 2021-04-10

@2320sharon
Copy link
Collaborator Author

2320sharon commented Feb 3, 2025

I heard back from our team and they mentioned they wanted the format dates x transect_ids as a format as well.

Below is an updated list of all the possible formats we should expect

  1. columns : transect id, slope
    Use the slope for each matching transect id
Transect ID Slope
1 0.05
2 0.04
3 0.02
  1. columns : transect id, slope, date
    use slope for everything up to and including the date for that transect
Transect ID Slope Date
1 0.05 2021-04-05
2 0.04 2021-04-05
2 0.03 2021-04-08
3 0.02 2021-04-06

If only one transect id is listed then that slope is used for tide correction for all the slopes
3. columns : slope, x,y
Use the slope for the transect closet to the x and y location

Slope x y
0.05 34.0522 -118.2437
0.04 36.7783 -119.4179
0.02 37.7749 -122.4194
  1. dates x transect ids.
  • Basically its a pivot of form 2
123 1234 12345 123456
2004-04-07 00:00:00+00:00 0.05 0.04 0.04
2004-04-08 00:00:00+00:00 0.04 0.05 0.08
2004-04-09 00:00:00+00:00 0.03 0.09 0.07
2004-04-10 00:00:00+00:00 0.02 0.01 0.07

@2320sharon
Copy link
Collaborator Author

2320sharon commented Feb 3, 2025

  • Make functions to read the slopes in all 4 formats
  • Make tide correction work with slopes for all 4 formats
  • Ensure tide and slope values are saved out to the tidally_corrected_timeseries_merged csv file

@2320sharon
Copy link
Collaborator Author

2320sharon commented Feb 6, 2025

  • Mandate date format
  • Mandate lat lon
  • mandate slope in (m/m)

@2320sharon
Copy link
Collaborator Author

2320sharon commented Feb 13, 2025

  • Update zoo notebook with new tide correction function call
  • Update scripts to use new tide correction function call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant