Giter Club home page Giter Club logo

weio's Introduction

Build Status Donate just a small amount, buy me a coffee!

weio

Library to read and write files, in particular files used by the Wind Energy community. This library is for instance used by the GUI tool pyDatView to plot, export and compare these different files.

Typical file formats supported

  • Various CSV and delimited files
  • FAST input and output files
  • Main HAWC2 input and output files (still some missing)
  • FLEX output files
  • NetCDF files (partial support for 1D and 2D data for now)

Python package usage

import weio 
f=weio.read('file.csv')
print(f.toDataFrame())
f.write('out.csv')

Example for an OpenFAST binary file:

import weio 
df=weio.read('Output.outb').toDataFrame()
plt.plot(df['Time_[s]'], df['GenPwr_[kW']))

Requirements

The library is compatible python 2.7 and python 3. The script relies on the following python packages: numpy, pandas, xarray

If you have pip installed on your system, you can install them by typing in a terminal:

pip install -r requirements.txt

or type make dep from the main directory.

Download

From the github page, click on the "Clone or download" button, and you may chose to download as Zip. Alternatively, from a command line:

git clone https://github.com/ebranlard/weio
cd weio

Installation

The python packages mentioned in the Requirements section need to be installed.

pip install -e .

or

python setup.py install

Adding more file formats

File formats can be added by implementing a subclass of weio/File.py, for instance weio/VTKFile.py. Existing examples are found in the folder weio. Once implemented the fileformat needs to be registered in weio/__init__.py by adding an import line at the beginning of this script and adding a line in the function fileFormats() of the form formats.append(FileFormat(VTKFile))

Contributing

Any contributions to this project are welcome! If you find this project useful, you can also buy me a coffee (donate a small amount) with the link below:

Donate just a small amount, buy me a coffee!

weio's People

Contributors

ebranlard avatar ewquon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.