Skip to content

Commit

Permalink
Update develop-ref after #2454 (#2457)
Browse files Browse the repository at this point in the history
Co-authored-by: Seth Linden <[email protected]>
Co-authored-by: John Halley Gotway <[email protected]>
Co-authored-by: johnhg <[email protected]>
Co-authored-by: Lisa Goodrich <[email protected]>
Co-authored-by: jprestop <[email protected]>
Co-authored-by: Howard Soh <[email protected]>
Co-authored-by: MET Tools Test Account <[email protected]>
Co-authored-by: Dave Albo <[email protected]>
Co-authored-by: j-opatz <[email protected]>
Co-authored-by: George McCabe <[email protected]>
Co-authored-by: Julie Prestopnik <[email protected]>
Co-authored-by: Jonathan Vigh <[email protected]>
Co-authored-by: Julie Prestopnik <[email protected]>
Co-authored-by: Seth Linden <[email protected]>
Co-authored-by: hsoh-u <[email protected]>
Co-authored-by: lisagoodrich <[email protected]>
Co-authored-by: davidalbo <[email protected]>
Co-authored-by: Daniel Adriaansen <[email protected]>
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)
  • Loading branch information
JohnHalleyGotway authored Feb 22, 2023
1 parent 260a9ae commit b0e8151
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
39 changes: 16 additions & 23 deletions src/tools/other/ascii2nc/airnow_locations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
// ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*


////////////////////////////////////////////////////////////////////////


using namespace std;

#include <iostream>
Expand All @@ -26,15 +24,12 @@ using namespace std;

////////////////////////////////////////////////////////////////////////


//
// Code for class AirnowLocations
//


////////////////////////////////////////////////////////////////////////


AirnowLocations::AirnowLocations()
{
//
Expand All @@ -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;
Expand Down Expand Up @@ -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";
}
}
}
Expand Down Expand Up @@ -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());
Expand All @@ -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;
}

////////////////////////////////////////////////////////////////////////

0 comments on commit b0e8151

Please sign in to comment.