diff --git a/components/mpas-ocean/src/shared/mpas_ocn_gm.F b/components/mpas-ocean/src/shared/mpas_ocn_gm.F index 2faf6aff6f96..d1e0948235eb 100644 --- a/components/mpas-ocean/src/shared/mpas_ocn_gm.F +++ b/components/mpas-ocean/src/shared/mpas_ocn_gm.F @@ -940,7 +940,7 @@ subroutine ocn_GM_init(domain, err)!{{{ integer, intent(out) :: err !< Output: error flag - real(kind=RKIND) :: sphereRadius + real(kind=RKIND) :: sphereRadius, coef type(block_type), pointer :: block type(mpas_pool_type), pointer :: meshPool @@ -1075,7 +1075,7 @@ subroutine ocn_GM_init(domain, err)!{{{ call mpas_dmpar_finalize(domain%dminfo) end if - ! Add horizontal taper + ! Initialize horizontal taper if (config_GM_horizontal_taper == 'none' .or. & config_GM_horizontal_taper == 'RossbyRadius') then ! For 'RossbyRadius', the taper is recomputed at every time step. @@ -1088,6 +1088,8 @@ subroutine ocn_GM_init(domain, err)!{{{ !$omp end do !$omp end parallel else if (config_GM_horizontal_taper == 'ramp') then + coef = 1.0_RKIND & + /(config_GM_horizontal_ramp_max - config_GM_horizontal_ramp_min) !$omp parallel !$omp do schedule(runtime) do iEdge = 1, nEdges @@ -1096,8 +1098,7 @@ subroutine ocn_GM_init(domain, err)!{{{ else if (dcEdge(iEdge) >= config_GM_horizontal_ramp_max) then gmHorizontalTaper(iEdge) = 1.0_RKIND else - gmHorizontalTaper(iEdge) = 1.0_RKIND & - /(config_GM_horizontal_ramp_max - config_GM_horizontal_ramp_min) & + gmHorizontalTaper(iEdge) = coef & *(dcEdge(iEdge) - config_GM_horizontal_ramp_min) end if end do diff --git a/components/mpas-ocean/src/shared/mpas_ocn_tracer_hmix_redi.F b/components/mpas-ocean/src/shared/mpas_ocn_tracer_hmix_redi.F index 0e0258c8ce51..36ae8e3dcd6e 100644 --- a/components/mpas-ocean/src/shared/mpas_ocn_tracer_hmix_redi.F +++ b/components/mpas-ocean/src/shared/mpas_ocn_tracer_hmix_redi.F @@ -533,7 +533,7 @@ subroutine ocn_tracer_hmix_Redi_init(domain, err)!{{{ call mpas_pool_get_array(meshPool, 'cellsOnEdge', cellsOnEdge) call mpas_pool_get_array(meshPool, 'dcEdge', dcEdge) - ! Resolution taper + ! Initialize horizonal taper if (config_Redi_horizontal_taper == 'none' .or. & config_Redi_horizontal_taper == 'RossbyRadius') then ! For 'RossbyRadius', the taper is recomputed at every time step in @@ -546,6 +546,8 @@ subroutine ocn_tracer_hmix_Redi_init(domain, err)!{{{ !$omp end do !$omp end parallel else if (config_Redi_horizontal_taper == 'ramp') then + coef = 1.0_RKIND & + /(config_Redi_horizontal_ramp_max - config_Redi_horizontal_ramp_min) !$omp parallel !$omp do schedule(runtime) do iEdge=1,nEdges @@ -554,9 +556,8 @@ subroutine ocn_tracer_hmix_Redi_init(domain, err)!{{{ else if (dcEdge(iEdge) >= config_Redi_horizontal_ramp_max) then RediHorizontalTaper(iEdge) = 1.0_RKIND else - RediHorizontalTaper(iEdge) = RediHorizontalTaper(iEdge) & - *(dcEdge(iEdge) - config_Redi_horizontal_ramp_min) & - /(config_Redi_horizontal_ramp_max - config_Redi_horizontal_ramp_min) + RediHorizontalTaper(iEdge) = coef & + *(dcEdge(iEdge) - config_Redi_horizontal_ramp_min) end if end do !$omp end do