add numberOfCheckPoints and endSimulation to netCDFWriter for checkpointing