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

Adding OBC code to slope_x, slope_y #1153

Merged
merged 8 commits into from
Jul 6, 2020
Merged

Adding OBC code to slope_x, slope_y #1153

merged 8 commits into from
Jul 6, 2020

Conversation

kshedstrom
Copy link
Collaborator

More for working on issue #1130 . Hopefully I got the OpenMP stuff right.

@codecov-commenter
Copy link

codecov-commenter commented Jul 1, 2020

Codecov Report

Merging #1153 into dev/gfdl will decrease coverage by 0.30%.
The diff coverage is 33.93%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl    #1153      +/-   ##
============================================
- Coverage     46.08%   45.78%   -0.31%     
============================================
  Files           214      223       +9     
  Lines         69399    69875     +476     
============================================
+ Hits          31984    31991       +7     
- Misses        37415    37884     +469     
Impacted Files Coverage Δ
...g_src/external/GFDL_ocean_BGC/FMS_coupler_util.F90 0.00% <0.00%> (ø)
...fig_src/external/GFDL_ocean_BGC/generic_tracer.F90 0.00% <0.00%> (ø)
...c/external/GFDL_ocean_BGC/generic_tracer_utils.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/kdtree.f90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/ocean_da_core.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/ocean_da_types.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/write_ocean_obs.F90 0.00% <0.00%> (ø)
config_src/solo_driver/MESO_surface_forcing.F90 0.00% <0.00%> (ø)
config_src/solo_driver/user_surface_forcing.F90 0.00% <0.00%> (ø)
src/ALE/MOM_regridding.F90 31.63% <0.00%> (ø)
... and 116 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 56ec441...a6d5d28. Read the comment docs.

@adcroft adcroft self-assigned this Jul 6, 2020
@adcroft
Copy link
Collaborator

adcroft commented Jul 6, 2020

Testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/10763

Just a heads up, I found I need two patches to pass the openMP tests:

diff --git a/src/core/MOM_isopycnal_slopes.F90 b/src/core/MOM_isopycnal_slopes.F90
index 84df62b80..58bc19674 100644
--- a/src/core/MOM_isopycnal_slopes.F90
+++ b/src/core/MOM_isopycnal_slopes.F90
@@ -181 +181,2 @@ subroutine calc_isoneutral_slopes(G, GV, US, h, e, tv, dt_kappa_smooth, &
-  !$OMP                                  present_N2_u,G_Rho0,N2_u,slope_x,EOSdom_u,local_open_u_BC) &
+  !$OMP                                  present_N2_u,G_Rho0,N2_u,slope_x,EOSdom_u,local_open_u_BC, &
+  !$OMP                                  OBC) &
@@ -284 +285 @@ subroutine calc_isoneutral_slopes(G, GV, US, h, e, tv, dt_kappa_smooth, &
-  !$OMP                                  local_open_v_BC,OBC%segnum_u,OBC%segnum_v) &
+  !$OMP                                  local_open_v_BC,OBC) &
diff --git a/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 b/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90
index c227bdfdb..e0def9182 100644
--- a/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90
+++ b/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90
@@ -537,2 +537 @@ subroutine calc_Visbeck_coeffs(h, slope_x, slope_y, N2_u, N2_v, G, GV, US, CS, O
-  !$OMP parallel do default(shared) private(S2,H_u,Hdn,Hup,H_geom,N2,wNE,wSE,wSW,wNW, &
-  !$OMP                                     local_open_u_BC)
+  !$OMP parallel do default(shared) private(S2,H_u,Hdn,Hup,H_geom,N2,wNE,wSE,wSW,wNW)
@@ -579,2 +578 @@ subroutine calc_Visbeck_coeffs(h, slope_x, slope_y, N2_u, N2_v, G, GV, US, CS, O
-  !$OMP parallel do default(shared) private(S2,H_v,Hdn,Hup,H_geom,N2,wNE,wSE,wSW,wNW, &
-  !$OMP                                     local_open_u_BC)
+  !$OMP parallel do default(shared) private(S2,H_v,Hdn,Hup,H_geom,N2,wNE,wSE,wSW,wNW)

@kshedstrom
Copy link
Collaborator Author

Thank you for fixing the OpenMP stuff.

I was hoping for help on this issue before you merge:

+ if (associated(OBC%tres_x) .or. associated(OBC%tres_y)) then
+  do m=1,OBC%ntr
+   call pass_vector(OBC%tres_x(:,:,:,m), OBC%tres_y(:,:,:,m), G%Domain, To_All+Scalar_Pair)
+  enddo
+ endif

causes dumbbell to blow up (only one of the tres_? is allocated), but is required for perfect restarts of Bering.

@adcroft adcroft merged commit a6d5d28 into mom-ocean:dev/gfdl Jul 6, 2020
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.

3 participants