a spreadsheet macro for post- processing data from a weather station/energy balance system antonio...

17
A Spreadsheet Macro for A Spreadsheet Macro for Post-Processing Data Post-Processing Data from a Weather from a Weather Station/Energy Balance Station/Energy Balance System System Antonio Gonzalez Antonio Gonzalez 1 and Eric and Eric Harmsen Harmsen 2 2 , , 1 1 Dept. of Mechanical Dept. of Mechanical Engineering Engineering 2 2 Dept. of Agricultural Dept. of Agricultural Engineering Engineering

Upload: evangeline-fletcher

Post on 13-Jan-2016

240 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

A Spreadsheet Macro for Post-A Spreadsheet Macro for Post-Processing Data from a Processing Data from a Weather Station/Energy Weather Station/Energy

Balance SystemBalance System

Antonio GonzalezAntonio Gonzalez11 and Eric Harmsen and Eric Harmsen22,,11Dept. of Mechanical EngineeringDept. of Mechanical Engineering22Dept. of Agricultural EngineeringDept. of Agricultural Engineering

Page 2: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

AcknowledgmentsAcknowledgments

This material is based on research with This material is based on research with financial support from NASA-URC, financial support from NASA-URC,

UPRM-TCESS and NASA-EPSCoR. UPRM-TCESS and NASA-EPSCoR.

Page 3: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

Water ConservationWater Conservation Agriculture is the Agriculture is the greatest consumer of greatest consumer of water in society.water in society.

It is estimated that 69% It is estimated that 69% of all water withdrawn of all water withdrawn on a global basis is on a global basis is used for agriculture.used for agriculture.

Conservation of water requires estimating the Conservation of water requires estimating the crop crop evapotranspirationevapotranspiration

Page 4: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

Evapotranspiration EquationsEvapotranspiration Equations

Page 5: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

Weather StationWeather Station

Measured DataMeasured Data Air Temperature Relative Humidity Net Radiation Wind Velocity and Direction Barometric Pressure Soil Moisture Soil Temperature Soil Heat Flux

Page 6: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

The vapor gradient method The vapor gradient method requires that the relative humidity requires that the relative humidity

and temperature be measured and temperature be measured withinwithin and and aboveabove the crop canopy the crop canopy

Page 7: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

Initially the Temp/RH sensor was raised and lowered manually

Page 8: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

Weather StationWeather Station

The weather station was modified to The weather station was modified to automatically obtain the vertical automatically obtain the vertical temperature and relative humidity (RH) at temperature and relative humidity (RH) at two heights (0.1 and 2 m).two heights (0.1 and 2 m).Data is saved to the data logger every 10 Data is saved to the data logger every 10 seconds.seconds.Temp/RH data are collected in each Temp/RH data are collected in each vertical position throughout the day every vertical position throughout the day every two minutes.two minutes.

Page 9: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

Elevator Device Programmable Logic Control

Device for automaticallyraising and lowering the Temp/RH sensor

Page 10: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

ProblemProblem

To obtain the vapor density gradient it is To obtain the vapor density gradient it is necessary to separate the humidity data necessary to separate the humidity data into the “up” data and the “down” data.into the “up” data and the “down” data.

Since data is collected every 10 seconds, Since data is collected every 10 seconds, manually processing the data is tedious manually processing the data is tedious and time consuming.and time consuming.

Page 11: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

The Spreadsheet MacroThe Spreadsheet Macro

Separates automatically the data into up and Separates automatically the data into up and down positions.down positions.Produces graphs of RH, Air Temperature, Net Produces graphs of RH, Air Temperature, Net Radiation, Wind Speed, Soil Temperature as a Radiation, Wind Speed, Soil Temperature as a function of time.function of time.Calculates the vapor density differences Calculates the vapor density differences between the up and down positions.between the up and down positions.Estimates evapotranspiration using a vapor Estimates evapotranspiration using a vapor gradient approach and the Penman-Monteith gradient approach and the Penman-Monteith energy equation.energy equation.

Page 12: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

Visual Basic CodeVisual Basic Code

Page 13: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

TablesTables

Page 14: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

Some Graphs Produced by the Spreadsheet Macro

Page 15: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

Relative Humidity and Relative Humidity and Sensor PositionSensor Position

54.00

56.00

58.00

60.00

62.00

64.00

66.00

11:30 11:32 11:35 11:38 11:41 11:44

Time

RH

(%

)

0.5

1

1.5

2

2.5

Po

sit

ion

RH

Position

Page 16: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

0.0

0.1

0.2

0.3

0.4

0.5

0.6

8:00 AM 10:24 AM 12:48 PM 3:12 PMTime

ET

(m

m/h

r)

ET-GradPM-ET4 per. Mov. Avg. (ET-Grad)

Evapotranspiration - Sugar Cane Evapotranspiration - Sugar Cane Lajas Nov. 9Lajas Nov. 9thth, 2004, 2004

ra = 66/u, rs = 300 sec/m, ET = 1.6 mm

Page 17: A Spreadsheet Macro for Post- Processing Data from a Weather Station/Energy Balance System Antonio Gonzalez 1 and Eric Harmsen 2, 1 Dept. of Mechanical

Benefits of Spreadsheet MacroBenefits of Spreadsheet Macro

Manually processing the data takes many Manually processing the data takes many hours, whereas the spreadsheet macro hours, whereas the spreadsheet macro can post-process the data in a few can post-process the data in a few minutes.minutes.Using the spreadsheet macro eliminates Using the spreadsheet macro eliminates errors that may be introduced when the errors that may be introduced when the data is processed manually.data is processed manually.It is possible for anyone to process the It is possible for anyone to process the data with very little training.data with very little training.