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

update to main branch 20220629 commit #95

Merged

Conversation

jiandewang
Copy link
Collaborator

update dev/emc to MOM6 main branch 20220629 (NCAR candidate 20220603) commit. See detail at #94

brandon.reichl and others added 30 commits May 21, 2021 12:29
- Add Craik-Leibovich terms, vorticity and dynamic pressure components.
- Add exploratory Stokes ddt version in MOM_wave_interface and MOM.F90
- Add tendency diagnostics for Stokes terms w/ control and option for diagnostic only Stokes force computation in MOM_CoriolisAdv.
- This only makes sense to add on the dynamics timestep.
Fix tidal mixing coeff diags when they are unavailable.
With these changes, arbitrary number of of partitioned stokes drift components
may be imported from ww3 when coupled within cesm. After the planned unification
of ww3 nuopc caps of CESM and EMC, the old (fixed) approach may be removed.
profile to restart file when surfbands wave coupling mode is on.
add the optional waves_csp arg to initialize_MOM
calls so as to ensure that the waves_csp is allocated.
This commit also has several misc doxygen fixes.
in MOM_CoriolisAdv. Also remove the Passive_Stokes_VF
block since it's never set to true.
…ments incorrectly override dvdx and dudy when surfbands wave coupling is on.
- Adding logical to prevent using terms if not allocated
- Adding optional diagnostic only output of term
- Moving time increment to within dynamics step instead of in main step MOOM loop.
- Correcting time tendency term to reflect time between Stokes drift updates and extent of dynamics time loop.
gustavo-marques and others added 18 commits April 21, 2022 10:17
* Remove lrunoff_hflx and frunoff_hflx from the IOB type. These
are never used;

* mean_runoff_heat_flx and mean_calving_heat_flx are are never
advertized, so these have been deleted;

* If cesm_coupled=true, six new fields are imported:
  - heat_content_lprec
  - heat_content_fprec
  - heat_content_evap
  - heat_content_cond
  - heat_content_rofl
  - heat_content_rofi

* Add a new parameter (ENTHALPY_FROM_COUPLER) to control if the
enthalpy associated with mass entering/leaving the ocean is provided
via the coupler or calculated in MOM6.
* If fluxes%heat_content_evap is associated, which will only happens in CESM
and when ENTHALPY_FROM_COUPLER=True, the heat contribution from mass
entering/leaving the ocean is accounted for using the six enthalpy terms
provided by the coupler: heat_content_evap, heat_content_lprec,
heat_content_fprec, heat_content_cond, heat_content_lrunoff, and
heat_content_frunoff. If fluxes%heat_content_evap is not associated,
these terms are accounted for via tv%TempxPmE;

* TODO: check that these changes do not change answers for GFDL.
This commit change the description of parameter ENTHALPY_FROM_COUPLER,
and it changes the call so that ENTHALPY_FROM_COUPLER is now logged
at this point.
* Introduces a new constant (EnthalpyConst = 1.0, by default) which
is set to 0.0 when fluxes%heat_content_evap is associated. This
constant is used in the expression that accounts for the temperature
 of the mass exchange (dTemp) to avoid double-couting for the enthalpy
terms when they are provided via coupler.

* Use heat_content_evap to determine if the diagostics heat_content_massin,
heat_content_massout, and TempxPmE should be calculated.
* Modify allocate_forcing_by_group so that heat_content_evap is allocated
and heat_content_massin and heat_content_massout *are not* allocated
when enthlapy terms are provided via coupler. This is done via optional
argument (hevap);

* Apply all modifications needed to include a new field in the
flux type (heat_content_evap): rotate_array, deallocate, fluxes_accumulate,
hchksum, and new diagnostics;

* Modify forcing_diagnostics so that diagnostics are properly computed
whether enthalpy terms are provided via coupler or computed by MOM6. This is
done by introducing a logical variable mom_enthalpy (default = true, meaning
dianostics are computed in the default way, using heat_content_massout). When
then optional argument (enthalpy) is present and true, mom_enthalpy = false.
In this case, diagnositcs are computed using heat_content_evap instead of
heat_content_massout.

* Deletes all entries associated with heat_content_icemelt. The enthalpy
associated with the mass from sea ice formation/melting is already accounted
for in field seaice_melt_heat. A note explaining this is also added.

Subroutine extractFluxes1d:

* When enthalpy terms are computed by MOM6, their contribution to the heat budget
is accounted for in subroutine applyBoundaryFluxesInOut. On the other hand, when
enthalpy terms are provided via coupler, they are included in net_heat in
this subroutine;

* By default the heat content from mass entering and leaving the ocean (enthalpy)
is diagnosed in this subroutine. When heat_content_evap is associated,
the enthalpy terms are provided via coupler and, therefore, they do not need
to be computed again. A logical variable (do_enthalpy, deault = true) is
introduced for this purposes. If luxes%heat_content_evap, do_enthalpy = false.
* only writes fluxes%heat_content_* when ENTHALPY_FROM_COUPLER = True.
* 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 (NOAA-EMC#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 (NOAA-EMC#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 (NOAA-EMC#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 (NOAA-EMC#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]>
…date_16may2022

(*)Merge MOM6/main from 16 May 2022
Address comment from reviewer by adding units to covTS and varS.
* Add ``implicit none ; private`` to this module;
* Put module variables into the control structure for this module;
* Add the description of the units for all real variables;
* Add a consistent two-point indent throughout the module .

TODO:
Without further modifications, adding ``private`` to the control
structure of this module will break the model. Currently, MOM.F90
needs access to ``use_stoch_eos``, ``stanley_coeff``, and some of
the diagnostic ids.
…candidate-2022-06-03

NCAR to main candidate branch (2022-06-03)
@codecov-commenter
Copy link

codecov-commenter commented Jun 29, 2022

Codecov Report

Merging #95 (7c8fb11) into dev/emc (c781316) will decrease coverage by 0.16%.
The diff coverage is 16.16%.

@@             Coverage Diff             @@
##           dev/emc      #95      +/-   ##
===========================================
- Coverage    28.78%   28.62%   -0.17%     
===========================================
  Files          249      252       +3     
  Lines        72991    73515     +524     
===========================================
+ Hits         21010    21040      +30     
- Misses       51981    52475     +494     
Impacted Files Coverage Δ
src/core/MOM_variables.F90 28.57% <ø> (ø)
src/equation_of_state/MOM_EOS.F90 21.04% <0.00%> (-2.41%) ⬇️
...uation_of_state/TEOS10/gsw_mod_error_functions.f90 0.00% <ø> (ø)
src/framework/MOM_random.F90 74.31% <ø> (ø)
src/parameterizations/lateral/MOM_MEKE.F90 50.81% <0.00%> (ø)
src/parameterizations/vertical/MOM_CVMix_KPP.F90 1.04% <0.00%> (+0.04%) ⬆️
...rc/parameterizations/vertical/MOM_tidal_mixing.F90 2.09% <0.00%> (-0.01%) ⬇️
src/tracer/MOM_CFC_cap.F90 18.77% <0.00%> (-1.95%) ⬇️
src/tracer/MOM_tracer_flow_control.F90 52.22% <0.00%> (-0.39%) ⬇️
src/tracer/MOM_tracer_types.F90 0.00% <0.00%> (ø)
... and 28 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 c781316...7c8fb11. Read the comment docs.

@jiandewang jiandewang force-pushed the feature/update-to-main-20220603 branch from 7c8fb11 to a249742 Compare July 18, 2022 19:42
@jiandewang jiandewang changed the title update to main branch 20220603 commit update to main branch 20220629 commit Jul 21, 2022
@jiandewang jiandewang merged commit ec1d17e into NOAA-EMC:dev/emc Jul 21, 2022
@jiandewang jiandewang deleted the feature/update-to-main-20220603 branch July 24, 2023 03:01
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.

7 participants