Skip to content

Commit 0bfeff5

Browse files
committed
Removed trailing space
1 parent 2b195b7 commit 0bfeff5

File tree

1 file changed

+40
-29
lines changed

1 file changed

+40
-29
lines changed

src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ module MOM_lateral_mixing_coeffs
130130
real, allocatable :: kdgl90_struct(:,:,:) !< Vertical structure function used in GL90 diffusivity [nondim]
131131
real :: BS_EBT_power !< Power to raise EBT vertical structure to. Default 0.0.
132132
real :: sqg_expo !< Exponent for SQG vertical structure [nondim]. Default 0.0
133-
logical :: BS_use_sqg !< If true, use sqg_stuct for backscatter vertical structure.
133+
logical :: BS_use_sqg_struct !< If true, use sqg_stuct for backscatter vertical structure.
134134

135135

136136
real ALLOCABLE_, dimension(NIMEMB_PTR_,NJMEM_) :: &
@@ -282,31 +282,23 @@ subroutine calc_resoln_function(h, tv, G, GV, US, CS, MEKE, dt)
282282
call create_group_pass(CS%pass_cg1, CS%cg1, G%Domain)
283283
call do_group_pass(CS%pass_cg1, G%Domain)
284284
endif
285-
if (CS%BS_use_sqg .or. CS%khth_use_sqg_struct .or. CS%khtr_use_sqg_struct &
285+
if (CS%BS_use_sqg_struct .or. CS%khth_use_sqg_struct .or. CS%khtr_use_sqg_struct &
286286
.or. CS%kdgl90_use_sqg_struct .or. CS%id_sqg_struct>0) then
287287
call calc_sqg_struct(h, tv, G, GV, US, CS, dt, MEKE)
288288
call pass_var(CS%sqg_struct, G%Domain)
289289
endif
290290

291-
if (CS%BS_EBT_power>0. .and. CS%BS_use_sqg) then
292-
call MOM_error(FATAL, &
293-
"calc_resoln_function: BS_EBT_POWER>0. &
294-
and BS_USE_SQG=True cannot be set together")
295-
elseif (CS%BS_EBT_power>0.) then
291+
if (CS%BS_EBT_power>0.) then
296292
do k=1,nz ; do j=G%jsd,G%jed ; do i=G%isd,G%ied
297293
CS%BS_struct(i,j,k) = CS%ebt_struct(i,j,k)**CS%BS_EBT_power
298294
enddo ; enddo ; enddo
299-
elseif (CS%BS_use_sqg) then
295+
elseif (CS%BS_use_sqg_struct) then
300296
do k=1,nz ; do j=G%jsd,G%jed ; do i=G%isd,G%ied
301297
CS%BS_struct(i,j,k) = CS%sqg_struct(i,j,k)
302298
enddo ; enddo ; enddo
303299
endif
304300

305-
if (CS%khth_use_ebt_struct .and. CS%khth_use_sqg_struct) then
306-
call MOM_error(FATAL, &
307-
"calc_resoln_function: Only one of KHTH_USE_EBT_STRUCT &
308-
and KHTH_USE_SQG_STRUCT can be true")
309-
elseif (CS%khth_use_ebt_struct) then
301+
if (CS%khth_use_ebt_struct) then
310302
do k=1,nz ; do j=G%jsd,G%jed ; do i=G%isd,G%ied
311303
CS%khth_struct(i,j,k) = CS%ebt_struct(i,j,k)
312304
enddo ; enddo ; enddo
@@ -316,11 +308,7 @@ subroutine calc_resoln_function(h, tv, G, GV, US, CS, MEKE, dt)
316308
enddo ; enddo ; enddo
317309
endif
318310

319-
if (CS%khtr_use_ebt_struct .and. CS%khtr_use_sqg_struct) then
320-
call MOM_error(FATAL, &
321-
"calc_resoln_function: Only one of KHTR_USE_EBT_STRUCT &
322-
and KHTR_USE_SQG_STRUCT can be true")
323-
elseif (CS%khtr_use_ebt_struct) then
311+
if (CS%khtr_use_ebt_struct) then
324312
do k=1,nz ; do j=G%jsd,G%jed ; do i=G%isd,G%ied
325313
CS%khtr_struct(i,j,k) = CS%ebt_struct(i,j,k)
326314
enddo ; enddo ; enddo
@@ -330,11 +318,7 @@ subroutine calc_resoln_function(h, tv, G, GV, US, CS, MEKE, dt)
330318
enddo ; enddo ; enddo
331319
endif
332320

333-
if (CS%kdgl90_use_ebt_struct .and. CS%kdgl90_use_sqg_struct) then
334-
call MOM_error(FATAL, &
335-
"calc_resoln_function: Only one of KD_GL90_USE_EBT_STRUCT &
336-
and KD_GL90_USE_SQG_STRUCT can be true")
337-
elseif (CS%kdgl90_use_ebt_struct) then
321+
if (CS%kdgl90_use_ebt_struct) then
338322
do k=1,nz ; do j=G%jsd,G%jed ; do i=G%isd,G%ied
339323
CS%kdgl90_struct(i,j,k) = CS%ebt_struct(i,j,k)
340324
enddo ; enddo ; enddo
@@ -1409,7 +1393,7 @@ subroutine VarMix_init(Time, G, GV, US, param_file, diag, CS)
14091393
call get_param(param_file, mdl, "BACKSCAT_EBT_POWER", CS%BS_EBT_power, &
14101394
"Power to raise EBT vertical structure to when backscatter "// &
14111395
"has vertical structure.", units="nondim", default=0.0)
1412-
call get_param(param_file, mdl, "BS_USE_SQG", CS%BS_use_sqg, &
1396+
call get_param(param_file, mdl, "BS_USE_SQG_STRUCT", CS%BS_use_sqg_struct, &
14131397
"If true, the SQG vertical structure is used for backscatter "//&
14141398
"on the condition that BS_EBT_power=0", &
14151399
default=.false.)
@@ -1494,8 +1478,33 @@ subroutine VarMix_init(Time, G, GV, US, param_file, diag, CS)
14941478
endif
14951479

14961480

1497-
allocate(CS%BS_struct(isd:ied,jsd:jed,GV%ke), source=0.0)
1498-
CS%BS_struct(:,:,:) = 1.0
1481+
if (CS%BS_EBT_power>0. .and. CS%BS_use_sqg_struct) then
1482+
call MOM_error(FATAL, &
1483+
"calc_resoln_function: BS_EBT_POWER>0. &
1484+
and BS_USE_SQG=True cannot be set together")
1485+
endif
1486+
1487+
if (CS%khth_use_ebt_struct .and. CS%khth_use_sqg_struct) then
1488+
call MOM_error(FATAL, &
1489+
"calc_resoln_function: Only one of KHTH_USE_EBT_STRUCT &
1490+
and KHTH_USE_SQG_STRUCT can be true")
1491+
endif
1492+
1493+
if (CS%khtr_use_ebt_struct .and. CS%khtr_use_sqg_struct) then
1494+
call MOM_error(FATAL, &
1495+
"calc_resoln_function: Only one of KHTR_USE_EBT_STRUCT &
1496+
and KHTR_USE_SQG_STRUCT can be true")
1497+
endif
1498+
1499+
if (CS%kdgl90_use_ebt_struct .and. CS%kdgl90_use_sqg_struct) then
1500+
call MOM_error(FATAL, &
1501+
"calc_resoln_function: Only one of KD_GL90_USE_EBT_STRUCT &
1502+
and KD_GL90_USE_SQG_STRUCT can be true")
1503+
endif
1504+
1505+
if (CS%BS_EBT_power>0. .or. CS%BS_use_sqg_struct) then
1506+
allocate(CS%BS_struct(isd:ied,jsd:jed,GV%ke), source=0.0)
1507+
endif
14991508

15001509
if (CS%khth_use_ebt_struct .or. CS%khth_use_sqg_struct) then
15011510
allocate(CS%khth_struct(isd:ied, jsd:jed, gv%ke), source=0.0)
@@ -1606,13 +1615,15 @@ subroutine VarMix_init(Time, G, GV, US, param_file, diag, CS)
16061615

16071616
CS%id_sqg_struct = register_diag_field('ocean_model', 'sqg_struct', diag%axesTl, Time, &
16081617
'Vertical structure of SQG mode', 'nondim')
1609-
if (CS%BS_use_sqg .or. CS%khth_use_sqg_struct .or. CS%khtr_use_sqg_struct &
1618+
if (CS%BS_use_sqg_struct .or. CS%khth_use_sqg_struct .or. CS%khtr_use_sqg_struct &
16101619
.or. CS%kdgl90_use_sqg_struct .or. CS%id_sqg_struct>0) then
16111620
allocate(CS%sqg_struct(isd:ied,jsd:jed,GV%ke), source=0.0)
16121621
endif
16131622

1614-
CS%id_BS_struct = register_diag_field('ocean_model', 'BS_struct', diag%axesTl, Time, &
1615-
'Vertical structure of backscatter', 'nondim')
1623+
if (CS%BS_EBT_power>0. .or. CS%BS_use_sqg_struct) then
1624+
CS%id_BS_struct = register_diag_field('ocean_model', 'BS_struct', diag%axesTl, Time, &
1625+
'Vertical structure of backscatter', 'nondim')
1626+
endif
16161627
if (CS%khth_use_ebt_struct .or. CS%khth_use_sqg_struct) then
16171628
CS%id_khth_struct = register_diag_field('ocean_model', 'khth_struct', diag%axesTl, Time, &
16181629
'Vertical structure of thickness diffusivity', 'nondim')

0 commit comments

Comments
 (0)