From b0e8151be7b54db35011e0a459f29b31619f8408 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Wed, 22 Feb 2023 10:09:26 -0700 Subject: [PATCH] Update develop-ref after #2454 (#2457) Co-authored-by: Seth Linden Co-authored-by: John Halley Gotway Co-authored-by: johnhg Co-authored-by: Lisa Goodrich Co-authored-by: jprestop Co-authored-by: Howard Soh Co-authored-by: MET Tools Test Account Co-authored-by: Dave Albo Co-authored-by: j-opatz <59586397+j-opatz@users.noreply.github.com> Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com> Co-authored-by: Julie Prestopnik Co-authored-by: Jonathan Vigh Co-authored-by: Julie Prestopnik Co-authored-by: Seth Linden Co-authored-by: hsoh-u Co-authored-by: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com> Co-authored-by: davidalbo Co-authored-by: Daniel Adriaansen fix 2238 link error (#2255) fix #2271 develop nbrctc (#2272) fix #2309 develop tcmpr (#2310) fix #2306 ascii2nc airnow hourly (#2314) fix_spread_md (#2335) fix #2389 develop flowchart (#2392) Fix Python environment issue (#2407) fix definitions of G172 and G220 based on comments in NOAA-EMC/NCEPLIBS-w3emc#157. (#2406) fix #2380 develop override (#2382) fix #2408 develop empty config (#2410) fix #2390 develop compile zlib (#2404) fix #2412 develop climo (#2422) fix #2437 develop convert (#2439) fix for develop, for #2437, forgot one reference to the search_parent for a dictionary lookup. fix #2452 develop airnow (#2454) --- .readthedocs.yaml | 4 +- src/tools/other/ascii2nc/airnow_locations.cc | 39 ++++++++------------ 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e18cbf4cca..63bbf83b7a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,12 +7,12 @@ version: 2 # Build all formats (htmlzip, pdf, epub) #formats: all -formats: [pdf] +#formats: [pdf] # Optionally set the version of Python and requirements required to build your # docs python: - version: 3.7 + version: 3.8 install: - requirements: docs/requirements.txt diff --git a/src/tools/other/ascii2nc/airnow_locations.cc b/src/tools/other/ascii2nc/airnow_locations.cc index 17ddcdb666..369f9d4bd8 100644 --- a/src/tools/other/ascii2nc/airnow_locations.cc +++ b/src/tools/other/ascii2nc/airnow_locations.cc @@ -6,10 +6,8 @@ // ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* - //////////////////////////////////////////////////////////////////////// - using namespace std; #include @@ -26,15 +24,12 @@ using namespace std; //////////////////////////////////////////////////////////////////////// - // // Code for class AirnowLocations // - //////////////////////////////////////////////////////////////////////// - AirnowLocations::AirnowLocations() { // @@ -43,27 +38,24 @@ AirnowLocations::AirnowLocations() monitoringSiteFileName = "Monitoring_Site_Locations_V2.dat"; } - //////////////////////////////////////////////////////////////////////// - AirnowLocations::~AirnowLocations() { } - //////////////////////////////////////////////////////////////////////// bool AirnowLocations::initialize(const string &fileName) { - string method_name = "AirnowLocations::initialize() "; + string method_name = "AirnowLocations::initialize()"; monitoringSiteFileName = fileName; LineDataFile locFile; if (!locFile.open(monitoringSiteFileName.c_str())) { - mlog << Error << method_name << "->" - << "can't open input ASCII file \"" << monitoringSiteFileName - << "\" for reading\n\n"; + mlog << Warning << "\n" << method_name << " -> " + << "can't open input ASCII file \"" << monitoringSiteFileName + << "\" for reading\n\n"; return false; } DataLine data_line; @@ -119,12 +111,12 @@ bool AirnowLocations::initialize(const string &fileName) double lon2 = monitoringSiteLon[index]; double elev2 = monitoringSiteElev[index]; if (lat != lat2 || lon != lon2 || elev != elev2 || aqsid2 != aqsid || stationid2 != stationid) { - mlog << Warning << "AirnowLocations" << method_name << "-> " - << "Multiple values seen for a single FullAQSID (" << fullaqsid << ")" - << "Values used: StationId:" << stationid << " Aqsid:" << aqsid << " Lat,Lon,Elev:" - << lat << "," << lon << "," << elev - << "Not used StationId:" << stationid2 << " Aqsid:" << aqsid2 << " Lat,Lon,Elev:" - << lat2 << "," << lon2 << "," << elev2 << "\n\n"; + mlog << Warning << "\n" << method_name << " -> " + << "Multiple values seen for a single FullAQSID (" << fullaqsid << ")" + << "Values used: StationId:" << stationid << " Aqsid:" << aqsid << " Lat,Lon,Elev:" + << lat << "," << lon << "," << elev + << "Not used StationId:" << stationid2 << " Aqsid:" << aqsid2 << " Lat,Lon,Elev:" + << lat2 << "," << lon2 << "," << elev2 << "\n\n"; } } } @@ -157,12 +149,12 @@ bool AirnowLocations::lookupLatLonElev(const string aqsid, double &lat, double & if (it == monitoringSiteStationId.end()) { it = find(monitoringSiteFullAqsid.begin(), monitoringSiteFullAqsid.end(), aqsid); if (it == monitoringSiteFullAqsid.end()) { - return false; + return false; } else { - index = (int)(it - monitoringSiteStationId.begin()); + index = (int)(it - monitoringSiteFullAqsid.begin()); } } else { - index = (int)(it - monitoringSiteFullAqsid.begin()); + index = (int)(it - monitoringSiteStationId.begin()); } } else { index = (int)(it - monitoringSiteAqsid.begin()); @@ -188,9 +180,10 @@ bool AirnowLocations::_setPtr(DataLine &data_line, const string &headerName, int return true; } } - mlog << Error << "AirnowLocations::_setPtr() ->" + mlog << Warning << "\nAirnowLocations::_setPtr() -> " << "Did not see '" << headerName << "' in the header line of file " - << monitoringSiteFileName << "\n"; + << monitoringSiteFileName << "\n\n"; return false; } +////////////////////////////////////////////////////////////////////////