Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fireatlas_nrt
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Wiki
Code
Merge requests
2
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gcorradini
fireatlas_nrt
Commits
d40c7383
Commit
d40c7383
authored
2 years ago
by
Julia Signell
Browse files
Options
Downloads
Patches
Plain Diff
Only put context manager around dask call
parent
a0d02144
Branches
dask-report
No related tags found
1 merge request
!17
Instantiate dask performance report _after_ client
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
FireGpkg_sfs.py
+11
-12
11 additions, 12 deletions
FireGpkg_sfs.py
with
11 additions
and
12 deletions
FireGpkg_sfs.py
+
11
−
12
View file @
d40c7383
...
...
@@ -540,20 +540,19 @@ def save_sfts_trng(
with
performance_report
(
filename
=
f
"
dask-report-
{
t
}
.html
"
):
# create and save all gpkg files at time t
save_sfts_all
(
client
,
t
,
regnm
,
layers
=
layers
)
tend
=
time
.
time
()
logger
.
info
(
f
"
{
(
tend
-
tstart
)
/
60.
}
minutes used to save Largefire data for this time.
"
)
tend
=
time
.
time
()
logger
.
info
(
f
"
{
(
tend
-
tstart
)
/
60.
}
minutes used to save Largefire data for this time.
"
)
# TODO: Purge Client!
client
.
restart
(
wait_for_workers
=
True
)
#client.run(gc.disable)
client
.
restart
(
wait_for_workers
=
True
)
#client.run(gc.disable)
# time flow control
# - if t reaches ted, set endloop to True to stop the loop
if
FireTime
.
t_dif
(
t
,
ted
)
==
0
:
endloop
=
True
# time flow control
# - if t reaches ted, set endloop to True to stop the loop
if
FireTime
.
t_dif
(
t
,
ted
)
==
0
:
endloop
=
True
# - update t with the next time stamp
t
=
FireTime
.
t_nb
(
t
,
nb
=
"
next
"
)
# - update t with the next time stamp
t
=
FireTime
.
t_nb
(
t
,
nb
=
"
next
"
)
def
combine_sfts
(
regnm
,
yr
,
addFRAP
=
False
):
'''
Combine all large fire time series to a gpkg data, with the option to add fire name from FRAP data
...
...
@@ -744,4 +743,4 @@ if __name__ == "__main__":
# save_sfts([2020, 9, 19, 'AM'],'Creek')
t2
=
time
.
time
()
print
(
f
"
{
(
t2
-
t1
)
/
60.
}
minutes used to run code
"
)
\ No newline at end of file
print
(
f
"
{
(
t2
-
t1
)
/
60.
}
minutes used to run code
"
)
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