Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
PyWake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TOPFARM
PyWake
Merge requests
!636
Load GaussianOverlapAvgModel table on first request
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Load GaussianOverlapAvgModel table on first request
gaussian_overlap_lazy_loading
into
master
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Mads M. Pedersen
requested to merge
gaussian_overlap_lazy_loading
into
master
3 months ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
0
0
Merge request reports
Viewing commit
3d0d5b77
Show latest version
1 file
+
11
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
3d0d5b77
Load GaussianOverlapAvgModel table on first request
· 3d0d5b77
Mads M. Pedersen
authored
3 months ago
py_wake/rotor_avg_models/gaussian_overlap_model.py
+
11
−
5
Options
@@ -9,11 +9,17 @@ from py_wake.utils.grid_interpolator import GridInterpolator
class
GaussianOverlapAvgModel
(
RotorAvgModel
):
def
__init__
(
self
,
filename
=
os
.
path
.
dirname
(
__file__
)
+
f
'
/gaussian_overlap_.02_.02_128_512.nc
'
):
table
=
xr
.
load_dataarray
(
filename
,
engine
=
'
h5netcdf
'
)
R_sigma
=
np
.
arange
(
0
,
20.001
,
0.01
)
CW_sigma
=
np
.
arange
(
0
,
10.01
,
0.01
)
dat
=
table
.
interp
(
R_sigma
=
R_sigma
,
CW_sigma
=
CW_sigma
,
method
=
'
cubic
'
)
self
.
overlap_interpolator
=
GridInterpolator
([
R_sigma
,
CW_sigma
],
dat
,
bounds
=
'
limit
'
)
self
.
filename
=
filename
@property
def
overlap_interpolator
(
self
):
if
not
hasattr
(
self
,
'
_overlap_interpolator
'
):
table
=
xr
.
load_dataarray
(
self
.
filename
,
engine
=
'
h5netcdf
'
)
R_sigma
=
np
.
arange
(
0
,
20.001
,
0.01
)
CW_sigma
=
np
.
arange
(
0
,
10.01
,
0.01
)
dat
=
table
.
interp
(
R_sigma
=
R_sigma
,
CW_sigma
=
CW_sigma
,
method
=
'
cubic
'
)
self
.
_overlap_interpolator
=
GridInterpolator
([
R_sigma
,
CW_sigma
],
dat
,
bounds
=
'
limit
'
)
return
self
.
_overlap_interpolator
def
_calc_layout_terms
(
self
,
func
,
cw_ijlk
,
**
kwargs
):
func
(
cw_ijlk
=
cw_ijlk
*
0
,
**
kwargs
)
Loading