Skip to content

Commit

Permalink
Merge 9d6def6 into bac8031
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallward committed May 19, 2022
2 parents bac8031 + 9d6def6 commit c2bf720
Show file tree
Hide file tree
Showing 204 changed files with 9,988 additions and 6,704 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ gnu:ocean-only-nolibs:
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile pipeline-build-gnu-oceanonly-nolibs
- make -f tools/MRS/Makefile MOM6_SRC=../.. pipeline-build-gnu-oceanonly-nolibs

gnu:ice-ocean-nolibs:
stage: builds
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile pipeline-build-gnu-iceocean-nolibs
- make -f tools/MRS/Makefile MOM6_SRC=../.. pipeline-build-gnu-iceocean-nolibs

intel:repro:
stage: builds
Expand Down
6 changes: 3 additions & 3 deletions .testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ build/openmp/Makefile: MOM_ACFLAGS=--enable-openmp
build/target/Makefile: MOM_ACFLAGS=
build/opt/Makefile: MOM_ACFLAGS=
build/opt_target/Makefile: MOM_ACFLAGS=
build/coupled/Makefile: MOM_ACFLAGS=--with-driver=coupled_driver
build/nuopc/Makefile: MOM_ACFLAGS=--with-driver=nuopc_driver
build/mct/Makefile: MOM_ACFLAGS=--with-driver=mct_driver
build/coupled/Makefile: MOM_ACFLAGS=--with-driver=FMS_cap
build/nuopc/Makefile: MOM_ACFLAGS=--with-driver=nuopc_cap
build/mct/Makefile: MOM_ACFLAGS=--with-driver=mct_cap

# Fetch regression target source code
build/target/Makefile: | $(TARGET_CODEBASE)
Expand Down
22 changes: 11 additions & 11 deletions config_src/drivers/FMS_cap/MOM_surface_forcing_gfdl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
fluxes%salt_flux_added(is:ie,js:je) = fluxes%salt_flux(is:ie,js:je) ! Diagnostic
else
do j=js,je ; do i=is,ie
if (G%mask2dT(i,j) > 0.5) then
if (G%mask2dT(i,j) > 0.0) then
delta_sss = sfc_state%SSS(i,j) - data_restore(i,j)
delta_sss = sign(1.0,delta_sss)*min(abs(delta_sss),CS%max_delta_srestore)
fluxes%vprec(i,j) = (CS%basin_mask(i,j)*open_ocn_mask(i,j)*CS%srestore_mask(i,j))* &
Expand Down Expand Up @@ -956,13 +956,13 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
if (present(taux).and.present(tauy)) then
do j=jsh,jeh ; do I=Isqh,Ieqh
taux(I,j) = 0.0
if ((G%mask2dBu(I,J) + G%mask2dBu(I,J-1)) > 0) &
if ((G%mask2dBu(I,J) + G%mask2dBu(I,J-1)) > 0.0) &
taux(I,j) = (G%mask2dBu(I,J)*taux_in_B(I,J) + G%mask2dBu(I,J-1)*taux_in_B(I,J-1)) / &
(G%mask2dBu(I,J) + G%mask2dBu(I,J-1))
enddo ; enddo
do J=Jsqh,Jeqh ; do i=ish,ieh
tauy(i,J) = 0.0
if ((G%mask2dBu(I,J) + G%mask2dBu(I-1,J)) > 0) &
if ((G%mask2dBu(I,J) + G%mask2dBu(I-1,J)) > 0.0) &
tauy(i,J) = (G%mask2dBu(I,J)*tauy_in_B(I,J) + G%mask2dBu(I-1,J)*tauy_in_B(I-1,J)) / &
(G%mask2dBu(I,J) + G%mask2dBu(I-1,J))
enddo ; enddo
Expand All @@ -984,14 +984,14 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,

if (present(taux)) then ; do j=jsh,jeh ; do I=Isqh,Ieqh
taux(I,j) = 0.0
if ((G%mask2dT(i,j) + G%mask2dT(i+1,j)) > 0) &
if ((G%mask2dT(i,j) + G%mask2dT(i+1,j)) > 0.0) &
taux(I,j) = (G%mask2dT(i,j)*taux_in_A(i,j) + G%mask2dT(i+1,j)*taux_in_A(i+1,j)) / &
(G%mask2dT(i,j) + G%mask2dT(i+1,j))
enddo ; enddo ; endif

if (present(tauy)) then ; do J=Jsqh,Jeqh ; do i=ish,ieh
tauy(i,J) = 0.0
if ((G%mask2dT(i,j) + G%mask2dT(i,j+1)) > 0) &
if ((G%mask2dT(i,j) + G%mask2dT(i,j+1)) > 0.0) &
tauy(i,J) = (G%mask2dT(i,j)*tauy_in_A(i,j) + G%mask2dT(i,J+1)*tauy_in_A(i,j+1)) / &
(G%mask2dT(i,j) + G%mask2dT(i,j+1))
enddo ; enddo ; endif
Expand Down Expand Up @@ -1029,10 +1029,10 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
gustiness = CS%gust_const
if (CS%read_gust_2d) then
if ((wind_stagger == CGRID_NE) .or. &
((wind_stagger == AGRID) .and. (G%mask2dT(i,j) > 0)) .or. &
((wind_stagger == AGRID) .and. (G%mask2dT(i,j) > 0.0)) .or. &
((wind_stagger == BGRID_NE) .and. &
(((G%mask2dBu(I,J) + G%mask2dBu(I-1,J-1)) + &
(G%mask2dBu(I,J-1) + G%mask2dBu(I-1,J))) > 0)) ) &
(G%mask2dBu(I,J-1) + G%mask2dBu(I-1,J))) > 0.0)) ) &
gustiness = CS%gust(i,j)
endif
ustar(i,j) = sqrt(gustiness*IRho0 + IRho0*Pa_conversion*IOB%stress_mag(i-i0,j-j0))
Expand All @@ -1050,7 +1050,7 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
do j=js,je ; do i=is,ie
tau_mag = 0.0 ; gustiness = CS%gust_const
if (((G%mask2dBu(I,J) + G%mask2dBu(I-1,J-1)) + &
(G%mask2dBu(I,J-1) + G%mask2dBu(I-1,J))) > 0) then
(G%mask2dBu(I,J-1) + G%mask2dBu(I-1,J))) > 0.0) then
tau_mag = sqrt(((G%mask2dBu(I,J)*(taux_in_B(I,J)**2 + tauy_in_B(I,J)**2) + &
G%mask2dBu(I-1,J-1)*(taux_in_B(I-1,J-1)**2 + tauy_in_B(I-1,J-1)**2)) + &
(G%mask2dBu(I,J-1)*(taux_in_B(I,J-1)**2 + tauy_in_B(I,J-1)**2) + &
Expand All @@ -1069,7 +1069,7 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
do j=js,je ; do i=is,ie
tau_mag = G%mask2dT(i,j) * sqrt(taux_in_A(i,j)**2 + tauy_in_A(i,j)**2)
gustiness = CS%gust_const
if (CS%read_gust_2d .and. (G%mask2dT(i,j) > 0)) gustiness = CS%gust(i,j)
if (CS%read_gust_2d .and. (G%mask2dT(i,j) > 0.0)) gustiness = CS%gust(i,j)
if (do_ustar) ustar(i,j) = sqrt(gustiness*IRho0 + IRho0 * tau_mag)
if (CS%answers_2018) then
if (do_gustless) gustless_ustar(i,j) = sqrt(US%L_to_Z*tau_mag / CS%Rho0)
Expand All @@ -1080,10 +1080,10 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
else ! C-grid wind stresses.
do j=js,je ; do i=is,ie
taux2 = 0.0 ; tauy2 = 0.0
if ((G%mask2dCu(I-1,j) + G%mask2dCu(I,j)) > 0) &
if ((G%mask2dCu(I-1,j) + G%mask2dCu(I,j)) > 0.0) &
taux2 = (G%mask2dCu(I-1,j)*taux_in_C(I-1,j)**2 + G%mask2dCu(I,j)*taux_in_C(I,j)**2) / &
(G%mask2dCu(I-1,j) + G%mask2dCu(I,j))
if ((G%mask2dCv(i,J-1) + G%mask2dCv(i,J)) > 0) &
if ((G%mask2dCv(i,J-1) + G%mask2dCv(i,J)) > 0.0) &
tauy2 = (G%mask2dCv(i,J-1)*tauy_in_C(i,J-1)**2 + G%mask2dCv(i,J)*tauy_in_C(i,J)**2) / &
(G%mask2dCv(i,J-1) + G%mask2dCv(i,J))
tau_mag = sqrt(taux2 + tauy2)
Expand Down
2 changes: 1 addition & 1 deletion config_src/drivers/FMS_cap/ocean_model_MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ subroutine Ocean_stock_pe(OS, index, value, time_index)
case (ISTOCK_HEAT) ! Return the heat content of the ocean in J.
call get_ocean_stocks(OS%MOM_CSp, heat=value, on_PE_only=.true.)
case (ISTOCK_SALT) ! Return the mass of the salt in the ocean in kg.
call get_ocean_stocks(OS%MOM_CSp, salt=value, on_PE_only=.true.)
call get_ocean_stocks(OS%MOM_CSp, salt=value, on_PE_only=.true.)
case default ; value = 0.0
end select
! If the FMS coupler is changed so that Ocean_stock_PE is only called on
Expand Down
50 changes: 25 additions & 25 deletions config_src/drivers/mct_cap/mom_ocean_model_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -689,34 +689,34 @@ subroutine ocean_model_restart(OS, timestamp, restartname)
"restart files can only be created after the buoyancy forcing is applied.")

if (present(restartname)) then
call save_restart(OS%dirs%restart_output_dir, OS%Time, OS%grid, &
call save_restart(OS%dirs%restart_output_dir, OS%Time, OS%grid, &
OS%restart_CSp, GV=OS%GV, filename=restartname)
call forcing_save_restart(OS%forcing_CSp, OS%grid, OS%Time, &
call forcing_save_restart(OS%forcing_CSp, OS%grid, OS%Time, &
OS%dirs%restart_output_dir) ! Is this needed?
if (OS%use_ice_shelf) then
call ice_shelf_save_restart(OS%Ice_shelf_CSp, OS%Time, &
if (OS%use_ice_shelf) then
call ice_shelf_save_restart(OS%Ice_shelf_CSp, OS%Time, &
OS%dirs%restart_output_dir)
endif
endif
else
if (BTEST(OS%Restart_control,1)) then
call save_restart(OS%dirs%restart_output_dir, OS%Time, OS%grid, &
OS%restart_CSp, .true., GV=OS%GV)
call forcing_save_restart(OS%forcing_CSp, OS%grid, OS%Time, &
OS%dirs%restart_output_dir, .true.)
if (OS%use_ice_shelf) then
call ice_shelf_save_restart(OS%Ice_shelf_CSp, OS%Time, OS%dirs%restart_output_dir, .true.)
endif
endif
if (BTEST(OS%Restart_control,0)) then
call save_restart(OS%dirs%restart_output_dir, OS%Time, OS%grid, &
OS%restart_CSp, GV=OS%GV)
call forcing_save_restart(OS%forcing_CSp, OS%grid, OS%Time, &
OS%dirs%restart_output_dir)
if (OS%use_ice_shelf) then
call ice_shelf_save_restart(OS%Ice_shelf_CSp, OS%Time, OS%dirs%restart_output_dir)
endif
endif
end if
if (BTEST(OS%Restart_control,1)) then
call save_restart(OS%dirs%restart_output_dir, OS%Time, OS%grid, &
OS%restart_CSp, .true., GV=OS%GV)
call forcing_save_restart(OS%forcing_CSp, OS%grid, OS%Time, &
OS%dirs%restart_output_dir, .true.)
if (OS%use_ice_shelf) then
call ice_shelf_save_restart(OS%Ice_shelf_CSp, OS%Time, OS%dirs%restart_output_dir, .true.)
endif
endif
if (BTEST(OS%Restart_control,0)) then
call save_restart(OS%dirs%restart_output_dir, OS%Time, OS%grid, &
OS%restart_CSp, GV=OS%GV)
call forcing_save_restart(OS%forcing_CSp, OS%grid, OS%Time, &
OS%dirs%restart_output_dir)
if (OS%use_ice_shelf) then
call ice_shelf_save_restart(OS%Ice_shelf_CSp, OS%Time, OS%dirs%restart_output_dir)
endif
endif
endif

end subroutine ocean_model_restart
! </SUBROUTINE> NAME="ocean_model_restart"
Expand Down Expand Up @@ -1033,7 +1033,7 @@ subroutine Ocean_stock_pe(OS, index, value, time_index)
case (ISTOCK_HEAT) ! Return the heat content of the ocean in J.
call get_ocean_stocks(OS%MOM_CSp, heat=value, on_PE_only=.true.)
case (ISTOCK_SALT) ! Return the mass of the salt in the ocean in kg.
call get_ocean_stocks(OS%MOM_CSp, salt=value, on_PE_only=.true.)
call get_ocean_stocks(OS%MOM_CSp, salt=value, on_PE_only=.true.)
case default ; value = 0.0
end select
! If the FMS coupler is changed so that Ocean_stock_PE is only called on
Expand Down
Loading

0 comments on commit c2bf720

Please sign in to comment.