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
bf3466c1
Commit
bf3466c1
authored
1 year ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Use method `ishape_range` in `select_ishapes`
Use method `ishape_range` in function `select_ishapes`.
parent
ea0375b1
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
Inst_eddies/Analysis/plot_eddy_contours.py
+12
-18
12 additions, 18 deletions
Inst_eddies/Analysis/plot_eddy_contours.py
with
12 additions
and
18 deletions
Inst_eddies/Analysis/plot_eddy_contours.py
+
12
−
18
View file @
bf3466c1
...
...
@@ -31,27 +31,21 @@ def select_ishapes(d, SHPC, i_slice, orientation, window = None):
"""
ishape_first
=
SHPC
.
comp_ishape
(
d
,
eddy_index
=
1
,
i_slice
=
i_slice
,
orientation
=
orientation
)
try
:
ishape_last
=
SHPC
.
get_ishape_last
(
i_slice
,
orientation
)
\
[
d
-
SHPC
.
d_init
[
i_slice
]]
except
TypeError
:
ishape_list
=
[]
ishape_list
=
SHPC
.
ishape_range
(
d
,
i_slice
,
orientation
)
if
window
is
None
:
ishape_list_filt
=
ishape_list
else
:
if
window
is
None
:
ishape_list
=
list
(
range
(
ishape_first
,
ishape_last
+
1
))
else
:
ishape_list
=
[]
reader
=
SHPC
.
get_reader
(
i_slice
,
layer
=
"
extremum
"
,
orientation
=
orientation
)
ishape_list_filt
=
[]
reader
=
SHPC
.
get_reader
(
i_slice
,
layer
=
"
extremum
"
,
orientation
=
orientation
)
for
ishape
in
range
(
ishape_
first
,
ishape_last
+
1
)
:
points
=
reader
.
shape
(
ishape
).
points
[
0
]
if
util_eddies
.
in_window
(
points
,
window
):
ishape_list
.
append
(
ishape
)
for
ishape
in
ishape_
list
:
points
=
reader
.
shape
(
ishape
).
points
[
0
]
if
util_eddies
.
in_window
(
points
,
window
):
ishape_list
_filt
.
append
(
ishape
)
return
ishape_list
return
ishape_list
_filt
def
snapshot
(
ax
,
ishape_list
,
SHPC
,
i_slice
,
orientation
,
*
,
dashed
=
False
,
light
=
False
,
src_crs
=
ccrs
.
PlateCarree
()):
...
...
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