Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Detection eddies
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
IPSL
LMD
DPAO
Detection eddies
Commits
def3b750
Commit
def3b750
authored
1 year ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Factorize statements
parent
a5b6b7cb
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
Overlap/plot_components.py
+11
-37
11 additions, 37 deletions
Overlap/plot_components.py
with
11 additions
and
37 deletions
Overlap/plot_components.py
+
11
−
37
View file @
def3b750
...
@@ -150,20 +150,20 @@ if __name__ == "__main__":
...
@@ -150,20 +150,20 @@ if __name__ == "__main__":
plt
.
figure
()
plt
.
figure
()
if
args
.
window
is
not
None
:
if
args
.
time
:
if
args
.
time
:
print
(
"
Reading edge list and SHPC...
"
)
print
(
"
Reading edge list and SHPC...
"
)
t0
=
time
.
perf_counter
()
t0
=
time
.
perf_counter
()
G
=
report_graph
.
read_eddy_graph
(
args
.
edgelist
,
args
.
shpc_dir
,
G
=
report_graph
.
read_eddy_graph
(
args
.
edgelist
,
args
.
shpc_dir
,
args
.
orientation
)
args
.
orientation
)
if
args
.
time
:
if
args
.
time
:
t1
=
time
.
perf_counter
()
t1
=
time
.
perf_counter
()
print
(
"
Elapsed time:
"
,
t1
-
t0
,
"
s
"
)
print
(
"
Elapsed time:
"
,
t1
-
t0
,
"
s
"
)
t0
=
t1
t0
=
t1
print
(
"
Finding components...
"
)
print
(
"
Finding components...
"
)
if
args
.
window
is
not
None
:
for
n
,
d
in
G
.
nodes
.
items
():
for
n
,
d
in
G
.
nodes
.
items
():
if
util_eddies
.
in_window
(
d
[
"
coordinates
"
],
args
.
window
):
if
util_eddies
.
in_window
(
d
[
"
coordinates
"
],
args
.
window
):
if
"
component
"
not
in
d
:
report_graph
.
add_component
(
G
,
n
)
if
"
component
"
not
in
d
:
report_graph
.
add_component
(
G
,
n
)
...
@@ -178,19 +178,6 @@ if __name__ == "__main__":
...
@@ -178,19 +178,6 @@ if __name__ == "__main__":
ax
=
plt
.
axes
(
projection
=
dest_crs
)
ax
=
plt
.
axes
(
projection
=
dest_crs
)
plot_all_components
(
G
,
label
)
plot_all_components
(
G
,
label
)
elif
args
.
node
is
not
None
:
elif
args
.
node
is
not
None
:
if
args
.
time
:
print
(
"
Reading edge list and SHPC...
"
)
t0
=
time
.
perf_counter
()
G
=
report_graph
.
read_eddy_graph
(
args
.
edgelist
,
args
.
shpc_dir
,
args
.
orientation
)
if
args
.
time
:
t1
=
time
.
perf_counter
()
print
(
"
Elapsed time:
"
,
t1
-
t0
,
"
s
"
)
t0
=
t1
print
(
"
Finding components...
"
)
report_graph
.
add_component
(
G
,
args
.
node
)
report_graph
.
add_component
(
G
,
args
.
node
)
if
args
.
time
:
if
args
.
time
:
...
@@ -202,19 +189,6 @@ if __name__ == "__main__":
...
@@ -202,19 +189,6 @@ if __name__ == "__main__":
ax
=
plt
.
axes
(
projection
=
dest_crs
)
ax
=
plt
.
axes
(
projection
=
dest_crs
)
plot_nbunch
(
G
,
G
.
nodes
[
args
.
node
][
"
component
"
],
label
=
label
)
plot_nbunch
(
G
,
G
.
nodes
[
args
.
node
][
"
component
"
],
label
=
label
)
else
:
else
:
if
args
.
time
:
print
(
"
Reading edge list and SHPC...
"
)
t0
=
time
.
perf_counter
()
G
=
report_graph
.
read_eddy_graph
(
args
.
edgelist
,
args
.
shpc_dir
,
args
.
orientation
)
if
args
.
time
:
t1
=
time
.
perf_counter
()
print
(
"
Elapsed time:
"
,
t1
-
t0
,
"
s
"
)
t0
=
t1
print
(
"
Finding components...
"
)
assign_all_components
(
G
)
assign_all_components
(
G
)
if
args
.
time
:
if
args
.
time
:
...
...
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