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
6de8f64a
Commit
6de8f64a
authored
2 years ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Create function `get_extr_coord`
parent
2b80a7e8
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
Trajectories/plot_traj.py
+5
-2
5 additions, 2 deletions
Trajectories/plot_traj.py
with
5 additions
and
2 deletions
Trajectories/plot_traj.py
+
5
−
2
View file @
6de8f64a
...
...
@@ -4,7 +4,7 @@ import report_graph
import
numpy
as
np
import
random
def
plot_single_traj
(
traj
,
e_overestim
,
SHPC
,
ax
,
src_crs
,
annotate_flag
):
def
get_extr_coord
(
traj
,
e_overestim
,
SHPC
):
xy
=
[]
for
node
in
traj
:
...
...
@@ -15,7 +15,10 @@ def plot_single_traj(traj, e_overestim, SHPC, ax, src_crs, annotate_flag):
shape
=
SHPC
.
get_reader
(
i_slice
,
layer
=
"
extremum
"
).
shape
(
ishape
)
xy
.
append
(
shape
.
points
[
0
])
xy
=
np
.
array
(
xy
)
return
np
.
array
(
xy
)
def
plot_single_traj
(
traj
,
e_overestim
,
SHPC
,
ax
,
src_crs
,
annotate_flag
):
xy
=
get_extr_coord
(
traj
,
e_overestim
,
SHPC
)
ax
.
plot
(
xy
[:,
0
],
xy
[:,
1
],
color
=
"
red
"
,
transform
=
src_crs
)
ax
.
plot
(
xy
[
0
,
0
],
xy
[
0
,
1
],
marker
=
"
s
"
,
color
=
"
black
"
,
transform
=
src_crs
)
...
...
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