Skip to content

[Feature]: Instantiate FlascDataFrame from a FLORIS model #254

@misi9170

Description

@misi9170

Description

We would like to provide the ability to instantiate a FlascDataFrame from a FLORIS model. This would likely have syntax:

fmodel = FlorisModel("input.yaml")
fmodel.set(...)
fmodel.run()
df = FlascDataFrame(fmodel)

where the FlascDataFrame constructor would need to detect the FlorisModel input and handle appropriately; or

fmodel = FlorisModel("input.yaml")
fmodel.set(...)
fmodel.run()
df = FlascDataFrame.from_FlorisModel(fmodel)

where .from_FlorisModel would be a (static) method defined on FlascDataFrame that would return an instantiated object.

This would allow users to quickly format their Floris output data as a FLASC dataframe.

An open question is how FlascDataFrame should instantiate if the fmodel has not yet been run(). Options:

  1. Instantiate without power columns (only wind direction, wind speed, TI columns). Print warning.
  2. Run the fmodel under the hood before constructing the dataframe. Possibly print warning.
  3. Error out with a message stating that the fmodel must be run() before attempting to instantiate the FlascDataFrame.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions