Opened 3 years ago

Closed 3 years ago

#900 closed defect (Fixed)

Multi-file option in time-averaging output files

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

Description

There have been two reports about the AVERAGES multi-file option failing during restart. I looked into the debugger again, and I could not reproduce the error. I tried eight different combinations with NTIMES, NAVG, and NDEFAVG. Thus, I don't know what specific set of values makes that logic fail.

However, I examined the possibility of adding the same logic used in history files to the time-averaging files. It turns out that augmenting the OutFiles is not that harmful when all the elements of the arrays in the derived type structure (T_IO) are not filled in some cases.

#ifdef AVERAGES
        IF ((nAVG(ng).gt.0).and.(ndefAVG(ng).gt.0)) THEN
          OutFiles=ntimes(ng)/ndefAVG(ng)
          IF ((nAVG(ng).eq.ndefAVG(ng)).or.                             &
     &        (MOD(ntimes(ng),ndefAVG(ng)).ge.nAVG(ng))) THEN
            OutFiles=Outfiles+1
          END IF
          CALL edit_file_struct (ng, OutFiles, AVG)
          AVG(ng)%load=0       ! because delayed creation of NetCDF file
        END IF                 ! due to time-averaging
#endif
#ifdef DIAGNOSTICS
        IF ((nDIA(ng).gt.0).and.(ndefDIA(ng).gt.0)) THEN
          OutFiles=ntimes(ng)/ndefDIA(ng)
          IF ((nDIA(ng).eq.ndefDIA(ng)).or.                             &
     &        (MOD(ntimes(ng),ndefDIA(ng)).ge.nDIA(ng))) THEN
            OutFiles=Outfiles+1
          END IF
          CALL edit_file_struct (ng, OutFiles, DIA)
          DIA(ng)%load=0       ! because delayed creation of NetCDF file
        END IF                 ! due to time-averaging
#endif

Change History (1)

comment:1 by arango, 3 years ago

Resolution: Fixed
Status: newclosed
Note: See TracTickets for help on using tickets.