diff --git a/src/bin/noaa-create-station-data.js b/src/bin/noaa-create-station-data similarity index 97% rename from src/bin/noaa-create-station-data.js rename to src/bin/noaa-create-station-data index fae3f59..c9b4e74 100644 --- a/src/bin/noaa-create-station-data.js +++ b/src/bin/noaa-create-station-data @@ -24,9 +24,9 @@ * We will use the parent record for selection by CODAP Users, and the * subordinate records for addressing NOAA datasets. */ -const fs = require('fs'); -const console = require('console'); -const process = require('process'); +const fs = require("fs"); +const console = require("console"); +const process = require("process"); const kDeltaSq = 0.0001; // distance in degrees within which two stations are considered the same. @@ -34,7 +34,7 @@ console.error("HELLO?"); function configure() { let configuration = {}; - configuration.progName = process.argv[1].replace(/.*\//, ''); + configuration.progName = process.argv[1].replace(/.*\//, ""); let isdStationsFile = process.argv[2]; if (!(isdStationsFile && fs.existsSync(isdStationsFile) ) ) { usage(configuration); @@ -43,7 +43,7 @@ function configure() { let ghcndStationsFile = process.argv[3]; if (ghcndStationsFile && !fs.existsSync(ghcndStationsFile)) { - printErrorAndExit(`${configuration.progName}: File doesn't exist: ${ghcndStationsFile}`); + printErrorAndExit(`${configuration.progName}: File doesn not exist: ${ghcndStationsFile}`); } configuration.ghcndStationsFile = ghcndStationsFile; return configuration; @@ -298,7 +298,7 @@ function main() { try { // 1 Read ISD Stations File const isdStationsFilePath = configuration.isdStationsFile; - const isdStationsRawText = fs.readFileSync(isdStationsFilePath, 'utf8'); + const isdStationsRawText = fs.readFileSync(isdStationsFilePath, "utf8"); const isdStations = JSON.parse(isdStationsRawText); console.error(`1 ISD ARE READ: total: ${isdStations.length} ISD stations.`); @@ -315,7 +315,7 @@ function main() { if (configuration.ghcndStationsFile) { // Read GHCND Stations File const ghcndStationsFilePath = configuration.ghcndStationsFile; - const ghcndStationsRawText = fs.readFileSync(ghcndStationsFilePath, 'utf8'); + const ghcndStationsRawText = fs.readFileSync(ghcndStationsFilePath, "utf8"); const ghcndStations = JSON.parse(ghcndStationsRawText); console.error(`4 GHCND READ: total ${ghcndStations.length}`);