Skip to content

Commit

Permalink
Bugfix: uninitialized variable dS in midas_vertmap
Browse files Browse the repository at this point in the history
- Reported by @nicjhan in issue #149.
- A maxval(abs(dS)) is using all of the array and yet only
  a sub-array is meant to be used. I simply initialized dS(:,:)=0
- No answer changes.
  • Loading branch information
adcroft committed Apr 28, 2015
1 parent b7ffdc9 commit 9dd6497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/initialization/midas_vertmap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,10 @@ subroutine determine_temperature(temp,salt,R,p_ref,niter,land_fill,h,k_start,eos

nx=size(temp,1);ny=size(temp,2); nz=size(temp,3)


press(:) = p_ref

do j=1,ny
dS(:,:) = 0. ! Needs to be zero everywhere since there is a maxval(abs(dS)) later...
T=temp(:,j,:)
S=salt(:,j,:)
hin=h(:,j,:)
Expand Down

0 comments on commit 9dd6497

Please sign in to comment.