c++ program that utilizes menu to print specific information from a weather data file

I have posted questions about this HW the other day, and I would like to know if I am going in the right direction with this program, it is next in sequence from last problem. I would ask my professor but he never responds to my emails.
Prompt:

INTERACTIVE DATA PROCESSING

4. (60 Points) Using the five-column data file produced by problem 2 above write a program that gives the user five options as described by a-e below.

The program should provide a menu showing each of the five options. The user then selects one of the five options. Depending on the option the user will be prompted to enter the corresponding parameters. Then those parameters will be passed to a function to do the work.

A: (12 Points) Total Precipitation from all stations for a single day

User enters one day in mm dd yyyy format. Program returns total precipitation from all stations in inches for that date.

TEST CASES: March 10, March 20.

B: (12 Points) Total Precipitation over a range of dates.

User specifies start date and end date in mm dd yyyy format. Program returns total precipitation from all stations over the date range.

TEST CASE: 03 07 2018 through 03 12 2018

C: (12 Points) Total Precipitation by Station for March.

User enters station name. The program adds up the precipitation for the entire month from that station - or group of stations. (NOTE: Entering DECATUR will select all stations with DECATUR as all or part of the station name.)

TEST CASES: HUNTSVILLE, ATHENS

D: (12 Points) Temperature Extremes and Average by Station

User enters station name. e.g. BANKHEAD. The program finds and returns the maximum temp, minimum temp, average high temperature, and average low temperature for station during March. You must calculate the average high and the average low from the tmax and tmin values. (Station names must match exactly.)

TEST CASES: MOBILE DOWNTOWN AIRPORT, DECATUR PRYOR FIELD

E. (12 Points) Temperature Extremes and Average by Station over a range of dates

User enters station name, start date and end date in mm dd yyyy format. The program computes and returns the maximum temp, minimum temp, average high temperature, and average low temperature for the specified station over the date range. You must calculate the average high and the average low from the tmax and tmin values. (Station names must match exactly.)

TEST CASES: BIRMINGHAM AIRPORT 03 05 2018 03 15 2018
SCOTTSBORO 03 20 2018 03 31 2018

(NOTE: There is also a SCOTTBORO 2 weather station. Do not include its data in the SCOTTSBORO test case.)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>

using namespace std;

int main()
{
    string dataline = "";
	string station = "";

	string tmax_s = "", tmin_s = "";

	unsigned int pos_station_name = 0;
	unsigned int pos_date = 0;	
	unsigned int pos_tmax = 0;
	unsigned int pos_tmin = 0;
    unsigned int mm = 0, dd = 0, yyyy = 0;
	float tmax = 0, tmin = 0;

    ifstream infile;
    infile.open("/Users/adam/desktop/temp/weather_station_five_column10.txt");
    if (!infile)
    {
        cout << "Unable to open the input file\n";
        return -99;
    }

    cout << "Use the first line of the file to find the column positions. " << endl;
	getline(infile,dataline);

	cout << "Read the second line from the file. " << endl;
	getline(infile,dataline);

	cout << "Read the data items one at a time." << endl;
	infile >> station;
    
char choice;

//unsigned short response = 0;
   bool menuQuit = false;

   while (menuQuit == false)
   {
      do
      {
         cout << "What action would you like to take?\n"
                   << " A) Total Precipitation over a single day\n"
                   << " B) Total Precipitation over range of dates\n"
                   << " C) Total Precipitation by Station for March\n"
                   << " D) Temperature Extremes and Average by Station\n"
                   << " E) Temperature Extremes and Average by Station over a range of dates\n"
                   << " F) Exit\n"
                   << ": ";
         cin >> choice;
         cout << "\n";
      }
      while (choice != 'F');

      switch (choice)
      {
    case 'A':
    cout << "Please enter date mmddyyyy\n\n";
    cin >> mm >> dd >> yyyy;
    break;

    case 'B':
        cout << "B selected\n\n";
        break;

    case 'C':
        cout << "C selected\n\n";
        break;

    case 'D':
        cout << "D selected\n";
        break;
    case 'E':
        cout << "D selected\n";
        break;
    case 'F':
        cout << "exiting.....\n";
        menuQuit = true;
        break;
    default:
         cout << "\n** Invalid Menu Selection!! **\n\n";
         break;
      }
   }

return 0;
}

Data file I made from last question:

STATION_NAME                                        DATE     PRCP     TMAX     TMIN
--------------------------------------------------- -------- -------- -------- --------
                        BANKHEAD LOCK AND DAM AL US 20180301 0.15     46.76    41.54    
                        BANKHEAD LOCK AND DAM AL US 20180302 0.45     46.94    39.92    
                        BANKHEAD LOCK AND DAM AL US 20180303 0        46.94    37.94    
                        BANKHEAD LOCK AND DAM AL US 20180304 0        46.76    37.94    
                        BANKHEAD LOCK AND DAM AL US 20180305 0        43.7     38.48    
                        BANKHEAD LOCK AND DAM AL US 20180306 1.36     43.88    38.66    
                        BANKHEAD LOCK AND DAM AL US 20180307 0.41     41.72    38.12    
                        BANKHEAD LOCK AND DAM AL US 20180308 0        41.18    37.22    
                        BANKHEAD LOCK AND DAM AL US 20180309 0        41.36    37.22    
                        BANKHEAD LOCK AND DAM AL US 20180310 0        43.34    37.4     
                        BANKHEAD LOCK AND DAM AL US 20180311 0.89     44.6     40.46    
                        BANKHEAD LOCK AND DAM AL US 20180312 0.1      44.6     38.12    
                        BANKHEAD LOCK AND DAM AL US 20180313 0        42.44    37.94    
                        BANKHEAD LOCK AND DAM AL US 20180314 0        42.26    37.58    
                        BANKHEAD LOCK AND DAM AL US 20180315 0        41.9     38.12    
                        BANKHEAD LOCK AND DAM AL US 20180316 0        44.24    38.12    
                        BANKHEAD LOCK AND DAM AL US 20180317 0.15     43.52    40.28    
                        BANKHEAD LOCK AND DAM AL US 20180318 0        46.04    42.44    
                        BANKHEAD LOCK AND DAM AL US 20180319 0.17     44.78    42.44    
                        BANKHEAD LOCK AND DAM AL US 20180320 0.04     45.68    41.72    
                        BANKHEAD LOCK AND DAM AL US 20180322 0        43.16    38.12    
                        BANKHEAD LOCK AND DAM AL US 20180323 0        44.24    38.66    
                        BANKHEAD LOCK AND DAM AL US 20180324 0        45.86    39.56    
                        BANKHEAD LOCK AND DAM AL US 20180325 0.01     45.68    41.9     
                        BANKHEAD LOCK AND DAM AL US 20180326 0        45.86    40.82    
                        BANKHEAD LOCK AND DAM AL US 20180327 0        41.72    

Looking good based on your previous thread.

A couple of things that stand out since you are able to use functions. Functions have the advantage of separation/repetition/debugging. By keeping the interface (menu) separate you are also not restricting your program to just run as a console program.
(BTW: This doesn't mean you need to destroy you code - maybe just re-arrange it )

1. You can have a function to open/close the file when you need it.
2. You can have a menu function that only returns the choice
3. Processing/filtering the file can be done as a separate function
4. Small point, but does the date have to be 3 strings instead of just 1?
5. You can get away with a single while loop
6. What happens if the choice is lower case - there are a couple of ways of handling this.
7. Preferably use double's instead of floats

Here's an example menu to get an integer character from the user:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <iostream>

void menu()
{
    std::cout << "1. Case 1\n";
    std::cout << "2. Case 2\n";
    std::cout << "q to quit\n";
}

int main()
{
    char selection = '0';
    
    menu();
    while (std::cin >> selection && tolower(selection) != 'q')
    {
        switch (selection)
        {
            case '1':
                std::cout << "Case 1\n";
                break;
                
            case '2':
                std::cout << "Case 2\n";
                break;
                
            default:
                std::cout << "Invalid choice\n";
                break;
        }
        menu();
    }
    
    std::cout << "Closing ...\n";
    
    return 0;
}

Last edited on
Small point, but I would have station names left justified to match the heading.

When defining a string variable, there's no need to initialise it to "". The constructor does this for you.
@OP
A consideration in your program is whether you are able/allowed etc to use containers - vectors, arrays etc, including classes/structs. What this means is you read in all your file data into memory (4000 records is not all that much) once only and raise the queries on that dataset instead of reading the text file multiple times.
One way to start to 'modularize' and therefore re-use code by way of functions:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>

void displayMenu();
void selector();
std::string getDate();

const std::string file_name{"wethr_stn_output_2.txt"};

int main()
{
    selector();
    
    std::cout << "End\n";
    return 0;
}


void displayMenu()
{
    std::cout
    << "What action would you like to take?\n"
    << " A) Total Precipitation over a single day\n"
    << " B) Total Precipitation over range of dates\n"
    << " C) Total Precipitation by Station for March\n"
    << " D) Temperature Extremes and Average by Station\n"
    << " E) Temperature Extremes and Average by Station over a range of dates\n"
    << " F) Exit\n"
    << '\n'
    << "PLEASE ENTER SELECTION: ";
}

void openFile(std::ifstream &infile, std::string name)
{
    infile.open(name);
    if (!infile)
    {
        std::cout << "Unable to open the input file\n";
        exit(-99);
    }
    // IGNORE HEADNGS
    std::string temp;
    for(int i = 0; i < 2; i++)
        getline(infile, temp);
}

void query_A(std::ifstream& INFILE, const std::string& selected_date)
{
    openFile(INFILE, file_name);
    std::string station_name, date;
    double prcp{0}, dummy{0};
    
    std::string temp;
    int counter{0};
    
    while ( INFILE >> station_name )
    {
        temp.clear();
        for(int i = 0; i < 5; i++)
        {
            INFILE >> temp;
            station_name += (' ' + temp);
        }
        INFILE >> date >> prcp >> dummy >> dummy;
        
        if(date == selected_date)
        {
            std::cout
            << "At station " << station_name
            << " on " << selected_date
            << " the daily rainfall was " << prcp
            << "\n\n";
            break;
        }
    }
    INFILE.close();
}

void selector()
{
    displayMenu();
    
    std::ifstream INFILE;
    
    char choice{};
    while (std::cin >> choice && ( choice = toupper(choice) ) && choice != 'F' )
    {
        switch (choice)
        {
            case 'A':
                std::cout << "A selected\n";
                query_A(INFILE, getDate());
                break;
                
            case 'B':
                std::cout << "B selected\n\n";
                break;
                
            case 'C':
                std::cout << "C selected\n\n";
                break;
                
            case 'D':
                std::cout << "D selected\n";
                break;
                
            case 'E':
                std::cout << "E selected\n";
                break;
                
            case 'F':
                std::cout << "exiting.....\n";
                break;
                
            default:
                std::cout << "\n** Invalid Menu Selection!! **\n\n";
                break;
        }
        displayMenu();
    }
}

std::string getDate()
{
    std::string a_date;
    std::cout << "Please enter a date <yyyymmdd>: ";
    std::cin >> a_date;
    return a_date;
}
Based upon my code from your other thread ( http://www.cplusplus.com/forum/beginner/280407/ ), then possibly as a starter consider:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <cctype>

struct Elem {
	size_t strt {};
	size_t len {};
};

enum COLS {STATION, DATE, PRCP, TMAX, TMIN};

using Line = std::vector<Elem>;
using Data = std::vector<std::string>;
using Weather = std::vector<Data>;

Line elemPos(std::string& line, char elem = '-') {
	Line l;

	for (size_t elend {}, strt {}; elend != std::string::npos && strt != std::string::npos; strt = line.find_first_not_of(' ', elend + 1)) {
		elend = line.find_first_not_of(elem, strt);
		l.emplace_back(strt, elend != std::string::npos ? elend - strt : (line.length() - strt));
	}

	return l;
}

Data getLine(std::string& lin, const Line& elem) {
	Data data;

	for (auto [s, l] : elem) {
		const auto s1 {lin.find_first_not_of(' ', s)};

		l = lin.find_last_not_of(' ', s + l) - s + 1;
		data.emplace_back(lin.data() + s1, l - (s1 - s));
	}

	return data;
}

Weather readData(std::istream& is, const Line& elems) {
	Weather w;

	for (std::string d; std::getline(is, d); )
		w.emplace_back(getLine(d, elems));

	return w;
}

std::string getDate() {
	std::string a_date;

	std::cout << "Please enter a date <yyyymmdd>: ";
	std::cin >> a_date;
	return a_date;
}

void optA(const Weather& weath, const std::string& date) {
	double tot {};

	for (const auto& w : weath)
		if (w[DATE] == date)
			tot += std::stod(w[PRCP]);

	std::cout << "Total precipitation for " << date << " is " << tot << "\n";
}

void displayMenu() {
	std::cout
		<< "\nWhat action would you like to take?\n"
		<< " A) Total Precipitation over a single day\n"
		<< " B) Total Precipitation over range of dates\n"
		<< " C) Total Precipitation by Station for March\n"
		<< " D) Temperature Extremes and Average by Station\n"
		<< " E) Temperature Extremes and Average by Station over a range of dates\n"
		<< " F) Exit\n"
		<< '\n'
		<< "PLEASE ENTER SELECTION: ";
}

int main() {
	std::ifstream ifw("weather.txt");

	if (!ifw)
		return (std::cout << "Cannot open input file\n"), 1;

	std::string header, line;

	std::getline(ifw, header);
	std::getline(ifw, line);

	const auto weath {readData(ifw, elemPos(line))};

	for (char choice {}; choice != 'F'; ) {
		displayMenu();

		std::cin >> choice;

		switch (choice = static_cast<char>(std::toupper(static_cast<unsigned char>(choice)))) {
			case 'A':
				optA(weath, getDate());
				break;

			case 'B':
				std::cout << "B selected\n\n";
				break;

			case 'C':
				std::cout << "C selected\n\n";
				break;

			case 'D':
				std::cout << "D selected\n";
				break;

			case 'E':
				std::cout << "E selected\n";
				break;

			case 'F':
				std::cout << "exiting.....\n";
				break;

			default:
				std::cout << "\n** Invalid Menu Selection!! **\n\n";
				break;
		}
	}
}

Last edited on
@OP
A good challenge cropping up is to convert the date string into a meaningful arrangement so dates can be compared. One way is to convert it via one of the date/time libraries in standard C++, write your own eg by parsing the string and generating a (integer) day number.
@againtry I can use 1d arrays but I don't really understand 2d arrays just yet.
@gigacapybara
You have a couple of choices with c-style arrays. 2d arrays aren't necessary and really only add unnecessary complexity.

You can use a series of 'parallel arrays' one 1D array for each of the variables, effectively linked by a common index value, or, better still a single 1D array which holds all the variables as single records using a struct or class.

It's not all that far removed from using <vectors> or other STL containers - they're designed to do a lot of the work arrays do - but taking the not impossible effort out.

The whole point is in program design is you can do all of the work by loading up the source data only once and then do all the exercises by a single shot without relying on the intermediate prepared file you have above.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>

const int CAPACITY{100};
int COUNT{0};

int main()
{
    std::ifstream infile;
    infile.open("wethr_stn.txt");
    if (!infile)
    {
        std::cout << "Unable to open the input file\n";
        return -99;
    }
    
    std::ofstream outfile;
    outfile.open("wethr_stn_output.txt");
    if (!outfile)
    {
        std::cout << "Unable to open the output file\n";
        return -98;
    }
    
    outfile << "WEATHER STATION DATA\n\n";
    
    // SOURCE FILE HEADING STUFF
    std::string heading;
    getline(infile, heading);
    
    heading =   "STATION_NAME                                        DATE     PRCP     TMAX     TMIN";
    outfile << heading << '\n';
    
    std::string underline;
    getline(infile, underline);
    underline = "--------------------------------------------------- -------- -------- -------- --------";
    outfile << underline << '\n';
    
    // DATA LINE PROCESSING
    std::string station, station_name, date;
    
    
    // SETUP PARALLEL ARRAYS
    std::string* stations = new std::string[CAPACITY];
    std::string* station_names = new std::string[CAPACITY];
    std::string* dates = new std::string[CAPACITY];
    
    int* mdprs = new int[CAPACITY];
    int* daprs = new int[CAPACITY];
    
    double* prcps = new double[CAPACITY];
    double* snwds = new double[CAPACITY];
    double* snows = new double[CAPACITY];
    
    int* tmaxs = new int[CAPACITY];
    int* tmins = new int[CAPACITY];
    int* awnds = new int[CAPACITY];
    
    bool* valid = new bool[CAPACITY]{true}; // <----
    
    COUNT = 0;
    std::string temp;
    while ( infile >> station )
    {
        infile >> stations[COUNT];
        
        station_name.clear();
        for(int i = 0; i < 5; i++)
        {
            infile >> temp;
            station_name += (temp + ' ');
        }
        station_names[COUNT] = station_name;
        
        infile
        >> dates[COUNT] >> mdprs[COUNT] >> daprs[COUNT] >> prcps[COUNT]
        >> snwds[COUNT] >> snows[COUNT] >> tmaxs[COUNT] >> tmins[COUNT]
        >> awnds[COUNT];
        
        COUNT++;
    }
    std::cout << "No. of records: " << COUNT << '\n';
    
    // FIRST FILTERING OPERATION
    for(int i = 0; i < COUNT; i++)
    {
        if( (prcps[i] == -9999) || (tmaxs[i] == -9999) || (tmins[i] == -9999) )
        {
            valid[i] = false;
        }
        else
        {
            valid[i] = true;
            
            outfile
            << std::setw(52) << std::right << station_names[i]
            << std::setw(8) << dates[i] << ' '
            << std::setw(8) << std::left << prcps[i] << ' '
            << std::setw(8) << std::left << ( (tmaxs[i] * 0.18) + 32 ) << ' '
            << std::setw(8) << std::left << ( (tmins[i] * 0.18) + 32 ) << ' '
            << '\n';
        }
    }
    
    // DISPLAY RECORD(s) FOR A SPECIFIC DATE
    std::string selected_date;
    std::cout << "Please enter a date: ";
    std::cin >> selected_date;
    
    for(int i = 0; i < COUNT; i++)
    {
        if(dates[i] == selected_date && valid[i] == true)
        {
            std::cout
            << "At station " << station_names[i]
            << " on " << selected_date
            << " the daily rainfall was " << prcps[i]
            << "\n\n";
            break;
        }
    }
    
    infile.close();
    outfile.close();
    std::cout << "End\n";
    
    return 0;
}


Fake input:

STATION           STATION_NAME                                       DATE     MDPR     DAPR     PRCP     SNWD     SNOW     TMAX     TMIN     AWND
----------------- -------------------------------------------------- -------- -------- -------- -------- -------- -------- -------- -------- --------
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180301 45       -9999    0.15     0.0      -9999    82       53       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180302 62       31       0.45     0.0      -9999    83       44       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180303 102      -9999    0.00     0.0      -9999    83       33       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180305 -9999    -9999    0.15     0.0      -9999    82       53       22
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180312 -78      -82      0.45     0.0      -9999    83       44       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180313 -9999    -9999    0.00     0.0      -9999    83       33       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180311 12       -9999    0.15     0.0      -9999    82       53       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180302 -9999    -9999    0.45     0.0      88       83       44       98
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180303 19       22       0.00     0.0      77       83       33       66
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180401 45       -9999    0.15     0.0      -9999    82       53       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180402 62       31       0.45     0.0      -9999    83       44       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180403 102      -9999    0.00     0.0      -9999    83       33       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180405 -9999    -9999    0.15     0.0      -9999    82       53       22
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180412 -78      -82      0.45     0.0      -9999    83       44       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180413 -9999    -9999    0.00     0.0      -9999    83       33       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180411 12       -9999    0.15     0.0      -9999    82       53       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180402 -9999    -9999    0.45     0.0      88       83       44       98
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180403 19       22       0.00     0.0      77       83       33       66
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180501 45       -9999    0.15     0.0      -9999    82       53       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180502 62       31       0.45     0.0      -9999    83       44       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180503 102      -9999    0.00     0.0      -9999    83       33       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180605 -9999    -9999    0.15     0.0      -9999    82       53       22
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180612 -78      -82      0.45     0.0      -9999    83       44       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180613 -9999    -9999    0.00     0.0      -9999    83       33       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180711 12       -9999    0.15     0.0      -9999    82       53       -9999
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180702 -9999    -9999    0.45     0.0      88       83       44       98
GHCND:USC00010505                        BANKHEAD LOCK AND DAM AL US 20180703 19       22       0.00     0.0      77       83       33       66




No. of records: 27
Please enter a date: 20180402
At station LOCK AND DAM AL US  on 20180402 the daily rainfall was 0.45

End
Program ended with exit code: 0
Registered users can post here. Sign in or register to post.