From 5d09123865b5e8b47ba9d3c389b23743d84908c1 Mon Sep 17 00:00:00 2001 From: Mads Hvid Ribergaard <38077893+mhrib@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:17:24 +0100 Subject: [PATCH] Rename sum to asum, as "sum" is also a generic fortran function (#905) Co-authored-by: Mads Hvid Ribergaard --- cicecore/cicedyn/general/ice_init.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cicecore/cicedyn/general/ice_init.F90 b/cicecore/cicedyn/general/ice_init.F90 index 0dd2cb832..4e1a50f44 100644 --- a/cicecore/cicedyn/general/ice_init.F90 +++ b/cicecore/cicedyn/general/ice_init.F90 @@ -2939,7 +2939,7 @@ subroutine set_state_var (nx_block, ny_block, & indxi, indxj ! compressed indices for cells with aicen > puny real (kind=dbl_kind) :: & - Tsfc, sum, hbar, abar, puny, rhos, Lfresh, rad_to_deg, rsnw_fall, dist_ratio, Tffresh + Tsfc, asum, hbar, abar, puny, rhos, Lfresh, rad_to_deg, rsnw_fall, dist_ratio, Tffresh real (kind=dbl_kind), dimension(ncat) :: & ainit, hinit ! initial area, thickness @@ -3075,7 +3075,7 @@ subroutine set_state_var (nx_block, ny_block, & ! Note: the resulting average ice thickness ! tends to be less than hbar due to the ! nonlinear distribution of ice thicknesses - sum = c0 + asum = c0 do n = 1, ncat if (n < ncat) then hinit(n) = p5*(hin_max(n-1) + hin_max(n)) ! m @@ -3084,10 +3084,10 @@ subroutine set_state_var (nx_block, ny_block, & endif ! parabola, max at h=hbar, zero at h=0, 2*hbar ainit(n) = max(c0, (c2*hbar*hinit(n) - hinit(n)**2)) - sum = sum + ainit(n) + asum = asum + ainit(n) enddo do n = 1, ncat - ainit(n) = ainit(n) / (sum + puny/ncat) ! normalize + ainit(n) = ainit(n) / (asum + puny/ncat) ! normalize enddo else