grib/src/main/java/ucar/nc2/grib/grib1/tables/EcmwfLocalConcepts.java
private void writeLookupTableFile(List<String> tableNums, Path dir, String writeDate) throws IOException {

        System.out.println("Writing: lookupTables.txt");
        Collections.sort(tableNums);
        Path lookupTableReg = dir.resolve("lookupTables.txt");
        Files.deleteIfExists(lookupTableReg);
        Files.createFile(lookupTableReg);
        try (BufferedWriter writer = Files.newBufferedWriter(lookupTableReg, ENCODING)){
            writer.write("# Generated by " + this.getClass().getCanonicalName() + " on " + writeDate);
            writer.newLine();
            for(String tn : tableNums){
                String tableName = "2.98." + tn + ".table";
                String reg = "98:\t-1:\t" + tn + ":\t" + tableName;
                writer.write(reg);
                writer.newLine();
            }
        }
    }
private void writeLookupTableFile(List<String> tableNums, Path dir, String writeDate) throws IOException {

        System.out.println("Writing: lookupTables.txt");
        Collections.sort(tableNums);
        Path lookupTableReg = dir.resolve("lookupTables.txt");
        Files.deleteIfExists(lookupTableReg);
        Files.createFile(lookupTableReg);
        try (BufferedWriter writer = Files.newBufferedWriter(lookupTableReg, ENCODING)){
            writer.write("# Generated by " + this.getClass().getCanonicalName() + " on " + writeDate);
            writer.newLine();
            for(String tn : tableNums){
                String tableName = "2.98." + tn + ".table";
                String reg = "98:\t-1:\t" + tn + ":\t" + tableName;
                writer.write(reg);
                writer.newLine();
            }
        }
    }
private void writeLookupTableFile ( List < String > tableNums , Path dir , String writeDate ) throws IOException { System . out . println ( "Writing: lookupTables.txt" ) ; Collections . sort ( tableNums ) ; Path lookupTableReg = dir . resolve ( "lookupTables.txt" ) ; Files . deleteIfExists ( lookupTableReg ) ; Files . createFile ( lookupTableReg ) ; try ( BufferedWriter writer = Files . newBufferedWriter ( lookupTableReg , ENCODING ) ) { writer . write ( "# Generated by " + this . getClass ( ) . getCanonicalName ( ) + " on " + writeDate ) ; writer . newLine ( ) ; for ( String tn : tableNums ) { String tableName = "2.98." + tn + ".table" ; String reg = "98:\t-1:\t" + tn + ":\t" + tableName ; writer . write ( reg ) ; writer . newLine ( ) ; } } }
Write the lookupTables.txt file, which basically registers all of the new grib1 tables
with the CDM

@param tableNums List of Table Numbers
@param dir Directory where the tables live
@param writeDate Date on which the main method of this class was run, resulting in new tables
Write the lookupTables . txt file which basically registers all of the new grib1 tables with the CDM