forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Updating NOAA-GFDL dev/gfdl into SPEAR dev/gfdl #4
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changed the units of lateral viscosities to [m2 T-1] and the units of biharmonic viscosities to [m4 T-1] in MOM_hor_visc.F90 for expanded dimensional consistency testing. All answers are bitwise identical.
Changed the units of the timestep to [T} in hor_visc_init and of vert_vort_mag to [T-1 m-1] in horizontal_viscosity. Also added a variant of the grad_vel_mag_h calculation with parentheses for rotational symmetry when answers_2018 = False. Changed the marks around suggestions for correcting issues with the recently added GME code to #GME# to help in finding them. All answers are bitwise identical.
Stronger conditional registration of FrictWorkMax
Changed the units of MEKE%Ku and MEKE%Au to [m2 T-1], including adding code to allow for the dimensional scaling to change across restarts and moving the halo updates on any MEKE variables read from restart files to the end of MEKE_init. Also change the units of GME_coeff in horizontal_viscosity to [m2 T-1]. This also required adding a unit_scale_type argument to MEKE_init. All answers are bitwise identical, but the units for some variables in a publicly visible type have changed.
Combined halo updates inside of the MEKE code into group passes to reduce latency. Also made del2MEKE into a local variable and removed it from the MEKE control structure. All answers are bitwise identical.
Eliminated an unnecessary halo update in horizontal_viscosity. All answers are bitwise identical.
Added a new runtime parameter, VERY_SMALL_FREQUENCY, to control how close to zero some frequencies that appear in the denominator of some expressions for the resolutoin functions can get. Also added some comments and rearranged some code addressing problems in calc_QG_Leith_viscosity. By default, all answers in the MOM6-examples test cases are bitwise identical, but there is a new entry in the MOM_parameter_doc.all files.
This patch remaps the opacity diagnostic to a tanh function, i.e. op -> 1/L * tanh(op * L) where L is arbitrarily set to 10^-10 (1 Angstrom). For op << 1/L, the diagnostic is nearly equivalent to the model opacity. For values comparable and larger than L, the diagnostic approaches 1/L, a sufficiently large value to reproduce the effects of a divergent opacity. This allows us to safely manipulate and store the opacity while also avoiding infinite values and floating point overflow. This change will modify the opacity diagnostic, but should not affect the dynamic state.
Rescaled the units of the f2_dx2_... and beta_dx2_... elements of VarMix_CS. These particular arrays are only used in calc_resoln_function, and because these are raised to arbitrary powers they have to be rescaled back to mks units in some cases. All answers are bitwise identical in the MOM6-examples test cases.
(*) Remap opacity diagnostic to tanh()
…/MOM6 into Hallberg-NOAA-code_units_cleanup
When the surface state went out of user-specified bounds we reported an error such as: ``` WARNING from PE 130: Extreme surface sfc_state detected: i= 18 j= 18 x= -60.625 y= -72.075 D= 1.9385E+01 SSH=-1.1945E+00 SST=-2.5183E+00 SSS= 3.2605E+01 U-= 0.0000E+00 U+=-8.9452E-03 V-= 0.0000E+00 V+= 0.0000E+00 ``` The i,j here are the on-core local i,j and the x,y are the geographic location (so you can find the location on a map). Neither of these are particularly useful when looking at actual model output unless you are adept on porjections. This commit changes the message to: ``` WARNING from PE 130: Extreme surface sfc_state detected: i= 958 j= 89 lon= -60.625 lat= -72.075 x= -60.042 y= -72.075 D= 1.9385E+01 SSH=-1.1945E+00 SST=-2.5183E+00 SSS= 3.2605E+01 U-= 0.0000E+00 U+=-8.9452E-0 3 V-= 0.0000E+00 V+= 0.0000E+00 ``` which allows you to look at model output using either indices or coordinates and still find the location on a map. - Changes the reported i,j-location to global index - Adds the diagnostic grid-lon,lat to report
When defining a parameter with get_param() we can indicate that the parameter is for debugging purposes with the optional argument `debuggingParam=.true.`. This had been implemented for scalar reals but not for a vector of reals.
More useful message when detecting bad surface state
Allows vector-of-reals debugging parameters
The KE_adv diagnostic is a sum of values multiplied by -1, which will assign a -0.0 value for zero-initialized states. This can lead to reproducibility problems for symmetric and nonsymmetric grids, since many intermediate calculations rely on masking of the u field and do not apply masks to subsequent steps. This can occur when a MPP domain is bordered by land, where calculations on the S and W boundaries of a symmetric grids are computed as if they are unmasked, and would be assigned a -0.0 value. For nonsymmetric grids, these values were never computed and would retain a +0.0 value. We resolve this by re-initalizing the KE_u and KE_v fields, since they are re-used as buffers for several diagnostics, and exclude masked points from the calculation. This ensures +0.0 values in any land boundaries across symmetric grids. If the masking is applied to other fields using `KE_u` and `KE_v`, then we may be able to remove the re-initialization step. While +/-0.0 are arithmetically identical in all cases, this fix will preserve bitwise reproducibility and is a step towards phasing out the `abs()` operation in the checksums.
The diagnostic KPP_OBLdepth_original requires a nonzero CS%n_smooth value, but it is currently possible to register this diagnostic even when this parameter is unset. This patch only registers the diagnostic when n_smooth is defined.
Diagnostic fixes to KE_adv, KPP_OBLdepth_original
- Prior to rolling forward the FMS submodule in MOM6-examples, this rolls evaluates that version in the Travis-CI pipeline. - f2e2c86 includes changes necessary to build MOM6 on MacOS.
…netCDF inputs in horiz_interp_and_extrap_tracer_record
Use f2e2c86 commit for FMS in .testing
This PR updates the README to include instructions for the test suite Makefile. It also fixes a bug in the travis config file which may have been preventing code coverage updates.
The variables used for calculating internal heat in MOM_geothermal.F90 relied on zero-initialization due to the conditional do_i() check inside of the loops, which was producing NaN warnings in our test suite. This patch resolves this by conditionally initializing the fields based on diagnostic registration. It also introduces two new logical variables to control the initialization and evaluation of the arrays.
ocean.stats and chksum_diag output is now tagged as PRECIOUS, and is retained after a run. This helps to identify an issue after a fail. .gitignore was also restructured to move the test ignore rules into a subdirectory. Finally, we no longer rely on (-) to ignore commands in Makefile, since it was causing odd issues after PRECIOUS was introduced. We now just explicitly ignore any commands by piping nonzero commands to `true`.
Initialize geothermal internal heat diagnostics
f90nml is no longer used to modify the input.nml files for restart runs, since it was adding an unnecessary dependency. Code coverage is now conditionally enabled for the symmetric build, and controlled by the REPORT_COVERAGE flag, since it can significantly increase the build and run times.
The z-interpolated uhml and vhml diagnostics gave inconsistent answers across layouts when using the general mixed layer restratification scheme, because the value of h had changed but its halos had not been updated. This had been previously fixed in the BML restratification but not the general stratification method. This patch updates the value of h by conditionally updating the halos if this diagnostic is required.
This PR enables coverage cleanup and CodeCov upload for test runs. It also introduces an optional configuration file, config.mk which can be used for user-configured settings, such as templates or mpirun commands.
Path rules for cleaning up old code coverage files (*.gcda) and for running the CodeCov.io upload script have been fixed.
- The OBC tracer reservoirs were being updated in MOM_tracer_advect - twice each! Update them separately after tracer advection. - The OBC tracer lengthscale was being cubed to get the volume. Change that to a lengthscale times the face area where the advection is happening. - Changes answers if the tracer lengthscales were not set to zero.
- Could make it more verbose to let the user know which data are missing.
Travis: config.mk user config; enable coverage
*Add new update_segment_tracer_reservoirs routine
(*) Bugfix: [uv]hml z-diags in general restrat
- As agreed on the MOM6 dev call, we renamed MOM_surface_forcing.F90 to help distinguish it from the other caps. It is now called MOM_surface_forcing_gfdl.F90.
TC reconfig
wfcooke
pushed a commit
that referenced
this pull request
Nov 30, 2021
Correct a couple of typos in hor_visc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.