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
158a0d61
Commit
158a0d61
authored
1 year ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Add script `plot_edge_contours.py`
parent
8b329944
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Overlap/Analysis/plot_eddy_contours.py
+1
-0
1 addition, 0 deletions
Overlap/Analysis/plot_eddy_contours.py
Overlap/Analysis/plot_edge_contours.py
+37
-0
37 additions, 0 deletions
Overlap/Analysis/plot_edge_contours.py
with
38 additions
and
0 deletions
Overlap/Analysis/plot_eddy_contours.py
0 → 120000
+
1
−
0
View file @
158a0d61
..
/
..
/
Inst_eddies
/
Analysis
/
plot_eddy_contours
.
py
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Overlap/Analysis/plot_edge_contours.py
0 → 100755
+
37
−
0
View file @
158a0d61
#!/usr/bin/env python3
import
sys
import
cartopy.crs
as
ccrs
import
matplotlib.pyplot
as
plt
import
plot_eddy_contours
import
util_eddies
# Input:
if
len
(
sys
.
argv
)
!=
6
:
sys
.
exit
(
"
Required arguments: orientation SHPC_dir
"
"
e_overestim head-node tail-node
"
)
orientation
=
sys
.
argv
[
1
]
SHPC_dir
=
sys
.
argv
[
2
]
e_overestim
=
int
(
sys
.
argv
[
3
])
my_head
=
int
(
sys
.
argv
[
4
])
my_tail
=
int
(
sys
.
argv
[
5
])
SHPC
=
util_eddies
.
SHPC_class
(
SHPC_dir
,
def_orient
=
orientation
)
date_head
,
eddy_i_head
=
util_eddies
.
node_to_date_eddy
(
my_head
,
e_overestim
)
date_tail
,
eddy_i_tail
=
util_eddies
.
node_to_date_eddy
(
my_tail
,
e_overestim
)
print
(
f
"
{
date_head
=
}
"
)
print
(
f
"
{
date_tail
=
}
"
)
i_slice_head
=
SHPC
.
get_slice
(
date_head
)
i_slice_tail
=
SHPC
.
get_slice
(
date_tail
)
ishape_head
=
SHPC
.
comp_ishape
(
date_head
,
eddy_i_head
,
i_slice_head
,
orientation
)
ishape_tail
=
SHPC
.
comp_ishape
(
date_tail
,
eddy_i_tail
,
i_slice_tail
,
orientation
)
fig
=
plt
.
figure
()
projection
=
ccrs
.
PlateCarree
()
ax
=
plt
.
axes
(
projection
=
projection
)
plot_eddy_contours
.
snapshot
(
ax
,
[
ishape_head
],
SHPC
,
i_slice_head
,
orientation
)
plot_eddy_contours
.
snapshot
(
ax
,
[
ishape_tail
],
SHPC
,
i_slice_tail
,
orientation
,
dashed
=
True
)
ax
.
gridlines
(
draw_labels
=
True
)
ax
.
coastlines
()
plt
.
show
()
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