-
Notifications
You must be signed in to change notification settings - Fork 232
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
Alternative remapping s/r #251
Merged
Hallberg-NOAA
merged 5 commits into
mom-ocean:dev/master
from
adcroft:user/aja/remap_refactor
Jan 19, 2016
Merged
Alternative remapping s/r #251
Hallberg-NOAA
merged 5 commits into
mom-ocean:dev/master
from
adcroft:user/aja/remap_refactor
Jan 19, 2016
Conversation
This file contains 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
- New function remap_via_sub_cells() returns to the idea of remapping by projection implemented via sub-cell integrals with a correction step to the sub-cell integrals that ensures accurate conservation. - Also added a function for evaluating the average of a single cell's reconstruction over an interval within the cell.
- remap_by_via_sub_cells() is now remap_via_sub_cells()
- On exiting the cycling over sub-cells, the remap_via_sub_cells() routine did not have an target association for the very last sub-cell.
- Separated integral calculations into their own loop - will later help create a vectorized version of remapping. - Expressed non-dimensional positions in terms of effective thickness so that positions are always bounded by source cell. - Removed unused argument, dh, to average_value_ppoly().
- remappingUnitTests now tests remap_via_sub_cells()
Hallberg-NOAA
added a commit
to Hallberg-NOAA/MOM6
that referenced
this pull request
Dec 4, 2022
There are extra US%T_to_s scaling factors in the expressions for ustar_min that were recently introduced with dev/gfdl PR mom-ocean#251; these are duplicative of the scaling factor that is already being applied when the parameter OMEGA is read in. The resulting expressions for ustar_min therefore effectively have units of [Z s T-2 ~> m s-1] when they should have units of [Z T-1 ~> m s-1]. Because ustar_min is a tiny floor on the magnitude of ustar, there is a range of values of T_RESCALE_POWER that will give the same answers as when it is 0, but for large enough values the answers will change, perhaps dramatically. This small commit removes these extra factors. Answers will change for some large values of T_RESCALE_POWER, but they are bitwise identical in the TC testing and in MOM6-examples based regression tests with modest or negative values.
Hallberg-NOAA
added a commit
to Hallberg-NOAA/MOM6
that referenced
this pull request
Dec 16, 2022
There are extra US%T_to_s scaling factors in the expressions for ustar_min that were recently introduced with dev/gfdl PR mom-ocean#251; these are duplicative of the scaling factor that is already being applied when the parameter OMEGA is read in. The resulting expressions for ustar_min therefore effectively have units of [Z s T-2 ~> m s-1] when they should have units of [Z T-1 ~> m s-1]. Because ustar_min is a tiny floor on the magnitude of ustar, there is a range of values of T_RESCALE_POWER that will give the same answers as when it is 0, but for large enough values the answers will change, perhaps dramatically. This small commit removes these extra factors. Answers will change for some large values of T_RESCALE_POWER, but they are bitwise identical in the TC testing and in MOM6-examples based regression tests with modest or negative values.
marshallward
pushed a commit
to Hallberg-NOAA/MOM6
that referenced
this pull request
Dec 18, 2022
There are extra US%T_to_s scaling factors in the expressions for ustar_min that were recently introduced with dev/gfdl PR mom-ocean#251; these are duplicative of the scaling factor that is already being applied when the parameter OMEGA is read in. The resulting expressions for ustar_min therefore effectively have units of [Z s T-2 ~> m s-1] when they should have units of [Z T-1 ~> m s-1]. Because ustar_min is a tiny floor on the magnitude of ustar, there is a range of values of T_RESCALE_POWER that will give the same answers as when it is 0, but for large enough values the answers will change, perhaps dramatically. This small commit removes these extra factors. Answers will change for some large values of T_RESCALE_POWER, but they are bitwise identical in the TC testing and in MOM6-examples based regression tests with modest or negative values.
gustavo-marques
pushed a commit
to gustavo-marques/MOM6
that referenced
this pull request
Aug 30, 2023
* Add Leith+E This commit adds the 2D Leith+E closure, which uses a modified 2D Leith biharmonic viscosity paired with a harmonic backscatter. ('Modified' here is not used in the same sense as 'modified 2D Leith'; it just means that the biharmonic coefficient is modified to account for enstrophy backscatter.) Variables are often named 'leithy' to refer to Leith+E. The parameterization is controlled by three main entries in user_nl_mom: 1. USE_LEITHY = True 2. LEITH_CK = 1.0 3. LEITH_BI_CONST = 8.0 To use Leith+E you should have LAPLACIAN=True and BIHARMONIC=True. (It doesn't hurt to be explicit and also set LEITH_AH=False, along with any other viscous closures, but this is not required. If USE_LEITHY=True it will not use any of the other schemes. It does use the background value of the biharmonic coefficient as a minimum, but ignores the background harmonic value.) LEITH_CK is the fraction of energy dissipated by the biharmonic term that gets backscattered by the harmonic term (it's a target; the backscatter rate is not exact.) Recommended values between 0 and 1. LEITH_BI_CONST is Upsilon^6 where Upsilon is the ratio between the grid scale and the dissipation scale for enstrophy. Values should be greater than or equal to 1; 8 is a good place to start. The code is sensitive to the background value of Ah; specifically, if Ah is too large, the code is unstable. This is because the backscatter coefficient is proportional to Ah, and if Ah is large then you get large backscatter. If your code is unstable, consider reducing, e.g., `AH_VEL_SCALE`. * Background Ah This commit updates the code so that it uses the background Ah as a minimum. Previously, if `SMAGORINSKY_AH = True`, Leith+E would use the Smag value of Ah as the minimum, which is incorrect. * Improve logging Removed `do_not_log` condition on `USE_LEITHY` * Fix Leithy Logic Added one line to fix the fact that the code would only work as intended if either (i) writing out Ah_h, or (ii) in debug mode. Also swapped .le. and .lt. for <= and <.
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.
Draft of low-level remapping written to unequivocally avoid overshoots and retain accurate conservation in presence of numerical round-off.
Todo: