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

This commit is contained in:
Lars Pastewka 2017-10-01 14:31:33 +02:00
parent da7be99cc4
commit fbe42cda2d
2 changed files with 8 additions and 6 deletions

View File

@ -616,13 +616,14 @@ 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++;
}
}
}

View File

@ -592,13 +592,14 @@ 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++;
}
}
}