Opened 9 years ago
Last modified 9 years ago
#695 closed bug
Checking point source methodologies: invalid value of ng — at Initial Version
Reported by: | m.hadfield | Owned by: | arango |
---|---|---|---|
Priority: | major | Milestone: | Release ROMS/TOMS 3.7 |
Component: | Nonlinear | Version: | 3.7 |
Keywords: | Cc: |
Description
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)
Note:
See TracTickets
for help on using tickets.