Commit fbe42cda authored by Lars Pastewka's avatar Lars Pastewka
Browse files

MAINT: Only set append flag when not in multifile mode.

parent da7be99c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -616,15 +616,16 @@ void DumpNetCDF::closefile()
  if (filewriter && singlefile_opened) {
    NCERR( nc_close(ncid) );
    singlefile_opened = 0;
    // append next time DumpNetCDF::openfile is called
    append_flag = 1;
    // write to next frame upon next open
    if (multifile)
      framei = 1;
    else
    else {
      // append next time DumpNetCDF::openfile is called
      append_flag = 1;
      framei++;
    }
  }
}

/* ---------------------------------------------------------------------- */

+4 −3
Original line number Diff line number Diff line
@@ -592,15 +592,16 @@ void DumpNetCDFMPIIO::closefile()
  if (singlefile_opened) {
    NCERR( ncmpi_close(ncid) );
    singlefile_opened = 0;
    // append next time DumpNetCDFMPIIO::openfile is called
    append_flag = 1;
    // write to next frame upon next open
    if (multifile)
      framei = 1;
    else
    else {
      // append next time DumpNetCDFMPIIO::openfile is called
      append_flag = 1;
      framei++;
    }
  }
}

/* ---------------------------------------------------------------------- */