/** * Write the NetCDF file * * @throws IOException * @throws InvalidRangeException */ public void write() throws IOException, ucar.ma2.InvalidRangeException { // end of define mode writer.create(); try { // Setting values for (NetCDFDimensionsManager.NetCDFDimensionMapping mapper : dimensionsManager.getDimensions()) { crsWriter.setCoordinateVariable(mapper); } writeDataValues(); } finally { // Close the writer writer.close(); } }