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
6610dd03
Commit
6610dd03
authored
3 years ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Replace basemap by cartopy
parent
7ed9c874
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/Documentation_texfol/Graphiques/regions.py
+5
-5
5 additions, 5 deletions
Inst_eddies/Documentation_texfol/Graphiques/regions.py
with
5 additions
and
5 deletions
Inst_eddies/Documentation_texfol/Graphiques/regions.py
+
5
−
5
View file @
6610dd03
#!/usr/bin/env python3
import
netCDF4
from
mpl_toolkits
import
basemap
import
cartopy.crs
as
ccrs
import
jumble
from
matplotlib
import
pyplot
as
plt
import
glob
import
itertools
m
=
basemap
.
Basemap
(
llcrnrlon
=-
30
,
llcrnrlat
=-
90
,
urcrnrlon
=
60
,
urcrnrlat
=
0
)
plt
.
figure
()
m
.
drawcoastlines
()
m
.
drawmeridians
(
range
(
0
,
361
,
15
),
labels
=
[
0
,
0
,
0
,
1
])
m
.
drawparallels
(
range
(
-
90
,
91
,
15
),
labels
=
[
1
,
0
,
0
,
0
])
ax
=
plt
.
axes
(
projection
=
ccrs
.
PlateCarree
())
colors
=
itertools
.
cycle
([
'
blue
'
,
'
orange
'
,
'
green
'
,
'
red
'
,
'
purple
'
,
'
brown
'
,
'
pink
'
,
'
gray
'
,
'
olive
'
,
'
cyan
'
])
...
...
@@ -27,6 +24,9 @@ for filename in glob.glob("h_region_*.nc") + ["h_outermost.nc"]:
jumble
.
draw_bbox
(
f
[
lon
][
0
],
f
[
lon
][
-
1
],
f
[
lat
][
0
],
f
[
lat
][
-
1
],
colors
=
next
(
colors
),
label
=
filename
)
ax
.
set_extent
((
-
30
,
60
,
-
90
,
0
),
ccrs
.
PlateCarree
())
ax
.
coastlines
()
ax
.
gridlines
(
draw_labels
=
True
)
plt
.
legend
(
loc
=
"
lower left
"
,
bbox_to_anchor
=
(
1
,
0.5
))
plt
.
subplots_adjust
(
right
=
0.7
)
plt
.
savefig
(
"
regions.pdf
"
)
...
...
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