Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename sum to asum, as "sum" is also a generic Fortran function #905

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cicecore/cicedyn/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down