Skip to content

Commit 48ed9e1

Browse files
committed
Merge branch 'dev/cryo' of github.com:gfdl-cryosphere/MOM6 into gfdl_cryo
2 parents 869986a + 62c39e8 commit 48ed9e1

123 files changed

Lines changed: 4959 additions & 2552 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config_src/drivers/FMS_cap/MOM_surface_forcing_gfdl.F90

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ subroutine apply_flux_adjustments(G, US, CS, Time, fluxes)
12111211
integer :: isc, iec, jsc, jec, i, j
12121212
logical :: overrode_h
12131213

1214-
isc = G%isc; iec = G%iec ; jsc = G%jsc; jec = G%jec
1214+
isc = G%isc ; iec = G%iec ; jsc = G%jsc ; jec = G%jec
12151215

12161216
call data_override(G%Domain, 'hflx_adj', temp_at_h, Time, override=overrode_h, &
12171217
scale=US%W_m2_to_QRZ_T)
@@ -1261,7 +1261,7 @@ subroutine apply_force_adjustments(G, US, CS, Time, forces)
12611261
real :: zonal_tau, merid_tau ! True zonal and meridional wind stresses [R Z L T-2 ~> Pa]
12621262
logical :: overrode_x, overrode_y
12631263

1264-
isc = G%isc; iec = G%iec ; jsc = G%jsc; jec = G%jec
1264+
isc = G%isc ; iec = G%iec ; jsc = G%jsc ; jec = G%jec
12651265

12661266
tempx_at_h(:,:) = 0.0 ; tempy_at_h(:,:) = 0.0
12671267
! Either reads data or leaves contents unchanged
@@ -1464,11 +1464,11 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, wind_stagger)
14641464
"due to internal corrections.", default=.false.)
14651465

14661466
if (present(wind_stagger)) then
1467-
if (wind_stagger == AGRID) then ; stagger = 'AGRID'
1467+
if (wind_stagger == AGRID) then ; stagger = 'AGRID'
14681468
elseif (wind_stagger == BGRID_NE) then ; stagger = 'BGRID_NE'
14691469
elseif (wind_stagger == CGRID_NE) then ; stagger = 'CGRID_NE'
14701470
else ; stagger = 'UNKNOWN' ; call MOM_error(FATAL,"surface_forcing_init: WIND_STAGGER = "// &
1471-
trim(stagger)// "is invalid."); endif
1471+
trim(stagger)// "is invalid.") ; endif
14721472
call log_param(param_file, mdl, "WIND_STAGGER", stagger, &
14731473
"The staggering of the input wind stress field "//&
14741474
"from the coupler that is actually used.")
@@ -1478,7 +1478,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, wind_stagger)
14781478
"A case-insensitive character string to indicate the "//&
14791479
"staggering of the input wind stress field. Valid "//&
14801480
"values are 'A', 'B', or 'C'.", default="C")
1481-
if (uppercase(stagger(1:1)) == 'A') then ; CS%wind_stagger = AGRID
1481+
if (uppercase(stagger(1:1)) == 'A') then ; CS%wind_stagger = AGRID
14821482
elseif (uppercase(stagger(1:1)) == 'B') then ; CS%wind_stagger = BGRID_NE
14831483
elseif (uppercase(stagger(1:1)) == 'C') then ; CS%wind_stagger = CGRID_NE
14841484
else ; call MOM_error(FATAL,"surface_forcing_init: WIND_STAGGER = "// &
@@ -1625,13 +1625,13 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, wind_stagger)
16251625
utide_2d(:,:) = 0.0
16261626
call read_netCDF_data(TideAmp_file, 'tideamp', utide_2d, G%Domain, &
16271627
rescale=US%m_to_Z*US%T_to_s)
1628-
do j=jsd, jed; do i=isd, ied
1628+
do j=jsd,jed ; do i=isd,ied
16291629
utide = utide_2d(i,j)
16301630
CS%BBL_tidal_dis(i,j) = G%mask2dT(i,j)*rho_TKE_tidal*CS%cd_tides*(utide*utide*utide)
16311631
CS%ustar_tidal(i,j) = sqrt(CS%cd_tides)*utide
16321632
enddo ; enddo
16331633
else
1634-
do j=jsd,jed; do i=isd,ied
1634+
do j=jsd,jed ; do i=isd,ied
16351635
utide = CS%utide
16361636
CS%BBL_tidal_dis(i,j) = rho_TKE_tidal*CS%cd_tides*(utide*utide*utide)
16371637
CS%ustar_tidal(i,j) = sqrt(CS%cd_tides)*utide
@@ -1742,7 +1742,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, wind_stagger)
17421742
if (CS%restore_salt) then
17431743
salt_file = trim(CS%inputdir) // trim(CS%salt_restore_file)
17441744
CS%srestore_handle = init_external_field(salt_file, CS%salt_restore_var_name, MOM_domain=G%Domain)
1745-
call safe_alloc_ptr(CS%srestore_mask,isd,ied,jsd,jed); CS%srestore_mask(:,:) = 1.0
1745+
call safe_alloc_ptr(CS%srestore_mask,isd,ied,jsd,jed) ; CS%srestore_mask(:,:) = 1.0
17461746
if (CS%mask_srestore) then ! read a 2-d file containing a mask for restoring fluxes
17471747
flnam = trim(CS%inputdir) // 'salt_restore_mask.nc'
17481748
call MOM_read_data(flnam,'mask', CS%srestore_mask, G%domain, timelevel=1)
@@ -1752,7 +1752,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, wind_stagger)
17521752
if (CS%restore_temp) then
17531753
temp_file = trim(CS%inputdir) // trim(CS%temp_restore_file)
17541754
CS%trestore_handle = init_external_field(temp_file, CS%temp_restore_var_name, MOM_domain=G%Domain)
1755-
call safe_alloc_ptr(CS%trestore_mask,isd,ied,jsd,jed); CS%trestore_mask(:,:) = 1.0
1755+
call safe_alloc_ptr(CS%trestore_mask,isd,ied,jsd,jed) ; CS%trestore_mask(:,:) = 1.0
17561756
if (CS%mask_trestore) then ! read a 2-d file containing a mask for restoring fluxes
17571757
flnam = trim(CS%inputdir) // 'temp_restore_mask.nc'
17581758
call MOM_read_data(flnam, 'mask', CS%trestore_mask, G%domain, timelevel=1)

config_src/drivers/FMS_cap/ocean_model_MOM.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module ocean_model_mod
4747
use MOM_time_manager, only : time_type, operator(>), operator(+), operator(-)
4848
use MOM_time_manager, only : operator(*), operator(/), operator(/=)
4949
use MOM_time_manager, only : operator(<=), operator(>=), operator(<)
50-
use MOM_time_manager, only : real_to_time, time_type_to_real
50+
use MOM_time_manager, only : real_to_time, time_to_real
5151
use MOM_tracer_flow_control, only : call_tracer_register, tracer_flow_control_init
5252
use MOM_tracer_flow_control, only : call_tracer_flux_init
5353
use MOM_unit_scaling, only : unit_scale_type
@@ -284,7 +284,7 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, wind_stagger, gas
284284
OS%Time = Time_in ; OS%Time_dyn = Time_in
285285
! Call initialize MOM with an optional Ice Shelf CS which, if present triggers
286286
! initialization of ice shelf parameters and arrays.
287-
point_calving=.false.; if (present(calve_ice_shelf_bergs)) point_calving=calve_ice_shelf_bergs
287+
point_calving = .false. ; if (present(calve_ice_shelf_bergs)) point_calving = calve_ice_shelf_bergs
288288
call initialize_MOM(OS%Time, Time_init, param_file, OS%dirs, OS%MOM_CSp, &
289289
Time_in, offline_tracer_mode=OS%offline_tracer_mode, &
290290
diag_ptr=OS%diag, count_calls=.true., ice_shelf_CSp=OS%ice_shelf_CSp, &
@@ -497,7 +497,7 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, time_start_upda
497497
integer :: is, ie, js, je
498498

499499
call callTree_enter("update_ocean_model(), ocean_model_MOM.F90")
500-
dt_coupling = OS%US%s_to_T*time_type_to_real(Ocean_coupling_time_step)
500+
dt_coupling = time_to_real(Ocean_coupling_time_step, scale=OS%US%s_to_T)
501501

502502
if (.not.associated(OS)) then
503503
call MOM_error(FATAL, "update_ocean_model called with an unassociated "// &
@@ -659,15 +659,15 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, time_start_upda
659659

660660
if (step_thermo) then
661661
! Back up Time1 to the start of the thermodynamic segment.
662-
Time1 = Time1 - real_to_time(OS%US%T_to_s*(dtdia - dt_dyn))
662+
Time1 = Time1 - real_to_time(dtdia - dt_dyn, unscale=OS%US%T_to_s)
663663
call step_MOM(OS%forces, OS%fluxes, OS%sfc_state, Time1, dtdia, OS%MOM_CSp, &
664664
Waves=OS%Waves, do_dynamics=.false., do_thermodynamics=.true., &
665665
start_cycle=.false., end_cycle=(n==n_max), cycle_length=dt_coupling)
666666
endif
667667
endif
668668

669669
t_elapsed_seg = t_elapsed_seg + dt_dyn
670-
Time1 = Time_seg_start + real_to_time(OS%US%T_to_s*t_elapsed_seg)
670+
Time1 = Time_seg_start + real_to_time(t_elapsed_seg, unscale=OS%US%T_to_s)
671671
enddo
672672
endif
673673

config_src/drivers/STALE_mct_cap/mom_ocean_model_mct.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ module MOM_ocean_model_mct
136136
!> The ocean_state_type contains all information about the state of the ocean,
137137
!! with a format that is private so it can be readily changed without disrupting
138138
!! other coupled components.
139-
type, public :: ocean_state_type ;
139+
type, public :: ocean_state_type
140140
! This type is private, and can therefore vary between different ocean models.
141141
logical :: is_ocean_PE = .false. !< True if this is an ocean PE.
142142
type(time_type) :: Time !< The ocean model's time and master clock.
@@ -585,7 +585,7 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, &
585585
call disable_averaging(OS%diag)
586586
Master_time = OS%Time ; Time1 = OS%Time
587587

588-
if(OS%offline_tracer_mode) then
588+
if (OS%offline_tracer_mode) then
589589
call step_offline(OS%forces, OS%fluxes, OS%sfc_state, Time1, dt_coupling, OS%MOM_CSp)
590590

591591
elseif ((.not.do_thermo) .or. (.not.do_dyn)) then
@@ -808,7 +808,7 @@ subroutine initialize_ocean_public_type(input_domain, Ocean_sfc, diag, maskmap,
808808

809809
call mpp_get_layout(input_domain,layout)
810810
call mpp_get_global_domain(input_domain, xsize=xsz, ysize=ysz)
811-
if(PRESENT(maskmap)) then
811+
if (PRESENT(maskmap)) then
812812
call mpp_define_domains((/1,xsz,1,ysz/),layout,Ocean_sfc%Domain, maskmap=maskmap)
813813
else
814814
call mpp_define_domains((/1,xsz,1,ysz/),layout,Ocean_sfc%Domain)

config_src/drivers/STALE_mct_cap/mom_surface_forcing_mct.F90

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
420420
endif
421421

422422
! obtain fluxes from IOB; note the staggering of indices
423-
i0 = 0; j0 = 0
423+
i0 = 0 ; j0 = 0
424424
do j=js,je ; do i=is,ie
425425
! liquid precipitation (rain)
426426
if (associated(IOB%lprec)) &
@@ -439,14 +439,14 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
439439
fluxes%lrunoff(i,j) = kg_m2_s_conversion * IOB%rofl_flux(i-i0,j-j0) * G%mask2dT(i,j)
440440
else if (associated(IOB%runoff)) then
441441
fluxes%lrunoff(i,j) = kg_m2_s_conversion * IOB%runoff(i-i0,j-j0) * G%mask2dT(i,j)
442-
end if
442+
endif
443443

444444
! ice runoff flux
445445
if (associated(IOB%rofi_flux)) then
446446
fluxes%frunoff(i,j) = kg_m2_s_conversion * IOB%rofi_flux(i-i0,j-j0) * G%mask2dT(i,j)
447447
else if (associated(IOB%calving)) then
448448
fluxes%frunoff(i,j) = kg_m2_s_conversion * IOB%calving(i-i0,j-j0) * G%mask2dT(i,j)
449-
end if
449+
endif
450450

451451
if (associated(IOB%ustar_berg)) &
452452
fluxes%ustar_berg(i,j) = US%m_to_Z*US%T_to_s * IOB%ustar_berg(i-i0,j-j0) * G%mask2dT(i,j)
@@ -641,7 +641,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
641641
IsdB = G%IsdB ; IedB = G%IedB ; JsdB = G%JsdB ; JedB = G%JedB
642642
isr = is-isd+1 ; ier = ie-isd+1 ; jsr = js-jsd+1 ; jer = je-jsd+1
643643
!i0 = is - isc_bnd ; j0 = js - jsc_bnd
644-
i0 = 0; j0 = 0
644+
i0 = 0 ; j0 = 0
645645

646646
Irho0 = US%L_to_Z / CS%Rho0
647647
Pa_conversion = US%kg_m3_to_R*US%m_s_to_L_T**2*US%L_to_Z
@@ -899,7 +899,7 @@ subroutine apply_flux_adjustments(G, US, CS, Time, fluxes)
899899
integer :: isc, iec, jsc, jec, i, j
900900
logical :: overrode_h
901901

902-
isc = G%isc; iec = G%iec ; jsc = G%jsc; jec = G%jec
902+
isc = G%isc ; iec = G%iec ; jsc = G%jsc ; jec = G%jec
903903

904904
overrode_h = .false.
905905
call data_override('OCN', 'hflx_adj', temp_at_h(isc:iec,jsc:jec), Time, override=overrode_h)
@@ -949,7 +949,7 @@ subroutine apply_force_adjustments(G, US, CS, Time, forces)
949949
real :: Pa_conversion ! A unit conversion factor from Pa to the internal units [R Z L T-2 Pa-1 ~> 1]
950950
logical :: overrode_x, overrode_y
951951

952-
isc = G%isc; iec = G%iec ; jsc = G%jsc; jec = G%jec
952+
isc = G%isc ; iec = G%iec ; jsc = G%jsc ; jec = G%jec
953953
Pa_conversion = US%kg_m3_to_R*US%m_s_to_L_T**2*US%L_to_Z
954954

955955
tempx_at_h(:,:) = 0.0 ; tempy_at_h(:,:) = 0.0
@@ -1227,13 +1227,13 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
12271227
if (CS%read_TIDEAMP) then
12281228
TideAmp_file = trim(CS%inputdir) // trim(TideAmp_file)
12291229
call MOM_read_data(TideAmp_file,'tideamp',CS%TKE_tidal,G%domain,timelevel=1, scale=US%m_to_Z*US%T_to_s)
1230-
do j=jsd, jed; do i=isd, ied
1230+
do j=jsd,jed ; do i=isd,ied
12311231
utide = CS%TKE_tidal(i,j)
12321232
CS%TKE_tidal(i,j) = G%mask2dT(i,j)*CS%Rho0*CS%cd_tides*(utide*utide*utide)
12331233
CS%ustar_tidal(i,j) = sqrt(CS%cd_tides)*utide
12341234
enddo ; enddo
12351235
else
1236-
do j=jsd,jed; do i=isd,ied
1236+
do j=jsd,jed ; do i=isd,ied
12371237
utide = CS%utide
12381238
CS%TKE_tidal(i,j) = CS%Rho0*CS%cd_tides*(utide*utide*utide)
12391239
CS%ustar_tidal(i,j) = sqrt(CS%cd_tides)*utide
@@ -1327,7 +1327,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
13271327
if (present(restore_salt)) then ; if (restore_salt) then
13281328
salt_file = trim(CS%inputdir) // trim(CS%salt_restore_file)
13291329
CS%srestore_handle = init_external_field(salt_file, CS%salt_restore_var_name, domain=G%Domain%mpp_domain)
1330-
call safe_alloc_ptr(CS%srestore_mask,isd,ied,jsd,jed); CS%srestore_mask(:,:) = 1.0
1330+
call safe_alloc_ptr(CS%srestore_mask,isd,ied,jsd,jed) ; CS%srestore_mask(:,:) = 1.0
13311331
if (CS%mask_srestore) then ! read a 2-d file containing a mask for restoring fluxes
13321332
flnam = trim(CS%inputdir) // 'salt_restore_mask.nc'
13331333
call MOM_read_data(flnam,'mask', CS%srestore_mask, G%domain, timelevel=1)
@@ -1337,7 +1337,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
13371337
if (present(restore_temp)) then ; if (restore_temp) then
13381338
temp_file = trim(CS%inputdir) // trim(CS%temp_restore_file)
13391339
CS%trestore_handle = init_external_field(temp_file, CS%temp_restore_var_name, domain=G%Domain%mpp_domain)
1340-
call safe_alloc_ptr(CS%trestore_mask,isd,ied,jsd,jed); CS%trestore_mask(:,:) = 1.0
1340+
call safe_alloc_ptr(CS%trestore_mask,isd,ied,jsd,jed) ; CS%trestore_mask(:,:) = 1.0
13411341
if (CS%mask_trestore) then ! read a 2-d file containing a mask for restoring fluxes
13421342
flnam = trim(CS%inputdir) // 'temp_restore_mask.nc'
13431343
call MOM_read_data(flnam, 'mask', CS%trestore_mask, G%domain, timelevel=1)
@@ -1403,7 +1403,7 @@ subroutine ice_ocn_bnd_type_chksum(id, timestep, iobt)
14031403
chks = field_chksum( iobt%v_flux ) ; if (root) write(outunit,100) 'iobt%v_flux ', chks
14041404
chks = field_chksum( iobt%t_flux ) ; if (root) write(outunit,100) 'iobt%t_flux ', chks
14051405
chks = field_chksum( iobt%q_flux ) ; if (root) write(outunit,100) 'iobt%q_flux ', chks
1406-
chks = field_chksum( iobt%seaice_melt_heat); if (root) write(outunit,100) 'iobt%seaice_melt_heat', chks
1406+
chks = field_chksum( iobt%seaice_melt_heat) ; if (root) write(outunit,100) 'iobt%seaice_melt_heat', chks
14071407
chks = field_chksum( iobt%seaice_melt) ; if (root) write(outunit,100) 'iobt%seaice_melt ', chks
14081408
chks = field_chksum( iobt%salt_flux ) ; if (root) write(outunit,100) 'iobt%salt_flux ', chks
14091409
chks = field_chksum( iobt%lw_flux ) ; if (root) write(outunit,100) 'iobt%lw_flux ', chks

config_src/drivers/STALE_mct_cap/ocn_cap_methods.F90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ subroutine ocn_import(x2o, ind, grid, ice_ocean_boundary, ocean_public, logunit,
4444
character(*), parameter :: F01 = "('(ocn_import) ',a,4(i6,2x),d21.14)"
4545
!-----------------------------------------------------------------------
4646

47-
isc = GRID%isc; iec = GRID%iec ; jsc = GRID%jsc; jec = GRID%jec
47+
isc = GRID%isc ; iec = GRID%iec ; jsc = GRID%jsc ; jec = GRID%jec
4848

4949
k = 0
5050
do j = jsc, jec
@@ -236,7 +236,7 @@ subroutine ocn_export(ind, ocn_public, grid, o2x, dt_int, ncouple_per_day)
236236
endif
237237
sshx(i,j) = slope * grid%US%m_to_L*grid%IdxT(i,j) * grid%mask2dT(i,j)
238238
if (grid%mask2dT(i,j)==0.) sshx(i,j) = 0.0
239-
enddo; enddo
239+
enddo ; enddo
240240

241241
! d/dy ssh
242242
do j=grid%jsc, grid%jec ; do i=grid%isc,grid%iec
@@ -263,15 +263,15 @@ subroutine ocn_export(ind, ocn_public, grid, o2x, dt_int, ncouple_per_day)
263263
endif
264264
sshy(i,j) = slope * grid%US%m_to_L*grid%IdyT(i,j) * grid%mask2dT(i,j)
265265
if (grid%mask2dT(i,j)==0.) sshy(i,j) = 0.0
266-
enddo; enddo
266+
enddo ; enddo
267267

268268
! rotate ssh gradients from local coordinates to true zonal/meridional (inverse transformation)
269269
n = 0
270270
do j=grid%jsc, grid%jec ; do i=grid%isc,grid%iec
271271
n = n+1
272272
o2x(ind%o2x_So_dhdx, n) = grid%cos_rot(i,j) * sshx(i,j) + grid%sin_rot(i,j) * sshy(i,j)
273273
o2x(ind%o2x_So_dhdy, n) = grid%cos_rot(i,j) * sshy(i,j) - grid%sin_rot(i,j) * sshx(i,j)
274-
enddo; enddo
274+
enddo ; enddo
275275

276276
end subroutine ocn_export
277277

config_src/drivers/STALE_mct_cap/ocn_comp_mct.F90

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module ocn_comp_mct
6161
use MOM_coupler_types, only : coupler_type_initialized, coupler_type_copy_data
6262

6363
! By default make data private
64-
implicit none; private
64+
implicit none ; private
6565

6666
#include <MOM_memory.h>
6767

@@ -201,7 +201,7 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
201201

202202
! set the shr log io unit number
203203
call shr_file_setLogUnit(stdout)
204-
end if
204+
endif
205205

206206
call set_calendar_type(NOLEAP) !TODO: confirm this
207207

@@ -280,7 +280,7 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
280280
"Coeff. used to convert net shortwave rad. into "//&
281281
"near-IR, diffuse shortwave.", units="nondim", default=0.215)
282282
else
283-
glb%c1 = 0.0; glb%c2 = 0.0; glb%c3 = 0.0; glb%c4 = 0.0
283+
glb%c1 = 0.0 ; glb%c2 = 0.0 ; glb%c3 = 0.0 ; glb%c4 = 0.0
284284
endif
285285

286286
! Close param file before it gets opened by ocean_model_init again.
@@ -316,13 +316,13 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
316316
close(nu)
317317
if (is_root_pe()) then
318318
write(stdout,*) 'Reading restart file(s): ',trim(restartfiles)
319-
end if
319+
endif
320320
call shr_file_freeUnit(nu)
321321
call ocean_model_init(glb%ocn_public, glb%ocn_state, time0, time_start, input_restart_file=trim(restartfiles))
322322
endif
323323
if (is_root_pe()) then
324324
write(stdout,'(/12x,a/)') '======== COMPLETED MOM INITIALIZATION ========'
325-
end if
325+
endif
326326

327327
! Initialize ocn_state%sfc_state out of sight
328328
call ocean_model_init_sfc(glb%ocn_state, glb%ocn_public)
@@ -384,14 +384,14 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
384384
if (mom_cpl_dt /= ocn_cpl_dt) then
385385
write(stdout,*) 'ERROR mom_cpl_dt and ocn_cpl_dt must be identical'
386386
call exit(0)
387-
end if
387+
endif
388388

389389
! send initial state to driver
390390

391391
!TODO:
392392
! if ( lsend_precip_fact ) then
393393
! call seq_infodata_PutData( infodata, precip_fact=precip_fact)
394-
! end if
394+
! endif
395395

396396
if (debug .and. root_pe().eq.pe_here()) print *, "calling ocn_export"
397397
call ocn_export(glb%ind, glb%ocn_public, glb%grid, o2x_o%rattr, mom_cpl_dt, ncouple_per_day)
@@ -412,7 +412,7 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
412412
if (is_root_pe()) then
413413
call shr_file_setLogUnit (shrlogunit)
414414
call shr_file_setLogLevel(shrloglev)
415-
end if
415+
endif
416416

417417
end subroutine ocn_init_mct
418418

@@ -488,10 +488,10 @@ subroutine ocn_run_mct( EClock, cdata_o, x2o_o, o2x_o)
488488
time_start = time_start-coupling_timestep
489489
! double the first coupling interval (to account for the missing coupling interval to due to lag)
490490
coupling_timestep = coupling_timestep*2
491-
end if
491+
endif
492492

493493
firstCall = .false.
494-
end if
494+
endif
495495

496496
! Debugging clocks
497497
if (debug .and. is_root_pe()) then
@@ -526,7 +526,7 @@ subroutine ocn_run_mct( EClock, cdata_o, x2o_o, o2x_o)
526526
c1=glb%c1, c2=glb%c2, c3=glb%c3, c4=glb%c4)
527527
else
528528
call ocn_import(x2o_o%rattr, glb%ind, glb%grid, Ice_ocean_boundary, glb%ocn_public, stdout, Eclock )
529-
end if
529+
endif
530530

531531
! Update internal ocean
532532
call update_ocean_model(ice_ocean_boundary, glb%ocn_state, glb%ocn_public, time_start, coupling_timestep)
@@ -760,7 +760,7 @@ end subroutine ocn_domain_mct
760760
else
761761
write(stdout,*) 'ocn_comp_mct ERROR: unknown starttype'
762762
call exit(0)
763-
end if
763+
endif
764764
return
765765

766766
end function

0 commit comments

Comments
 (0)