Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,294 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,406 people online right now. Registration is fast and FREE... Join Now!




climate data processing

 
Reply to this topicStart new topic

climate data processing, C++

Rating  5
kaantexas
2 Sep, 2008 - 12:00 PM
Post #1

New D.I.C Head
*

Joined: 12 Jan, 2008
Posts: 14

Will be using the actual data for carbon dioxide levels from the National Oceanic and Atmospheric Administration from a station in Hawaii. Will be creating a class that can calculate various averages and differences over time from the raw data. The main purpose of this program is to learn the tools for the course and to use multi-file programs.

Will be using a statistics class (which you will write) to calculate and report on the climate data.

Input: You will get the file name from the command line of the program. e.g.

linux prompt> ./analyze co2_mm_mlo.txt

Here is an example data file: " See attachment "


Note: The data has a lot of text at the beginning. Read in each word of the file until you reach a line that has "MLO" as the first word. At that point you can start reading the floating point CO2 levels from the data. You may assume that any data file you are given will not have the code "MLO" in the data before the first line of CO2 levels.

Hint: To throw away the text you don't need...

string str;
do {
inputFile >> str;

cout << ":test" << str << endl; //for testing
}
while (str != "MLO");

Processing: You will need to determine the highest, lowest, and average CO2 level in the data. You will also need to calculate the standard deviation of the data. Essentially you are testing the Stats class with this application.

Here is the stats.h header file. " See attachment "

Output: You should provide a main program that reads in the data and provides the appropriate output. Use functions where necessary. Output will go to standard output (the screen).

What do you think?
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: Climate Data Processing
2 Sep, 2008 - 10:06 PM
Post #2

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,199



Thanked: 213 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
I think it is pretty straight forward and not too far out there. Sounds like a great opportunity for you to go off and write some code and when you get stuck come back here with your code (in code tags), any error messages you receive, and a problem question then we can guide you in the right direction.

Until then, we can't do anything since it is site policy to first see your "Best effort" attempt at solving the problem and then we can assist. That and we don't do people's homework for them.

As you can see, I think a lot of things. wink2.gif
User is offlineProfile CardPM
+Quote Post

kaantexas
RE: Climate Data Processing
4 Sep, 2008 - 09:13 AM
Post #3

New D.I.C Head
*

Joined: 12 Jan, 2008
Posts: 14

QUOTE(Martyr2 @ 2 Sep, 2008 - 11:06 PM) *

I think it is pretty straight forward and not too far out there. Sounds like a great opportunity for you to go off and write some code and when you get stuck come back here with your code (in code tags), any error messages you receive, and a problem question then we can guide you in the right direction.

Until then, we can't do anything since it is site policy to first see your "Best effort" attempt at solving the problem and then we can assist. That and we don't do people's homework for them.

As you can see, I think a lot of things. wink2.gif


--------------------------------------------------------------------
smile.gif I am not asking full entire codes. I was trying to share different solution ways.
User is offlineProfile CardPM
+Quote Post

kaantexas
RE: Climate Data Processing
8 Sep, 2008 - 02:57 PM
Post #4

New D.I.C Head
*

Joined: 12 Jan, 2008
Posts: 14

QUOTE(kaantexas @ 4 Sep, 2008 - 10:13 AM) *

QUOTE(Martyr2 @ 2 Sep, 2008 - 11:06 PM) *

I think it is pretty straight forward and not too far out there. Sounds like a great opportunity for you to go off and write some code and when you get stuck come back here with your code (in code tags), any error messages you receive, and a problem question then we can guide you in the right direction.

Until then, we can't do anything since it is site policy to first see your "Best effort" attempt at solving the problem and then we can assist. That and we don't do people's homework for them.

As you can see, I think a lot of things. wink2.gif


--------------------------------------------------------------------
smile.gif I am not asking full entire codes. I was trying to share different solution ways.


I am trying to read each line of the data from the text file until hit the word "MLO". You think, I should use if statement with array. or?
User is offlineProfile CardPM
+Quote Post

kaantexas
RE: Climate Data Processing
16 Sep, 2008 - 03:14 PM
Post #5

New D.I.C Head
*

Joined: 12 Jan, 2008
Posts: 14

QUOTE(kaantexas @ 8 Sep, 2008 - 03:57 PM) *

QUOTE(kaantexas @ 4 Sep, 2008 - 10:13 AM) *

QUOTE(Martyr2 @ 2 Sep, 2008 - 11:06 PM) *

I think it is pretty straight forward and not too far out there. Sounds like a great opportunity for you to go off and write some code and when you get stuck come back here with your code (in code tags), any error messages you receive, and a problem question then we can guide you in the right direction.

Until then, we can't do anything since it is site policy to first see your "Best effort" attempt at solving the problem and then we can assist. That and we don't do people's homework for them.

As you can see, I think a lot of things. wink2.gif


--------------------------------------------------------------------
smile.gif I am not asking full entire codes. I was trying to share different solution ways.

I am trying to read each line of the data from the text file until hit the word "MLO". You think, I should use if statement with array. or?




If anyone needs help, let me know.
I am done. It is working perfect, even in Linux.

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/2/08 05:55AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month