You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug in the application of KHTH_SLOPE_MAX to the slopes used to calculate the Potential energy released by the GM mixing for use by MEKE when MEKE_GM_SRC_ALT is true. Specifically the lines Slope_x_PE(I,j,k) = MIN(Slope,CS%slope_max) and its counterpart for Slope_y_PE (MOM_thickness_diffuse.F90, lines 928 and 1210) do limit positive slopes, but they do not limit negative slopes. As a result, this breaks rotational consistency, among other problems.
Obviously the solution to this bug is to replace this with something like Slope_x_PE(I,j,k) = MAX(MIN(Slope,CS%slope_max), -1.*CS%slope_max), but it could change answers for anyone using this option. To the best of my knowledge, we at GFDL are not currently using MEKE_GM_SRC_ALT in any cases, but because this code came from NCAR originally, it seems like this issue is best handled via dev/NCAR in case someone at NCAR is using it.
The text was updated successfully, but these errors were encountered:
This bug is being addressed via NOAA-GFDL#620, which retains adds the new runtime parameter MEKE_GM_SRC_ALT_SLOPE_BUG to correct it, but leaves the bug in place by default. Because we are not yet using MEKE_GM_SRC_ALT = True at GFDL, we would not mind if this bug were just fixed in the code, but adding this bug-fix flag does seem like the right approach in case someone is using this option. With this bug-fix enabled, we are able to get rotationally symmetric solutions when MEKE_GM_SRC_ALT = True.
I don't think NCAR is using MEKE_GM_SRC_ALT = True right now. I played with that option when I was exploring MEKE configurations with no equilibrium-restoring, but ended up not using it. This discussion summarizes the options we're currently exploring. It's of course great that this bug is being fixed; my comment is just to say that the fix is not urgent for us.
There is a bug in the application of KHTH_SLOPE_MAX to the slopes used to calculate the Potential energy released by the GM mixing for use by MEKE when MEKE_GM_SRC_ALT is true. Specifically the lines
Slope_x_PE(I,j,k) = MIN(Slope,CS%slope_max)
and its counterpart for Slope_y_PE (MOM_thickness_diffuse.F90, lines 928 and 1210) do limit positive slopes, but they do not limit negative slopes. As a result, this breaks rotational consistency, among other problems.Obviously the solution to this bug is to replace this with something like
Slope_x_PE(I,j,k) = MAX(MIN(Slope,CS%slope_max), -1.*CS%slope_max)
, but it could change answers for anyone using this option. To the best of my knowledge, we at GFDL are not currently using MEKE_GM_SRC_ALT in any cases, but because this code came from NCAR originally, it seems like this issue is best handled via dev/NCAR in case someone at NCAR is using it.The text was updated successfully, but these errors were encountered: