public NetcdfFile write ( CancelTask cancel ) throws IOException { try { if ( version . isExtendedModel ( ) ) addGroupExtended ( null , fileIn . getRootGroup ( ) ) ; else addGroupClassic ( ) ; if ( cancel != null && cancel . isCancel ( ) ) return null ; // create the file writer . create ( ) ; if ( cancel != null && cancel . isCancel ( ) ) return null ; double total = copyVarData ( varList , null , cancel ) ; if ( cancel != null && cancel . isCancel ( ) ) return null ; writer . flush ( ) ; if ( debug ) System . out . println ( "FileWriter done total bytes = " + total ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; writer . abort ( ) ; // clean up throw ioe ; } return writer . getNetcdfFile ( ) ; }
Write the input file to the output file .