Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KI-WaVo
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Landesamt für Umwelt
KI-WaVo
Commits
fc7df764
Commit
fc7df764
authored
6 months ago
by
Michel Spils
Browse files
Options
Downloads
Patches
Plain Diff
params bsh_extractor
parent
16095bc3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scripts/bsh_extractor_v2.py
+9
-3
9 additions, 3 deletions
src/scripts/bsh_extractor_v2.py
with
9 additions
and
3 deletions
src/scripts/bsh_extractor_v2.py
+
9
−
3
View file @
fc7df764
...
...
@@ -15,8 +15,9 @@ def parse_arguments() -> Path:
"""
parser
=
argparse
.
ArgumentParser
(
description
=
'
Process root folder.
'
)
parser
.
add_argument
(
'
base_dir
'
,
type
=
Path
,
help
=
'
Path to the root folder
'
)
parser
.
add_argument
(
'
dest_dir
'
,
type
=
Path
,
help
=
'
Path to the root folder
'
)
args
=
parser
.
parse_args
()
return
args
.
base_dir
return
[
args
.
base_dir
,
args
.
dest_dir
]
def
get_offset
(
hour
:
int
)
->
int
:
"""
Calculates how many values to skip from the input hour to get to an hour divisible by 3
...
...
@@ -146,10 +147,15 @@ def make_target_file_name(base_dir:Path,tsVorh) -> Path:
def
main
():
"""
Main function of the script. Reads the data from the MOS.zip file, extracts the relevant data and writes it .zrx files.
"""
base_dir
=
parse_arguments
()
#base_dir = parse_arguments()
#mos_file_name = base_dir / "MOS.zip"
#dat_file,tsVorh = get_dat_file_name(mos_file_name)
#target_file = make_target_file_name(base_dir,tsVorh)
base_dir
,
dest_dir
=
parse_arguments
()
mos_file_name
=
base_dir
/
"
MOS.zip
"
dat_file
,
tsVorh
=
get_dat_file_name
(
mos_file_name
)
target_file
=
make_target_file_name
(
base_dir
,
tsVorh
)
target_file
=
make_target_file_name
(
base_dir
/
'
4WISKI
'
,
tsVorh
)
df
=
read_dat_file
(
mos_file_name
,
dat_file
,
tsVorh
)
writeZrxp
(
target_file
,
df
)
...
...
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