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
36ab382d
Commit
36ab382d
authored
4 months ago
by
Lene Wasskog
Browse files
Options
Downloads
Patches
Plain Diff
chore: Clear logging config, fix date extraction
parent
0e07f060
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SEPTREFHUM.py
+2
-1
2 additions, 1 deletion
SEPTREFHUM.py
with
2 additions
and
1 deletion
SEPTREFHUM.py
+
2
−
1
View file @
36ab382d
...
@@ -66,6 +66,7 @@ tmpfile_path = f"tmp/{year}/"
...
@@ -66,6 +66,7 @@ tmpfile_path = f"tmp/{year}/"
TEMPERATURE_THRESHOLD
=
8.0
TEMPERATURE_THRESHOLD
=
8.0
DEBUG
=
False
if
os
.
getenv
(
"
DEBUG
"
)
is
None
or
os
.
getenv
(
"
DEBUG
"
).
lower
()
==
"
false
"
else
True
DEBUG
=
False
if
os
.
getenv
(
"
DEBUG
"
)
is
None
or
os
.
getenv
(
"
DEBUG
"
).
lower
()
==
"
false
"
else
True
logging
.
getLogger
().
handlers
.
clear
()
logging
.
basicConfig
(
logging
.
basicConfig
(
level
=
logging
.
DEBUG
if
DEBUG
else
logging
.
INFO
,
level
=
logging
.
DEBUG
if
DEBUG
else
logging
.
INFO
,
format
=
"
%(asctime)s - %(levelname).4s - (%(filename)s:%(lineno)d) - %(message)s
"
,
format
=
"
%(asctime)s - %(levelname).4s - (%(filename)s:%(lineno)d) - %(message)s
"
,
...
@@ -78,7 +79,7 @@ start_date = None
...
@@ -78,7 +79,7 @@ start_date = None
last_wh_date
=
None
last_wh_date
=
None
#"""
#"""
for
wh_file
in
glob
.
glob
(
f
"
{
tmpfile_path
}
wh_2[0-9][0-9][0-9]-[01][0-9]-[0123][0-9].nc
"
):
for
wh_file
in
glob
.
glob
(
f
"
{
tmpfile_path
}
wh_2[0-9][0-9][0-9]-[01][0-9]-[0123][0-9].nc
"
):
current_wh_file_date
=
local_timezone
.
localize
(
datetime
.
strptime
(
f
"
{
wh_file
[
7
:
17
]
}
"
,
"
%Y-%m-%d
"
))
current_wh_file_date
=
local_timezone
.
localize
(
datetime
.
strptime
(
f
"
{
wh_file
[
12
:
22
]
}
"
,
"
%Y-%m-%d
"
))
if
last_wh_date
is
None
or
last_wh_date
<
current_wh_file_date
:
if
last_wh_date
is
None
or
last_wh_date
<
current_wh_file_date
:
last_wh_date
=
current_wh_file_date
last_wh_date
=
current_wh_file_date
if
last_wh_date
is
not
None
:
if
last_wh_date
is
not
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