Converting Solar Radiation Measurements from ASTI Weather Stations to a Monthly Average Shapefile using Python – About the Authors – Which Data Source?



Converting Solar Radiation Measurements from ASTI Weather Stations to a Monthly Average Shapefile using Python – About the Authors – Which Data Source?

0 0


philgeos2016-presentation

Converting Solar Radiation Measurements from ASTI Weather Stations to a Monthly Average Shapefile using Python. Presentation given during the 5th Philippine Geomatics Symposium (PhilGEOS).

On Github benhur07b / philgeos2016-presentation

Converting Solar Radiation Measurements from ASTI Weather Stations to a Monthly Average Shapefile using Python

5th Philippine Geomatics Symposium (PhilGEOS 2016) April 20-22, 2016 University of the Philippines Diliman

Outline

Background

Materials and Methods

Results

About the Authors

Pintor, Sola, Teves

SOLAR Component Philippine Renewable Energy Resource Mapping from LiDAR Surveys (REMap) Nationwide Detailed Resources Assessment using LiDAR Program (Phil-LiDAR 2)

Weather Data

Source Data format Time Range of Daily Measurements ASTI Weather API(http://weather.asti.dost.gov.ph/home/index.php/api) .json 08:00H - 08:00H BSWM Agro-Met site(http://agromet.da.gov.ph/viewdata/) .csv 08:00H - 08:00H Philippine E-Science Grid Repository(http://repo.pscigrid.gov.ph/predict) .csv 00:00H - 24:00H

Problems

Different data formatting No option to download averages Missing and incomplete readings

ASTI Weather API

BSWM AGROMET Site

Phil. E-Science Grid Repo

Objectives

Daily Solar radiation (W/m2) readings from ASTI weather sensors

-- to --

Monthly Average solar radiation (W/m2) shapefile

Which Data Source?

Python Modules

BeautifulSoup

pandas

pyshp

Workflow

Download

Inputs: YYYY/MM/DD, Keyword/s

Output: Daily sensor readings (.csv)

Beautifulsoup is used to crawl the repository and search sensor measurements that match the keywords and the date provided.

Compile

PART 1

Inputs: Directory of daily sensor readings, Sensor Type

Output: Average solar radiation (W/m2) readings per sensor per month per year (.csv)

Each daily sensor reading for a month is checked to determine if it will be included in the computation of the monthly average.

PART 2

Inputs: Output of PART 1

Output: Monthly average solar radiation (W/m2) per sensor (.csv)

Pandas is used to compute for the weighted mean

Convert

Inputs: Output of COMPILE PART 2

Output: Monthly average solar radiation (W/m2) (.shp)

Pyshp converts the csv to a shapefile.

ASTI Solar Download, Compile, and Convert Tool

available at: https://github.com/remap-solar/asti-solar-dcc-tool

Demo (Download)

Demo (Compile Part 1)

Demo (Compile Part 2)

Demo (Convert)

Conclusion

  • Python is useful not just in the processing but also in the pre-processing of geospatial data because of its versatility and the variety of its libraries.
  • The developed tool significantly decreases the time needed to download and average ASTI solar radiation data.

Current Limitations and Future Improvements

  • The Download tool can be used to download all the weather sensor data in the repo but the Compile and Convert tools were specifically created for the purpose of computing the monthly average solar radiation values.
  • With a little editing of the code, the tool can be extended to compile and convert other weather data.
  • Use data from the ASTI Weather API instead of the Phil. E-Science Grid Repository
This research is an output of the Nationwide Detailed Resources Assessment using LiDAR Program (Phil-LiDAR 2), in particular, Project 5: Philippine Renewable Energy Resource Mapping from LiDAR Surveys (REMap). The Program is funded by the Department of Science and Technology (DOST) through its grants-in-aid program (GIA) and implemented by the Training Centre for Applied Geodesy and Photogrammetry of the University of the Philippines – Diliman.

THANK YOU! :)

This presentation is available at:http://benhur07b.github.io/philgeos2016-presentation