Velocity remap dimensional consistency#308
Conversation
|
PS this will change answers whenever the remap correction is turned on. Dimensional tests are failing, but it's because of #302. If you set |
|
This is passing our pr_mom suite, but I think we should discuss the CI regression test failures before I merge. @gustavo-marques, @mnlevy1981 . |
|
My calendar is up to date, and I'm happy to chat any time I'm free today... but in general, I am in favor of answer-changes when we move from "add epsilon to a non-negative denominator to avoid dividing by zero" to "do division when denominator is non-zero / evaluate limit when denominator is zero" |
|
@alperaltuntas reminded me that we need to use the answer-date construct in MOM6 to preserve answers for GFDL; he's going to update this PR with an option to maintain the previous answers. I'm still a little confused about when |
|
The original PR #277 was merged May 24, 2024. I don't think this was ever used at GFDL, but I don't know that for sure. |
|
I am noting here that reverting the changes in lines 383 and 388 fixes the regression errors, which indicate yet another dimensional consistency issue. |
If the units are really |
@klindsay28 points out that this comment is an over-simplification; my thinking was that all of these computations should be done in the model dimensions ( |
|
The quantity is velocity squared times vertical thickness divided by dt, so the dimensions are H L^2 /T^3. For output it needs to also be multiplied by density. |
I think I understand. With your new scaling factor of |
|
Yes, that should be dropped. I thought I did it, but evidently forgot to remove it for this PR. I will make that change asap |
mnlevy1981
left a comment
There was a problem hiding this comment.
As discussed in the developer's meeting, I think the current test failures (round-off level changes in ocean_model-ale_u2 and ocean_model-ale_v2) are expected due to refactoring of the scaling coefficients. They won't effect GFDL bit-for-bit requirements since these variables are not currently available on dev/gfdl
|
pr_mom test is ongoing and should be done in 30 mins. |
The dimensional consistency tests were failing with the old code because of the presence of a literal constant on these lines. I replaced those lines by logic to avoid divide-by-zero, and the new code passes the dimensional consistency test. I also cleaned up the unit scaling to make it more easily legible.