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

Add coordinates for "y2" (topographically corrected data) in export #42

Open
erikmannerfelt opened this issue Apr 19, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@erikmannerfelt
Copy link
Owner

Currently, there is no easy y-coordinate for the topographically corrected data. The dimension y2 should have elevation associated with it.

The y2-coordinate should technically be possible to calculate from the x/y coordinates (elevation and depth), but I honestly don't see a trivial way to do it, so it'd be much better to just export the y2 elevation instead.

@erikmannerfelt
Copy link
Owner Author

In xarray, this is approximated by:

data["elevation_topo"] = ("y2",), np.linspace(data["elevation"].min().item() - data["depth"].max().item(), data["elevation"].max().item(), data["y2"].shape[0])[::-1]

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
None yet
Development

No branches or pull requests

1 participant