Averaged files not written correctly if ntsavg=0 (time-steps missing)
This is due to an inconsistency in output.F for the iteration of nrecavg.
Instead of if (mod(ilc-1,navg).eq.0) nrecavg=nrecavg+1
It should be: if (mod(ilc-ntsavg,navg).eq.0) nrecavg=nrecavg+1
Otherwise, if ntsavg=0, the file is written, but nrecavg is not incremented. So the time step in the file will be overwritten on the next write.