Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
toolbox
WindEnergyToolbox
Commits
8ea05361
There was a problem fetching the pipeline summary.
Commit
8ea05361
authored
7 years ago
by
Mads M. Pedersen
Browse files
Options
Downloads
Patches
Plain Diff
removed test
parent
ba3a3be8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!37
Resolve "Utilization of TestFiles repository"
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wetb/wind/tests/test_mann_parameters.py
+0
-56
0 additions, 56 deletions
wetb/wind/tests/test_mann_parameters.py
with
0 additions
and
56 deletions
wetb/wind/tests/test_mann_parameters.py
deleted
100644 → 0
+
0
−
56
View file @
ba3a3be8
'''
Created on 20. feb. 2017
@author: mmpe
'''
import
unittest
from
wetb
import
gtsdf
from
wetb.wind.utils
import
wsp_dir2uv
from
wetb.wind.turbulence.mann_parameters
import
fit_mann_model_spectra
import
numpy
as
np
from
wetb.wind.turbulence.spectra
import
spectra
import
os
tfp
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"
test_files/
"
)
+
"
/
"
class
TestMannParameters
(
unittest
.
TestCase
):
def
test_estimate_mann_parameters1
(
self
):
"""
Example of fitting Mann parameters to a time series
"""
ds
=
gtsdf
.
Dataset
(
tfp
+
"
WspDataset.hdf5
"
)
#'unit_test/test_files/wspdataset.hdf5')
f
=
35
u
,
v
=
wsp_dir2uv
(
ds
.
Vhub_85m
,
ds
.
Dir_hub_
)
u_ref
=
np
.
mean
(
u
)
u
-=
u_ref
sf
=
f
/
u_ref
plt
=
False
ae
,
L
,
G
=
fit_mann_model_spectra
(
*
spectra
(
sf
,
u
,
v
),
plt
=
plt
)
self
.
assertAlmostEqual
(
ae
,
0.03
,
3
)
self
.
assertAlmostEqual
(
L
,
16.20
,
2
)
self
.
assertAlmostEqual
(
G
,
2.47
,
2
)
def
test_estimate_mann_parameters2
(
self
):
"""
Example of fitting Mann parameters to a
"
series
"
of a turbulence box
"""
l
=
16384
nx
=
8192
ny
,
nz
=
8
,
8
sf
=
(
nx
/
l
)
fn
=
tfp
+
"
turb/h2a8192_8_8_16384_32_32_0.15_10_3.3%s.dat
"
u
,
v
,
w
=
[
np
.
fromfile
(
fn
%
uvw
,
np
.
dtype
(
'
<f
'
),
-
1
).
reshape
(
nx
,
ny
*
nz
)
for
uvw
in
[
'
u
'
,
'
v
'
,
'
w
'
]]
plt
=
False
ae
,
L
,
G
=
fit_mann_model_spectra
(
*
spectra
(
sf
,
u
,
v
,
w
),
plt
=
plt
)
self
.
assertAlmostEqual
(
ae
,
0.15
,
delta
=
0.01
)
self
.
assertAlmostEqual
(
L
,
10
,
delta
=
0.3
)
self
.
assertAlmostEqual
(
G
,
3.3
,
delta
=
0.06
)
if
__name__
==
"
__main__
"
:
#import sys;sys.argv = ['', 'Test.test_estimate_mann_parameters']
unittest
.
main
()
\ No newline at end of file
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