Group Abstract Group Abstract

Message Boards Message Boards

Importing tipping bucket raingage data

Posted 10 years ago

Hi There

I am a very new Mathematica user and have only just been making my way through the Hands-On book.

I am a hobbyist and I have a home weather system which uses a tipping bucket to measure rainfall. Basically, the bucket tips whenever it collects 0.01" of rain, so the time series is irregular and not a constant interval, i.e. the bucket tip times are irregular but the volume is always the same. Right now the data is in Excel.

Can someone guide me to how I import the irregular date and time series of constant volumes from excel and work with it, i.e. make a plot. Also, is there a way to make it a regular series of data by interpolating to say, make it a 5 or 10 minute interval and have Mathematica calculate the volume over that regular time series. I would like to calculate rainfall intensities for various periods and also have Mathematica look at the time series with a forward moving average to pick out the maximum intensity for various time periods by going stepwise through the data series to find which 5 minute interval (for example) had the highest intensity for a particular storm event.

Any advice on where to begin?

Thanks for any thoughts. Roger

POSTED BY: Roger Leventhal
7 Replies
POSTED BY: Marco Thiel

Hi Roger,

if you have a file with more time series from different rain gauges, you might want to use the Dimensions function that I used above. There should be a change in one of the dimensions or an additional entry. That would tell you how to extract the data you want.

You can post the data with two entries and I can give it a shot.

Cheers,

M.

POSTED BY: Marco Thiel
Posted 10 years ago

Thanks Marco! You are a great explainer. And yes, the January 2008 storm may have been big but not that big, so its either a garden hose or someone peeing into my rain gage as a practical joke. Either way, I wouldn't have seen it without this plot. And you have given me two new functions to look up "TimeSeries" and "MovingMap" so I may have questions on what these functions do.

Another question, if I had another rain gage in the same excel file as another column, how do I get Mathematica to recognize there are two different time series y variables with the same date/time stamp? I tried with another data set using DataListPlot and it didnt work, it didnt recognize another column as a new time series with the same date/time stamp so I got an error. When I deleted the second column it worked

thanks, Roger

POSTED BY: Roger Leventhal
Posted 10 years ago

Great, thanks. Quick simple question. What do the 1,3 and the two semicolons in a row mean? i.e. the "1,3;;,{1,3}" part of your answer. I was looking at the reference guide but couldnt quite find it. Is it part of the Import function or DateListPlot?

Thanks for your help, Roger

POSTED BY: Roger Leventhal

Dear Roger,

ok. Thank you. I will look into that this night. Reading and plotting the data is quite straight forward:

data = Import["/Users/thiel/Desktop/Novato_ALERT_tips_1993_2012.xlsx"];

where the directory/folder would have to be adjusted. A DatelistPlot works with the data quite directly:

DateListPlot[data[[1, 3 ;;, {1, 3}]], PlotRange -> All]

enter image description here

Cheers,

Marco

POSTED BY: Marco Thiel
Posted 10 years ago
Attachments:
POSTED BY: Roger Leventhal

Hi Roger,

that shouldn't be too difficult. There is even built in functionality to make time series more regular. But importing and cleaning the data depends a little on the exact format it is in. Could you post a sample file, i.e. attach the Excel file to your post?

Cheers,

Marco

POSTED BY: Marco Thiel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard