-
Notifications
You must be signed in to change notification settings - Fork 139
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
Implementing correct depth-to-sigma calculation #1772
Conversation
Looks good! Just some things that I think would be good to clarify before merging. I'm not 100% happy with the API changes with |
Co-authored-by: Vecko <36369090+VeckoTheGecko@users.noreply.github.com>
…nParcels/parcels into CROCO_fix_sigma_calculation
Yes, I fully understand; I'm not 100% happy either. This would actually be another reason to move to xarray for FieldSet creation in Parcels... The xarray DataSet can be expected to contain all these variables (hc, Cs_w, Zeta, H, etc) if the data comes from CROCO/Roms, so we can take them directly from there... |
I 100% agree. I'm currently scoping that out |
This PR fixes the way that the conversion is done for CROCO fieldsets from particle.depth (in meters) to local sigma-coordinate. Where this was initially assumed to be a simple linear conversion, this turned out to be much more complex.
After some discussion on the myroms forum https://www.myroms.org/forum/viewtopic.php?p=25752#p25752, the best option is to calculate the local depth of each sigma layer and then linearly interpolate the particle depth to find the fractional sigma depth.
This fixes #1763