Skip to content

Main to dev/ncar (after #1507 merge)#200

Merged
gustavo-marques merged 295 commits into
dev/ncarfrom
merge_pr1507
Oct 25, 2021
Merged

Main to dev/ncar (after #1507 merge)#200
gustavo-marques merged 295 commits into
dev/ncarfrom
merge_pr1507

Conversation

@alperaltuntas
Copy link
Copy Markdown
Member

This PR syncs dev/ncar with main after the merge of https://github.com/NOAA-GFDL/MOM6/pull/1507

testing: aux_mom.cheyenne. all tests pass with expected answer changes due to MEKE updates.

kshedstrom and others added 30 commits June 23, 2021 19:54
  Added new diagnostics of the acceleration driven by the wind stress
accelerations as redistributed by a timestep of the vertical viscosity and not
lost to bottom drag within a timestep.  This is also in the diagnostics of the
accelerations due to the vertical viscosity, but the redistribution can be found
from the difference of the two.  Also added a diagnostic of the contribution of
the wind stresses to kinetic energy, and applied an underflow limiter on both
the new acceleration diagnostic and the existing viscous acceleration
diagnostic.  All solutions are bitwise identical, but there are new diagnostics.
  Add checks for inconsistent parameter settings in adiabatic_driver_init() when
ADIABATIC = True, and issue instructive error messages if any are found.  This
PR addresses MOM6 issue mom-ocean#1417.  All answers are bitwise identical, although some
cases where the inconsistent parameter settings were previously ignored may now
issue fatal errors and will not run.
  Added code to lock the restart registry once all registration should have
occurred or if the restart has been read, along with a new public interface,
restart_registry_lock, to allow this lock to be set or unset.  All calls to
register restart fields now check the state of this lock and issue a fatal error
if the registry is locked.  This PR addresses MOM6 issue mom-ocean#1214.

  In the process of adding this restart lock, the new error messages revealed
that some of the restart registration calls related to some types of open
boundary conditions were not happening early enough.  To avoid this, a new
interface, register_DOME_OBC, was added to the DOME_initialization module and is
being called from call_OBC_register, and a number of the OBC-related calls
during the initialization were collected in the same (appropriate) place.  Some
OBC error messages were also corrected.  All answers are bitwise identical, but
there are two new public interfaces and the order of some OBC-related entries in
the MOM_parameter_doc calls changed.
- This addresses the FMS issue $761
NOAA-GFDL/FMS#761

- There is a mpp_broadcast in the FMS2 subroutine
get_unlimited_dimension_name() and this subroutine has to be called by
all pes, so it cannot be inside a if(is_root_pe()) block
  Added a test to avoid attempting to deallocate the geothermal heating field if
it is not allocated, and changed the geo_heat element of geothermal_CS from a
pointer into an allocatable array.  Also clarified the comments describing
several of the elements of geothermal_CS, and added a test to avoid logging the
value of GEOTHERMAL_DRHO_DT_INPLACE when the model is not in layered-mode and
this parameter is unused.  This PR addresses MOM6 issue mom-ocean#1449.  All answers are
bitwise identical in all cases that worked before, but there are fewer entries
in some ALE-mode MOM_parameter_doc files.
…20210723

merge GFDL 20210723 main branch (hash # b629e8d)
Replace MOM_control_struct pointers as locals
* Adding a pass_var to surface h

This is required for the u,v sponges to be invariant of tiling.
I don't know why, but the problem only showed up for me in a narrow
channel in the Bering domain.

* Matt's suggestion for not sponging at the grid edge.

* Finish the masking out of edge in uv sponge.

- Without this change, the edges don't reproduce on restart
  due to the h values outside being nonsense.

The non-merge commits in this squashed PR that were not already in dev/gfdl are: 
NOAA-GFDL@2bfa4bc "Adding a pass_var to surface h"
NOAA-GFDL@95a770a "Matt's suggestion for not sponging at the grid edge."
and
NOAA-GFDL@53dfdc7 "Finish the masking out of edge in uv sponge."
Hallberg-NOAA and others added 23 commits September 24, 2021 11:26
`make all` (the default rule) builds the executables specified by
`BUILDS`.  This was hard-coded, but can be promoted to a user-defined
configuration for user-defined builds.

This should be seen as a simple alias to `make build/${b}/MOM6`.

The `repro` build was also incorrectly in the list, even though it was
also conditionally added.  It has been removed from the default list.

A similar modification was made to CONFIGS, which select the "tc"
experiments.  The default is still to do a `tc*` glob.

Documentation was also added.
Macros for generating individual rules for the tc's were added.  This
was generalized to support the contents of CONFIGS, which is now a
user-defined parameter.

The wildcard rules have now been replaced with more explicit rules, in
preparation for the merge of TESTS and TEST_TYPES.

A method for excluding tests has been added for tc3 support, and could
be extended to future tests.
The Makefile rules were extended to support multiple iterations of
dimension testing.  Examples shown below:

* test.dim      Run all dimension tests
* test.dim.l    Run all L dimension tests
* tc2.dim       Run all tc2 dimension tests
* tc2.dim.l     Run the tc2 L dimension test

Also, TESTS and TEST_TYPES were merged into a single variable, and the
old plural test names (e.g. test.grids) were removed and are now handled
as singular tests => test.grid.

The GitHub actions testing was updated to reflect these new non-plural
names.  It will take some iteration to confirm that they are working.
…direction

+(*)Add ALTERNATE_FIRST_DIRECTION
The `N2_floor` buoyancy frequency was left unset when
`KHTH_USE_FGNV_STREAMFUNCTION` was disabled.  This could potentially
cause errors, such as floating point exceptions.

Ideally we would restrict the calculations of `hN2_[uv]` to when the
streamfunction is enabled.  But due to propagation to these values to
`hN2_[xy]_PE` fields, which may be used outside of the streamfunction,
it is perhaps best to just initialize `N2_floor` to zero.

Although this would mostly likely be initialized to zero in production,
there is a chance that this could modify answers derived from random
initialization.

Thanks to @wfcooke for reporting this.  It was also independently (and
inexplicably) detected during removal of MEKE pointers, suggesting some
memory volatility.
…e_reflection

Refactoring internal tide reflection
(*) N2_floor init fix when FGNV streamfn disabled
…date-2021-10-04

correct long_name for tracer_dfy for passive tracers when diag_form == 1
PRs mom-ocean#1428 and mom-ocean#1457 extended the topography clipping to allow flooding
but missed the use case for positive-only depths where the MASKING_DEPTH
parameter alone was in use. There were two bugs:

1. The new code assumed that MINIMUM_DEPTH would be deeper than
   MASKING_DEPTH (which is intuitive). However, the point of MASKING_DEPTH
   was only to specify the determination of the land mask. The new code
   assigned depths the value of MASKING_DEPTH which broke cases that were
   using MASKING_DEPTH as documented and were leaving MINIMUM_DEPTH=0.

2. The values of variable masking_depth were altered and subsequently
   not consistent with the logged parameters. A warning was issued but
   the behavior was nevertheless not as intended.

Changes:
1. Removed the test that masking_depth > min_depth, and warning
2. Adjusted the condition and assigned value when clipping depths.
   This now uses the shallower of min_depth and masking_depth to decide
   when to clip and for the value to use otherwise.
   The expression for the land mask is unaltered.
3. Corrected documentation to retain original purpose of MASKING_DEPTH
4. Added some comments for declaration with units
5. Added some clarifying comments in code

Todo:
- resolve the need for the alternative negative depth pathway associated
  with the 0.5*min_depth expression.
- @klindsay28 spotted two issues for the NW2 tracers
  1. Use of the wrong logical variable
  2. Incorrect comment
- Using the wrong logical meant that the ideal age pacakge was being
  called in addition to the NW2 package, but did not affect the NW2
  tracers themselves.
- Following feedback from @herrwang0, we have removed the possibility
  for a user to try using negative depths without the MASKING_DEPTH
  parameter being set appropriately. This avoids the asymmetric use
  of MINIMUM_DEPTH that was proposed. A FATAL is now issued.
- Corrected a spelling error in a comment.
- Removed an unused "use" that should have been done in previous commit.
Recover topography clipping when not specifying MINIMUM_DEPTH
Correct logical associated with NW2 tracers
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 25, 2021

Codecov Report

Merging #200 (cb5ae89) into dev/ncar (f58053a) will increase coverage by 29.06%.
The diff coverage is 12.14%.

Impacted file tree graph

@@              Coverage Diff              @@
##           dev/ncar     #200       +/-   ##
=============================================
+ Coverage          0   29.06%   +29.06%     
=============================================
  Files             0      237      +237     
  Lines             0    71635    +71635     
=============================================
+ Hits              0    20822    +20822     
- Misses            0    50813    +50813     
Impacted Files Coverage Δ
config_src/drivers/solo_driver/MOM_driver.F90 68.20% <ø> (ø)
src/ALE/MOM_regridding.F90 21.45% <0.00%> (ø)
src/ALE/coord_adapt.F90 0.00% <0.00%> (ø)
src/ALE/regrid_interp.F90 1.41% <ø> (ø)
src/core/MOM_PressureForce_Montgomery.F90 6.36% <0.00%> (ø)
src/core/MOM_dynamics_unsplit.F90 65.56% <0.00%> (ø)
src/core/MOM_dynamics_unsplit_RK2.F90 64.70% <0.00%> (ø)
src/core/MOM_grid.F90 61.68% <0.00%> (ø)
src/core/MOM_transcribe_grid.F90 24.63% <0.00%> (ø)
src/core/MOM_variables.F90 28.57% <0.00%> (ø)
... and 333 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f58053a...cb5ae89. Read the comment docs.

@gustavo-marques gustavo-marques merged commit 3d86e71 into dev/ncar Oct 25, 2021
@alperaltuntas alperaltuntas deleted the merge_pr1507 branch December 8, 2021 16:59
alperaltuntas pushed a commit that referenced this pull request Dec 14, 2022
Obsolete the HENYEY_IGW_BACKGROUND_NEW option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.