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

Merging latest dev/master into dev/ncar #19

Merged
merged 103 commits into from
Aug 1, 2017

Conversation

gustavo-marques
Copy link
Collaborator

@gustavo-marques gustavo-marques commented Aug 1, 2017

  • Passed all the MOM-examples tests on Cheyenne.

  • Compiled and run using the CESM framework.

Andrew Shao and others added 30 commits May 9, 2017 15:05
…ed to

figure out why the redistribution of residual does not fully conserve.
in MOM_tracer_registry.F90: MOM_tracer_chkinv. This routine calculates
the global inventories of all tracers in the registry. Some of the
debugging checksums in the offline tracer routines are updated to use this
new function.
This primarily resulted from an error in the indexing when the fields were
being updated. Now to test in OM4_05
Added a term proportional to the gradient of divergence to the
Leith viscosity, which turns regular 2D Leith into Modified Leith.
  Moved the calls to set_viscous_BBL out of the dynamics code and up into
step_MOM, eliminating 4-way redundant calls and making the various algorithms
more obviously similar.  The answers are bitwise identical with 3 of the 4
dynamic solvers, but with MOM_dynamics_unsplit the time level of thicknesses
used to calculate the bottom boundary layer properties are replaced with the
initial thicknesses (like the other schemes), rather than the average of the
initial thicknesses and the predicted thicknesses from the first (of perhaps
several) step of the dynamics.  All existing test cases are bitwise identical,
but if SPLIT=FALSE and USE_RK2=FALSE, answers will change.
  Eliminated calc_bbl and bbl_calc_time_interval from the vertvisc_type.  Also
renamed pass_kd_kv_turb to pass_kv_turb and added local variables inside of
step_MOM to take the place of the variables that were eliminated, and added a
new clock to step_MOM to record the time taken by calls to set_viscous_BBL. The
unused module use statements for set_viscous_BBL were also eliminated from the
MOM_dynamics modules.  All answers are bitwise identical.
Runs fail with
FATAL from PE   107: MPP_RESET_GROUP_UPDATE_FIELD_3D_: group%reset_index_s > group%nscalar
etc.

" .and. (.not.CS%thickness_diffuse_first .or. CS%t_dyn_rel_adv == 0)) " was removed in a previous update.
  Corrected a bug when DIABATIC_FIRST=True in how the compensation for the
difference between the dynamic sea surface height used by the barotropic solver
and the height that the layers would have if net mass sources were applied
gradually instead of abruptly at the start of the thermodynamic time step. This
would change answers if both SPLIT and DIABATIC_FIRST are true and the value of
BT_MASS_SOURCE_LIMIT > 0.0, but as there are currently no test cases that match
these conditions, the answers are unchanged in all of the test cases. In cases
where the answers do change, they are unambiguously better based on weaker high
frequency gravity waves arising from coupling shocks.
…opass_fix

Bugfix to reintroduce group halo pass check removed in 282a160
  Corrected spelling errors and content errors in several of the comments
describing subroutine arguments.  All answers are bitwise identical.
  Reverted to the simpler pass_var routines for the single 3-d variable h.  This
avoids the issue that triggered the recent pull request mom-ocean#520, and it should have
no performance impacts.  (In fact, by letting each call have its own halo size,
it might lead to performance improvements in subsequent commits.)  All answers
are bitwise identical.
added Doxygen comments to all of the arguments to the subroutines in
MOM_checksum_packages.F90. All the answers are bitwise identical.
Change to pass_var for h and correct barotropic mass source

...and it passed (no surprise): https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/1956
added Doxygen comments to all of the subroutines in MOM_checksum_packages.F90.
All the answers are bitwise identical.
Added Doxygen comments to all of the subroutines in the
MOM_dynamics_legacy_split.F90. All the answers are bitwise identical.
Added Doxygen comments to all of the subroutines in the
MOM_dynamics_unsplit.F90. All the answers are bitwise identical.
Added doxygen comments to all of the subroutines in MOM_dynamics_unsplit_RK2.F90
…line_tracer_updates

# Conflicts:
#	src/core/MOM.F90
Added doxygen comments to all of the subroutines in MOM_interface_heights.F90.
All the answers are bitwise identical.
Hallberg-NOAA and others added 23 commits June 29, 2017 12:36
  Removed trailing white space that had recently been added on two lines.  All
answers are bitwise identical.
Renames "mod" variable to avoid using imod() fn
  The name "mod" had been used for various module name variables throughout the
MOM6 code, but this can cause name-space conflicts with the mod intrinsic
function, so "mod" has been renamed "mdl" throughout the MOM6 code.  All answers
are bitwise identical.
Renamed variables "mod" to "mdl"

Passed: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/2054

(Initial fail seems to have been a stale file issue).
- VarMix was originally for a crude implementation of a Visbeck et al.
  diffusivity formula. It has become a catchall for resolution functions,
  stored slopes and length-scales. It infact has never contained an actual
  diffusivity. The meaning of the parameter USE_VARIABLE_MIXING was original
  "use Visbeck" but has really meant "allocate and calculate everything in
  this module even if not being used". This has now been cleaned up...
- USE_VARIABLE_MIXING still exists but does nothing.
  - It will be made obsolete shortly.
- Visbeck related fields (VarMix@L2v, ...) are allocated only if
  KhTh_Slope_Cff>0 or KhTr_Slope_Cff>0.
- The Eady growth rates are now allocated and calculated if
  either of Visbeck or MEKE schemes are in use.
- The field VarMix%Rd_dx_h is allocated and calculated if either the
  diagnostic is requested or the field needed "Passivity" or the
  resolution functions.
- The wave speed VarMix%cg1 is calculated only if needed but which
  includes resolution fns, Rd_dx, and FGNV stream fn.
  - Closes mom-ocean#522.
- Added logic in tracer_hordiff() to avoid referencing VarMix%L2v or
  VarMix%SN_v when VarMix%KhTh_Slope_Cff==0.
- Added logic in tracer_hordiff() to avoid referencing VarMix%L2v or
  VarMix%SN_v when VarMix%KhTr_Slope_Cff==0.

- This commit affects available_diags and MOM_parameter_doc for some
  experiments but does not changes answers.
- The third paper, in the series of Fox-Kemper et al., proposed upscaling
  the buoyancy gradients from the frontal scale to the grid-scale. To date
  this has been implemented as a globally constant upscaling indicated by
  the FOX_KEMPER_ML_RESTRAT parameter. This commit implements the upscaling
  as a function of grid-spacing, 1st-baroclinic deformation radius and a
  frontal length scale parameter, MLE_FRONT_LENGTH.
- VarMix is now passed to mixedlayer_restrat since we need VarMix%Rd_dx.
- Updated MLE doxumentation.
- For some reason we had "MLD" in the argument list but "Hml" in the
  subroutine code and declarations. This was breaking the CM4 compile.
- This fixes another occurrence of a keyword being used as a
  variable name. It is allowed but is rather poor practice and
  makes searching for the use of keywords and constructs somewhat
  harder.
- The forcing diagnostics were using array syntax than meant calculations
  were being made for points that could be invalid (uninitialized in halos)
- In order to call calculateBuoyancyFlux2d() along with the ePBL
  the KPP fields are all allocated but not all are needed. This
  allocates only those used.
- The resetting/zeroing and accumulation of diagnostic arrays within
  extractFluxes1d() assumes the routine is called only once. With the
  need for a buoyancy flux in ePBL, it is currently being called twice.
  - This was leading to the "hdfs" diagnostic accumulating too much.
- I have added a flag to indicate to not calculate the diagnostic fields.
  - A better solution will be to only call once but calculate a buoyancy
    flux in extractFluxes1d() but this will require more coding since
    the latter is dependent on the equation of state and needs a different
    interpretation of mass fluxes.
- I checked that this changes "hdfs" but have not checked whether other
  diagnostics were affected.
- Closes NOAA-GFDL/MOM6-examples#128 but I opened mom-ocean#543 to make a note that
  we have more tidying up to do.
Re-factor of MOM_lateral_mixing_coeffs.F90 (VarMix)
Fixed argument name to match declaration gen_trcr_col_physics()
- A new local variable was missing from the openmp directives.
@alperaltuntas alperaltuntas merged commit 7480492 into NCAR:dev/ncar Aug 1, 2017
@gustavo-marques gustavo-marques deleted the new_merge branch August 24, 2017 22:20
alperaltuntas pushed a commit that referenced this pull request Aug 2, 2021
Merge in latest dev/gfdl updates
alperaltuntas pushed a commit that referenced this pull request Feb 18, 2022
- An errant use of the porous face area led to an out-of-bounds k-index
  reported in NOAA-GFDL#19.
- Closes #19
alperaltuntas pushed a commit that referenced this pull request Feb 18, 2022
* additions for stochastic physics and ePBL perts

* cleanup of code and enhancement of ePBL perts

* Update MOM_diabatic_driver.F90

remove conflict with dev/emc

* Update MOM_diabatic_driver.F90

further resolve conflict

* Update MOM_diabatic_driver.F90

put id_sppt_wts, etc back.

* add stochy_restart writing to mom_cap

* additions for stochy restarts

* clean up debug statements

* clean up code

* fix non stochastic ePBL calculation

* re-write of stochastic code to remove CPP directives

* remove blank link in MOM_diagnostics

* clean up MOM_domains

* make stochastics optional

* correct coupled_driver/ocean_model_MOM.F90 and other cleanup

* clean up of code for MOM6 coding standards

* remove stochastics container

* revert MOM_domains.F90

* clean up of mom_ocean_model_nuopc.F90

* remove PE_here from mom_ocean_model_nuopc.F90

* remove debug statements

* stochastic physics re-write

* move stochastics to external directory

* doxygen cleanup

* add write_stoch_restart_ocn to MOM_stochastics

* add logic to remove incrments from restart if outside IAU window

* revert logic wrt increments

* add comments

* update to gfdl 20210806 (#74)

* remove white space and fix comment

* Update MOM_oda_incupd.F90

remove unused index bounds, and fix sum_h2 loop.

Co-authored-by: pjpegion <[email protected]>
Co-authored-by: Marshall Ward <[email protected]>

* Fussing with zotero.bib.

Getting a warning about a repeated bibliography entry for adcroft2004.
Rob thinks this is a hash failure.

* Still fussing with zotero.bib

- it was complaining about the (unused) Kasahara reference.

* Several little things, one is making sponge less verbose.

- Pointing to OBC wiki file from the lateral parameterizations doc.

- Using the MOM6 verbosity to control the time_interp verbosity.

- Making the check for negative water depths more informative.

* return a more accurate error message in MOM_stochasics

* Working on boundary layer docs.

* Done with EPBL docs?

* Undoing some patches from others

* Cleaning up too-new commits

* Adding in that SAL commit again.

* correction on type in directory name

* Added some to vertical viscisity doc.

* Cleaned up whitespace leftover from porous topomerge.

- Spacing within expressions was uneven and made multiplation look like
  POW functions. Leftover from merging NOAA-GFDL#3.
- No answer changes.

* Fix out-of-bounds k index in PPM flux

- An errant use of the porous face area led to an out-of-bounds k-index
  reported in NOAA-GFDL#19.
- Closes #19

* Adding Channel drag figure

* Take cite out of figure caption.

* Copyright year 2022
gustavo-marques pushed a commit that referenced this pull request May 7, 2022
* initial hooks for stochastic EOS modifications

* remove debug statements

* add documentation

* Change ampltiude from 0.39 to sqrt(.39)

* remove global_indexing logic from stoch_eos_init

* switch to using MOM_random and add restart capability

* update random sequence to update each each time-step

* remove tseed0 from MOM_random (leftover from debugging)

* Added necessary submodules and S^2, T^2 diagnostics to MOM_diagnostics

* Added diagnostics for outputting variables related to the stochastic parameterization.

* Diagnostics in MOM_PressureForce_FV updated for stochastic (rather than deterministic) Stanley SGS T variance parameterization.

* Added parentheses for reproducibility.

* Changed diagnostics to account for possible absence of stoch_eos_pattern in MOM_PressureForce_FV,
when deterministic parameterization is on.

* remove mom6_da_hooks and geoKdTree from pkg

* add stochastic compoment to MOM_thickness_diffuse

* fix array size declaration and post_data

* Corrected indexing of loops in MOM_calc_varT

* Changed how parameterization of SGS T variance (deterministic and stochastic) is switched on in PGF and thickness diffusion codes

* Corrected a few typos

* Cleaned up indices, redundant diagnostic, printing

* Fixed diagnostic IDs

* Fixed diagnostics typo

* Corrected indices in calculation of tv%varT

* Minor index fix

* Corrected bug in pressure in Stanley diagnostics

* Fixed whitespace error

* Stoch eos clock (#5)

*Added a clock for the Stanley parameterization

Co-authored-by: jkenigson <[email protected]>

* add halo update to random pattern

* Update MOM_stoch_eos.F90

Fix bug for looping over compute domain (is -> isc etc.)

* Avoid unnessary computations on halo (MOM_stoch_eos) and code clean-up (MOM_thickness_diffuse)

* Removed halo updates before determ param calc

* Update MOM_stoch_eos.F90

Removed unnecessary code

* Bug - indices are transposed

* Changed Stanley stochastic coefficient from exp(X) to exp(aX) (#9)

* Changed Stanley stochastic coefficient from exp(X) to exp(aX)

* Extra spaces removed

* Stoch eos init fix (#10)

* Don't bother calculating tv%varT if stanley_coeff<0

* Missing then added

* Merge Ian Grooms Tvar Discretization (#11)

* Update MOM_stoch_eos.F90

In progress updating stencil for$ | dx \times \nabla T|^2$ calculation

* New discretization of |dx\circ\nablaT|^2

Co-authored-by: Ian Grooms <[email protected]>

* Multiplied tvar%SGS by grid cell thickness ratio

* Added limiter for tv%varT

* Stoch eos ncar linear disc (#12)

* Update MOM_stoch_eos.F90

In progress updating stencil for$ | dx \times \nabla T|^2$ calculation

* New discretization of |dx\circ\nablaT|^2

* AR1 timescale land mask

Adds land mask to the computation of the AR1 decorrelation time

* Update dt in call to MOM_stoch_eos_run

The call to `MOM_stoch_eos_run` (which time steps the noise) is from within `step_MOM_dynamics`. `step_MOM_dynamics` advances on time step `dt` (per line 957), but the noise is updated using `dt_thermo`. It seems more appropriate to update the noise using `dt`, since it gets called from within `step_MOM_dynamics`.

* Fixed the units for r_sm_H

* Remove vestigial declarations

The variables `hl`, `Tl`, `mn_T`, `mn_T2`, and `r_sm_H` are no longer used, so I removed their declarations and an OMP private clause

Co-authored-by: Ian Grooms <[email protected]>

* Update MOM_thickness_diffuse.F90

Changed index for soft convention

* Update CVMix-src

* Ensure use_varT, etc., initialized

* Don't register stanley diagnostics if scheme is off

* Stanley density second derivs at h pts (#15)

* Change discretization of Stanley correction (drho_dT_dT at h points)

* Limit Stanley noise, shrink limiting value

* Revert t variance discretization

* Reverted variable declarations

* Stanley scheme in mixed_layer_restrat, vert_fill in stoch_eos, code cleanup (#19)

* Test Stanley EOS param in mixed_layer_restrat

* Fix size of TS cov, S var in Stanley calculate_density calls

* Test move stanley scheme initialization

* Added missing openMP directives

* Revert Stanley tvar discretization (#18)

* Perform vertical filling in calculation of T variance

* Variable declaration syntax error, remove scaling from get_param

* Fix call to vert_fill_TS

* Code cleanup, whitespace cleanup

Co-authored-by: Jessica Kenigson <[email protected]>

* Use Stanley (2020) variance; scheme off at coast

* Comment clean-up

* Remove factor of 0.5 in Tvar

* Don't calculate Stanley diagnostics on halo

* Change start indices in stanley_density_1d

* Stanley param in MOM_isopycnal_slopes (#22)

Stanley param in MOM_isopycnal_slopes and thickness diffuse index fix

* Set eady flag to true if use_stored_slopes is true

* Cleanup, docs, whitespace

* Docs and whitespace

* Docs and whitespace

* Docs and whitespace

* Whitespace cleanup

* Whitespace cleanup

* Clean up whitespace

* Docs cleanup

* use_stanley

* Update MOM_lateral_mixing_coeffs.F90

* Adds link to another TEOS10 module

* Set Stanley off for testing

* Line continuation

Co-authored-by: Phil Pegion <[email protected]>
Co-authored-by: Philip Pegion <[email protected]>
Co-authored-by: Jessica Kenigson <[email protected]>
Co-authored-by: Jessica Kenigson <[email protected]>
Co-authored-by: jkenigson <[email protected]>
Co-authored-by: jskenigson <[email protected]>
Co-authored-by: Jessica Kenigson <[email protected]>
Co-authored-by: Jessica Kenigson <[email protected]>
Co-authored-by: Philip Pegion <[email protected]>
Co-authored-by: Jessica Kenigson <[email protected]>
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.

9 participants