Skip to content

This Python script converts wind resource data from a CSV file into the SRW (Standard Resource Wind) format, suitable for use in wind energy analysis tools.

Notifications You must be signed in to change notification settings

MobinMithun/CSV-to-SRW

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CSV to SRW Converter

This Python script converts wind resource data from a CSV file into the SRW (Standard Resource Wind) format, suitable for use in wind energy analysis tools.

Features

  • Select any CSV file containing wind speed, wind direction, temperature, and optionally pressure columns.
  • Flexible column matching (case-insensitive, partial matches).
  • Skips non-numeric and header rows automatically.
  • Outputs a formatted SRW file with standard headers and repeated heights.
  • Simple GUI for file selection and output configuration.

Requirements

  • Python 3.7+
  • pandas
  • tkinter (usually included with Python)

How to Use

  1. Run the script:
    & ".venv/Scripts/python.exe" "convert_any_csv_to_srw.py"
  2. Follow the prompts to:
    • Select your wind resource CSV file.
    • Enter the output SRW filename (must end with .srw).
    • Choose a folder to save the SRW file.
  3. On success, a message will show the location of your new SRW file.

CSV Format Notes

  • The script expects columns for wind speed, wind direction, and temperature. Pressure is optional.
  • Column names are matched by keywords (e.g., "wind speed", "direction", "temperature", "pressure").
  • Non-numeric rows (such as extra headers) are skipped automatically.

Example

Wind Direction(degree) Wind Speed(m/s) Temperature(C) Pressure(atm)
180 5.2 22.1 1.01
... ... ... ...

About

This Python script converts wind resource data from a CSV file into the SRW (Standard Resource Wind) format, suitable for use in wind energy analysis tools.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published