Skip to content
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

Candidate for main from GFDL 2020-09-18 #1211

Merged
merged 415 commits into from
Oct 22, 2020
Merged

Conversation

adcroft
Copy link
Collaborator

@adcroft adcroft commented Sep 21, 2020

This is a PR onto our collective main branch. Note we now use the terminology "main" where we once used "dev/master". Instructions on renaming your branches can be found at https://github.com/NOAA-GFDL/MOM6/wiki/Renaming-the-main-branch-in-MOM6.

This PR has some potentially major-impact changes which are detailed below. Each in isolation made sense but unfortunately we let them stack up so may take some work to sort through - our apologies!

  • A change in defaults for parameters potentially changes your answers if you implicitly rely on a parameter by not setting it explicitly at run-time. If your answers have changed with this PR-to-main then follow the instructions outlined in NOAA-GFDL#1127 to recover your answers.
    • NOAA-GFDL#1127 MOM6: +(*)Changed the defaults for 36 parameters
  • Reorganization of some source code. The use of git submodules for optional code in pkg/ has been replaced by the use of null modules in config_src/external. This means the search path for code at compile time must be updated.
    • NOAA-GFDL#1133 Added null version of ocean_BGC
    • NOAA-GFDL#1139 Moved hooks from pkg to external
    • NOAA-GFDL#1160 Move MOM_oda_driver to framework directory
  • New version of FMS. It's not a major change but you must use tag 2019.01.03 from here on. There is an new argument in one API that is needed to be forward compatible. We will soon be updating GFDL to using a 2020 tag but that will not require source code change and should be optional.
    • NOAA-GFDL#1141 FMS2020.01 "runtime required" but optional argument to diag_axis_init
    • NOAA-GFDL#1143 This is the minimum required update to use 2020.01 FMS & FMScoupler
    • NOAA-GFDL#1158 Test patch to FMS 2019.01.02 from Rusty
    • NOAA-GFDL#1164 Move FMS tag to 2019.01.03
  • Change in diagnostic timing. This will change the values you diagnose for temperatire and salinity. Due to a mistake introduced when closing the remapped diagnostic budgets the call to posts for T/S was moved too early in the algorithm.
    • NOAA-GFDL#1207 Post tracer concentration when synced

I've classified the remaining PRs below which we expect should not affect you adversely.

As usual, please can @jiandewang, @awallcraft, @kshedstrom, and @gustavo-marques review the PR.

Bug fixes:

  • NOAA-GFDL#1114 Rotate: fixed-time ALE sponge bugfixes
  • NOAA-GFDL#1122 Solution for Divide by zero in OBC reservoirs #1121 (OBC)
  • NOAA-GFDL#1128 Fixes a assignment mismatch in MOM_generic_tracers bug
  • NOAA-GFDL#1129 *Corrected two bugs impacting .testing test cases bug
  • NOAA-GFDL#1136 +partial fix for Imperfect restarts in Bering domain #1130
  • NOAA-GFDL#1159 +Adding a halo update for tracer reservoirs.
  • NOAA-GFDL#1169 Fixing loop bound error in MOM_PressureForce_Montgomery.F90
  • NOAA-GFDL#1170 OBC: H-dimensionality fixes
  • NOAA-GFDL#1175 (*)Fix code problems that appear in ISOMIP cases
  • NOAA-GFDL#1181 (*)Correct the values returned by wave_speeds
  • NOAA-GFDL#1183 Fixes in wave structure, solves inconsistent array copies in MOM_wave_structure #1182

Testing:

  • NOAA-GFDL#1115 Travis: Arm64 tests; git depth restored; Makefile
  • NOAA-GFDL#1118 CodeCov: Set number of reports to 8
  • NOAA-GFDL#1119 Codecov: Set base as parent (target) branch
  • NOAA-GFDL#1120 Codecov: Set base as parent (target) branch
  • NOAA-GFDL#1137 Minor adjustments to .testing/Makefile
  • NOAA-GFDL#1138 *Fix frazil restarts (corrects bug from PR#1102)
  • NOAA-GFDL#1140 Use FMS tag 2019.01.02 in .testing
  • NOAA-GFDL#1144 Testing: Removed environment flag checks
  • NOAA-GFDL#1150 Testing: Explicit OpenMP CPU affinity
  • NOAA-GFDL#1166 Testing: tc4 installs python-netCDF4 via venv
  • NOAA-GFDL#1194 .testing Makefile typo fix
  • NOAA-GFDL#1195 Add a codecov upload job to establish coverage changes
  • NOAA-GFDL#1197 Autoconf-based build framework
  • NOAA-GFDL#1208 Testing: Warn on new diagnostic in regression

Enhancements:

  • NOAA-GFDL#1116 MOM6: +Add just_read_params arg to entrain_diffusive_init
  • NOAA-GFDL#1123 (*)Improve ePBL when EPBL_ORIGINAL_PE_CALC=False
  • NOAA-GFDL#1124 MOM6: +Minor improvements in framework code
  • NOAA-GFDL#1125 +(*)Fix conflicting defaults for NKML
  • NOAA-GFDL#1126 Neverworld2 and "basin builder"
  • NOAA-GFDL#1132 Removing broken link to diag_table documentation.
  • NOAA-GFDL#1134 Additions from GMAO (I)
  • NOAA-GFDL#1135 +Improve documentation in MOM_parameter_doc files
  • NOAA-GFDL#1142 Added diagnostics for partial derivatives of density
  • NOAA-GFDL#1147 (*)Corrected halo size in EOS call if VERTEX_SHEAR=T
  • NOAA-GFDL#1148 Fixing openmp issues with FMS2020 cpu affinity
  • NOAA-GFDL#1152 Removed #ifdef debugging blocks
  • NOAA-GFDL#1153 Adding OBC code to slope_x, slope_y
  • NOAA-GFDL#1154 +Aligned newlines with module documentation
  • NOAA-GFDL#1156 Adds parameterizations of SGS variance to PGF and isopycnal slopes
  • NOAA-GFDL#1161 MOM6: +(*)Add option to use time-integrated barotropic continuity
  • NOAA-GFDL#1162 MOM6: (*?)Revised ice_shelf_driver.F90 so it compiles
  • NOAA-GFDL#1163 Momentum budget terms multiplied by fractional layer-thicknesses
  • NOAA-GFDL#1167 OBC: Define global indices when [IJ]s == [IJ]e
  • NOAA-GFDL#1171 OBC: Removal of segment zero
  • NOAA-GFDL#1172 (*)Improve advective CFL calculation with tiny h
  • NOAA-GFDL#1173 Infrastructure calls via framework directory
  • NOAA-GFDL#1174 Move call to initialize_segment_data to MOM_state_initialization
  • NOAA-GFDL#1176 Dev master candidate NCAR 2020-08-11
  • NOAA-GFDL#1178 +Move find_interfaces to MOM_state_initialization
  • NOAA-GFDL#1179 New option to use a grid index convention for spatially-varying diagn\u2026
  • NOAA-GFDL#1180 Ice shelf grid
  • NOAA-GFDL#1184 *+Add halo updates needed with VERTEX_SHEAR=True
  • NOAA-GFDL#1186 Fix epipycnal pairing array size declarations
  • NOAA-GFDL#1187 Small correction in register_diag_field for 2D diagnostics
  • NOAA-GFDL#1188 +Allow position=NORTH_FACE in pass_var calls
  • NOAA-GFDL#1189 +Revised interface to write_cputime
  • NOAA-GFDL#1190 Updating the default setting for BBL_USE_EOS to match USE_REGRIDDING
  • NOAA-GFDL#1192 Always set VARIABLE_BUOYFORCE = True with RESTOREBUOY = True
  • NOAA-GFDL#1193 Brankart PGF update
  • NOAA-GFDL#1196 *Corrected the test whether to use fluxes%psurf
  • NOAA-GFDL#1198 (*)Reduce size of GV%Rlay and improve error handling
  • NOAA-GFDL#1199 (*)Correct the use of memory macros for arguments
  • NOAA-GFDL#1200 OBC: segment parser refactoring
  • NOAA-GFDL#1202 Properly set vertex_shear in set_diffusivity_init
  • NOAA-GFDL#1204 +Merge dev/master into dev/gfdl
  • NOAA-GFDL#1205 Clean up pass_var for tracer reservoirs.
  • NOAA-GFDL#1209 GM-Brankart update from NCAR

adcroft and others added 30 commits June 26, 2020 08:59
  Corrected halo size in density derivative calculations in smoothed_dRdT_dRdS
This fixes an i-parallelization problem that was recently introduced (as a part
of MOM6 PR#1089) when VERTEX_SHEAR is True, and closes MOM6 issue #1146.  All
answers in the existing MOM6-examples test suite are bitwise identical, but this
does change (correct) answers when VERTEX_SHEAR is true.
- FMS2020 has newer cpu affinity work. These are mostly to fix the
  issues with thread placing and  hyperthreadng under slurm on gaea.
  But it also works on Orion.
- The new affinity module simplifies the thread-placing calls in the
  component models.
- The name of some functions has changed, that's the reason for crashes
  like:
      FATAL: input domain does not have an io_domain.
- This update fixes those issues.
- openmp runs with 1 and 2 threads gives the same answers as non-openmp
- NOTE: I don't rememer why we put the thread placing calls in MOM_domains.F90
        They look as unnecessary and the whole #ifndef NOT_SET_AFFINITY block
        can probably be removed. ocean_nthreads is either set in coupler
or solo_driver.
(*)Corrected halo size in EOS call if VERTEX_SHEAR=T
FMS affinity operations, often used in OpenMP directives, require
explicit CPU affinities such that the number of available CPUs matches
the number of requested PEs.

To accommodate this, we explicit configure OpenMP to use cpu=0 for our
ARM tests.
  Removed old debugging code in blocks of code surrounded by #ifdef statements
and removed unnecessary #ifdef around other blocks of debugging code.  MOM6
standards discourage the use of CPP macros except for a limited set of uses
related to memory where this is unavoidable, so this commit is bringing MOM6
closer to its stated standards.  All answers and output are identical.
  Modified doc_module so that new lines are added only when modules are
documented, and are added in all parameter_doc files in which modules are
documented.  All answers and output are identical, but there are white space
changes in MOM_parameter_doc and SIS_parameter_doc files.
  Added the new optional argument like_default to the log_param and doc_param
routines to help control where the documentation appears.  This new argument is
used for logging EPBL_USTAR_MIN, the diagnosed output value of MAXIMUM_DEPTH
when the input value is negative, and the diagnosed number of columns where
sponges occur with MOM_ALE_sponge.  An '!' was also added to the logging of
EPBL_USTAR_MIN.  All answers are bitwise identical but there are minor changes
in the contents of some MOM_parameter_doc.short files.
Added diagnostics for partial derivatives of density
  Added code to determine whether all parameters in the MOM_grid, MOM_restart,
MOM_write_cputime and MOM_tracer_registry modules are being used with their
default settings, and added all_default arguments to the log_version calls for
these modules.  All answers and output are identical, but there are white space
changes in MOM_parameter_doc.short and SIS_parameter_doc.short files.
Testing: Explicit OpenMP CPU affinity
- Members of a type cannot be individually labelled as shared/private
- One variable was converted to shared since it was defiend in a non-OMP
  section and then labelled as private which meant it was uninitialized.
@kshedstrom
Copy link
Collaborator

I approve this PR.

marshallward and others added 2 commits September 22, 2020 11:40
The COVERAGE variable was incorrectly quoted, and was causing incorrect
quotes in the compile flag arguments.

This patch removes the redundant quotes.
@adcroft
Copy link
Collaborator Author

adcroft commented Sep 22, 2020

Following @gustavo-marques realization yesterday, I pushed the corresponding branch "main-candidate-2020-09-18" to MOM6-examples.

@jiandewang
Copy link
Collaborator

EMC will follow the changing of those default values, works fine in EMC coupled system

@adcroft
Copy link
Collaborator Author

adcroft commented Oct 15, 2020

@gustavo-marques What's your status on this PR?

@gustavo-marques
Copy link
Collaborator

@alperaltuntas and I are working on it. Cheyenne was down for maintenance over the last two days. We should be able to finish handling it within the next day or two.

@@ -1095,7 +1095,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
call get_param(param_file, mdl, "USE_NET_FW_ADJUSTMENT_SIGN_BUG", &
CS%use_net_FW_adjustment_sign_bug, &
"If true, use the wrong sign for the adjustment to "//&
"the net fresh-water.", default=.false.)
"the net fresh-water.", default=.true.)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default for this parameter did not have to be changed. We (NCAR) had already set this to False and, unintentionally, @Hallberg-NOAA set it back to True in NOAA-GFDL#1127

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 3871073

@@ -1094,7 +1094,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
call get_param(param_file, mdl, "USE_NET_FW_ADJUSTMENT_SIGN_BUG", &
CS%use_net_FW_adjustment_sign_bug, &
"If true, use the wrong sign for the adjustment to "//&
"the net fresh-water.", default=.false.)
"the net fresh-water.", default=.true.)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. The default should be False.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 3871073

@gustavo-marques
Copy link
Collaborator

We were able to recover previous answers after manually setting USE_NET_FW_ADJUSTMENT_SIGN_BUG=False. I suggest that we change the default for this flag in both MCT and NUOPC caps before merging this PR (see above).

@adcroft
Copy link
Collaborator Author

adcroft commented Oct 19, 2020

@gustavo-marques Thanks for the above. I'll update this branch shortly.

- The default for USE_NET_FW_ADJUSTMENT_SIGN_BUG had been changed to
  False but during the merge of main onto dev/gfdl the default was
  inadvertently flipped. @gustavo-marques pointed this out when reviewing
  NOAA-GFDL/MOM6#1211.
- This affects EMC and NCAR versions of drivers and is not tested at GFDL.
marshallward referenced this pull request Oct 21, 2020
- The default for USE_NET_FW_ADJUSTMENT_SIGN_BUG had been changed to
  False but during the merge of main onto dev/gfdl the default was
  inadvertently flipped. @gustavo-marques pointed this out when reviewing
  NOAA-GFDL/MOM6#1211.
- This affects EMC and NCAR versions of drivers and is not tested at GFDL.
@gustavo-marques
Copy link
Collaborator

Thanks for making these changes. We now approve this PR.

@awallcraft
Copy link
Collaborator

I approve this PR.

@adcroft adcroft self-assigned this Oct 22, 2020
@adcroft adcroft merged commit ced41b5 into main Oct 22, 2020
@adcroft adcroft deleted the main-candidate-2020-09-18 branch October 22, 2020 20:09
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.