Changes between Initial Version and Version 1 of Ticket #557


Ignore:
Timestamp:
06/07/12 20:40:59 (12 years ago)
Author:
arango
Comment:

I think that both conditionals are equivalent yielding the same logical result: TRUE or FALSE:

           IF ((TRIM(ncfile).eq.TRIM(S(ifile)%name)).and.                &
     &        ((ncid.eq.-1).and.(FRCids(ifile,ng).ne.-1))) THEN
             ...
           END IF
or

           IF ((TRIM(ncfile).eq.TRIM(S(ifile)%name)).and.                &
     &        (ncid.ne.FRCids(ifile,ng))) THEN
             ...
           END IF

So I can see the advantages of the latter. Thank you.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #557

    • Property ResolutionFixed
    • Property Status newclosed
  • Ticket #557 – Description

    initial v1  
    1 I propose a change to inquire.F looking like:
     1I propose a change to '''inquire.F''' looking like:
    22
    33{{{
     
    1212           END IF
    1313}}}
    14 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.
     14The 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'''.