Skip to content

Commit 480bfc1

Browse files
authored
Merge pull request #636 from billsacks/glc_avg_r8
Convert count to r8 rather than r4 in prep_glc_avg ### Description of changes Convert count to r8 rather than r4 in prep_glc_avg. This makes this averaging consistent with what's done in med_methods_FB_average, so we can switch to the latter (in an upcoming PR) without changing answers. ### Specific notes Contributors other than yourself, if any: CMEPS Issues Fixed (include github issue #): Are changes expected to change answers? (specify if bfb, different at roundoff, more substantial) - probably bfb but has a slight potential to change answers in cases with lnd2glc coupling. Since integers up to about 16 million can be represented exactly in r4, I don't expect answer changes, but it's possible that there will be answer changes from this with some compilers. Any User Interface Changes (namelist or namelist defaults changes)? ### Testing performed Just tested the build (`SMS_Ld2_D_P8x1.f10_g37.X.green_gnu`).
2 parents d165c16 + b0a71cb commit 480bfc1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mediator/med_phases_prep_glc_mod.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ subroutine med_phases_prep_glc_avg(gcomp, rc)
613613
if (chkerr(rc,__LINE__,u_FILE_u)) return
614614
if (lndAccum2glc_cnt > 0) then
615615
! If accumulation count is greater than 0, do the averaging
616-
data2d(:,:) = data2d(:,:) / real(lndAccum2glc_cnt)
616+
data2d(:,:) = data2d(:,:) / real(lndAccum2glc_cnt, R8)
617617
else
618618
! If accumulation count is 0, then simply set the averaged field bundle values from the land
619619
! to the import field bundle values
@@ -631,7 +631,7 @@ subroutine med_phases_prep_glc_avg(gcomp, rc)
631631
if (chkerr(rc,__LINE__,u_FILE_u)) return
632632
if (ocnAccum2glc_cnt > 0) then
633633
! If accumulation count is greater than 0, do the averaging
634-
data2d(:,:) = data2d(:,:) / real(ocnAccum2glc_cnt)
634+
data2d(:,:) = data2d(:,:) / real(ocnAccum2glc_cnt, R8)
635635
else
636636
! If accumulation count is 0, then simply set the averaged field bundle values from the ocn
637637
! to the import field bundle values

0 commit comments

Comments
 (0)