Opened 13 years ago
Closed 13 years ago
#557 closed bug (Fixed)
Multi-file, multi-var issue on input — at Version 1
Reported by: | kate | Owned by: | arango |
---|---|---|---|
Priority: | major | Milestone: | Release ROMS/TOMS 3.6 |
Component: | Nonlinear | Version: | 3.6 |
Keywords: | Cc: |
Description (last modified by )
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.
Change History (1)
comment:1 by , 13 years ago
Description: | modified (diff) |
---|---|
Resolution: | → Fixed |
Status: | new → closed |
I think that both conditionals are equivalent yielding the same logical result: TRUE or FALSE:
So I can see the advantages of the latter. Thank you.