Skip to content

Commit

Permalink
Corrected spacing around semicolons between dos
Browse files Browse the repository at this point in the history
  Corrected non-standard spacing around semicolons separating do loops or if
tests on a single line, following MOM6 code standards.  (If Marshall wins his
planned argument against allowing such constructs, this enforcement of standards
will help in getting rid of them.)  All answers are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Dec 4, 2020
1 parent 3f7d3cf commit 6096c6c
Show file tree
Hide file tree
Showing 38 changed files with 101 additions and 99 deletions.
4 changes: 2 additions & 2 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3324,7 +3324,7 @@ subroutine extract_surface_state(CS, sfc_state_in)
sfc_state%ocean_heat(i,j) = 0.0 ; sfc_state%ocean_salt(i,j) = 0.0
enddo ; enddo
!$OMP parallel do default(shared) private(mass)
do j=js,je ; do k=1,nz; do i=is,ie
do j=js,je ; do k=1,nz ; do i=is,ie
mass = GV%H_to_RZ*h(i,j,k)
sfc_state%ocean_mass(i,j) = sfc_state%ocean_mass(i,j) + mass
sfc_state%ocean_heat(i,j) = sfc_state%ocean_heat(i,j) + mass * CS%tv%T(i,j,k)
Expand Down Expand Up @@ -3365,7 +3365,7 @@ subroutine extract_surface_state(CS, sfc_state_in)

if (CS%check_bad_sfc_vals) then
numberOfErrors=0 ! count number of errors
do j=js,je; do i=is,ie
do j=js,je ; do i=is,ie
if (G%mask2dT(i,j)>0.) then
localError = sfc_state%sea_lev(i,j) <= -G%bathyT(i,j) &
.or. sfc_state%sea_lev(i,j) >= CS%bad_val_ssh_max &
Expand Down
2 changes: 1 addition & 1 deletion src/core/MOM_PressureForce_FV.F90
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ subroutine PressureForce_FV_Bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm
enddo ; enddo
endif
!$OMP parallel do default(shared)
do j=Jsq,Jeq+1; do k=nz,1,-1 ; do i=Isq,Ieq+1
do j=Jsq,Jeq+1 ; do k=nz,1,-1 ; do i=Isq,Ieq+1
e(i,j,K) = e(i,j,K+1) + h(i,j,k)*GV%H_to_Z
enddo ; enddo ; enddo

Expand Down
6 changes: 3 additions & 3 deletions src/core/MOM_barotropic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,7 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,

! Set the mass source, after first initializing the halos to 0.
!$OMP do
do j=jsvf-1,jevf+1; do i=isvf-1,ievf+1 ; eta_src(i,j) = 0.0 ; enddo ; enddo
do j=jsvf-1,jevf+1 ; do i=isvf-1,ievf+1 ; eta_src(i,j) = 0.0 ; enddo ; enddo
if (CS%bound_BT_corr) then ; if ((use_BT_Cont.or.integral_BT_cont) .and. CS%BT_cont_bounds) then
do j=js,je ; do i=is,ie ; if (G%mask2dT(i,j) > 0.0) then
if (CS%eta_cor(i,j) > 0.0) then
Expand Down Expand Up @@ -3807,13 +3807,13 @@ subroutine set_local_BT_cont_types(BT_cont, BTCL_u, BTCL_v, G, US, MS, BT_Domain
FA_v_NN(i,j) = 0.0 ; FA_v_N0(i,j) = 0.0 ; FA_v_S0(i,j) = 0.0 ; FA_v_SS(i,j) = 0.0
enddo ; enddo
!$OMP do
do j=js,je; do I=is-1,ie
do j=js,je ; do I=is-1,ie
uBT_EE(I,j) = BT_cont%uBT_EE(I,j) ; uBT_WW(I,j) = BT_cont%uBT_WW(I,j)
FA_u_EE(I,j) = BT_cont%FA_u_EE(I,j) ; FA_u_E0(I,j) = BT_cont%FA_u_E0(I,j)
FA_u_W0(I,j) = BT_cont%FA_u_W0(I,j) ; FA_u_WW(I,j) = BT_cont%FA_u_WW(I,j)
enddo ; enddo
!$OMP do
do J=js-1,je; do i=is,ie
do J=js-1,je ; do i=is,ie
vBT_NN(i,J) = BT_cont%vBT_NN(i,J) ; vBT_SS(i,J) = BT_cont%vBT_SS(i,J)
FA_v_NN(i,J) = BT_cont%FA_v_NN(i,J) ; FA_v_N0(i,J) = BT_cont%FA_v_N0(i,J)
FA_v_S0(i,J) = BT_cont%FA_v_S0(i,J) ; FA_v_SS(i,J) = BT_cont%FA_v_SS(i,J)
Expand Down
4 changes: 2 additions & 2 deletions src/core/MOM_checksum_packages.F90
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ subroutine MOM_state_chksum_3arg(mesg, u, v, h, G, GV, US, haloshift, symmetric)
! Note that for the chksum calls to be useful for reproducing across PE
! counts, there must be no redundant points, so all variables use is..ie
! and js...je as their extent.
hs=1; if (present(haloshift)) hs=haloshift
sym=.false.; if (present(symmetric)) sym=symmetric
hs = 1 ; if (present(haloshift)) hs = haloshift
sym = .false. ; if (present(symmetric)) sym = symmetric
call uvchksum(mesg//" u", u, v, G%HI, haloshift=hs, symmetric=sym, scale=L_T_to_m_s)
call hchksum(h, mesg//" h",G%HI, haloshift=hs, scale=GV%H_to_m)
end subroutine MOM_state_chksum_3arg
Expand Down
2 changes: 1 addition & 1 deletion src/core/MOM_density_integrals.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ subroutine int_spec_vol_dp_generic_plm(T_t, T_b, S_t, S_b, p_t, p_b, alpha_ref,
enddo

! 1. Compute vertical integrals
do j=Jsq,Jeq+1; do i=Isq,Ieq+1
do j=Jsq,Jeq+1 ; do i=Isq,Ieq+1
dp = p_b(i,j) - p_t(i,j)
do n=1,5 ! T, S and p are linearly interpolated in the vertical.
p5(n) = RL2_T2_to_Pa * (wt_t(n) * p_t(i,j) + wt_b(n) * p_b(i,j))
Expand Down
4 changes: 2 additions & 2 deletions src/core/MOM_dynamics_split_RK2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ subroutine step_MOM_dyn_split_RK2(u, v, h, tv, visc, Time_local, dt, forces, p_s
call disable_averaging(CS%diag)
if (showCallTree) call callTree_wayPoint("done with PressureForce (step_MOM_dyn_split_RK2)")

if (associated(CS%OBC)) then; if (CS%OBC%update_OBC) then
if (associated(CS%OBC)) then ; if (CS%OBC%update_OBC) then
call update_OBC_data(CS%OBC, G, GV, US, tv, h, CS%update_OBC_CSp, Time_local)
endif; endif
endif ; endif
if (associated(CS%OBC) .and. CS%debug_OBC) &
call open_boundary_zero_normal_flow(CS%OBC, G, GV, CS%PFu, CS%PFv)

Expand Down
12 changes: 6 additions & 6 deletions src/core/MOM_dynamics_unsplit.F90
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &
CS%PressureForce_CSp, CS%ALE_CSp, p_surf)
call cpu_clock_end(id_clock_pres)

if (associated(CS%OBC)) then; if (CS%OBC%update_OBC) then
if (associated(CS%OBC)) then ; if (CS%OBC%update_OBC) then
call update_OBC_data(CS%OBC, G, GV, US, tv, h, CS%update_OBC_CSp, Time_local)
endif; endif
endif ; endif
if (associated(CS%OBC)) then
call open_boundary_zero_normal_flow(CS%OBC, G, GV, CS%PFu, CS%PFv)
call open_boundary_zero_normal_flow(CS%OBC, G, GV, CS%CAu, CS%CAv)
Expand Down Expand Up @@ -382,9 +382,9 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &
CS%PressureForce_CSp, CS%ALE_CSp, p_surf)
call cpu_clock_end(id_clock_pres)

if (associated(CS%OBC)) then; if (CS%OBC%update_OBC) then
if (associated(CS%OBC)) then ; if (CS%OBC%update_OBC) then
call update_OBC_data(CS%OBC, G, GV, US, tv, h, CS%update_OBC_CSp, Time_local)
endif; endif
endif ; endif
if (associated(CS%OBC)) then
call open_boundary_zero_normal_flow(CS%OBC, G, GV, CS%PFu, CS%PFv)
call open_boundary_zero_normal_flow(CS%OBC, G, GV, CS%CAu, CS%CAv)
Expand Down Expand Up @@ -457,9 +457,9 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &
CS%PressureForce_CSp, CS%ALE_CSp, p_surf)
call cpu_clock_end(id_clock_pres)

if (associated(CS%OBC)) then; if (CS%OBC%update_OBC) then
if (associated(CS%OBC)) then ; if (CS%OBC%update_OBC) then
call update_OBC_data(CS%OBC, G, GV, US, tv, h, CS%update_OBC_CSp, Time_local)
endif; endif
endif ; endif

! u = u + dt * ( PFu + CAu )
if (associated(CS%OBC)) then
Expand Down
4 changes: 2 additions & 2 deletions src/core/MOM_dynamics_unsplit_RK2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ subroutine step_MOM_dyn_unsplit_RK2(u_in, v_in, h_in, tv, visc, Time_local, dt,
call pass_vector(CS%PFu, CS%PFv, G%Domain, clock=id_clock_pass)
call pass_vector(CS%CAu, CS%CAv, G%Domain, clock=id_clock_pass)

if (associated(CS%OBC)) then; if (CS%OBC%update_OBC) then
if (associated(CS%OBC)) then ; if (CS%OBC%update_OBC) then
call update_OBC_data(CS%OBC, G, GV, US, tv, h_in, CS%update_OBC_CSp, Time_local)
endif; endif
endif ; endif
if (associated(CS%OBC)) then
call open_boundary_zero_normal_flow(CS%OBC, G, GV, CS%PFu, CS%PFv)
call open_boundary_zero_normal_flow(CS%OBC, G, GV, CS%CAu, CS%CAv)
Expand Down
4 changes: 2 additions & 2 deletions src/core/MOM_interface_heights.F90
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ subroutine find_eta_3d(h, tv, G, GV, US, eta, eta_bt, halo_size, eta_to_m)

if (GV%Boussinesq) then
!$OMP do
do j=jsv,jev ; do k=nz,1,-1; do i=isv,iev
do j=jsv,jev ; do k=nz,1,-1 ; do i=isv,iev
eta(i,j,K) = eta(i,j,K+1) + h(i,j,k)*H_to_eta
enddo ; enddo ; enddo
if (present(eta_bt)) then
Expand Down Expand Up @@ -119,7 +119,7 @@ subroutine find_eta_3d(h, tv, G, GV, US, eta, eta_bt, halo_size, eta_to_m)
enddo
else
!$OMP do
do j=jsv,jev ; do k=nz,1,-1; do i=isv,iev
do j=jsv,jev ; do k=nz,1,-1 ; do i=isv,iev
eta(i,j,K) = eta(i,j,K+1) + H_to_rho_eta*h(i,j,k) / GV%Rlay(k)
enddo ; enddo ; enddo
endif
Expand Down
10 changes: 5 additions & 5 deletions src/core/MOM_open_boundary.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4336,12 +4336,12 @@ subroutine update_OBC_segment_data(G, GV, US, OBC, tv, h, Time)

if (trim(segment%field(m)%name) == 'TEMP') then
if (associated(segment%field(m)%buffer_dst)) then
do k=1,nz; do j=js_obc2, je_obc; do i=is_obc2,ie_obc
do k=1,nz ; do j=js_obc2,je_obc ; do i=is_obc2,ie_obc
segment%tr_Reg%Tr(1)%t(i,j,k) = segment%field(m)%buffer_dst(i,j,k)
enddo ; enddo ; enddo
if (.not. segment%tr_Reg%Tr(1)%is_initialized) then
! if the tracer reservoir has not yet been initialized, then set to external value.
do k=1,nz; do j=js_obc2, je_obc; do i=is_obc2,ie_obc
do k=1,nz ; do j=js_obc2,je_obc ; do i=is_obc2,ie_obc
segment%tr_Reg%Tr(1)%tres(i,j,k) = segment%tr_Reg%Tr(1)%t(i,j,k)
enddo ; enddo ; enddo
segment%tr_Reg%Tr(1)%is_initialized=.true.
Expand All @@ -4351,12 +4351,12 @@ subroutine update_OBC_segment_data(G, GV, US, OBC, tv, h, Time)
endif
elseif (trim(segment%field(m)%name) == 'SALT') then
if (associated(segment%field(m)%buffer_dst)) then
do k=1,nz; do j=js_obc2, je_obc; do i=is_obc2,ie_obc
do k=1,nz ; do j=js_obc2,je_obc ; do i=is_obc2,ie_obc
segment%tr_Reg%Tr(2)%t(i,j,k) = segment%field(m)%buffer_dst(i,j,k)
enddo ; enddo ; enddo
if (.not. segment%tr_Reg%Tr(2)%is_initialized) then
!if the tracer reservoir has not yet been initialized, then set to external value.
do k=1,nz; do j=js_obc2, je_obc; do i=is_obc2,ie_obc
do k=1,nz ; do j=js_obc2,je_obc ; do i=is_obc2,ie_obc
segment%tr_Reg%Tr(2)%tres(i,j,k) = segment%tr_Reg%Tr(2)%t(i,j,k)
enddo ; enddo ; enddo
segment%tr_Reg%Tr(2)%is_initialized=.true.
Expand Down Expand Up @@ -5226,7 +5226,7 @@ subroutine adjustSegmentEtaToFitBathymetry(G, GV, US, segment,fld)
do k=1,nz
segment%field(fld)%dz_src(i,j,k) = segment%field(fld)%dz_src(i,j,k)*GV%Z_to_H
enddo
enddo; enddo
enddo ; enddo

! can not do communication call here since only PEs on the current segment are here

Expand Down
8 changes: 4 additions & 4 deletions src/diagnostics/MOM_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ subroutine calculate_diagnostic_fields(u, v, h, uh, vh, tv, ADp, CDp, p_surf, &

! mass per area of grid cell (for Bouss, use Rho0)
if (CS%id_masscello > 0) then
do k=1,nz; do j=js,je ; do i=is,ie
do k=1,nz ; do j=js,je ; do i=is,ie
work_3d(i,j,k) = GV%H_to_kg_m2*h(i,j,k)
enddo ; enddo ; enddo
call post_data(CS%id_masscello, work_3d, CS%diag)
Expand All @@ -381,13 +381,13 @@ subroutine calculate_diagnostic_fields(u, v, h, uh, vh, tv, ADp, CDp, p_surf, &
if (CS%id_thkcello > 0) then ; if (GV%H_to_Z == 1.0) then
call post_data(CS%id_thkcello, h, CS%diag)
else
do k=1,nz; do j=js,je ; do i=is,ie
do k=1,nz ; do j=js,je ; do i=is,ie
work_3d(i,j,k) = GV%H_to_Z*h(i,j,k)
enddo ; enddo ; enddo
call post_data(CS%id_thkcello, work_3d, CS%diag)
endif ; endif
if (CS%id_volcello > 0) then ! volcello = h*area for Boussinesq
do k=1,nz; do j=js,je ; do i=is,ie
do k=1,nz ; do j=js,je ; do i=is,ie
work_3d(i,j,k) = ( GV%H_to_Z*h(i,j,k) ) * US%Z_to_m*US%L_to_m**2*G%areaT(i,j)
enddo ; enddo ; enddo
call post_data(CS%id_volcello, work_3d, CS%diag)
Expand Down Expand Up @@ -421,7 +421,7 @@ subroutine calculate_diagnostic_fields(u, v, h, uh, vh, tv, ADp, CDp, p_surf, &
enddo ! j
if (CS%id_thkcello > 0) call post_data(CS%id_thkcello, work_3d, CS%diag)
if (CS%id_volcello > 0) then
do k=1,nz; do j=js,je ; do i=is,ie ! volcello = dp/(rho*g)*area for non-Boussinesq
do k=1,nz ; do j=js,je ; do i=is,ie ! volcello = dp/(rho*g)*area for non-Boussinesq
work_3d(i,j,k) = US%Z_to_m*US%L_to_m**2*G%areaT(i,j) * work_3d(i,j,k)
enddo ; enddo ; enddo
call post_data(CS%id_volcello, work_3d, CS%diag)
Expand Down
2 changes: 1 addition & 1 deletion src/diagnostics/MOM_wave_speed.F90
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ subroutine wave_speed(h, tv, G, GV, US, cg1, CS, full_halos, use_ebt_mode, mono_
calc_modal_structure = l_use_ebt_mode
if (present(modal_structure)) calc_modal_structure = .true.
if (calc_modal_structure) then
do k=1,nz; do j=js,je; do i=is,ie
do k=1,nz ; do j=js,je ; do i=is,ie
modal_structure(i,j,k) = 0.0
enddo ; enddo ; enddo
endif
Expand Down
8 changes: 4 additions & 4 deletions src/framework/MOM_checksums.F90
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ integer function subchk(array, HI, di, dj, scale)
real, intent(in) :: scale !< A scaling factor for this array.
integer :: i, j, bc
subchk = 0
do j=HI%jsc+dj,HI%jec+dj; do i=HI%isc+di,HI%iec+di
do j=HI%jsc+dj,HI%jec+dj ; do i=HI%isc+di,HI%iec+di
bc = bitcount(abs(scale*array(i,j)))
subchk = subchk + bc
enddo ; enddo
Expand Down Expand Up @@ -693,7 +693,7 @@ integer function subchk(array, HI, di, dj, scale)
integer :: i, j, bc
subchk = 0
! This line deliberately uses the h-point computational domain.
do J=HI%jsc+dj,HI%jec+dj; do I=HI%isc+di,HI%iec+di
do J=HI%jsc+dj,HI%jec+dj ; do I=HI%isc+di,HI%iec+di
bc = bitcount(abs(scale*array(I,J)))
subchk = subchk + bc
enddo ; enddo
Expand Down Expand Up @@ -983,7 +983,7 @@ integer function subchk(array, HI, di, dj, scale)
integer :: i, j, bc
subchk = 0
! This line deliberately uses the h-point computational domain.
do j=HI%jsc+dj,HI%jec+dj; do I=HI%isc+di,HI%iec+di
do j=HI%jsc+dj,HI%jec+dj ; do I=HI%isc+di,HI%iec+di
bc = bitcount(abs(scale*array(I,j)))
subchk = subchk + bc
enddo ; enddo
Expand Down Expand Up @@ -1162,7 +1162,7 @@ integer function subchk(array, HI, di, dj, scale)
integer :: i, j, bc
subchk = 0
! This line deliberately uses the h-point computational domain.
do J=HI%jsc+dj,HI%jec+dj; do i=HI%isc+di,HI%iec+di
do J=HI%jsc+dj,HI%jec+dj ; do i=HI%isc+di,HI%iec+di
bc = bitcount(abs(scale*array(i,J)))
subchk = subchk + bc
enddo ; enddo
Expand Down
4 changes: 2 additions & 2 deletions src/framework/MOM_diag_mediator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4270,7 +4270,7 @@ subroutine downsample_mask_2d(field_in, field_out, dl, isc_o, jsc_o, isc_d, iec_
tot_non_zero = 0.0
do jj=j0,j0+dl-1 ; do ii=i0,i0+dl-1
tot_non_zero = tot_non_zero + field_in(ii,jj)
enddo;enddo
enddo ; enddo
if (tot_non_zero > 0.0) field_out(i,j)=1.0
enddo ; enddo
end subroutine downsample_mask_2d
Expand Down Expand Up @@ -4306,7 +4306,7 @@ subroutine downsample_mask_3d(field_in, field_out, dl, isc_o, jsc_o, isc_d, iec_
tot_non_zero = 0.0
do jj=j0,j0+dl-1 ; do ii=i0,i0+dl-1
tot_non_zero = tot_non_zero + field_in(ii,jj,k)
enddo;enddo
enddo ; enddo
if (tot_non_zero > 0.0) field_out(i,j,k)=1.0
enddo ; enddo ; enddo
end subroutine downsample_mask_3d
Expand Down
6 changes: 3 additions & 3 deletions src/framework/MOM_diag_remap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ subroutine diag_remap_do_remap(remap_cs, G, GV, h, staggered_in_x, staggered_in_
remapped_field(:,:,:) = 0.

! Symmetric grid offset under 1-based indexing; see header for details.
shift = 0; if (G%symmetric) shift = 1
shift = 0 ; if (G%symmetric) shift = 1

if (staggered_in_x .and. .not. staggered_in_y) then
! U-points
Expand Down Expand Up @@ -516,7 +516,7 @@ subroutine vertically_reintegrate_diag_field(remap_cs, G, h, h_target, staggered
reintegrated_field(:,:,:) = 0.

! Symmetric grid offset under 1-based indexing; see header for details.
shift = 0; if (G%symmetric) shift = 1
shift = 0 ; if (G%symmetric) shift = 1

if (staggered_in_x .and. .not. staggered_in_y) then
! U-points
Expand Down Expand Up @@ -597,7 +597,7 @@ subroutine vertically_interpolate_diag_field(remap_cs, G, h, staggered_in_x, sta
nz_dest = remap_cs%nz

! Symmetric grid offset under 1-based indexing; see header for details.
shift = 0; if (G%symmetric) shift = 1
shift = 0 ; if (G%symmetric) shift = 1

if (staggered_in_x .and. .not. staggered_in_y) then
! U-points
Expand Down
2 changes: 1 addition & 1 deletion src/ice_shelf/MOM_ice_shelf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1736,7 +1736,7 @@ subroutine initialize_ice_shelf(param_file, ocn_grid, Time, CS, diag, forces_in,

! do j=G%jsc,G%jec ; do i=G%isc,G%iec
! ISS%area_shelf_h(i,j) = ISS%area_shelf_h(i,j)*G%mask2dT(i,j)
! enddo; enddo
! enddo ; enddo

CS%Time = Time

Expand Down
4 changes: 2 additions & 2 deletions src/initialization/MOM_shared_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1311,9 +1311,9 @@ subroutine write_ocean_geometry_file(G, param_file, directory, geom_file, US)
call create_file(unit, trim(filepath), vars, nFlds_used, fields, &
file_threading, dG=G)

do J=Jsq,Jeq; do I=Isq,Ieq; out_q(I,J) = G%geoLatBu(I,J); enddo ; enddo
do J=Jsq,Jeq ; do I=Isq,Ieq ; out_q(I,J) = G%geoLatBu(I,J) ; enddo ; enddo
call write_field(unit, fields(1), G%Domain%mpp_domain, out_q)
do J=Jsq,Jeq; do I=Isq,Ieq; out_q(I,J) = G%geoLonBu(I,J); enddo ; enddo
do J=Jsq,Jeq ; do I=Isq,Ieq ; out_q(I,J) = G%geoLonBu(I,J) ; enddo ; enddo
call write_field(unit, fields(2), G%Domain%mpp_domain, out_q)
call write_field(unit, fields(3), G%Domain%mpp_domain, G%geoLatT)
call write_field(unit, fields(4), G%Domain%mpp_domain, G%geoLonT)
Expand Down
4 changes: 2 additions & 2 deletions src/initialization/MOM_state_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ subroutine MOM_initialize_state(u, v, h, tv, Time, G, GV, US, PF, dirs, &
! This initialization should not be needed. Certainly restricting it
! to the computational domain helps detect possible uninitialized
! data in halos which should be covered by the pass_var(h) later.
!do k = 1, nz; do j = js, je; do i = is, ie
!do k=1,nz ; do j=js,je ; do i=is,ie
! h(i,j,k) = 0.
!enddo
endif
Expand Down Expand Up @@ -1889,7 +1889,7 @@ subroutine initialize_sponges_file(G, GV, US, use_temperature, tv, param_file, L
if (eta(i,j,K) < (eta(i,j,K+1) + GV%Angstrom_Z)) &
eta(i,j,K) = eta(i,j,K+1) + GV%Angstrom_Z
enddo ; enddo ; enddo
do k=1,nz; do j=js,je ; do i=is,ie
do k=1,nz ; do j=js,je ; do i=is,ie
h(i,j,k) = GV%Z_to_H*(eta(i,j,k)-eta(i,j,k+1))
enddo ; enddo ; enddo
call initialize_ALE_sponge(Idamp, G, GV, param_file, ALE_CSp, h, nz_data)
Expand Down
4 changes: 2 additions & 2 deletions src/ocean_data_assim/MOM_oda_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ subroutine init_oda(Time, G, GV, CS)

do k = 1, CS%nk
call mpp_global_field(G%Domain%mpp_domain, CS%h(:,:,k), global2D)
do i=1, CS%ni; do j=1, CS%nj
do i=1,CS%ni ; do j=1,CS%nj
if ( global2D(i,j) > 1 ) then
T_grid%mask(i,j,k) = 1.0
endif
Expand Down Expand Up @@ -337,7 +337,7 @@ subroutine set_prior_tracer(Time, G, GV, h, tv, CS)
allocate(T(isd:ied,jsd:jed,CS%nk))
allocate(S(isd:ied,jsd:jed,CS%nk))

do j=js,je; do i=is,ie
do j=js,je ; do i=is,ie
call remapping_core_h(CS%remapCS, GV%ke, h(i,j,:), tv%T(i,j,:), &
CS%nk, CS%h(i,j,:), T(i,j,:))
call remapping_core_h(CS%remapCS, GV%ke, h(i,j,:), tv%S(i,j,:), &
Expand Down
Loading

0 comments on commit 6096c6c

Please sign in to comment.