diff --git a/src/SIS2_ice_thm.F90 b/src/SIS2_ice_thm.F90 index 2190da46..57677314 100644 --- a/src/SIS2_ice_thm.F90 +++ b/src/SIS2_ice_thm.F90 @@ -1504,7 +1504,7 @@ end subroutine SIS2_ice_thm_end ! Everything above this point pertains to the updating of the ice state due to ! thermodyanmic forcing. Everything after this point relates to more basic ! calculations of sea ice thermodynamics. They could be separated into two -! modules, but by keeping them together compliers stand a better chance of +! modules, but by keeping them together compilers stand a better chance of ! inlining various small subroutines and achieving better performance. !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~! diff --git a/src/SIS_dyn_cgrid.F90 b/src/SIS_dyn_cgrid.F90 index 14e1182f..2b341d15 100644 --- a/src/SIS_dyn_cgrid.F90 +++ b/src/SIS_dyn_cgrid.F90 @@ -131,14 +131,14 @@ module SIS_dyn_cgrid real :: puny !< small number [nondim] real :: onemeter !< make the units work out (hopefully) [Z ~> m] real :: basal_stress_cutoff !< tunable parameter for the bottom drag [nondim] - integer :: ncat_b ! number of bathymetry categories - integer :: ncat_i ! number of ice thickness categories (log-normal) + integer :: ncat_b !< number of bathymetry categories + integer :: ncat_i !< number of ice thickness categories (log-normal) real, pointer, dimension(:,:) :: Tb_u=>NULL() !< Basal stress component at u-points !! [R Z L T-2 -> kg m-1 s-2] real, pointer, dimension(:,:) :: Tb_v=>NULL() !< Basal stress component at v-points !! [R Z L T-2 -> kg m-1 s-2] - real, pointer, dimension(:,:) :: sigma_b=>NULL() !< !< Bottom depth variance [Z ~> m]. + real, pointer, dimension(:,:) :: sigma_b=>NULL() !< Bottom depth variance [Z ~> m]. logical :: FirstCall = .true. !< If true, this module has not been called before !>@{ Diagnostic IDs @@ -356,9 +356,9 @@ subroutine SIS_C_dyn_init(Time, G, US, param_file, diag, CS, ntrunc) "Scale factor in ITD landfast ice.", & units="nondim", default=1.9430) call get_param(param_file, mdl, "H2_FILE", h2_file, & - "The path to the file containing the sub-grid-scale "//& - "topographic roughness amplitude with ITD_LANDFAST.", & - fail_if_missing=.true.) + "The path to the file containing the sub-grid-scale "//& + "topographic roughness amplitude with ITD_LANDFAST.", & + fail_if_missing=.true.) call get_param(param_file, mdl, "INPUTDIR", inputdir, default=".") filename = trim(inputdir) // "/" // trim(h2_file) allocate(CS%sigma_b(G%isd:G%ied,G%jsd:G%jed), source=0.0) diff --git a/src/SIS_tracer_advect.F90 b/src/SIS_tracer_advect.F90 index 23f14d2b..ecb77699 100644 --- a/src/SIS_tracer_advect.F90 +++ b/src/SIS_tracer_advect.F90 @@ -758,10 +758,12 @@ subroutine advect_scalar_x(scalar, hprev, uhr, uh_neglect, domore_u, Idt, is, ie do_i(i) = .false. endif enddo - do i=is,ie ; if ((do_i(i)) .and. (Ihnew(i) > 0.0)) then - scalar(i,j,k) = (scalar(i,j,k) * hlst(i) - & - ((uhh(I)-haddE(i))*Tr_x(I) - & - (uhh(I-1)+haddW(i))*Tr_x(I-1))) * Ihnew(i) + do i=is,ie ; if (do_i(i)) then + if (Ihnew(i) > 0.0) then + scalar(i,j,k) = (scalar(i,j,k) * hlst(i) - & + ((uhh(I)-haddE(i))*Tr_x(I) - & + (uhh(I-1)+haddW(i))*Tr_x(I-1))) * Ihnew(i) + endif endif ; enddo endif ; enddo ! End of j-loop. @@ -928,10 +930,12 @@ subroutine advect_x(Tr, hprev, uhr, uh_neglect, domore_u, ntr, nL_max, Idt, is, endif enddo do m=1,ntr ; do l=1,Tr(m)%nL - do i=is,ie ; if ((do_i(i)) .and. (Ihnew(i) > 0.0)) then - Tr(m)%t(i,j,k,l) = (Tr(m)%t(i,j,k,l) * hlst(i) - & - ((uhh(I)-haddE(i))*Tr_x(I,l,m) - & - (uhh(I-1)+haddW(i))*Tr_x(I-1,l,m))) * Ihnew(i) + do i=is,ie ; if (do_i(i)) then + if (Ihnew(i) > 0.0) then + Tr(m)%t(i,j,k,l) = (Tr(m)%t(i,j,k,l) * hlst(i) - & + ((uhh(I)-haddE(i))*Tr_x(I,l,m) - & + (uhh(I-1)+haddW(i))*Tr_x(I-1,l,m))) * Ihnew(i) + endif endif ; enddo ! Diagnostics if (associated(Tr(m)%ad4d_x)) then ; do i=is,ie ; if (do_i(i)) then