-
Notifications
You must be signed in to change notification settings - Fork 19
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
Feature: add gaussian blending to floris solutions in postprocess step (similar to UncertaintyInterface but in post-) #114
Feature: add gaussian blending to floris solutions in postprocess step (similar to UncertaintyInterface but in post-) #114
Conversation
This looks good @Bartdoekemeijer , going to add to the 1.4 milestone, |
@@ -398,7 +408,7 @@ def calc_floris_approx_table( | |||
solutions_dict["wd_{:03d}".format(turbi)] = \ | |||
wd_mesh.flatten() # Uniform wind direction | |||
solutions_dict["ti_{:03d}".format(turbi)] = \ | |||
fi.floris.flow_field.turbulence_intensity_field[:, :, turbi, 0, 0].flatten() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this Bart!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice tool and looks good to me. I've approved, but @Bartdoekemeijer could you briefly explain the changes to floirs_tools.interpolate_floris_from_df_approx()? In particular:
- Why the line that made sure "time" is dropped is commented out
- The switch to only interpolating the "pow" column (not the others in varnames)
Happy to merge after that!
Thanks for reviewing!
If the dataframe is large, the call
Are you referring to this line? We are still interpolating for each variable. The point is that when you call |
This is great I think, when I was originally mapping more of the code to polars, this was one of the changes I had to make (polars only uses simple indexes). I think a standard where time is just an index is a good one, it will also make grabbing polars speed up more broadly a smaller step. |
@paulf81 you mean a standard where time is just a column, right? |
Ok that makes sense, figured it must be something like that but just couldn't quite connect the dots, thanks @Bartdoekemeijer! Proceeding to merge. |
yes, sorry!! |
This PR is ready to be merged.
Feature or improvement description
This PR adds a new function in
floris_tools
that allows users to apply Gaussian smearing on theirdf_fi_aprox
in the wind direction axis. The results should be identical with FLORIS'UncertaintyInterface
withfix_yaw_in_relative_frame=True
, but then much faster because this is purely a post-processing step.Related issue, if one exists
N/A
Impacted areas of the software
floris_tools
Additional supporting information
This PR allows the rapid generation of FLORIS solutions from an existing precalculated dataset with different values for
wd_std
. This can be helpful when tuning a model while including various levels ofwd_std
.There are also a couple of small bug fixes in the code. Not the cleanest way of pulling them in like this, but figured it'll do the job okay since it's in the same functions/files.
Test results, if applicable
Here is a minimal example:
And produces: