Index: wflow-py/wflow/wf_netcdfio.py =================================================================== diff -u -r90a4ee3dd8724fb9dfe52fa5b7364aca4a4bd36a -rb90c267fae9ec3423464cf9b6c7a9bcbcd45d3a0 --- wflow-py/wflow/wf_netcdfio.py (.../wf_netcdfio.py) (revision 90a4ee3dd8724fb9dfe52fa5b7364aca4a4bd36a) +++ wflow-py/wflow/wf_netcdfio.py (.../wf_netcdfio.py) (revision b90c267fae9ec3423464cf9b6c7a9bcbcd45d3a0) @@ -64,7 +64,7 @@ complevel=9, zlib=True, least_significant_digit=None, - FillValue=1E31, + FillValue=1e31, ): """ This function prepares a NetCDF file with given metadata, for a certain year, daily basis data @@ -325,10 +325,9 @@ # timeObj = cftime.num2date(time[:], units=time.units, calendar=time.calendar) idx = timestep - 1 - + buffreset = int((idx + 1) % self.maxbuf) bufpos = int((idx) % self.maxbuf) - try: nc_var = self.nc_trg.variables[var]