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
5a1d779c
There was a problem fetching the pipeline summary.
Commit
5a1d779c
authored
8 years ago
by
David Verelst
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.windenergy.dtu.dk:toolbox/WindEnergyToolbox
parents
ebb3cca7
8148f7fb
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
requirements.txt
+1
-0
1 addition, 0 deletions
requirements.txt
wetb/hawc2/simulation.py
+1
-1
1 addition, 1 deletion
wetb/hawc2/simulation.py
wetb/utils/cluster_tools/ssh_client.py
+1
-1
1 addition, 1 deletion
wetb/utils/cluster_tools/ssh_client.py
wetb/wind/shear.py
+4
-3
4 additions, 3 deletions
wetb/wind/shear.py
with
7 additions
and
5 deletions
requirements.txt
+
1
−
0
View file @
5a1d779c
...
...
@@ -11,4 +11,5 @@ h5py
pandas
tables
future
paramiko
This diff is collapsed.
Click to expand it.
wetb/hawc2/simulation.py
+
1
−
1
View file @
5a1d779c
...
...
@@ -635,7 +635,7 @@ cp -R . /scratch/$USER/$PBS_JOBID
cd /scratch/$USER/$PBS_JOBID
pwd
echo
"
---------------------
"
%s -c
"
from wetb.hawc2.cluster_simulation import ClusterSimulation;ClusterSimulation(
'
.
'
,
'
%s
'
, (
'
%s
'
,%s
'
))
"
%s -c
"
from wetb.hawc2.cluster_simulation import ClusterSimulation;ClusterSimulation(
'
.
'
,
'
%s
'
, (
'
%s
'
,
'
%s
'
))
"
echo
"
---------------------
"
echo $?
echo
"
---------------------
"
...
...
This diff is collapsed.
Click to expand it.
wetb/utils/cluster_tools/ssh_client.py
+
1
−
1
View file @
5a1d779c
...
...
@@ -41,7 +41,7 @@ class SSHClient(object):
return
self
.
client
def
connect
(
self
):
if
self
.
password
is
None
:
if
self
.
password
is
None
or
self
.
password
==
""
:
raise
IOError
(
"
Password not set
"
)
self
.
client
=
paramiko
.
SSHClient
()
self
.
client
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
...
...
This diff is collapsed.
Click to expand it.
wetb/wind/shear.py
+
4
−
3
View file @
5a1d779c
...
...
@@ -51,7 +51,7 @@ def fit_power_shear(z_u_lst):
Parameters
----------
z_u_lst : [(z_ref, u_z_ref), (z1, u_z1)
,...
]
z_u_lst : [(z_ref, u_z_ref), (z1, u_z1)]
- z_ref: Reference height
\n
- u_z_ref: Wind speeds or mean wind speed at z_ref
- z1: another height
...
...
@@ -73,7 +73,7 @@ def fit_power_shear(z_u_lst):
return
alpha
def
fit_power_shear_ref
(
z_u_lst
,
z_ref
):
"""
Estimate power shear parameter, alpha, from two or more
a
specific reference height using polynomial fit.
"""
Estimate power shear parameter, alpha, from two or more specific reference height
s
using polynomial fit.
Parameters
----------
...
...
@@ -99,7 +99,8 @@ def fit_power_shear_ref(z_u_lst, z_ref):
"""
def
shear_error
(
x
,
z_u_lst
,
z_ref
):
alpha
,
u_ref
=
x
return
np
.
sum
([(
np
.
mean
(
u
)
-
u_ref
*
(
z
/
z_ref
)
**
alpha
)
**
2
for
z
,
u
in
z_u_lst
])
return
np
.
sum
([(
u
-
u_ref
*
(
z
/
z_ref
)
**
alpha
)
**
2
for
z
,
u
in
z_u_lst
])
z_u_lst
=
[(
z
,
np
.
mean
(
u
))
for
z
,
u
in
z_u_lst
]
return
fmin
(
shear_error
,
(.
1
,
10
),
(
z_u_lst
,
z_ref
),
disp
=
False
)
...
...
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