Opened 5 years ago
Closed 5 years ago
#835 closed bug (Fixed)
Trouble in time-averaged output NetCDF files — at Version 1
Reported by: | kate | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | Release ROMS/TOMS 3.8 |
Component: | Nonlinear | Version: | 3.8 |
Keywords: | Cc: |
Description (last modified by )
If you run the standard upwelling case with NTIMES = 18, NAVG = 9, NDEFAVG = 9, it blows up:
Image PC Routine Line Source oceanG 00000000021D3096 Unknown Unknown Unknown oceanG 000000000092C915 output_ 283 output.f90 oceanG 0000000000813DF1 main3d_ 231 main3d.f90
the line in question is:
283 AVG(ng)%Nrec(Fcount)=0
The test above:
278 IF (iic(ng).eq.ntstart(ng)) THEN
is never true, so AVG(ng)%load starts at 1, goes to 2, then 3. When Fcount is 3, it goes out of bounds with AVG(ng)%Nrec is dimensioned size 2.
It was working before: src:ticket:825, trunk@982
Change History (1)
comment:1 by , 5 years ago
Description: | modified (diff) |
---|---|
Resolution: | → Fixed |
Status: | new → closed |
Summary: | trouble in output → Trouble in time-averaged output NetCDF files |
Note:
See TracTickets
for help on using tickets.
Yes, indeed. Great catch! The issue here is that the time-averaged output NetCDF files (when AVERAGES or DIAGNOSTICS_* are activated) are delayed in its creation until the fields are accumulated and ready to write out if the parameters NDEFAVG or NDEFDIA are greater than zero (multi-file option).
It is tricky, but the solution is very simple. The AVG(ng)%load or DIA(ng)%load are reset to zero for such cases in read_phypar.F. By default, their values are initialized to one during initialization in load_s1d. It is weird that the compiler didn't pick-up the out-of-bounds errors during my original testing.