Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
extract_cyclones
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
cyclobs
extract_cyclones
Commits
0e505d3b
Commit
0e505d3b
authored
Nov 10, 2020
by
CEVAER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix attributes
parent
f2cf3ac6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
extract_cyclones/__init__.py
extract_cyclones/__init__.py
+3
-3
No files found.
extract_cyclones/__init__.py
View file @
0e505d3b
...
...
@@ -260,6 +260,9 @@ def extract_write_cyclone_data(dataset, kept_track_points, filename, output_path
logger
.
info
(
f
"Data has less than
{
min_pixel
}
pixel of data. Not writing to file."
)
return
# Deleting all attributes
sel
.
attrs
.
clear
()
# Extracting min and max time to set attributes on NetCDF
min_time
,
max_time
=
extract_start_stop_measure
(
sel
,
time_col_name
)
if
max_time
-
min_time
>
datetime
.
timedelta
(
minutes
=
30
):
...
...
@@ -282,9 +285,6 @@ def extract_write_cyclone_data(dataset, kept_track_points, filename, output_path
#sel.attrs["measurement_stop_date"] = str(file_date + max_time)
sel
.
attrs
[
"measurementDate"
]
=
(
min_date
+
(
max_date
-
min_date
)
/
2
).
strftime
(
"%Y-%m-%d %H:%M:%S"
)
# Deleting all attributes
sel
.
attrs
.
clear
()
# Setting new attributes
for
attr
in
attrs
:
if
type
(
attrs
[
attr
])
==
dict
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment