Skip to content

Commit

Permalink
Merge branch 'ndk/cam/fix-add-tmp-arrays-use-ncol' (PR #1521)
Browse files Browse the repository at this point in the history
Fixes tmp_array size to avoid array mismatch found by GNU

This is a fix to a PR #1501 (github issue #1263).
 I allocated the tmp_array to be too large and GNU compiler stopped
 with  an array mismatch.
 Change this to be state%ncol in size, not pcol

 Fixes #1263

[BFB]

* ndk/cam/fix-add-tmp-arrays-use-ncol:
  This is a fix to a PR #1501 (github issue #1263). I allocated the
  tmp_array to be too large and GNU compiler stopped with an array
  mismatch. Change this to be state%ncol in size, not pcol Add a
  more reasonable pe layout for the a%ne30np4 grid for cori-knl.
  May not be optimal, but allows for testing.
  • Loading branch information
singhbalwinder committed May 11, 2017
2 parents a8bc3b0 + cf9e47a commit c5d6848
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/cam/src/physics/cam/clubb_intr.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ subroutine clubb_tend_cam( &
real(r8) :: es(pcols,pver)
real(r8) :: qs(pcols,pver)
real(r8) :: gam(pcols,pver)
real(r8) :: tmp_array(pcols,pverp)
real(r8) :: tmp_array(state%ncol,pverp)
real(r8) :: bfact, orgparam, delpavg
character(len=6) :: choice_radf

Expand Down
2 changes: 1 addition & 1 deletion components/cam/src/physics/cam/hetfrz_classnuc_cam.F90
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ subroutine hetfrz_classnuc_cam_calc( &
real(r8) :: numice10s(pcols,pver)
real(r8) :: numice10s_imm_dst(pcols,pver)
real(r8) :: numice10s_imm_bc(pcols,pver)
real(r8) :: tmp_array(pcols,pver)
real(r8) :: tmp_array(state%ncol,pver)

real(r8) :: na500(pcols,pver)
real(r8) :: tot_na500(pcols,pver)
Expand Down

0 comments on commit c5d6848

Please sign in to comment.