Repository navigation
TPXO forcing changes - #473
Open
stephankramer wants to merge 3 commits into
Open
stephankramer wants to merge 3 commits into
stephankramer wants to merge 3 commits into
Conversation
This is used in the high-resolution atlas version of TPXO. Also converts "mm" such that elevations are always returned in meters.
BREAKING CHANGE: previously uptide's TPXOncTidalComponentInterpolator returned velocities or transport in whatever units where used in TPXO - e.g. in tpxo9 it uses cm/s for velocities but m^2/s for transports, but TPXO10 atlas version it uses cm^2/s for tranports. With stephankramer/uptide#19 uptide will always return velocities in m/s and transports in m^2/s with conversion if needed. That uptide PR also enables choosing between velocity 'u', 'v' or transport 'U', 'V', and if only transports are provided but velocity is asked for it computes the velocity from the transport by using TPXO's hu/hv depths. Thus in Thetis' TPXOTidalForcing you can now specify whether you want to interpolate velocities into the uv_field or transports - where in the latter case you can, yourself, divide by the higher resolution bathymetry on the computational mesh instead of TPXO's.
Contributor
Author
|
Currently sits on release for testing, but plan to merge into main |
stephankramer
force-pushed
the
skramer/tpxo-updates
branch
from
November 23, 2026 17:47
68fe94a to
b52c22a
Compare
Since stephankramer/uptide@aff505d uptide accepts longitude in arbitrary modulus range of 360, so we no longer have to use positive longitudes but can use standard -180<=lon<=180. This has the advantage that for models straddling the 0-meridian, the longitude range is correctly computed by simply taking the min and max. This range is used by uptide to determine which part of the global grid is read in and more importantly at every timestep it computes the tide at all these grid points in the range. So previously for a region with say -4<lon<6, we'd convert to positive longitude, giving 0<lon<6 or 356<lon<360 - so the min, max range would come out as 0-360, i.e. uptide would compute the tide on all netcdf gridpoints over the entire width og the global mesh (but within the latitude range). That merge also fixes a bug in the wrapping around of the global grid: the TPXO global grid ranges from 1/6<=lon<=360 (i.e. the lon=360 degree is not repeated with a lon=0 column). Points that were in the 0<lon<1/6 range would fail to interpolate. Uptide would raise an error, but Thetis (used to) ignore it and set it to zero. The wrapping bug has been fixed in uptide, so 0<lon<1/6 points are correctly interpolated. To avoid such bugs being silenced, this commit changes Thetis to *not* silence these interpolation exceptions. If you want the old behaviour (because say your regional tidal grid doesn't entirely cover your model region and you know you're fine with points outside being zeroed) use zero_missing_points=True in the TidalBoundaryForcing.
stephankramer
force-pushed
the
skramer/tpxo-updates
branch
from
November 24, 2026 11:46
b52c22a to
c00e18f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a number of changes in TPXOTidalBoundaryForcing related to uptide recent improvements:
zero_missing_points=Trueconwill be substitude by the requested constituent names