Opened 13 years ago

Last modified 13 years ago

#557 closed bug

Multi-file, multi-var issue on input — at Initial Version

Reported by: kate Owned by: arango
Priority: major Milestone: Release ROMS/TOMS 3.6
Component: Nonlinear Version: 3.6
Keywords: Cc:

Description

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 patch updates the ncid and therefore the calling ncFRCid.

Change History (0)

Note: See TracTickets for help on using tickets.