﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
695	Checking point source methodologies: invalid value of ng	m.hadfield	arango	"In '''read_phypar.F''', lines 2736 through 2750 check the point source methodologies
{{{
!
!  Check if both point sources methodologies are activated.  Only one
!  method is allowed for a particular grid.  Otherwise, the point
!  source will be applies twice.
!
       IF (LuvSrc(ng).and.LwSrc(ng)) THEN
         IF (Master) THEN
           WRITE (out,260) 'LuvSrc', LuvSrc(ng),                        &
     &           'Because LwSrc  is also ON; only one method is legal.'
           WRITE (out,260) 'LwSrc', LwSrc(ng),                          &
     &           'Because LuvSrc is also ON; only one method is legal.'
           exit_flag=4
           RETURN
         END IF
       END IF
}}}
This needs to be enclosed in a loop over '''ng''':
{{{
      DO ng=1,Ngrids
       IF (LuvSrc(ng).and.LwSrc(ng)) THEN
      ...
       END IF
      END DO
}}}
Otherwise, '''ng''' has the value it acquired on exit from the previous such loop, which leads to an out-of-bound access in '''!LuvSrc(ng''') and '''!LwSrc(ng)'''."	bug	closed	major	Release ROMS/TOMS 3.7	Nonlinear	3.7	Fixed		
