Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic API #195

Draft
wants to merge 9 commits into
base: develop
Choose a base branch
from
Draft

Add basic API #195

wants to merge 9 commits into from

Conversation

crookp
Copy link

@crookp crookp commented Dec 18, 2024

Create a basic API to allow LandBOSSE to be called more easily from other tools, and to return results as objects rather than writing to excel files.

The new LandBOSSERunner class recreates the existing function calls for running LandBOSSE, but without writing to Excel.
The LandBOSSEResult class is a simple container for the results that LandBOSSE generates.

The input to the new API is now a yaml file, but it still requires an excel input file as well. Most of the contents of that yaml file are basic inputs (e.g. number of turbines), however one entry is a filepath to an excel sheet containing additional tabular input data. Rather than having all the inputs in yaml file(s), the inputs are split between a yaml file and an excel file. The idea is, the yaml file contains those inputs which are changed regularly when iterating on parameter values, whereas the excel file contains structured input tables that are unlikely to be modified with any regularity.

Also includes some refactoring of existing LandBOSSE modules to avoid deprecation warnings and avoid repeated use of pd.concat to create dataframes row by row.

Currently the LandBOSSERunner class requires a weather dataframe input with wind speed timeseries data to calculate wind delays. If running LandBOSSE using the old input method, this data must be in the input excel file. It would be possible to have the LandBOSSERunner class download Wind Toolkit data if no weather dataframe is provided, but this is not currently implemented (and would require an API, as well as inputs on the location and time period of the weather data).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant