Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Grid SEPTREFHUM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
VIPS
Models
GRID
Grid SEPTREFHUM
Commits
329ad762
Commit
329ad762
authored
1 year ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Remove debug output and obsolete code
parent
65ae0557
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SEPTREFHUM.py
+1
-9
1 addition, 9 deletions
SEPTREFHUM.py
with
1 addition
and
9 deletions
SEPTREFHUM.py
+
1
−
9
View file @
329ad762
...
@@ -69,14 +69,11 @@ if last_wh_date is not None:
...
@@ -69,14 +69,11 @@ if last_wh_date is not None:
print
(
f
"
Last date of WH calculations is
{
last_wh_date
}
. Start date =
{
start_date
}
"
)
print
(
f
"
Last date of WH calculations is
{
last_wh_date
}
. Start date =
{
start_date
}
"
)
# TODO: let filename/pattern be configurable <== DONE??
weatherdata_files
=
glob
.
glob
(
f
"
{
infile_path
}{
filename_pattern
}
"
)
weatherdata_files
=
glob
.
glob
(
f
"
{
infile_path
}{
filename_pattern
}
"
)
#print(f"{infile_path}{filename_pattern}")
#print(f"{infile_path}{filename_pattern}")
#print("What are the weatherdata files?")
#print("What are the weatherdata files?")
#print(weatherdata_files)
#print(weatherdata_files)
for
file_path
in
sorted
(
weatherdata_files
):
for
file_path
in
sorted
(
weatherdata_files
):
print
(
"
Examining %s
"
%
file_path
)
# TODO: When filename/pattern is configurable: make the string search adaptable
# TODO: When filename/pattern is configurable: make the string search adaptable
file_name
=
os
.
path
.
basename
(
file_path
)
file_name
=
os
.
path
.
basename
(
file_path
)
# Skip if we don't have a complete date, which could indicate that we are looking at a yearly file of daily data
# Skip if we don't have a complete date, which could indicate that we are looking at a yearly file of daily data
...
@@ -85,12 +82,7 @@ for file_path in sorted(weatherdata_files):
...
@@ -85,12 +82,7 @@ for file_path in sorted(weatherdata_files):
except
ValueError
as
e
:
except
ValueError
as
e
:
print
(
e
)
print
(
e
)
continue
continue
#file_date = file_name[file_name.index("nordic")+7:file_name.index("nordic")+17]
# Skip if we don't have a complete date (10 characters), which could indicate that we are looking at a yearly file of daily data
#if len(file_date) != 10:
# continue
#wh_sum_date = local_timezone.localize(datetime.strptime(f"{file_date}", "%Y-%m-%d"))
# Only process files from the three last days (if this is not a work from scratch)
# Only process files from the three last days (if this is not a work from scratch)
if
start_date
is
not
None
and
wh_sum_date
<
start_date
:
if
start_date
is
not
None
and
wh_sum_date
<
start_date
:
continue
continue
...
...
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