-
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
GFDL to main (2024-05-31) #1631
GFDL to main (2024-05-31) #1631
Commits on Nov 22, 2023
-
Use a class to deliver elemental procedures for EOS
- Added a base class in MOM_EOS_base_type.F90 - All EOS modules now extend this base class - This reduces replicated code between the EOS modules - All existing APIs in MOM_EOS now avoid branching for the type of EOS and ultimately pass through to a low-level elemental function implementation of the actual EOS - Added a new elemental function exposed by MOM_EOS (currently not used in the main model) - There is a speed up over the previous form of EOS due to the reduced branching - For some functions, a local implementation of the base class member is needed to gain performance. I deliberately did not implement this optimization for UNESCO or Jackett06 so that the generic implementation of the base class is utilized and we have code coverage.
Configuration menu - View commit details
-
Copy full SHA for d8579d2 - Browse repository at this point
Copy the full SHA d8579d2View commit details -
Add rule and workflow to compare results of micro-timing tests
- Added rules to .testing/Makefile to invoke build.timing, run.timing for the "target" code checked out for regression tests - Appended to existing GH "perfmon" workflow
Configuration menu - View commit details
-
Copy full SHA for 7cc191a - Browse repository at this point
Copy the full SHA 7cc191aView commit details
Commits on Nov 23, 2023
-
Add units to comments in MOM_neutral_diffusion
Added or corrected the units in comments describing about 200 real variables in MOM_hor_bnd_diffusion and MOM_neutral_diffusion, and corrected spelling errors or other issues in about another 20 comments. Only comments are changed and all answers are bitwise identical.
Configuration menu - View commit details
-
Copy full SHA for 34b880f - Browse repository at this point
Copy the full SHA 34b880fView commit details
Commits on Nov 27, 2023
-
Fix unpaired parentheses in a formatting string
Fix unpaired parentheses in the format statement used in an error message about OBC segment data not being on the supergrid. All answers are bitwise identical, but there is one less compile-time warning.
Configuration menu - View commit details
-
Copy full SHA for 11759d6 - Browse repository at this point
Copy the full SHA 11759d6View commit details
Commits on Dec 14, 2023
-
+(*)Add continuity_fluxes & continuity_adjust_vel
Added the new public interfaces continuity_fluxes and continuity_adjust_vel to make use of the continuity code without actually updating the layer thicknesses, and made the existing routines zonal_mass_flux and meridional_mass_flux in the continuity_PPM module public. Continuity_fluxes is overloaded to provide either the layer thickness fluxes or the vertically summed barotropic fluxes. As a part of this change, the LB arguments to meridional_mass_flux and zonal_mass_flux were made optional and moved toward the end of the list of arguments. The intent of the ocean_grid_type argument to 11 routines in the continuity_PPM module was changed from inout to in. Missing factors of por_face_area[UV] were also added to merid_face_thickness and zonal_face_thickness when the visc_rem arguments are not present or where OBCs are in use. This could change answers, but it seems very unlikely that any impacted cases are in use yet. Answers are bitwise identical all known cases, but there are 4 new public interfaces, and some bugs were fixed in cases that are not likely in use yet.
Configuration menu - View commit details
-
Copy full SHA for b898297 - Browse repository at this point
Copy the full SHA b898297View commit details -
+Pass-through from continuity_PPM via continuity
In recognition of the fact that there is only a single continuity scheme that is accessed via the MOM_continuity module, this commit refactors MOM_continuity to use 3 simple pass-through interfaces (continuity, continuity_init and continuity_stencil) to the corresponding routines from MOM_continuity_PPM, while the MOM_continuity control structure is now alias for continuity_PPM_CS and is opaque in the MOM_continuity module. As a part of these changes, the runtime parameter CONTINUITY_SCHEME was obsoleted with a warning value of "PPM". All answers are bitwise identical, and all public interfaces look the same from the outside, but there is one fewer entry in the MOM_parameter_doc.all files.
Configuration menu - View commit details
-
Copy full SHA for fc0bef1 - Browse repository at this point
Copy the full SHA fc0bef1View commit details -
+Create zonal_edge_thickness in MOM_continuity_PPM
Refactored MOM_continuity_PPM to create the separate publicly visible routines zonal_edge_thickness and meridional_edge_thickness, and also renamed the internal routines zonal_face_thickness and merid_face_thickness to zonal_flux_thickness, meridional_flux_thickness and made them publicly visible as well. This commit also renames a number of internal edge thickness variables from h_L and h_R to h_S and h_N or h_W and h_E for greater clarity, since left and right are not so well defined on the grid as north, south, east and west. All answers are bitwise identical, but there are 4 new publicly visible interfaces.
Configuration menu - View commit details
-
Copy full SHA for 6b86ab8 - Browse repository at this point
Copy the full SHA 6b86ab8View commit details -
+Call zonal_edge_thickness outside of zonal_mass_flux
Moved the calls to zonal_edge_thickness and meridional_edge_thickness out of zonal_mass_flux and meridional_mass_flux to facilitate the reuse at some later date of the PPM thickness reconstructions. As a part of this, there are new edge thickness arguments to zonal_mass_flux and meridional_mass_flux. The interfaces to zonal_edge_thickness and meridional_edge_thickness are new publicly visible and are used in MOM_continuity. This commits also changes the name of the loop_bounds_type to cont_loop_bounds_type and makes it public but opaque adds the publicly visible function set_continuity_loop_bounds to enable the continuity loop bounds to be set from outside of the continuity_PPM module. Reflecting these changes there are new calls to zonal_edge_thickness and meridional_edge_thickness in the 3 routines in MOM_continuity and in continuity_PPM, and new arrays for holding the edge thicknesses in these routines. All answers are bitwise identical, but there are new publicly visible interfaces and types and changes to other publicly visible interfaces. However, no changes are required outside of MOM_continuity and MOM_continuity_PPM.
Configuration menu - View commit details
-
Copy full SHA for d3496fe - Browse repository at this point
Copy the full SHA d3496feView commit details -
+Add zonal_BT_mass_flux & meridional_BT_mass_flux
Added the new publicly visible routines zonal_BT_mass_flux and meridional_BT_mass_flux to return the vertically summed transports that the continuity solver would generate. Also revised the routine continuity_2d_fluxes in MOM_continuity to make use of these new routines. Because these new routines are not yet being used, all answers are bitwise identical, but there are new public interfaces.
Configuration menu - View commit details
-
Copy full SHA for bbda30f - Browse repository at this point
Copy the full SHA bbda30fView commit details -
+Add continuity_zonal_convergence
Added the new publicly visible routines continuity_zonal_convergence and continuity_meridional_convergence to increment layer thicknesses using the continuity loop bounds type to specify extents. Also revised continuity_PPM to use these new routines. These changes will allow for the reuse of some of the reconstructions in calls that replace calls to continuity with the unwrapped contents. All answers are bitwise identical, but there are two new public interfaces.
Configuration menu - View commit details
-
Copy full SHA for a70482c - Browse repository at this point
Copy the full SHA a70482cView commit details -
Move continuity_fluxes to MOM_continuity_PPM.F90
Move continuity_fluxes and continuity_adjust_vel from MOM_continuity.F90 to MOM_continuity_PPM.F90, but with these interfaces also offered via the MOM_continuity module so that no changes are required outside of these two files. In addtion, 11 of the recently added public interfaces from MOM_continuity_PPM are also made available as pass-through interfaces from MOM_continuity. All answers are bitwise identical.
Configuration menu - View commit details
-
Copy full SHA for 6b6f8dc - Browse repository at this point
Copy the full SHA 6b6f8dcView commit details -
+Add optional argument du_cor to continuity_PPM
Added the new optional arguments du_cor and dv_cor to continuity_PPM and zonal_mass_flux or meridional_mass_flux to return the barotropic velocity increments that make the summed barotropic transports match uhbt or vhbt. Also cleaned up and simplified the logic of some of the flags used to apply specified open boundary conditions, adding a new 1-d logical array thereby avoiding working unnecessarily on some loops or repeatedly checking for specified open boundary condition points. Two openMP directives were also simplified. All answers are bitwise identical, but there are new optional arguments to three publicly visible routines.
Configuration menu - View commit details
-
Copy full SHA for 7877292 - Browse repository at this point
Copy the full SHA 7877292View commit details
Commits on Dec 15, 2023
-
Makedep: Include support for CPP condition blocks
This patch adds support to makedep for handling most #ifdef-like condition blocks. The following preprocessing commands are handled: * #define / #undef * #ifdef / #else / #endif A new flag is added to provide defined macros (-D), and is chosen to match the `cpp` flag, so that flags can be shared across programs. Macros are tracked in a new internal variable and are used for #ifdef testing. Nested condition blocks are supported by using an internal stack of the exclusion state. Certain cases are still not handled. * #if blocks containing logical expressions are not parsed. * CPP content inside of #include is ignored. No doubt many other cases are still unconsidered, such as exotic macro names. The autoconf builds use this feature by passing the generated $(DEFS) argument to makedep. This is suitable for now, but we may need to consider two cases in the future: * Macros defined in $CPPFLAGS are currently ignored, and perhaps they should be included here. The risk is that it may contain non-macro flags. * At some point, DEFS could be moved to a config.h file, and DEFS would no longer contain these macros. (Note that this is very unlikely at the moment, since this feature only works with C.)
Configuration menu - View commit details
-
Copy full SHA for 7d334f8 - Browse repository at this point
Copy the full SHA 7d334f8View commit details -
+Standardize input salinity units as "ppt"
Standardized the syntax for the units of salinities that are read via get_param calls to be uniformly 'units="ppt"' or similar units for derivatives with salinity. The only exceptions are places where practical salinity is used specifically, which occurs for several arguments in the MOM_EOS code. All answers are bitwise identical, but there are changes to a number of MOM_parameter_doc files.
Configuration menu - View commit details
-
Copy full SHA for 4e8fbe1 - Browse repository at this point
Copy the full SHA 4e8fbe1View commit details
Commits on Dec 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 8395404 - Browse repository at this point
Copy the full SHA 8395404View commit details
Commits on Dec 19, 2023
-
Fix for an OBC issue with mask_tables
- Without this, if part of your OBC is filled with land mask and if that land mask contains a masked out tile, you will generate a NaN from the phase speed calculation where h is negative in the halo neighbor of that masked tile.
Configuration menu - View commit details
-
Copy full SHA for a28443b - Browse repository at this point
Copy the full SHA a28443bView commit details -
+FIX_USTAR_GUSTLESS_BUG is now USTAR_GUSTLESS_BUG
Renamed the runtime parameter FIX_USTAR_GUSTLESS_BUG to USTAR_GUSTLESS_BUG (with a switch between the meanings of true and false for the two parameters) for consistency with the syntax of other bug-fix flags in MOM6 and to partially address dev/gfdl MOM6 issue #237. Input parameter files need not be changed right away because MOM6 will still work if FIX_USTAR_GUSTLESS_BUG is specified instead of USTAR_GUSTLESS_BUG, but USTAR_GUSTLESS_BUG will be logged, so there are changes to the MOM_parameter_doc files. By default or with existing input parameter files, all answers are bitwise identical, and there is error handling if inconsistent settings of FIX_USTAR_GUSTLESS_BUG and USTAR_GUSTLESS_BUG are both specified.
Configuration menu - View commit details
-
Copy full SHA for 5c14668 - Browse repository at this point
Copy the full SHA 5c14668View commit details
Commits on Dec 20, 2023
-
This commit guarantees consistency of the ice sheet code under rotate…
…d/flipped input and grids, and under dimensional rescaling to the +/-140 power. Bitwise identical results were achieved under rotation/rescaling using standard 2D test cases such as MISMIP+. Major changes include the following: - Specified order of operations throughout, and modified the implementation of FEM integration, h-point-to-node operations, etc for consistency under rotation (see MOM_ice_shelf_dynamics.F90 subroutines calc_shelf_driving_stress, CG_action, CG_action_subgrid_basal, matrix_diagonal, shelf_advance_front, and interpolate_h_to_b). - Added an ice-shelf version of 'first_direction' and 'alterate_first_direction', allowing users to control the order in which the x- and y-direction ice-shelf advection calls are made. Required for consistency under rotation. - Dimensional rescaling fixes throughout MOM_ice_shelf_initialize.F90, and within MOM_ice_shelf_dynamics.F90 (see subroutines initialize_ice_shelf_dyn, ice_shelf_solve_outer, and calc_shelf_taub) - Rotation/rescaling testing revealed two additional bugs that were subsequently fixed: (1) An index error in the conjugate gradient algorithm (subroutine CG_action) (2) Discretization error for the east/north fluxes in subroutines ice_shelf_advect_thickness_x and ice_shelf_advect_thickness_y. The commit also includes several simple changes for code readability and computational efficiency: - Saved Phi, PhiC, and Phisub in the ice shelf dynamics control structure at the start of each run, rather than reallocating and recalculating these static fields each time they are used. Reshaped the Phisub array for computational efficiency over loops. - Modified the sub-cell grounding scheme so that it is only called for partially-grounded cells that contain the grounding line (i.e. where float_cond(i,j)==1). Added float_cond to the ice dynamics structure for output. - Simplified the option to calculate ice viscosity at 4 quadrature points per cell rather than at cell centers, by adding parameter NUMBER_OF_ICE_VISCOSITY_QUADRATURE_POINTS and reshaping CS%ice_visc accordingly. - Style changes and removal of unused code (e.g. removed subroutine apply_boundary_values and field thickness_bdry_val)
Configuration menu - View commit details
-
Copy full SHA for 7ddc727 - Browse repository at this point
Copy the full SHA 7ddc727View commit details -
Configuration menu - View commit details
-
Copy full SHA for b0ff6bd - Browse repository at this point
Copy the full SHA b0ff6bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for f7233e0 - Browse repository at this point
Copy the full SHA f7233e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for d7096bd - Browse repository at this point
Copy the full SHA d7096bdView commit details -
Rename u arg to step_MOM_dyn_split_RK2 as u_inst
Renamed the arguments u and v to step_MOM_dyn_split_RK2 as u_inst and v_inst to more clearly differentiate between the instantaneous velocities (u_inst and v_inst) and the velocities with a time-averaged phase in the barotropic mode (u_av and v_av). A comment is also added at one point where the wrong velocities are being used to calculate and apply the Orlanski-style radiation open boundary conditions, with the intention of adding the option to correct this in a subsequent commit. This commit only changes the name of a pair of internal variables in one routine, and all answers are bitwise identical.
Configuration menu - View commit details
-
Copy full SHA for 90de5de - Browse repository at this point
Copy the full SHA 90de5deView commit details
Commits on Dec 21, 2023
-
+FIX_UNSPLIT_DT_VISC_BUG is now UNSPLIT_DT_VISC_BUG
Renamed the runtime parameter FIX_UNSPLIT_DT_VISC_BUG to UNSPLIT_DT_VISC_BUG (with a switch between the meanings of true and false for the two parameters) for consistency with the syntax of other bug-fix flags in MOM6 and to partially address dev/gfdl MOM6 issue #237. Input parameter files need not be changed right away because MOM6 will still work if FIX_UNSPLIT_DT_VISC_BUG is specified instead of UNSPLIT_DT_VISC_BUG, but UNSPLIT_DT_VISC_BUG will be logged, so there are changes to the MOM_parameter_doc files. By default or with existing input parameter files, all answers are bitwise identical, and there is error handling if inconsistent settings of FIX_UNSPLIT_DT_VISC_BUG and UNSPLIT_DT_VISC_BUG are both specified.
Configuration menu - View commit details
-
Copy full SHA for eac3bb3 - Browse repository at this point
Copy the full SHA eac3bb3View commit details
Commits on Dec 22, 2023
-
+Add MOM_dynamics_split_RK2b enabled by SPLIT_RK2B
Add the new module MOM_dynamics_split_RK2b and calls to the routines in this module to MOM.F90. These calls are exercised when the run time parameter SPLIT_RK2B is true. For now, all answers are bitwise identical when this new code is being exercised, but there is a new module with multiple public interfaces and a new entry in many MOM_parameter_doc files.
Configuration menu - View commit details
-
Copy full SHA for 2ea0ac3 - Browse repository at this point
Copy the full SHA 2ea0ac3View commit details -
*+Revise algorithm in step_MOM_dyn_split_RK2b
Revised step_MOM_dyn_split_RK2b to use the time-filtered velocities as arguments and reconstruct the instantaneous velocities with the proper phase from the barotropic solver from the saved increments du_av_inst and dv_av_inst. As a part of this change, the continuity solver is used to find the thickness fluxes used in the predictor step Coriolis terms, and the horizontal viscous accelerations are calculated for both the predictor and corrector steps, thereby avoiding the need to vertically remap any 3-d fields apart from a single pair of velocity components. The run-time option STORE_CORIOLIS_ACCEL is no longer used when SPLIT_RK2B = True. FPMIX was also disabled in this mode due to unresolved dimensional inconsistency errors in that code. Additionally, the time-filtered velocities are now used instead of the instantaneous velocities in the second call to radiation_open_bdry_conds(), which should improve the performance of several of the Orlanski-type open boundary conditions. The 2-d fields du_av_inst and dv_av_inst were added to the restart file, while the 3-d fields u2, v2, diffu and diffv and either CAu and CAv or uh, vh and h2 are all removed from the restart files. Remap_dyn_split_RK2b_aux_vars() now has nothing to do, and it should probably be eliminated altogether in a subsequent commit. All answers are changed when SPLIT_RK2B = True, and there are changes to the contents of the restart files.
Configuration menu - View commit details
-
Copy full SHA for 8b98bd0 - Browse repository at this point
Copy the full SHA 8b98bd0View commit details -
Regroup MOM_dynamics_split_RK2b halo updates
This commit includes further revisions to MOM_dynamics_split_RK2b that avoid some unnecessary calculations and group some of the halo updates into fewer group passes. All answers are bitwise identical.
Configuration menu - View commit details
-
Copy full SHA for 9d57c15 - Browse repository at this point
Copy the full SHA 9d57c15View commit details -
+Correct description of SPLIT_RK2B
Corrected the description of the runtime parameter SPLIT_RK2B that will appear in the MOM_parameter_doc files and in the doxygen descriptions of the MOM module to better reflect what was ultimately being done with this new scheme. All answers are bitwise identical, but there are changes to the (newly added) contents of some MOM_parameter_doc files.
Configuration menu - View commit details
-
Copy full SHA for 5137442 - Browse repository at this point
Copy the full SHA 5137442View commit details
Commits on Jan 9, 2024
-
Added the new functions cuberoot and intrinsic_functions_unit_tests to the MOM_intrinsic_functions module, and call intrinsic_functions_unit_tests from unit_tests to confirm that this new function works as intended. Separately, cuberoot was tested by replacing expressions like A**(1./3.) with cuberoot(A) in MOM_energetic_PBL and verifying that the answers only change at roundoff, but that it can give bitwise identical results when the argument is scaled by an integer power of 8 and then unscaled by the corresponding integer power of 2, but that change will occur in a subsequent commit as it can change answers depending on an ANSWER_DATE flag. With this commit, cuberoot is not yet being used so all answers are bitwise identical, although there are new publicly visible routines.
Configuration menu - View commit details
-
Copy full SHA for a03bb95 - Browse repository at this point
Copy the full SHA a03bb95View commit details
Commits on Jan 18, 2024
-
JOB_DIR in the Gaea-specific .gitlab-ci.yml configuration file is updated to use its F5 filesystem.
Configuration menu - View commit details
-
Copy full SHA for d7d126a - Browse repository at this point
Copy the full SHA d7d126aView commit details
Commits on Jan 26, 2024
-
*Use Halley method iterations in cuberoot function
Modified the cuberoot function to do 3 iterations with Halley's method starting with a first guess that balances the errors at the two ends of the range of the iterations, before a final iteration with Newton's method that polishes the root and gives a solution that is accurate to machine precision. Following on performance testing of the previous version, all convergence testing has been removed and the same number of iterations are applied regardless of the input value. This changes answers at roundoff for code that uses the cuberoot function, so ideally this PR would be dealt with before the cuberoot becomes widely used.
Configuration menu - View commit details
-
Copy full SHA for 4813b17 - Browse repository at this point
Copy the full SHA 4813b17View commit details -
Cuberoot: Apply first iteration explicitly (#11)
Applying the first iteration explicitly appears to speed up the cuberoot function by a bit over 20%: Before: Halley Final: 0.14174999999999999 After: Halley Final: 0.11080000000000001 There is an assumption that compilers will precompute the constants like `0.7 * (0.7)**3`, and that all will do so in the same manner.
Configuration menu - View commit details
-
Copy full SHA for 17f1c40 - Browse repository at this point
Copy the full SHA 17f1c40View commit details
Commits on Jan 29, 2024
-
Data table documentation (#551)
* Update forcing.rst * add more detail to forcing.rst removing ambiguity about yaml format.
Configuration menu - View commit details
-
Copy full SHA for 435ccaa - Browse repository at this point
Copy the full SHA 435ccaaView commit details
Commits on Jan 31, 2024
-
Params: Add do_not_log to param block open/close
This patch adds `do_not_log` to `openParameterBlock`, to prevent logging of `BLOCK%` `%BLOCK` entry and exit calls. The argument was not added to `closeParameterBlock`, since this state can be tracked inside the `block` with a new `log_access` field in `parameter_block`. This flag does not extend to parameters within the block, since (as far as I know) there is no way for a `get_param` to know if it is within a block or not. Even if it could know this, there would need to be some careful handling of nested blocks. The potential block/parameter inconsistency should be supported at some point, but for now it is the user's responsibility to consistently apply `do_not_log` to blocks and its contents.
Configuration menu - View commit details
-
Copy full SHA for f1e0f01 - Browse repository at this point
Copy the full SHA f1e0f01View commit details -
Open parameter block before querying BODNER23
Fix the error caused by readinging `MLE%BODNER23`, and instead explicitly opening and closing the parameter blocks.
Configuration menu - View commit details
-
Copy full SHA for 5ca70ba - Browse repository at this point
Copy the full SHA 5ca70baView commit details
Commits on Feb 1, 2024
-
(*)Oil_tracer_column_physics unit conversion fix
Added a missing unit conversion factor to a hard-coded 10 m distance in oil_tracer_column_physics. This will not change answers in Boussinesq cases without any dimensional rescaling, but it will correct answers in a hypothetical non-Boussinesq case. Also made some white space in expressions near this fix more closely match the MOM6 style guide. No answers are affected in any known existing regression test cases or other runs.
Configuration menu - View commit details
-
Copy full SHA for 541c2f4 - Browse repository at this point
Copy the full SHA 541c2f4View commit details
Commits on Feb 2, 2024
-
(*)Avoid using RHO_0 in non-Boussinesq averaging
Use GV%H_to_MKS instead of GV%H_to_m when undoing the dimensional rescaling of thicknesses when taking weighted averages in horizontally_average_diag_field, global_layer_mean and global_volume_mean. In Boussinesq mode, these are identical, but in non-Boussinesq mode using GV%H_to_m introduced a multiplication and then division by the Boussinesq reference density, whereas GV%H_to_MKS avoids this by rescaling to a volume or mass-based coordinate depending on the mode. Several comments were also updated to reflect these conditional changes in the units of some internal variables. All expressions are mathematically equivalent, and this does not impact any solutions, but there can be changes in the last bits in some non-Boussinesq averaged diagnostics.
Configuration menu - View commit details
-
Copy full SHA for 76f0668 - Browse repository at this point
Copy the full SHA 76f0668View commit details -
Intrinsics: Faster cuberoot scaling functions
This patch replaces the intrinsic-based exponent rescaling with explicit bit manipulation of the floating point number. This appears to produce a ~2.5x speedup of the solver, reducing its time from embarassingly slow to disappointingly slow. It is slightly faster than the GNU cbrt function, but still about 3x slower than the Intel SVML cbrt function. Timings (s) (16M array, -O3 -mavx -mfma) | Solver | -O2 | -O3 | |---------------------|-------|-------| | GNU x**1/3 | 0.225 | 0.198 | | GNU cuberoot before | 0.418 | 0.412 | | GNU cuberoot after | 0.208 | 0.187 | | Intel x**1/3 | 0.068 | 0.067 | | Intel before | 0.514 | 0.507 | | Intel after | 0.213 | 0.189 | At least one issue here is that Intel SVML is using fast vectorized logic operators whereas the Fortran intrinsics are replaced with slower legacy scalar versions. Not sure there is much we could even do about that without complaining to vendors. Also, I'm sure there's magic in their solvers which we are not capturing. Regardless, I think this is a major improvement. I do not believe it will change answers, but probably a good idea to verify this and get it in before committing any solutions using cuberoot().
Configuration menu - View commit details
-
Copy full SHA for 60cb551 - Browse repository at this point
Copy the full SHA 60cb551View commit details -
Cuberoot: Refactor (re|de)scale functions
Some modifications were made to the cuberoot rescale and descale functions: * The machine parameters were moved from function to module parameters. This could dangerously expose them to other functions, but it prevents multiple definitions of the same numbers. * The exponent is now cube-rooted in rescale rather than descale. * The exponent expressions are broken into more explicit steps, rather than combining multiple steps and assumptions into a single expression. * The bias is no longer assumed to be a multiple of three. This is true for double precision but not single precision. A new test of quasi-random number was also added to the cuberoot test suite. These numbers were able to detect the differences in GNU and Intel compiler output. A potential error in the return value of the test was also fixed. The volatile test of 1 - 0.5*ULP has been added. The cube root of this value rounds to 1, and needs to be handled carefully. The unit test function `cuberoot(v**3)` was reversed to `cuberoot(v)**`, to include testing of this value. (Cubing would wipe out the anomaly.)
Configuration menu - View commit details
-
Copy full SHA for 5edba9b - Browse repository at this point
Copy the full SHA 5edba9bView commit details -
Cuberoot: Break **3 into explicit integer cubes
In separate testing, we observed that Intel would use the `pow()` function to evaluate the cubes of some numbers, causing different answers with GNU. In this patch, I replace the cubic x**3 operations with explicit x*x*x multiplication, which appears to avoid this substitution. Well, for the moment, at least.
Configuration menu - View commit details
-
Copy full SHA for 736ef16 - Browse repository at this point
Copy the full SHA 736ef16View commit details
Commits on Feb 5, 2024
-
(*)Use cuberoot in ePBL_column
Use the new cuberoot() function in place of **(1./3.) to calculate the turbulent velocity vstar in ePBL_column when EPBL_ANSWER_DATE is 20240101 or higher. This is mathematically equivalent to the previous version, but it does change and answers at roundoff and it allows several dimensional scaling factors that had previously been required to be eliminated. All answers are mathematically equivalant, but answers do change if EPBL_ANSWER_DATE is 20240101 or higher and the description of EPBL_ANSWER_DATE changes in some MOM_parameter_doc files.
Configuration menu - View commit details
-
Copy full SHA for 671c85d - Browse repository at this point
Copy the full SHA 671c85dView commit details
Commits on Feb 7, 2024
-
*Fix two bugs in convert_temp_salt_for_TEOS10
Fixed two bugs on a single line of convert_temp_salt_for_TEOS10. The first bug was a reversal in the order of the temperature and salinity arguments to poTemp_to_consTemp, resulting in temperatures that closely approximate the salinities. The second bug that was fixed on this line was temperatures being rescaled with a factor that is appropriate for salinities. This bug-fix will change answers dramatically for any cases that use the ROQUET_RHO, ROQUET_SPV and TEOS10 equations of state and initialize the model with INIT_LAYERS_FROM_Z_FILE = True.
Configuration menu - View commit details
-
Copy full SHA for 07bace6 - Browse repository at this point
Copy the full SHA 07bace6View commit details -
+ALE_remap_scalar with arbitrary thickness units
This commit add the new optional arguments h_neglect and h_neglect_edge to ALE_remap_scalar to allow for the thicknesses used in this routine to be provided in any self-consistent units, including [Z ~> m], instead of just [H ~> m or kg m-2]. To help make use of this new capability, this commit also adds the new functions set_h_neglect and set_dz_neglect to the MOM_regridding module. build_grid_rho and build_grid_HyCOM1 have been refactored to use set_h_neglect in place of the corresponding duplicated code blocks. This commit also adds the new optional argument h_in_Z_units to MOM_initialize_tracer_from_Z, which in turn uses this new capability for ALE_remap_scalar to use vertical layer extents (in Z units) rather than thicknesses (in H units). Although there are new optional arguments to public interfaces, they are not yet being exercised with this commit so no answers are changed. Moreover, even if they were being exercised, all Boussinesq solutions would give identical answers.
Configuration menu - View commit details
-
Copy full SHA for 915cfe2 - Browse repository at this point
Copy the full SHA 915cfe2View commit details -
(*)MOM_temp_salt_init_from_Z Z-unit tracer remap
Revise MOM_temp_salt_initialize_from_Z in cases when Z_INIT_REMAP_GENERAL is False to call ALE_remap_scalar with vertical layer extents (in Z units) rather than layer thicknesses (in H units). When in fully non-Boussinesq mode, this same routine uses dz_to_thickness (using the full equation of state) rather than dz_to_thickness_simple to initialize the layer thicknesses. Boussinesq answers are bitwise identical, but answers can change in some fully non-Boussinesq cases.
Configuration menu - View commit details
-
Copy full SHA for e7a7a82 - Browse repository at this point
Copy the full SHA e7a7a82View commit details -
*+non-Boussinesq revisions to MOM_generic_tracer
Revised initialize_MOM_generic_tracer to use thickness_to_dz to get the layer vertical extents and then provide these to MOM_initialize_tracer_from_Z to read in initial generic tracer concentrations from Z-space files. The previous approach inappropriately used an simple multiplicative rescaling (via a call to dz_to_thickness_simple in MOM_initialize_tracer_from_Z) by a factor that includes the Boussinesq reference density when in non-Boussinesq mode. A new thermo_vars_type arguments was added to initialize_MOM_generic_tracer to allow for this change. Also revised MOM_generic_tracer_column_physics to use thickness_to_dz instead of a simple multiplicative rescaling to get the layer vertical extents (in m) that are used in calls to generic_tracer_source. The multiplicative factor that was used previously (GV%H_to_m) includes the Boussinesq reference density and hence is inappropriate in non-Boussinesq mode; using thickness_to_dz avoids this. Also added comments documenting the meaning and units of about 30 real variables in the MOM_generic_tracer routines. There is a new mandatory argument to initialize_MOM_generic_tracer. All Boussinseq mode answers are bitwise identical, but in non-Boussinesq mode mode generic tracer answers are changed by avoiding the use of the Boussinesq reference density in several places.
Configuration menu - View commit details
-
Copy full SHA for 9a6ddee - Browse repository at this point
Copy the full SHA 9a6ddeeView commit details
Commits on Feb 8, 2024
-
Fix issue with restart filenames when using ensembles.
Moved call for filename_appendix outside of loop. Fixes issue where restart filename was ./MOM.res.ens_01.nc ./MOM.res.ens_01.ens_01_1.nc ./MOM.res.ens_01.ens_01.ens_01_2.nc ./MOM.res.ens_01.ens_01.ens_01.ens_01_3.nc instead of ./MOM.res.ens_01.nc ./MOM.res.ens_01_1.nc ./MOM.res.ens_01_2.nc ./MOM.res.ens_01_3.nc
Configuration menu - View commit details
-
Copy full SHA for ea12532 - Browse repository at this point
Copy the full SHA ea12532View commit details -
+(*)Bodner param with cuberoot and non-Boussinesq
Use the new cuberoot function in the Bodner estimate of u'w' when the new runtime parameter ML_RESTRAT_ANSWER_DATE is 20240201 or higher, which avoids the need to undo and redo the dimensional scaling in this calculation. In addition, the refactoring associated with this change explicitly revealed that as it was implemented it introduced an undesirable dependency on the value of the Boussinesq reference density, RHO_0, when in non-Boussinesq mode. To avoid this, a new version of the Bodner u'w' calculation was introduced in fully non-Boussinesq mode, which does change answers with this combination; because there is not yet a known case that used this combination, we have chosen not to add a runtime parameter to preserve the old answers when the Bodner parameterization is used in fully-Boussinesq mode. This change will modify the contents of some MOM_parameter_doc files with USE_BODNER=True, and it changes answers in cases that are also fully non-Boussinesq. The new runtime parameter ML_RESTRAT_ANSWER_DATE might need to be set below 20240201 to retain some existing Boussinesq answers.
Configuration menu - View commit details
-
Copy full SHA for 9282cd1 - Browse repository at this point
Copy the full SHA 9282cd1View commit details -
Remove some unused calculations if non-Boussinesq
Eliminated some unused calculations in wave_speed and thickness_diffuse_full that would use the Boussinesq reference density when in non-Boussinesq mode, either by adding logical flags around the calculations so that they only occur in Boussinesq mode. All answers are bitwise identical.
Configuration menu - View commit details
-
Copy full SHA for 4757bcb - Browse repository at this point
Copy the full SHA 4757bcbView commit details
Commits on Feb 9, 2024
-
Document MOM_regridding and coord variable units
Added or amended comments describing about 90 variables in the MOM_regridding, coord_adapt, coord_rho, and coord_sigma modules to document the purpose and units of real variables using the MOM6 standard syntax. A missing doxygen comment was also added to describe inflate_vanished_layers_old(). A few unused internal variables were also eliminated, including the max_depth_index_scale element of the regridding_CS type. All answers are bitwise identical and only comments are changed.
Configuration menu - View commit details
-
Copy full SHA for de7e5b7 - Browse repository at this point
Copy the full SHA de7e5b7View commit details
Commits on Feb 13, 2024
-
Document core and linear EOS variable units
Modified comments to document the units of 17 variables in 5 files in the core directory and another 5 variables in MOM_EOS_linear.F90. Only comments are changed and all answers are bitwise identical.
Configuration menu - View commit details
-
Copy full SHA for c37a2f0 - Browse repository at this point
Copy the full SHA c37a2f0View commit details
Commits on Feb 14, 2024
-
+(*)non-Boussinesq ALE_sponges work in Z units
Revised the ALE_sponge code to convert the model's thicknesses (in thickness units of [H ~> m or kg m-2]) into layer vertical extents (in height units of [Z ~> m]) to match how the input datasets vertical grids are specified and to avoid using the Boussinesq reference density to do the opposite conversion when in non-Boussinesq mode. The internal conversion in apply_ALE_sponge between layer thicknesses and layer vertical extents matches those in thickness_to_dz, and uses the layer-averaged specific volumes when in non-Boussinesq mode. As a part of these changes, 12 internal variables in MOM_ALE_sponge were renamed (e.g., from data_h to data_dz) to more clearly reflect that they are the layer vertical extents instead of thicknesses, and there are new 3-d variables dz_model, that is created from h when the sponges are applied to the velocities, and data_dz to handle the conversion of the input thicknesses or vertical extents in initialize_ALE_sponge_fixed. This commit includes adding a new thermo_var_type argument to apply_ALE_sponge, a new unit_scale_type argument to rotate_ALE_sponge and initialize_ALE_sponge_varying and the new optional argument data_h_is_Z to initialize_ALE_sponge_fixed to indicate that the in thicknesses arguments are vertical distances (in [Z ~> m]) and do not need to be rescaled inside of the ALE_sponge code, and similarly for the new optional argument data_h_in_Z to get_ALE_sponge_thicknesses. This commit also adds halo size and Omit_Corners arguments to the pass_var calls in the ALE_sponge code. There are new optional arguments to 2 publicly visible routines, and new mandatory arguments to 3 others, but by default the meaning and units of all previous arguments are the same, and answers will be bitwise identical in any Boussinesq cases. However, answers will change in any non-Boussinesq cases that use the ALE_sponges.
Configuration menu - View commit details
-
Copy full SHA for 0fb905f - Browse repository at this point
Copy the full SHA 0fb905fView commit details
Commits on Feb 15, 2024
-
(*)Use thickness_to_dz with BRYAN_LEWIS_DIFFUSIVITY
Use thickness_to_dz to convert the layer thicknesses into the geometric depths used to set the Bryan-Lewis background diffusivities instead of multiplication by GV%H_to_m, thereby avoiding division by the Boussinesq reference density in non-Boussinesq mode. No answers are changed in any Boussinsesq configurations, but answers will change in non-Boussinesq configurations that have BRYAN_LEWIS_DIFFUSIVITY = True.
Configuration menu - View commit details
-
Copy full SHA for f14a681 - Browse repository at this point
Copy the full SHA f14a681View commit details
Commits on Feb 21, 2024
-
+tracer_Z_init can rescale tracers
Added the new optional scale argument to tracer_Z_init to allow the units of the tracers that it initializes from a z-space file to be rescaled, similarly to what is already done in tracer_z_init_array. This also required the addition of the new missing_scale argument to the private routine read_Z_edges to specify how the missing values are rescaled. Comments were also added or modified describing 28 real variables or their units in this module. By default all answers are bitwise identical, but when this new option is exercised, answers could change at roundoff for some non-Boussinesq cases.
Configuration menu - View commit details
-
Copy full SHA for 3f7465a - Browse repository at this point
Copy the full SHA 3f7465aView commit details
Commits on Feb 25, 2024
-
Update MOM_mixed_layer_restrat.F90 (#568)
* Update MOM_mixed_layer_restrat.F90 Adding and calculating diagnostic front length scale (lf_bodner) to mixed layer restratification code Co-authored-by: Kate Hedstrom <kshedstrom@alaska.edu> Co-authored-by: Marshall Ward <marshall.ward@noaa.gov> * Bodner diag: Fix ustar and dims Fix two issues which emerged from the Bodner length scale diagnostic after the cuberoot ANSWER_DATE was introduced. The split of the loop due to the cuberoot caused ustar to be assigned in a separate loop, leaving it uninitialized for the length scale diagnostics loop. It also had its dimensions removed. However, the whole point of the new cuberoot() function was to preserve its dimensions, so there was no need for the intermediate dimensional manipulation, and all dimensionality should be shifted to the registration. This patch removes the intermediate dimensions and also explicitly defines it as Z2/H rather than L. * Bodner diagnostic: Restore scaling to L The scaling of the Bodner lengthscale diagnostic is correctly restored to L in this patch. The Z2 H-1 constant is factored into the calculation of the lengthscale; I believe this represents a conversion from a [Z2 T-2]-like momentum flux to a [LH T-2]-like momentum flux. A generic `uflux_rescale` term was introduced to be used in both ld_bodner and wpup, to avoid a double division by SpV. The if-block for computation of ld_bodner was also moved outside of the loop, in order to facilitate vectorization. --------- Co-authored-by: Liz Drenkard <liz.drenkard@noaa.gov> Co-authored-by: Kate Hedstrom <kshedstrom@alaska.edu>
Configuration menu - View commit details
-
Copy full SHA for f92e4ac - Browse repository at this point
Copy the full SHA f92e4acView commit details
Commits on Feb 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e69d771 - Browse repository at this point
Copy the full SHA e69d771View commit details -
MLE: Use default answer date outside of block (#570)
Inside the `MLE%` ... `%MLE` parameter block, the default answer date was being read while inside the block. Since the namespaces inside blocks are not shared or inherited, this was creating a new parameter, `MLE%DEFAULT_ANSWER_DATE`, whose value differed from the global `DEFAULT_ANSWER_DATE`. This was causing unintuitive behavior of `MLE%ML_RESTRAT_ANSWER_DATE`, which ignored this global answer date. This patch reads `DEFAULT_ANSWER_DATE` outside of the block, so that `ML_RESTRAT_ANSWER_DATE` now defaults to the global value.
Configuration menu - View commit details
-
Copy full SHA for f2e7abf - Browse repository at this point
Copy the full SHA f2e7abfView commit details -
(*)Fix bug in h_neglect used to remap diags to rho
Added explicit names to the h_neglect and h_neglect_edge arguments in a call to build_rho_column in diag_remap_update. These were problematic because these arguments were previously in the wrong positions and hence were being used for the wrong variables inside of build_rho_column. In Boussinesq mode, the results will be the same as long as there is no dimensional rescaling being applied to thicknesses, and it this were being tested it would have resulted in a dimensional consistency test failure. In non-Boussinesq mode, the values of H_subroundoff as used for this coordinate will be off by a factor of RHO_KV_CONVERT (usually 1035), but these thicknesses are so small that they do not matter unless ANGSTROM is explicitly set to zero (when no dimensional rescaling is being used). To summarize, this fixes a bug that has been around since 2017, and while this fix could slightly change some diagnostics that are remapped to density, it only does so in circumstances that are unlikely to have been realized. No answer changes were detected in the MOM6-examples regression suite, and almost certainly none ever would be in any existing use of MOM6.
Configuration menu - View commit details
-
Copy full SHA for 86c5ed9 - Browse repository at this point
Copy the full SHA 86c5ed9View commit details
Commits on Feb 29, 2024
-
(*)non-Boussinesq Z unit update_OBC_segment_data
Revised the update_OBC_segment_data code to keep the z-space input data in height units ([Z ~> m]) rather than rescaling them to thickness units. This change means that the non-Boussinesq open boundary condition calculations avoid using the Boussinesq reference density. Associated with this change, 5 internal variables in update_OBC_segment_data were renamed to reflect that they are layer vertical extents instead of thicknesses. Also added or amended comments describing the purpose and units of 25 real variables in this module and corrected a handful of lines in this module that were not adhering to the guidance in the MOM6 style guide. Answers are bitwise identical in any Boussinesq cases. However, answers will change in any non-Boussinesq cases that use open boundary conditions that use time_interp_extrnal to read in Z-space data.
Configuration menu - View commit details
-
Copy full SHA for 8f7df08 - Browse repository at this point
Copy the full SHA 8f7df08View commit details -
*Corrected CFC diagnostics and non-Bous CFC fluxes
Removed the duplicative multiplication by the Boussinesq density and related unit conversion factors in the calculation of the diagnosed mole concentration of the "cfc11" and "cfc12" diagnostics. This unit rescaling is duplicative of the conversion factors in the register_diag_field calls for these diagnostics (at about line 263). This will change these two diagnostics by a factor of RHO_0. This bug arose from separate and independent changes coming from GFDL and NCAR to add the same missing rescaling factor, and it might have gone undetected because of the vast range of valid values for CFC concentrations or because all of our regression testing uses calendar dates that precede the invention and first release of CFCs in the 1930s. Although this commit will correct the code that is on the dev/gfdl branch, care will have to be taken when merging in modified versions of this file from other branches that might have also corrected this bug to avoid reintroducing it (perhaps in reverse). Also replaced the expression for the CFC flux rescaling factor for use with KPP_NonLocalTransport with GV%RZ_to_H, which is equivalent to the previous expression in Boussinesq mode but avoids a multiplication and division by the Boussinesq reference density in non-Boussinesq mode. All Boussinesq answers are identical, but some non-Boussinesq CFCs could be altered in the last bits. This PR will change diagnostics of CFC concentrations by about 3 orders of magnitude. The internal representation of the CFCs is bitwise identical in all Boussinesq cases, but they may change at roundoff in non-Boussinesq cases that use KPP.
Configuration menu - View commit details
-
Copy full SHA for d0e9c25 - Browse repository at this point
Copy the full SHA d0e9c25View commit details
Commits on Mar 2, 2024
-
Pinning package requirements for readthedocs
Minor version updates to multiple packages used in the generation of the documentation introduce dependencies needing Sphinx >= 5.0, which breaks the sphinx extensions we use in documenting the MOM6 APIs. I have added versions for all the packages needed to keep things working with Sphinx4 for now, but we really do need to find a way to work with the newer versions. More pinningaof of requirements for readthedocs More pinning of requirements for readthedocs
Configuration menu - View commit details
-
Copy full SHA for fd5696b - Browse repository at this point
Copy the full SHA fd5696bView commit details
Commits on Mar 5, 2024
-
Create BUILD and WORK directory macros
This patch introduces two new macros, BUILD and WORK, to permit relocation of the build/ and work/ directories. It also makes the following smaller changes: * deps/ is now defined by the DEPS macro. If unset, deps/ is placed in the BUILD directory. * results/ is moved into WORK. * Compiler flags which track directories now use $(abspath ...) to allow for arbitrary paths. * GitHub CI paths were adjusted to support these new settings. * DO_* flags are now used as on/off with ifdef testing, rather than checking for `true` values. * mkmf macros have been removed from the coupled test config. * The default FMS infra has been changed to FMS2 in all components, including the configure.ac outside of .testing. This work will enable testing of multiple FMS libraries in our CI.
Configuration menu - View commit details
-
Copy full SHA for f9da673 - Browse repository at this point
Copy the full SHA f9da673View commit details
Commits on Mar 6, 2024
-
Refactor set_viscous_BBL channel drag calculations
Refactored set_viscous_BBL to separate out the routines setting the open interface lengths used for the channel drag, shortening a 1070 line long routine to 915 lines and reducing the scope of a number of temporary variables. A number of logical branch points have been moved outside of the innermost do loops. This refactoring will also make it easier to provide alternatives to some of the solvers that do not use the trigonometric functions to solve for the roots of a cubic expression and avoiding the issues noted at /issues/483. All answers are bitwise identical and public interfaces are unchanged.
Configuration menu - View commit details
-
Copy full SHA for 2ae6385 - Browse repository at this point
Copy the full SHA 2ae6385View commit details -
+Add find_L_open_concave_iterative
Added the new routine find_L_open_concave_iterative to use iterative Newton's method approaches with appropriate limits to solve the cubic equation for the fractional open face lengths at interfaces that are used by the CHANNEL_DRAG code. These solutions are analogous to those given by the previous expressions that are now in find_L_open_concave_trigonometric, and the two differ at close to roundoff, but the new method is completely independent of the transcendental function library, thereby addressing dev/gfdl MOM6 issue #483. This new routine is called when the new runtime parameter TRIG_CHANNEL_DRAG_WIDTHS is set to false, but by default the previous answers are recovered. By default all answers are bitwise identical, but there is a new runtime parameter in some MOM_parameter_doc files.
Configuration menu - View commit details
-
Copy full SHA for da02ffc - Browse repository at this point
Copy the full SHA da02ffcView commit details -
Add the debugging routine test_L_open_concave
Added the new debugging or testing subroutine test_L_open_concave along with extra calls when DEBUG = True that can be used to demonstrate that the iterative solver in find_L_open_concave_iterative is substantially more accurate but mathematically equivalent to the solver in find_L_open_concave_trigonometric. This extra code is only called in debugging mode, and it probably should be deleted in a separate commit after find_L_open_concave_iterative has been accepted onto the dev/gfdl branch of MOM6. All answers are bitwise identical and no output or input is changed.
Configuration menu - View commit details
-
Copy full SHA for e1ea758 - Browse repository at this point
Copy the full SHA e1ea758View commit details -
Minor refactoring in set_viscous_BBL
Carried out minor refactoring in set_viscous_BBL as suggested by the reviews of this PR, including the elimination of some unnecessary error handling and the replacement of C2pi_3 as an argument to find_L_open_concave_trigonometric with an internal parameter. All answers are bitwise identical and there are no changes to publicly visible interfaces.
Configuration menu - View commit details
-
Copy full SHA for 714d2da - Browse repository at this point
Copy the full SHA 714d2daView commit details
Commits on Mar 9, 2024
-
Compute dz in the halo for OBC segments
It was blowing up with "forrtl: error (65): floating invalid" when accessing dz in the halo at the boundary, but just sometimes. My default layout is trouble while my testing layout of 48 cores is not.
Configuration menu - View commit details
-
Copy full SHA for 6153d97 - Browse repository at this point
Copy the full SHA 6153d97View commit details -
+Fix myStats global indexing segmentation faults
Revised the interfaces to the myStats routine in the horizontal_regridding module to avoid segmentation faults due to inconsistent horizontal indices and array extents in global indexing mode. Rather than passing in absolute array extents to work on, an ocean grid type is now passed as an argument to myStats, with the new optional full_halo argument used to capture the case where the tracer statistics are being taken over the full data domain. The most frequently encountered problems occurred when the hard-coded debug variable in the horiz_interp_and_extrap_tracer routines are changed from false to true. When global indexing is not used, this revised work exactly as before, but when it is used with global indexing, it avoids segmentation faults that were preventing the model from running in some cases with all debugging enabled.
Configuration menu - View commit details
-
Copy full SHA for 0ff03ae - Browse repository at this point
Copy the full SHA 0ff03aeView commit details
Commits on Mar 11, 2024
-
(*)Fix apply_topography_edits_from_file indexing
Corrected bugs in the horizontal indexing in apply_topography_edits_from_file that led to differing answers depending on the value of GLOBAL_INDEXING. This change gives identical results when GLOBAL_INDEXING is used, as can be seen by noting that G%idg_offset = G%isd_global + G%isd and that without global indexing G%isd = 1, but with global indexing the new expressions give the same answers as without them. Because global indexing is not typically used, answers are not changed for any cases in the MOM6-examples test suite.
Configuration menu - View commit details
-
Copy full SHA for 0bd4c16 - Browse repository at this point
Copy the full SHA 0bd4c16View commit details
Commits on Mar 12, 2024
-
Earlier initialization thickness halo updates
Moved the post-initialization halo updates for thicknesses and temperatures and salinities in initialize_MOM to occur immediately after the last point where they are modified and before the remapped diagnostic grids are set up. This does not change any existing answers but it will enable the future use of the thermo_var_ptr type in calls to thickness_to_dz when setting up remapped diagnostics, and perhaps elsewhere in the initialization of other auxiliary variables. All answers are bitwise identical.
Configuration menu - View commit details
-
Copy full SHA for 9e78615 - Browse repository at this point
Copy the full SHA 9e78615View commit details -
+(*)Refactor MOM_diag_remap for global indices
Refactored MOM_diag_remap to work with global indices and to move logical branches outside of do loops. This was done by adding internal routines that set the loop indices consistently with the NE c-grid convention used throughout the MOM6 code and converting the optionally associated mask pointer into an optional argument. It also simplifies the logic of many of the expressions within the remapping code. There is also a new element, Z_based_coord, in the diag_remap_ctrl type, to indicate whether the remapping is working in thickness or height units, but for now it is always set to false. The function set_h_neglect or set_dz_neglect is used to set the negligible thicknesses used for remapping in diag_remap_update and diag_remap_do_remap, depending on whether the remapping is being done in thickness or vertical height coordinates. Diag_remap_init has a new vertical_grid_type argument, and diag_remap_do_remap has a new unit_scale_type argument. For REMAPPING_ANSWER_DATES later than 20240201, diag_remap_updated does an explicit sum to determine the total water column thickness, rather than using sum function, which is indeterminate of the order of the sums. For some compilers, this could change the vertical grids used for remapping diagnostics at roundoff, but no such change was detected for any of the compilers used with the MOM6 regression test suite. All answers and diagnostics in cases that worked before are bitwise identical, but there are new arguments to two publicly visible interfaces.
Configuration menu - View commit details
-
Copy full SHA for 1ae2a3a - Browse repository at this point
Copy the full SHA 1ae2a3aView commit details -
+(*)Use z-space remapping for some diagnostics
Do remapping in Z-space for some remapped diagnostics, depending on which coordinate is used. The subroutine thickness_to_dz is used with the thermo_vars_type to do the rescaling properly in non-Boussinesq mode. A new thermo_var_ptrs argument was added to diag_mediator_init, replacing three other arguments that had the same information, and its call from MOM.F90 was modified accordingly. The various calls to the diag_remap routines from post_data_3d and diag_update_remap_grids were modified depending on whether a z-unit or h-unit vertical grid is being remapped to. All answers and diagnostics are identical in Boussinesq mode, but some remapped diagnostics are changed (by not using expressions that depend on the Boussinesq reference density) in the non-Boussinesq mode. There are altered or augmented public arguments to two publicly visible routines.
Configuration menu - View commit details
-
Copy full SHA for d311b1d - Browse repository at this point
Copy the full SHA d311b1dView commit details -
+(*)Fix downsample_mask indexing bugs
Corrected indexing problems in downsample_mask that would cause masked reduced-resolution diagnostics to work improperly when the model is in symmetric memory mode or when global indexing is used. This involves passing the starting index in memory of the native-grid field being downsampled in all calls to downsample_mask. In global-indexing mode, this change avoids a series of segmentation faults that stopped the model runs when compiled for debugging. All solutions are bitwise identical in all cases but some down-scaled diagnostics will change in some memory modes, hopefully becoming consistent across all memory modes (although this has yet to be tested in all modes).
Configuration menu - View commit details
-
Copy full SHA for 611f575 - Browse repository at this point
Copy the full SHA 611f575View commit details
Commits on Mar 13, 2024
-
(*)Eliminate IIm1 and JJm1 in Update_Stokes_Drift
Replaced the IIm1 and JJm1 variables in Update_Stokes_Drift with 'I-1' and 'J-1' in Update_Stokes_Drift. The previous expressions could give incorrect solutions at the southern and western edges of the global domain with global indexing and serve no purpose when global indexing is not used. In addition, the i-, j- and k- index variables in Update_Surface_Waves, Update_Stokes_Drift, get_Langmuir_Number and Get_SL_Average_Prof were changed from ii to i, jj to j, and kk to k to follow the patterns used elsewhere in the MOM_wave_interface module and throughout the rest of the MOM6 code. All answers are bitwise identical in cases that do not use global indexing.
Configuration menu - View commit details
-
Copy full SHA for 2bc04bd - Browse repository at this point
Copy the full SHA 2bc04bdView commit details
Commits on Mar 14, 2024
-
Document remapping function variable units
Added or amended comments to document the mostly arbitrary units of about 360 variables in 13 low-level remapping modules. Only comments are changed and all answers are bitwise identical.
Configuration menu - View commit details
-
Copy full SHA for 744dbcc - Browse repository at this point
Copy the full SHA 744dbccView commit details
Commits on Mar 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a23c7d8 - Browse repository at this point
Copy the full SHA a23c7d8View commit details
Commits on Mar 16, 2024
-
This patch contains several bugfixes associated with the rotational grid testing. The following checksums are declared as scalar pairs, rather than vectors: * eta_[uv] (in porous barrier) * por_face_area[UV] * por_layer_width[UV] * Ray_[uv] (Rayleigh drag velocity) Fluxes and surface fields are now permitted to contain tracer fluxes (tr_fluxes) when rotation is enabled. The fields are retained in their unrotated form, since these are accessed and handled outside of MOM6. The rotated p_surf_SSH pointer in forces now correctly points to either p_surf or p_surf_full. read_netcdf_nc() now correctly uses the unrotated horizontal index struct HI, used to access the contents of the file. Previously, it was using the model HI, which may be rotated. Reading chlorophyll with time_interp_external now uses rotation to correctly fetch its output. NOTE: This could be cleaned up so that the rotation details are hidden from users, but there are some unresolved issues around how to approach this.
Configuration menu - View commit details
-
Copy full SHA for 4fd0162 - Browse repository at this point
Copy the full SHA 4fd0162View commit details
Commits on Mar 21, 2024
-
+Rotationally symmetric neutral diffusion option
Added the option to do neutral tracer diffusion with expressions that satisfy rotational symmetry. This option is enabled by setting the new runtime parameter NDIFF_ANSWER_DATE to be greater than 20240330. By default, this parameter is set to use the previous expressions, although the default may be changed later to follow DEFAULT_ANSWER_DATE. By default all answers are bitwise identical, but there are changes to some MOM_parameter_doc files due to the introduction of a new runtime parameter.
Configuration menu - View commit details
-
Copy full SHA for 32f6316 - Browse repository at this point
Copy the full SHA 32f6316View commit details
Commits on Mar 26, 2024
-
Add an option in hor_visc to use cont thickness
Runtime parameter USE_CONT_THICKNESS is added in hor_visc to let it use velocity-point thickness consistent with the continuity solver. Thicknesses are borrowed from BT_cont so only split mode is supported.
Configuration menu - View commit details
-
Copy full SHA for 812510b - Browse repository at this point
Copy the full SHA 812510bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 37ff301 - Browse repository at this point
Copy the full SHA 37ff301View commit details
Commits on Mar 27, 2024
-
Set up auxiliary domain for unrotated grid
When ROTATE_INDEX is true, the model keeps both its rotated internal grid and an unrotated grid for setting initialization and forcing. When the model is run in symmetric memory mode, there is an auxiliary non-symmetric domain that is needed for reading in fields at velocity points. The auxiliary domain in the unrotated grid (G_in) was not being set previously, causing the model to fail to run some cases when ROTATE_INDEX was true. That auxiliary domain in the unrotated grid is now being set up properly. All answers and output are bitwise identical for any cases that worked previously.
Configuration menu - View commit details
-
Copy full SHA for 2b59089 - Browse repository at this point
Copy the full SHA 2b59089View commit details
Commits on Apr 1, 2024
-
Set flags properly for rotated tripolar grids
Added code to tht two versions of clone_MD_to_MD in the FMS1 and FMS2 versions of MOM_domain_infra.F90 to properly change the flags when a tripolar grid is rotated, so that it does not lead to misleadingly incorrect answers. With the current versions of FMS, doing grid rotation testing with a tripolar grid will lead to error messages about the incomplete implementation of FMS, but these failures are preferable to the model silently working incorrectly. All answers are bitwise identical in cases that worked correctly before.
Configuration menu - View commit details
-
Copy full SHA for 5e34f48 - Browse repository at this point
Copy the full SHA 5e34f48View commit details
Commits on Apr 2, 2024
-
+Add get_netcdf_filename for a get_field_nc error
Add get_netcdf_filename and use it to add useful details (the field and filenames in question) to a fatal error message in get_field_nc. All answers are bitwise identical, but there is a new public interface and some output is changed in cases where get_field_nc is failing.
Configuration menu - View commit details
-
Copy full SHA for f9372f3 - Browse repository at this point
Copy the full SHA f9372f3View commit details
Commits on Apr 5, 2024
-
+Rotationally symmetric epipycnal diffusion option
Added the option to do epipycnal tracer diffusion between a bulk mixed layer and the interior ocean with expressions that satisfy rotational symmetry. This option is enabled by setting the new runtime parameter HOR_DIFF_ANSWER_DATE to be greater than 20240330. By default, this parameter is set to use the previous expressions, although the default may be changed later to follow DEFAULT_ANSWER_DATE. Also corrected two bugs with the tracer limits used to repartition the fluxes between layers within tracer_epipycnal_ML_diff; this correction is enables by setting the new HOR_DIFF_LIMIT_BUG to .false., but to retain previous answers by default it is set to true. By default all answers are bitwise identical, but there are changes to some MOM_parameter_doc files due to the introduction of two new runtime parameters.
Configuration menu - View commit details
-
Copy full SHA for a3fd1f3 - Browse repository at this point
Copy the full SHA a3fd1f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for a71fbce - Browse repository at this point
Copy the full SHA a71fbceView commit details
Commits on Apr 10, 2024
-
(*)Pass dz to user initialize_ALE_sponge calls
Pass vertical extents (dz in [Z ~> m]) instead of thicknesses (h in [H ~> m or kg m-2] and use data_h_is_Z flag in calls to initialize_ALE_sponge calls from 5 user modules and avoid extra calls to dz_to_thickness in these routines. All Boussinesq solutions are bitwise identical, but in any non-Boussinesq configurations using ALE sponges, the previous conversion from dz to thickness and back again can change dz in the last bits, so some non-Boussinesq answers could change.
Configuration menu - View commit details
-
Copy full SHA for 2d121dc - Browse repository at this point
Copy the full SHA 2d121dcView commit details
Commits on Apr 12, 2024
-
(*)Avoiding using RHO_0 in non-Boussinesq debugging
When in non-Boussinesq mode, write out mass-based tracer inventories from calls to MOM_tracer_chkinv and mean thicknesses in mass per unit area from calls to MOM_state_stats, rather than the approximate volumes that depend on the Boussinesq reference density. Similarly the thicknesses and transports output by write_u_accel and write_v_accel are in mass per unit area or mass flux per unit face length in non-Boussinesq mode. This is done specifically by using GV%H_to_MKS in place of GV%H_to_m; these are identical in Boussinesq mode, but GV%H_to_MKS avoids rescaling by the Boussinesq reference density in non-Boussinesq mode. Several comments were also updated to reflect these changes. All solutions are identical, but there are changes in the units of several diagnostic output fields that the model can write out when debugging non-Boussinesq mode runs.
Configuration menu - View commit details
-
Copy full SHA for c86358b - Browse repository at this point
Copy the full SHA c86358bView commit details -
Add units to the descriptions of 141 variables
Added units in comments describing about 141 real variables in 7 framework modules. All answers are bitwise identical, and only comments are changed.
Configuration menu - View commit details
-
Copy full SHA for 43b2a43 - Browse repository at this point
Copy the full SHA 43b2a43View commit details
Commits on Apr 13, 2024
-
Add units to the descriptions of 115 variables
Added or corrected the units in comments describing about 115 real variables scattered across 14 tracer modules and 10 other modules. All answers are bitwise identical, and only comments are changed.
Configuration menu - View commit details
-
Copy full SHA for b98acd8 - Browse repository at this point
Copy the full SHA b98acd8View commit details
Commits on Apr 15, 2024
-
Disable codecov upload requirement
This patch removes the code coverage upload requirement. Constraints around codecov.io upload rules have made it impossible to keep this as a requirement. However, we will still attempt an upload, which should be more successful for accounts with a stored URL token, such as NOAA-GFDL.
Configuration menu - View commit details
-
Copy full SHA for 5b9ae52 - Browse repository at this point
Copy the full SHA 5b9ae52View commit details -
CPP expression parser for makedep
This patch adds a relatively robust parser for C preprocessor expressions inside of an #if statement. The following are supported: * Nearly all operators, including arithmetic, logical, and bitwise, * Parentheses within expressions, * defined() evaluations. The following are explicitly not supported: * Function macros, * Multiline preprocessors. No doubt there are other lingering issues, but this is comprehensive enough to handle both MOM6 as well as current and legacy FMS source codes. Existing Makefile.dep output files appear to be mostly unchanged. One rule (data_override.o) had its arguments reordered but is otherwise unchanged. mpp_data.o had its rule corrected to use mpp_util_mpi.inc rather than mpp_util_nocomm.inc. Some fixes and adjustments were made to the overall makedep source: * Input macros (-D) are now stored as key-value dicts, rather than simply a list of macro names. * Input macros are now passed to all scan_fortran_file() calls, rather than just the Fortran source. * Input macros are now correctly passed to FMS makedep. Previously, these were omitted from the Makefile generation. * Previously, #if blocks were always set to True, even though the comments indicated that they were always set to False. Given that neither of these was ever correct, it's amazing that we were able to survive this long without prior incident. The motivation for this PR comes from issues with Makefile generation in FMS. Older versions of FMS were unable to correctly resolve their dependencies in fft.f90 on certain systems (perhaps caused by filesystem peculiarities). Newer versions of FMS were unable to handle the #if block default from True to False. Inevitably, we threw up our hands and solved the underlying problem.
Configuration menu - View commit details
-
Copy full SHA for 6f1c79e - Browse repository at this point
Copy the full SHA 6f1c79eView commit details
Commits on Apr 17, 2024
-
(*)Fix Stokes drift spectrum rescaling
Eliminated unneeded rescaling factors when setting the surface Stokes drift spectrum variables (UStk_Hb and VStk_Hb) from forces%[UV]Stkb in Update_Surface_Waves. This bug appears to have been introduced when merging in code that updates the Stokes drifts that was added on one branch (dev/ncar) separately from changes in how these Stokes drifts are scaled in the mech_forcing type on anther branch (dev/gfdl), although it might just have been an oversight during refactoring. All answers are bitwise identical when no dimensional rescaling is being used, but answers could change for some uncommon cases using the Stokes drift spectrum when dimensional rescaling is applied.
Configuration menu - View commit details
-
Copy full SHA for 3a3baf1 - Browse repository at this point
Copy the full SHA 3a3baf1View commit details
Commits on Apr 18, 2024
-
Fix for using tidal amplitude in determining the BBL thickness
Setting `BBL_USE_TIDAL_BG` in OM5_b003 revealed non-conservation and non-reproducibility across layouts. A scalar variable was correctly being set based on the tidal amplitude but was being used after a break between loops. - Replaced the scalar variable U_bg_sq with a vector u2_bg(:) that is set to either a constant or the square of the tidal amplitude. - The module parameter CS%drag_bg_vel was not set if using the tidal amplitude but WAS being used for conditionals. We now set it to 1e30 because it should NOT be used or impact the solution. Setting it to zero, or anything meaningful would allow code to use it inadvertently. This "constant" does not need to satisfy any dimensional testing.
Configuration menu - View commit details
-
Copy full SHA for 6c44c5f - Browse repository at this point
Copy the full SHA 6c44c5fView commit details
Commits on Apr 19, 2024
-
Perf: Better error report for failed parsing
Print the line and its tokenization in parse_perf.py if the tokenization fails for any reason. This is most likely to occur if the fourth token is not an integer. This is possibly a platform-dependent issue, and not something easily replicated on any machine we are using, so it is easier to simply integrate it into the codebase.
Configuration menu - View commit details
-
Copy full SHA for f7a4491 - Browse repository at this point
Copy the full SHA f7a4491View commit details
Commits on Apr 20, 2024
-
Better document variable units in 3 user modules
Added descriptions or added or corrected the units in the descriptions of 72 variables in the Neverworld_initialization and basin_builder modules. This includes minor refactoring to avoid reusing scalar variables with completely different units. Also refactored tidal_bay_set_OBC_data by moving the multiplication by rescaling factors at one point so that the units of a variable agree with their documented units. All answers are bitwise identical.
Configuration menu - View commit details
-
Copy full SHA for 1c4d0dc - Browse repository at this point
Copy the full SHA 1c4d0dcView commit details
Commits on Apr 22, 2024
-
Proto-type cricital latitude modification of Henyey
- Adds maximum latitude above which to reduce the background diffusion to the minimum value.
Configuration menu - View commit details
-
Copy full SHA for 0efe83d - Browse repository at this point
Copy the full SHA 0efe83dView commit details
Commits on Apr 23, 2024
-
Document units of 34 real variables in vertFPmix
Added standard-format unit descriptions for 34 real variables in comments in the subroutine vertPFmix. Another 6 comments were added noting dimensionally inconsistent expressions in vertFPmix. Only comments are changed and all answers are bitwise identical.
Configuration menu - View commit details
-
Copy full SHA for 01b2ea9 - Browse repository at this point
Copy the full SHA 01b2ea9View commit details
Commits on Apr 30, 2024
-
Refactoring density integrals for efficiency
Refactored 4 routines (int_density_generic_pcm, int_density_generic_ppm, int_spec_vol_generic_pcm and int_spec_vol_generic_plm) in density integrals for greater computational efficiency by doing fewer calls to the equation of state routines but calculating entire rows of densities at subgrid locations with each each call, replicating what was already being done int_density_dz_generic_plm. To accomplish this, a number of variables now use larger arrays than previously. The total computational cost of the non-Boussinesq pressure gradient force calculation was more than 50% greater with the previous code in some tests. All answers are bitwise identical.
Configuration menu - View commit details
-
Copy full SHA for 4058462 - Browse repository at this point
Copy the full SHA 4058462View commit details
Commits on May 2, 2024
-
Allow ALE boundary extrapolation behaviour to differ at initialisatio…
…n and in model run Adds INIT_BOUNDARY_EXTRAP parameter and function, so that REMAP_BOUNDARY_EXTRAP can just be used in the initialisation and not in the model dynamics, as required for an ice shelf in ALE mode. Background: When an ice shelf is initialised in ALE mode, MOM_state_initialization first initialises the ocean thickness and T/S with topography, but without an ice shelf. It then calls the function trim_for_ice, which takes in input of the ice shelf pressure, and in turn calls cut_off_column_top which truncates the columns (and adds vanishing layers) to account for the pressure of the ice depressing the free surface. The output of this is a grid with the ice shelf boundary treated in a ALE z-coordinate fashion with vanishing layers at the surface, and @adcroft's upcoming changes will make T and S consistent to the grid. However, after adding the ice shelf, we still need to regrid and remap onto our desired ALE coordinate, for example sigma coordinates. This can be done with regrid_accelerate in MOM_state_initialization or by the block controlled by REMAP_AFTER_INITIALIZATION in MOM.F90 We want the initialisation to use boundary extrapolation in the remapping so that the boundary cells preserve the desired initialisation profile when remapped to their target coordinate. This is controlled by REMAP_BOUNDARY_EXTRAP, except this runtime parameter modifies the control structure for the dynamic part of the model run too, which is bad because it means extrema are not preserved in the ALE remapping and can lead to non-sensible values of tracers. Changes: * Added runtime parameter INIT_BOUNDARY_EXTRAP and set the ALE control structure to use that instead of REMAP_BOUNDARY_EXTRAP at first. The default of INIT_BOUNDARY_EXTRAP is REMAP_BOUNDARY_EXTRAP to preserve answers (though it is not recommended to use REMAP_BOUNDARY_EXTRAP during model dynamics...) * After ALE regrid/remap in MOM.F90 (final initialisation step using ALE), reset the boundary extrapolation flag in the ALE control structure to go back to REMAP_BOUNDARY_EXTRAP. This PR combined with @adcroft's upcoming changes should make the initialisation of the ocean thickness and TS in an ALE ice shelf cavity perfect, when the new flag INIT_BOUNDARY_EXTRAP = True and old flag REMAP_BOUNDARY_EXTRAP = False.
Configuration menu - View commit details
-
Copy full SHA for 25989ad - Browse repository at this point
Copy the full SHA 25989adView commit details
Commits on May 3, 2024
-
+Rotationally symmetric KPP_smooth_BLD option
Added the option of using rotationally symmetric expressions in KPP_smooth_BLD(). This is enabled by setting the new runtime parameter KPP%ANSWER_DATE to a value of 20240501 or higher. For now the default is to use the older symmetry-breaking expressions, but the default value for KPP%ANSWER_DATE should be revised to use DEFAULT_ANSWER_DATE. By default, all answers are bitwise identical but there is a new entry in some MOM_parameter_doc files.
Configuration menu - View commit details
-
Copy full SHA for 46fd6e6 - Browse repository at this point
Copy the full SHA 46fd6e6View commit details
Commits on May 7, 2024
-
(*)Revise 13 diagnostics for rotational symmetry
Refactored 10 diagnostics related to terms in the kinetic energy budgets and 2 diagnostics of nonlinear relative-vorticity related accelerations to respect rotational symmetry. These diagnostics are mathematically equivalent but will change at roundoff due to changes in the order of arithmetic. Only diagnostics are changed, and the solutions themselves are bitwise identical in all cases.
Configuration menu - View commit details
-
Copy full SHA for a3e9e1c - Browse repository at this point
Copy the full SHA a3e9e1cView commit details
Commits on May 8, 2024
-
+Fix multiple bugs when MEKE_GM_SRC_ALT is True
Fix several bugs when MEKE_GM_SRC_ALT is True, including corrections to two dimensional rescaling factors, and optionally fix a bug that sets a limit only on positive slopes but leaving negative slopes unlimited. This bug is corrected when the new runtime parameter MEKE_GM_SRC_ALT_SLOPE_BUG is false. Additionally there is a new runtime parameter MEKE_GM_SRC_ANSWER_DATE that specifies the use of rotationally symmetric expressions for PE_release_h when it is set to 20240601 or higher, but it should be noted that rotational symmetry also requires that MEKE_GM_SRC_ALT_SLOPE_BUG is false. Four new checksum calls were also added to verify the correctness of the calculation of MEKE%GM_src when MEKE_GM_SRC_ALT and DEBUG are true. By default, all answers are bitwise identical but there are two new runtime parameters in some MOM_parameter_doc files.
Configuration menu - View commit details
-
Copy full SHA for efe1b4a - Browse repository at this point
Copy the full SHA efe1b4aView commit details -
Added missing values for vector u2_bg(:) within set_viscous_ML
Vector u2_bg(:) was introduced in commit 6c44c5f (Fix for using tidal amplitude in determining the BBL thickness, 2024-04-04). It replaces a scalar in set_viscous_ML, but was not defined, causing crashes. This commit sets the values of u2_bg(:) to match those given given in set_viscous_BBL.
Configuration menu - View commit details
-
Copy full SHA for a200f5f - Browse repository at this point
Copy the full SHA a200f5fView commit details -
Makedep: Better handling of parentheses
The makedep tool was updated to handle parentheses in preprocessor expressions. The expression `#if (defined a)` could not be parsed due to poor ad-hoc handling of parentheses, making it impossible to build the AM2-based coupled models with makedep, The tool has has been significantly overhauled to include better overall unary operator support. * `defined` is now more of an operation than an exception, since it is pushed to the stack like any other operator. * Parentheses are now handled as "operators", with `)` triggering an operator stack push and `(` conducting the actual operation (in this case simply returning the contents). * In order to handle the possibility of macros within parentheses, macros are now evaluated only immediately before used in expressions, rather than the instant they are first encountered. This redesign has allowed for many edge cases to be consolidated into the general purpose parser, greatly simplifying the code.
Configuration menu - View commit details
-
Copy full SHA for 1829b7f - Browse repository at this point
Copy the full SHA 1829b7fView commit details
Commits on May 13, 2024
-
+(*)Fix USE_QG_LEITH_VISC = True reproducibility
This commit includes a series of changes that get MOM6 to reproduce across processor counts, layouts and restarts when USE_QG_LEITH_VISC = True and also to implement related changes to the QG Leith code to be consistent with not making the Boussinesq approximation when in non-Boussinesq mode. These changes include: - Adding a thermo_var_ptrs and a timestep argument to to the interfaces to horizontal_viscosity, initialize_dyn_split_RK2 and initialize_dyn_split_RK2b - Correcting a bug in the powers of H_subroundoff in the denominators of some expressions for the effective thicknesses associated with interfaces, thereby correcting some dimensionally inconsistencies in these expressions - Adding the new publicly visible routine calc_QG_slopes - Adding the arguments slope_x and slope_y to calc_QG_Leith_viscosity and avoiding the use of the VarMix%slope_[xy] elements in that routine - Using thickness_to_dz to consistently convert layer thicknesses to the vertical distances across layers and provide this as an argument to calc_QG_Leith_viscosity - Determining vertical distances in calculating the vertical derivatives of the slopes consistently with avoiding the Boussinesq approximation when in non-Boussinesq mode - Increasing some loop extents in calc_QG_Leith_viscosity Note that several of the expansions of the halo sizes in updates or in some of the calculations are not necessary if an extra halo update is included for slope_x and slope_y and dz after the calls to calc_QG_slopes and thickness_to_dz in horizontal_viscosity. This extra halo update has also been included in a comment for later reference. This commit includes several changes to publicly visible interfaces, and it will change answers with USE_QG_LEITH_VISC = True (which had previously triggered a fatal error), but answers and output are bitwise identical in other cases.
Configuration menu - View commit details
-
Copy full SHA for 93d9bb8 - Browse repository at this point
Copy the full SHA 93d9bb8View commit details -
Add diags for east, north velocity components.
- This is required for our BOEM-funded Arctic project. It needs something similar for SIS2 as well.
Configuration menu - View commit details
-
Copy full SHA for bb8a653 - Browse repository at this point
Copy the full SHA bb8a653View commit details
Commits on May 14, 2024
-
SAL: Explicitly allocate sht variable in SAL_CS
For reasons not entirely clear, deallocation of the RK2 control structure caused a segmentation fault when compiled by Nvidia. A deeper investigation suggested that the compiler was attempting to deallocate a nullified pointer during automatic cleanup of RK2->SAL->sht. Apparently deallocation of a NULL pointer is an error (even though free() is not supposed to care). By redefining `sht` as an allocatable component rather than a local component of the SAL_CS instance, it seemed to satisfy the compiler that nothing was needed and the error went away. There are still some lingering questions behind the cause of the segfault, but for now I am going to put this under "compiler bug". This patch also initializes some of the logical flags in the SAL_CS type. This is possibly unnecessary, but it is consistent with the general rules of safety followed in other MOM6 derived types.
Configuration menu - View commit details
-
Copy full SHA for 0c790f2 - Browse repository at this point
Copy the full SHA 0c790f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for e253883 - Browse repository at this point
Copy the full SHA e253883View commit details
Commits on May 15, 2024
-
Testing: Correct perf parsing of C++ output
This patch fixes errors in the parser of perf output. Previously, each record was assumed to be separated by spaces, but this failed for more generic records (usually from C++) which included signatures (such as `f(a, b)`) or templates (`f<a, b>`). Nested constructs were also possible. This is fixed by introducing a simple tokenizer which extracts <, (, and whitespace from the output , then rebuilds the records by combining any whitespace which appears inside of delimiters. This patch should hopefully resolve the CI errors in GitHub Actions.
Configuration menu - View commit details
-
Copy full SHA for 6272bbc - Browse repository at this point
Copy the full SHA 6272bbcView commit details
Commits on May 20, 2024
-
- Given a recent incompatibility with FMS2 and gfortan 14.1 we need to revert to FMS1 for the MacOS builds.
Configuration menu - View commit details
-
Copy full SHA for 7a2a33b - Browse repository at this point
Copy the full SHA 7a2a33bView commit details
Commits on May 21, 2024
-
GitLab CI: Direct build directory to $HOME
This patch directs the compilation of GitLab regression test models to the $HOME directory. This is motivated by incredibly slow file access times on GFDL's GPFS file system (F5), with the Nvidia builds taking a prohibitively long time (around 4 hours). Compiling in $HOME reduces Nvidia times to 15 minutes, with similar reduction times in the other compilation. This is achieved with only minimal changes to the build system. Instead of creating `build/`, we create a dedicated directory in `$HOME/ci/$CI_PROJECT_ID/build` and a symbolic link to this directory in the GPFS directory. To support these builds, additional symlinks to `src/` and `ocean_only/` (for static builds) are also created, from $HOME and back into GPFS. Once the job is completed, the temporary space in $HOME is deleted. This patch should not be considered a permanent solution, it is only meant to get us through a difficult period of testing. Hopefully we can revert this change in the near future.
Configuration menu - View commit details
-
Copy full SHA for 83bc4a6 - Browse repository at this point
Copy the full SHA 83bc4a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 758b5a3 - Browse repository at this point
Copy the full SHA 758b5a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f3da0b - Browse repository at this point
Copy the full SHA 9f3da0bView commit details
Commits on May 22, 2024
-
Fix error in diagnostic axis registration for grid space axes
- For runs using grid space diagnostic axes, the registration of the cell centered axes fails with symmetric memory with a runtime error when posting diagnostics. This patch fixes this error.
Configuration menu - View commit details
-
Copy full SHA for 93f2aee - Browse repository at this point
Copy the full SHA 93f2aeeView commit details -
Replace USE_GRID_SPACE_DIAGNOSTIC_AXES with USE_INDEX_DIAGNOSTIC_AXES
- The old flag has been obsoleted. This will impact only a very small number of users.
Configuration menu - View commit details
-
Copy full SHA for c1c32d2 - Browse repository at this point
Copy the full SHA c1c32d2View commit details -
Better variables for updated masks in fill_miss_2d
Within fill_miss_2d, there are 2 sets of masked values used for remapping - masked values in neighboring points in arbitrary units (with names like "south") and the updated valid mask with values of 0 or 1 (with names like "gs"). At one point in the code, the former were being used where the latter were more appropriate. This commit changes this to help with the understandability of the code. However, when the order of arithmetic is not specified with parentheses, the Nvidia compiler is changing answers with this change of variables. To avoid this change in answers, this commit is only changing which variables are used when the answer_date is larger than 20190101 and the order of the sums are specified with parentheses. This commit also now moves the logical test for ans_2018 outside of the i- and j- loops where non-zero values of a_chg are set. All answers and output are bitwise identical.
Configuration menu - View commit details
-
Copy full SHA for 1cf20b3 - Browse repository at this point
Copy the full SHA 1cf20b3View commit details
Commits on May 24, 2024
-
Bugfix for tracer advection diagnostic in symmetric memory mode
- Fix logic so tracer advection diagnostics are computed correctly for symmetric memory mode
Configuration menu - View commit details
-
Copy full SHA for 2b69f1e - Browse repository at this point
Copy the full SHA 2b69f1eView commit details -
Autoconf: Detect FMS IO implementation
This patch allows autoconf to detect the version of FMS IO that is implemented in its library, and select the appropriate "infra" in the MOM6 source. The allows for removal of the --with-framework flag, and should prevent future FMS library/infra mismatches.
Configuration menu - View commit details
-
Copy full SHA for 7384dba - Browse repository at this point
Copy the full SHA 7384dbaView commit details -
.testing: Target build uses its own Makefile
The build/target/MOM6 rule was modified so that build/target is now a symlink into build/target_codebase/.testing/build/symmetric. In other words, build/target now uses the entire build system of target_codebase (i.e. the reference codebase) rather than borrowing from bits and pieces of the current codebase. This should prevent potential false positives in future regression tests related to buildsystem changes. Several apparently unused blocks of rules and other content in .testing/Makefile have also been removed.
Configuration menu - View commit details
-
Copy full SHA for c7d3268 - Browse repository at this point
Copy the full SHA c7d3268View commit details
Commits on May 28, 2024
-
CI: Fix FMS_COMMIT, remove FRAMEWORK
This patch fixes FMS_COMMIT and FMS_URL so that they are properly exported to ``ac/deps/Makefile`` and used in the .testing FMS build. It also removes any references to the FRAMEWORK flag, which is no longer needed to identify the FMS API.
Configuration menu - View commit details
-
Copy full SHA for 8ecb260 - Browse repository at this point
Copy the full SHA 8ecb260View commit details
Commits on May 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 59e3a8f - Browse repository at this point
Copy the full SHA 59e3a8fView commit details -
*Fix ALE_remap_scalar call with h_in_Z_units
Corrected an argument to the call to ALE_remap_scalar() when h_in_Z_units is true in MOM_initialize_tracer_from_Z(), to avoid the problems documented in github.com//issues/589. A comment was also added explaining the logic of what is going on in this fork of the code. This commit will change answers with some generic tracers that are initialized from a Z-space input file, restoring them to previous values that worked previously (before about Feb. 1, 2024 on dev/gfdl) in Boussinesq configurations without dimensional consistency testing, but in a new form that does pass the dimensional consistency testing for depths and thicknesses. All answers are bitwise identical in any cases that do not use generic tracers.
Configuration menu - View commit details
-
Copy full SHA for f21ec03 - Browse repository at this point
Copy the full SHA f21ec03View commit details
Commits on May 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 705a384 - Browse repository at this point
Copy the full SHA 705a384View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7305528 - Browse repository at this point
Copy the full SHA 7305528View commit details -
(*)Refactor and document soliton_initialization
Refactored the code in soliton_initialization.F90 to more accurately reflect the nondimensionalization that was applied in developing this test case. This change includes reading in the maximum depth and beta, and using them to calculate the equatorial deformation radius and the external gravity wave speed. The references to the papers describing the test case in the module were added to the doxygen comments describing the routines in this module. This commit also includes adding comments documenting the nature and units of all the internal variables in this module. There are two new arguments each (param_file and just_read) to soliton_initialize_thickness and soliton_initialize_velocity to accommodate these changes, bringing them into line with the interfaces for other similar user initialization routines, and MOM_initialize_state was changed accordingly. This change could change answers in general, but in the specific examples that use this code, both beta and the external wave speed are deliberately set to 1 in MKS units, so this commit does not change answers for that specific case.
Configuration menu - View commit details
-
Copy full SHA for d90ff6b - Browse repository at this point
Copy the full SHA d90ff6bView commit details -
(*)Correct rescaling of KPP pseudo-salt flux
Calculate the rescaled pseudo-salt flux when KPP is in use inside of pseudo_salt_tracer_column_physics(), rather than using fluxes%KPP_salt_flux. This commit also corrects for the fact that salinity and pseudo-salt have scaling that differs by a factor of US%S_to_ppt, which was not previously being taken into account. All answers are bitwise identical when no dimensional rescaling is being used, but they will change (and be corrected) when salinity is being rescaled.
Configuration menu - View commit details
-
Copy full SHA for 3c87d98 - Browse repository at this point
Copy the full SHA 3c87d98View commit details -
+Eliminate fluxes%KPP_salt_flux
Eliminated the KPP_salt_flux element of the forcing type, which is no longer being used after the revisions to pseudo_salt_tracer_column_physics. Also moved 5 allocatable arrays (KPP_NLTheat, KPP_NLTscalar, KPP_buoy_flux, KPP_temp_flux and KPP_salt_flux) out of diabatic_CS, replacing them with ordinary arrays in diabatic_ALE(), diabatic_ALE_legacy() and layered_diabatic(). This change could reduce the high-water memory footprint of the model when KPP is in use. All answers are bitwise identical, but one element of a publicly visible type has been eliminated.
Configuration menu - View commit details
-
Copy full SHA for 506d186 - Browse repository at this point
Copy the full SHA 506d186View commit details -
Fix TEOS10 argument descriptions
Corrected the descriptions of several conservative temperature and absolute salinity arguments in the comments for arguments to 4 TEOS10 equation of state routines, and eliminated the commented out code to mask out negative salinities in 8 TEOS10 routines. Only comments are changed, and all answers are bitwise identical.
Configuration menu - View commit details
-
Copy full SHA for c121215 - Browse repository at this point
Copy the full SHA c121215View commit details
Commits on May 31, 2024
-
+Add convert_MLD_to_ML_thickness
Added the routine convert_MLD_to_ML_thickness to consistently convert the mixed layer depths (in units of [Z ~> m]) back to the mixed layer thicknesses (in [H ~> m or kg m-2]), with proper error checking and handling of the non-Boussinesq case. The body of this routine was taken from duplicated blocks of code in MOM_mixedlayer_restrat.F90. This is not tested directly in this PR, but it was tested via revisions to MOM_mixedlayer_restrat.F90 that are included in a subsequent commit. All answers are bitwise identical, but there is a new publicly visible interface.
Configuration menu - View commit details
-
Copy full SHA for 836e696 - Browse repository at this point
Copy the full SHA 836e696View commit details -
+*Use thickness in ideal_age_tracer_column_physics
Pass mixed layer thickness, rather than mixed layer depth, to ideal_age_tracer_column_physics, and determine the number of layers within the mixed layer in count_BL_layers in thickness units rather than depth units. To accommodate these changes there is now a call to convert_MLD_to_ML_thickness inside of call_tracer_column_fns. The thermo_var_ptrs type argument (tv) to ideal_age_tracer_column_physics and count_BL_layers are no longer used and have been removed. All answers are bitwise identical in Boussinesq mode, but in non-Boussinesq mode there are changes in the passive ideal age tracers at the level of roundoff. There are also changes in the units of arguments and the number of arguments to a public interface.
Configuration menu - View commit details
-
Copy full SHA for 2035af3 - Browse repository at this point
Copy the full SHA 2035af3View commit details -
+Pass h_MLD to mixedlayer_restrat
Provide the mixed layer thickness, as well as the mixed layer depth as arguments to mixedlayer_restrat. The code that had previously been used to convert between the two has now been removed to the new external function convert_MLD_to_ML_thickness. To accommodate these changes, a new element, h_ML, was added to the vertvisc type, and a call to convert_MLD_to_ML_thickness was temporarily added in step_MOM_dynamics just before the call to mixedlayer_restrat. All answers are bitwise identical, but there are changes to a public interface.
Configuration menu - View commit details
-
Copy full SHA for 912c568 - Browse repository at this point
Copy the full SHA 912c568View commit details -
+*Convert MLD to ML_thickness in diabatic
Moved the call to convert mixed layer depths into mixed layer thicknesses from right before the call to mixedlayer_restrat into the various diabatic routines just after they are calculated. This code rearrangement changes answers in non-Boussinesq mode because the layer specific volumes will have evolved between these two calls, but it is consistent with the mixed layer thicknesses as used in the boundary layer parameterizations. A new argument was added to bulkmixedlayer to return the mixed layer thickness that was already being calculated. The previous argument Hml was renamed to BLD and changed from a pointer into a simple array. Both are intent(inout) rather than intent(out) to preserve values in halos. This commit also revises the logic around the allocation of visc%h_ML and its registration as a restart variable, including handling cases where an older restart file is being read that includes MLD but not h_ML. Because the mixed layer depth is used in almost cases, CS%Hml in the control structure for MOM.F90 was changed from a pointer to an allocatable, with values of 0 in those cases (e.g., when ADIABATIC is true) where it is not used. In addition, the argument Hml to the various diabatic routines was changed to MLD to more clearly reflect that it is a depth and not a thickness. Outside of diabatic, BML is only used to provide the tracer point boundary layer depths to the calling routines, so it does not need a halo update. Instead, all of the halo updates for the various elements of visc that do need halo updates after the diabatic calls are collected into one place for efficiency and more accurate timings. The scale arguments of 34 checksum calls were revised from GV%H_to_m to GV%H_to_MKS for more accurate checksums in non-Boussinesq configurations by avoiding multiplication by an reference specific volume, and instead only rescaling by an integer power of 2. All answers are bitwise identical in Boussinesq mode, but in non-Boussinesq mode there are changes in answers in cases that use the boundary layer thicknesses obtained from the boundary layer parameterizations in subsequent calculations, such as mixed layer restratification with some options. There are also changes to the arguments of several publicly visible routines.
Configuration menu - View commit details
-
Copy full SHA for c300208 - Browse repository at this point
Copy the full SHA c300208View commit details -
+*Use visc%h_ML in tracer diffusion routines
Pass visc%h_ML to applyBoundaryFluxesInOut, which avoids the need for the thickness conversions inside of that routine. Answers are bitwise identical for Boussinesq cases, but they will change in non-Boussinesq cases because the layer specific volumes have changed between the time the boundary layer thicknesses have been calculated and when they are being used in the brine plume parameterization. Also use visc%h_ML in place of calls to KPP_get_BLD or energetic_PBL_get_MLD in step_MOM_dyn_split_RK2, hor_bnd_diffusion and neutral_diffusion_calc_coeffs. This change requires a new vertvisc_type argument to tracer_hordiff, hor_bnd_diffusion and neutral_diffusion_calc_coeffs. Boussinesq answers are bitwise identical, but non-Boussinesq answers change because they now use the actual model specific volumes rather than some prescribed constant value to to the relevant unit conversions. The logic in set_visc_register_restarts was also updated so that visc%MLD and visc%h_ML are allocated and registered for restarts in the cases where they will be used. All answers are bitwise identical in Boussinesq mode, but in non-Boussinesq mode there are changes in answers in cases that use neutral tracer diffusion that excludes the boundary layer, horizontal tracer diffusion in the boundary layer or FPMIX. There are also changes to the arguments of several publicly visible routines.
Configuration menu - View commit details
-
Copy full SHA for d3cb7ee - Browse repository at this point
Copy the full SHA d3cb7eeView commit details -
+*Pass visc%h_ML to call_tracer_column_fns
Added the optional argument h_BL to call_tracer_column_fns, and then pass visc%h_ML to this routine as a part of the calls from the diabatic routines. This argument is not provided in adiabatic mode or in offline tracer mode, which is why it has been made optional. All answers are bitwise identical in Boussinesq mode but ideal age tracers can change in non-Boussinesq mode due to the updates to the layer specific volumes between the calculation of the boundary layer properties and the calls to call_tracer_column_fns.
Configuration menu - View commit details
-
Copy full SHA for d66adff - Browse repository at this point
Copy the full SHA d66adffView commit details
Commits on Jun 8, 2024
-
Remove diag_send_complete from disable_averaging
diag_send_complete() is removed from disable_averaging(), due to potential performance costs over sweeping through files and variables for synchronization across nodes or other thread-like backround operations. It also prevents potential errors in drivers where diag_manager_set_time_end was unset. We will come back to this issue and work out a better strategy for diagnostic synchronization.
Configuration menu - View commit details
-
Copy full SHA for 0578393 - Browse repository at this point
Copy the full SHA 0578393View commit details
Commits on Jun 19, 2024
-
Disable nonrepro FMAs in convex BBL solver
Three FMAs were introduced when the BBL convex L(:) computation were moved to a separate function. Parentheses have been added to disable these FMAs. Calculation of the cell width fractions `L` was consolidated and moved into a new function, `find_L_open_concave_analytic` (later renamed to `find_open_L_open_concave_trigonometric`). When compiled with Intel and using the following flags, -O2 -march=core-avx2 -fp-model source -qno-opt-dynamic-align additional FMAs are added to the function, specifically the following expressions: crv_3 = (Dp + Dm - 2.0*D_vel) L(K) = L0*(1.0 + ax2_3apb*L0) L(K) = apb_4a * (1.0 - 2.0 * cos( C1_3*acos(a2x48_apb3*vol_below(K) - 1.0) - C2pi_3) ) (Third expression FMA was added inside of `acos()` by the compiler) The crucial flag seems to be `-march=core-avx2` which controls the introduction of FMAs and explains why the problem went undetected. The legacy answers were restored by adding new parentheses to the above equations. Since this function is not generally considered reproducible and is provided for legacy support, the loss of performance is not considered to be an issue.
Configuration menu - View commit details
-
Copy full SHA for b4ae2b7 - Browse repository at this point
Copy the full SHA b4ae2b7View commit details
Commits on Jul 4, 2024
-
Re-initialize fields within KPP
Five fields associated with KPP were previously initialized during allocation (using `source=0.`). It was found that the allocations were unnecessary, and the fields were redefined as local variables within functions, without the initialization to zero. Although the uninitialized points were masked and unused in the rest of the model, they were still able to change the checksums and were being reported as regressions. This patch restores the original checksums by re-implementing the zero initialization. Thanks to Bob Hallberg (@Hallberg-NOAA) for diagnosing this issue.
Configuration menu - View commit details
-
Copy full SHA for ac2b642 - Browse repository at this point
Copy the full SHA ac2b642View commit details
Commits on Jul 7, 2024
-
Allow incorrect PPM:H3 tracer advection stencil
Due to answer changes in multiple production experiments, this patch introduces a new parameter, USE_HUYNH_STENCIL_BUG, which sets the tracer advection stencil width to its previous incorrect value. This parameter replicates the previous method, which keeps `stencil` at 2 when PPM:H3 is used. ---- The logical parameters are * P = CS%usePPM * H = CS%useHuynh * E = USE_HUYNH_STENCIL_BUG * R = CS%useHuynhStencilBug The three expressions of interest: 1. P & ~H 2. P 3. P & ~R (1) is the original incorrect expression, (2) is the fixed expression, and (3) is the proposed update. What we want: If E is false, then (3) should reduce to (2). If E is true, then (3) should reduce to (1). R is computed as follows: * R = False (from derived type initialization) * if (H) R = E (from get_param call) This is equivalent to R = H & E, and (3) is P & ~(H & E). * If E is False, then P & ~(H & False) = P. * If E is True, then P & ~(H & True) = P & ~H So this flag should replicate both the previous and current behavior.
Configuration menu - View commit details
-
Copy full SHA for 3fac1c5 - Browse repository at this point
Copy the full SHA 3fac1c5View commit details
Commits on Jul 17, 2024
-
(*)+Restore USE_WRIGHT_2ND_DERIV_BUG functionality
This commit restores the effectiveness of the runtime parameter USE_WRIGHT_2ND_DERIV_BUG in determining whether a bug is corrected in the calculation of two of the second derivative terms returned by calculate_density_second_derivs_elem() with the "WRIGHT" equation of state, recreating the behavior (and answers) that are currently on the main branch of MOM6. To do this, it adds and calls the new routine set_params_buggy_Wright() when appropriate, and adds the new element "three" to the buggy_Wright_EOS type. When the bug is fixed, buggy_Wright_EOS%three = 3, but ...%three = 2 to recreate the bug. This commit does change answers for cases using the "WRIGHT" equation of state and one of the "USE_STANLEY_..." parameterizations from those on the dev/gfdl branch of MOM6, but in so doing it restores the answers on the main branch of MOM6. There is also a new publicly visible subroutine.
Configuration menu - View commit details
-
Copy full SHA for 00f7d23 - Browse repository at this point
Copy the full SHA 00f7d23View commit details
Commits on Jul 21, 2024
-
*Possibly initialize h_ML from MLD in restart file
Moved a check for whether to initialize an uninitialized visc%h_ML field from visc%MLD outside of the test for the value of CS%mixedlayer_restart. This change will prevent answer changes between code versions for certain cases that initialize from a restart file, use the melt_potential field and have MLE_USE_PBL_MLD = True but also have MIXEDLAYER_RESTRAT = False. This commit corrects a very specific oversight that was introduced when the roles of visc%h_ML and visc%MLD were separated, and it can change answers (reverting them to answers from older versions of the main branch of MOM6) in very specific cases where MOM6 is initialized from a restart file from an older versions of the code, including the 5x5-degree test case in the dev/emc regression suite.
Configuration menu - View commit details
-
Copy full SHA for 40f4721 - Browse repository at this point
Copy the full SHA 40f4721View commit details
Commits on Jul 22, 2024
-
Added checksum calls for the melt_potential, ocean_mass, ocean_heat and ocean_salt elements of the surface state in MOM_surface_chksum if these fields are allocated for more comprehensive debugging. Also added the symmetric optional argument to the call to MOM_surface_chksum form extract_surface_state so that all of the surface velocity values that could contribute to the ocean surface velocities that are seen by the coupler are checksummed. All solutions are bitwise identical, but there are enhancements to the MOM6 debugging capabilities.
Configuration menu - View commit details
-
Copy full SHA for ee686c8 - Browse repository at this point
Copy the full SHA ee686c8View commit details