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

Optional addition of ocean_bgc into mom6 libraries #10

Closed
wants to merge 2 commits into from

Conversation

liuxiao37k
Copy link

Modified CMakeLists.txt to add optional build of ocean biogeochemistry (ocean_bgc) source code into mom6 libraries/executables, invoked by {$OCEAN_BGC_FOUND} = 1

Modified README.md accordingly.

These updates will not affect the existing soca-mom6 ctests (i.e. they can still run with mom6 physics only without ocean_bgc) - they only built the capacity for running ocean_bgc.

Issue(s) addressed

  • fixes JCSDA/soca-bundle/issues/25

Dependencies:

An upstream repository needs to be merged first:

soca-bundle: branch = feature/ocean_bgc
https://github.com/JCSDA/soca-bundle/tree/feature/ocean_bgc

waiting on JCSDA/soca-bundle/pull/26

@liuxiao37k liuxiao37k added enhancement New feature or request waiting for another PR waiting on another pull request to be merged first labels Apr 29, 2020
@liuxiao37k liuxiao37k self-assigned this Apr 29, 2020
@codecov
Copy link

codecov bot commented Apr 29, 2020

Codecov Report

Merging #10 into dev/master-ecbuild will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           dev/master-ecbuild      #10   +/-   ##
===================================================
  Coverage               43.20%   43.20%           
===================================================
  Files                     213      213           
  Lines                   62214    62214           
===================================================
  Hits                    26880    26880           
  Misses                  35334    35334           
Impacted Files Coverage Δ
src/framework/MOM_horizontal_regridding.F90 0.00% <ø> (ø)

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 84c2432...913df68. Read the comment docs.

@liuxiao37k
Copy link
Author

liuxiao37k commented May 5, 2020

Could you please give me a hint on how to get the following done (as you commented here: https://github.com/JCSDA/soca-bundle/pull/26)? Thank you! @travissluka

"I think the ocean_bgc CMakeLIsts.txt needs to

export the files to be included in MOM6. It's messy having the list of variables duplicated in the MOM6 CMakeLists here https://github.com/JCSDA/MOM6/blob/feature/mom6-bgc/CMakeLists.txt#L130 AND this wont work when doing TravisCI builds of soca because those locations can't be hardcoded like that. Their location will be different when doing a make install.
move the recursive submodule update to inside the ocean_bgc repo, That's too much logic to be in the main bundle right now.
Perhaps we should have a discussion on the particularities of how our TravisCI build system works, because it has implications on how new repositories are added."

This is what I tried but it did not work:

in ocean_bgc/CMakeLists.txt:
set (OCEAN_BGC_SRC_FILES ocean_bgc_src_files)
list( APPEND ocean_bgc_src_files
file aaa
file bbb
file ccc
...)
in mom6/CMakeLists.txt:
ecbuild_use_package( PROJECT ocean_bgc )
list( APPEND mom6_src_files
${config_src_files}
${src_files}
${OCEAN_BGC_SRC_FILES}
)
How could I export OCEAN_BGC_SRC_FILES such that it is accessible in mom6? Thank you.

@guillaumevernieres
Copy link

@liuxiao37k , fyi, @aerorahul 's recursive cloning addition to ecbuild is curently in review.

guillaumevernieres pushed a commit that referenced this pull request Jun 18, 2020
…10)

added to cap at or before code sprint but add these changes without
requiring ifdef CMEPS flags
@liuxiao37k liuxiao37k closed this Jun 25, 2020
@liuxiao37k liuxiao37k deleted the feature/ocean_bgc branch June 25, 2020 23:03
travissluka pushed a commit that referenced this pull request Jul 12, 2021
Testing: Target uses local autoconf
guillaumevernieres pushed a commit that referenced this pull request Jan 11, 2022
Visc_rem_[uv] multiplied momentum budget diagnostics
mark-a-potts pushed a commit to mark-a-potts/MOM6 that referenced this pull request Aug 10, 2023
* 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 (JCSDA-internal#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) (JCSDA-internal#9)

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

* Extra spaces removed

* Stoch eos init fix (JCSDA-internal#10)

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

* Missing then added

* Merge Ian Grooms Tvar Discretization (JCSDA-internal#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 (JCSDA-internal#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 (JCSDA-internal#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 (JCSDA-internal#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 (JCSDA-internal#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 (JCSDA-internal#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]>
mark-a-potts pushed a commit to mark-a-potts/MOM6 that referenced this pull request Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting for another PR waiting on another pull request to be merged first
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants