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
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
mimc
WindEnergyToolbox
Commits
e8c8ec8b
Commit
e8c8ec8b
authored
6 years ago
by
mimc
Browse files
Options
Downloads
Patches
Plain Diff
Added come comments and removed old debug messages mostly non-functional
parent
55f382ce
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#7091
failed
6 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wetb/hawc2/hawc2_simulation.py
+4
-3
4 additions, 3 deletions
wetb/hawc2/hawc2_simulation.py
with
4 additions
and
3 deletions
wetb/hawc2/hawc2_simulation.py
+
4
−
3
View file @
e8c8ec8b
...
...
@@ -152,6 +152,7 @@ class Hawc2_Simulation(object):
else
:
self
.
scale_sensors
()
# This will normalize the sensors to the nun-dimensional lengths
def
normalize_sensors
(
self
,
blade_scale
=
None
):
if
not
self
.
htcf
is
None
:
if
blade_scale
is
None
:
...
...
@@ -161,6 +162,7 @@ class Hawc2_Simulation(object):
if
isinstance
(
obj
,
HTCSensor
)
and
not
isinstance
(
obj
,
HTCSensorAtTime
):
obj
.
normalize_sensor
(
blade_scale
)
# This will scale the sensors back to the dimensional point
def
scale_sensors
(
self
,
blade_scale
=
None
):
if
not
self
.
htcf
is
None
:
if
blade_scale
is
None
:
...
...
@@ -254,7 +256,8 @@ class Hawc2_Simulation(object):
# This will set the write directory
def
set_write_directory
(
self
,
write_directory
):
self
.
write_directory
=
os
.
path
.
abspath
(
os
.
path
.
realpath
(
write_directory
))
# Add a file that must also accompanying the simulation when a new simulation is writen
def
add_accompanying_file
(
self
,
accompanying_file
):
# If we have a list of files
...
...
@@ -374,8 +377,6 @@ class Hawc2_Simulation(object):
os
.
makedirs
(
self
.
write_directory
)
os
.
chdir
(
self
.
write_directory
)
# This is the point where you would specify that a file is running
print
(
'
Now the code would execute the model
'
)
# These values allow for some second attempts at running HAWC2 (occasionally it crashed right away with wine)
exec_str
=
self
.
exec_command
+
'
'
+
self
.
input_files
[
'
htc
'
][
0
].
written_file
exec_str
=
exec_str
.
split
()
...
...
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