﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
557	Multi-file, multi-var issue on input	kate	arango	"I propose a change to '''inquire.F''' looking like:

{{{
@@ -378,7 +378,7 @@
       IF (label(1:3).eq.'FRC') THEN
         DO ifile=1,nfiles
           IF ((TRIM(ncfile).eq.TRIM(S(ifile)%name)).and.                &
-     &        ((ncid.eq.-1).and.(FRCids(ifile,ng).ne.-1))) THEN
+     &        (ncid.ne.FRCids(ifile,ng))) THEN
             ncid=FRCids(ifile,ng)
             EXIT
           END IF
}}}
The reason for this is if you have say both '''Uwind''' and '''Vwind''' in the same file, but one file per year. In the transition from one file to the next, there can be trouble. Specifically, when reading '''Uwind''', inquire knows to close out the old file and update '''ncFRCid''', '''FRC%ncid''' and '''FRCids'''. No problem. Now we come to '''Vwind''' which still has the old value for '''ncFRCid''', getting into inquire as '''ncid'''. This is no longer pointing to a valid file handle, but inquire doesn't actually use it. However, the calling '''get_2dfld''' does use it and will fail on reading '''ocean_time''' or '''wind_time''' or whatever. Mysterious when you know that field is in the file you think it should be reading. This updates the '''ncid''' and therefore the calling '''ncFRCid'''."	bug	closed	major	Release ROMS/TOMS 3.6	Nonlinear	3.6	Fixed		
