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
Commits
53050796
Commit
53050796
authored
3 years ago
by
Bjarke Tobias Olsen
Committed by
Mads M. Pedersen
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added PyWAsP PWC file for testing
parent
fb65e61c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
py_wake/tests/test_files/pwc_parquo_fictio_small.nc
+3
-0
3 additions, 0 deletions
py_wake/tests/test_files/pwc_parquo_fictio_small.nc
py_wake/tests/test_sites/test_xrsite.py
+16
-27
16 additions, 27 deletions
py_wake/tests/test_sites/test_xrsite.py
with
19 additions
and
27 deletions
py_wake/tests/test_files/pwc_parquo_fictio_small.nc
0 → 100644
LFS
+
3
−
0
View file @
53050796
Source diff could not be displayed: it is stored in LFS. Options to address this:
view the blob
.
This diff is collapsed.
Click to expand it.
py_wake/tests/test_sites/test_xrsite.py
+
16
−
27
View file @
53050796
...
...
@@ -91,6 +91,12 @@ def complex_ws_site():
return
XRSite
(
ds
,
shear
=
PowerShear
(
h_ref
=
100
,
alpha
=
.
2
),
interp_method
=
'
linear
'
)
@pytest.fixture
def
pywasp_pwc
():
pwc_file
=
tfp
+
"
pwc_parquo_fictio_small.nc
"
return
xr
.
open_dataset
(
pwc_file
)
def
test_uniform_local_wind
(
uniform_site
):
site
=
uniform_site
x_i
=
y_i
=
np
.
arange
(
5
)
...
...
@@ -495,7 +501,10 @@ def test_interp_special_cases():
npt
.
assert_array_almost_equal
(
ip1
.
data
,
ip2
.
data
)
def
test_from_pywasp_pwc
():
def
test_from_pywasp_pwc
(
pywasp_pwc
):
site
=
XRSite
.
from_pywasp_pwc
(
pywasp_pwc
)
A
=
np
.
array
([
[
5.757
,
6.088
,
5.369
],
[
5.584
,
5.806
,
5.358
],
...
...
@@ -541,32 +550,6 @@ def test_from_pywasp_pwc():
[
0.06993906
,
0.07252219
,
0.0717409
]
])
sector
=
np
.
linspace
(
0.0
,
330.0
,
12
)
x
=
np
.
array
([
263655.0
,
263891.1
,
264022.2
])
y
=
np
.
array
([
6506601.0
,
6506394.0
,
6506124.0
])
h
=
np
.
array
([
70
]
*
3
)
pwc
=
xr
.
Dataset
(
data_vars
=
{
"
A
"
:
((
"
sector
"
,
"
point
"
),
A
),
"
k
"
:
((
"
sector
"
,
"
point
"
),
k
),
"
wdfreq
"
:
((
"
sector
"
,
"
point
"
),
wdfreq
),
"
turbulence_intensity
"
:
((
"
sector
"
,
"
point
"
),
np
.
zeros_like
(
A
)),
},
coords
=
{
"
sector
"
:
((
"
sector
"
,),
sector
),
"
sector_floor
"
:
((
"
sector
"
,),
np
.
mod
(
sector
-
15
,
360
)),
"
sector_ceil
"
:
((
"
sector
"
,),
np
.
mod
(
sector
+
15
,
360
)),
"
point
"
:
((
"
point
"
),
np
.
arange
(
len
(
x
))),
"
west_east
"
:
((
"
point
"
,),
x
),
"
south_north
"
:
((
"
point
"
,),
y
),
"
height
"
:
((
"
point
"
,),
h
)
}
)
site
=
XRSite
.
from_pywasp_pwc
(
pwc
)
speedups
=
np
.
array
([
[
0.94574503
,
0.96176405
,
0.97405529
,
0.85145872
,
0.86463324
,
0.91415641
,
0.94562806
,
0.962134
,
0.9601336
,
0.82210133
,
...
...
@@ -579,6 +562,12 @@ def test_from_pywasp_pwc():
1.
,
0.99923124
,
0.8811313
]
])
sector
=
np
.
linspace
(
0.0
,
330.0
,
12
)
x
=
np
.
array
([
263655.0
,
263891.1
,
264022.2
])
y
=
np
.
array
([
6506601.0
,
6506394.0
,
6506124.0
])
h
=
np
.
array
([
70
]
*
3
)
wd
=
np
.
linspace
(
0.0
,
360.0
,
13
)
i
=
np
.
arange
(
3
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment