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
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
Admin message
The Gitlab server is succesfully updated to version 17.9.2
Show more breadcrumbs
mmir
WindEnergyToolbox
Commits
47d4d8d3
Commit
47d4d8d3
authored
7 years ago
by
David Verelst
Browse files
Options
Downloads
Patches
Plain Diff
prepost.dlcdefs: more clear htc master file auto selection
parent
46993cbe
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+5
-4
5 additions, 4 deletions
README.md
wetb/prepost/dlcdefs.py
+21
-8
21 additions, 8 deletions
wetb/prepost/dlcdefs.py
with
26 additions
and
12 deletions
README.md
+
5
−
4
View file @
47d4d8d3
...
...
@@ -71,10 +71,11 @@ load calculations, and create load envelopes.
Additional documentation can be found here:
-
[
Auto-generation of Design Load Cases
](
docs/howto-make-dlcs.md
)
-
[
How to use the Statistics DataFrame
](
docs/using-statistics-df.md
)
-
[
Generate DLB spreadsheets
](
docs/generate-spreadsheet.md
)
-
[
Getting started with DLBs
](
docs/getting-started-with-dlbs.md
)
-
[
Generate DLB spreadsheets
](
docs/generate-spreadsheet.md
)
-
[
Auto-generation of Design Load Cases
](
docs/howto-make-dlcs.md
)
-
[
House rules for storing results on ```mimer/hawc2sim```
](
docs/houserules-mimerhawc2sim.md
)
-
[
How to use the Statistics DataFrame
](
docs/using-statistics-df.md
)
### [fast](wetb/fast)
Tools for working with NREL's FAST code (An aeroelastic computer-aided engineering (CAE) tool for horizontal axis wind turbines)
...
...
This diff is collapsed.
Click to expand it.
wetb/prepost/dlcdefs.py
+
21
−
8
View file @
47d4d8d3
...
...
@@ -13,10 +13,9 @@ from future.utils import viewitems
from
future
import
standard_library
standard_library
.
install_aliases
()
import
os
import
unittest
from
glob
import
glob
import
pandas
as
pd
...
...
@@ -62,16 +61,30 @@ def configure_dirs(verbose=False):
def
find_master_file
(
proot
,
htc_dir
=
'
htc
'
,
master_dir
=
'
_master
'
,
master_contains
=
'
_master_
'
):
pattern
=
'
*
_master_
*
'
):
"""
Find the master file name. It is assumed that the master file is in the
folder _master, under htc, and contains _master_ in the file name.
folder _master, under htc, and contains _master_ in the file name. If
multiple files contain pattern, the last file of the sorted list is
returned.
Parameters
----------
proot
htc_dir : str, default: htc
master_dir : str, default: _master
pattern : str, default: *_master_*
"""
f
or
root
,
dirs
,
files
in
os
.
walk
(
os
.
path
.
join
(
proot
,
htc_dir
,
master_dir
)):
for
fname
in
files
:
if
fname
.
find
(
master_contain
s
)
>
-
1
:
return
fname
f
path_search
=
os
.
path
.
join
(
proot
,
htc_dir
,
master_dir
,
pattern
)
files
=
glob
(
fpath_search
)
if
len
(
file
s
)
>
0
:
return
sorted
(
files
)[
-
1
]
return
None
...
...
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