Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
brivas
ORCHESTRA-SST
Commits
a50cb4cc
Commit
a50cb4cc
authored
4 years ago
by
Beatriz Recinos
Browse files
Options
Download
Email Patches
Plain Diff
test bokeh app
parent
cdbce596
master
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
123 additions
and
2 deletions
+123
-2
config.ini
config.ini
+1
-0
notebooks/analysing_time_series.ipynb
notebooks/analysing_time_series.ipynb
+87
-0
notebooks/video_bokehapp.mov
notebooks/video_bokehapp.mov
+0
-0
sst_tools/plot_sst.py
sst_tools/plot_sst.py
+35
-2
No files found.
config.ini
View file @
a50cb4cc
...
...
@@ -16,3 +16,4 @@ satellite_sst_buoy_1x1 = '/gws/nopw/j04/orchestra/ESAcci_sst_v2.1_coarse/v2.1_at
satellite_sst_buoy_2x2
=
'/gws/nopw/j04/orchestra/ESAcci_sst_v2.1_coarse/v2.1_atbuoy_2x2/'
time_series
=
'/gws/nopw/j04/orchestra/ESAcci_sst_v2.1_coarse/time_series_ESAcci_sst/'
This diff is collapsed.
Click to expand it.
notebooks/analysing_time_series.ipynb
View file @
a50cb4cc
This diff is collapsed.
Click to expand it.
notebooks/video_bokehapp.mov
0 → 100644
View file @
a50cb4cc
File added
This diff is collapsed.
Click to expand it.
sst_tools/plot_sst.py
View file @
a50cb4cc
...
...
@@ -20,6 +20,7 @@ def plot_sst_map(sst_data, ax, vmin=None, vmax=None, cbar=True):
ax: axes to plot the data
vmin: minimum value of the color scale
vmax: maximum value of the color scale
cbar: If True include colour bar
Returns
-------
...
...
@@ -37,8 +38,7 @@ def plot_sst_map(sst_data, ax, vmin=None, vmax=None, cbar=True):
cax
,
kw
=
colorbar
.
make_axes
(
ax
,
location
=
'bottom'
,
pad
=
0.001
,
aspect
=
30
)
cb
=
plt
.
colorbar
(
im
,
cax
=
cax
,
**
kw
)
# orientation="horizontal")
cb
.
set_label
(
label
=
'CCI SST temperature normalised ($^{\circ}$C)'
,
size
=
'medium'
,
weight
=
'bold'
)
size
=
'medium'
,
weight
=
'bold'
)
gl
=
ax
.
gridlines
(
crs
=
crs
.
PlateCarree
(),
draw_labels
=
True
,
linewidth
=
2
,
color
=
'gray'
,
alpha
=
0.5
,
linestyle
=
'--'
)
...
...
@@ -107,3 +107,36 @@ def plot_stats_on_salem_map(ds, var, t, lon_xinterval=0.5, lat_yinterval=0.5):
sm
.
set_lonlat_contours
(
xinterval
=
lon_xinterval
,
yinterval
=
lat_yinterval
)
sm
.
set_cmap
(
cmap
)
return
sm
def
plot_time_series
(
data_dic
,
name_one
,
name_two
,
variable
,
label_one
,
label_two
,
axs
):
"""
Plot time series of data
Parameters
----------
data_dic_one: dictionary with the data resolution 1
data_dic_two: dictionary with the data resolution 2
name_one: file name (e.g. '1M_1x1', '1Y_1x1' or 'QS-JAN_1x1')
name_two: file name (e.g. '1M_2x2', '1Y_2x2' or 'QS-JAN_2x2')
variable: variable to plot from the data_dic columns
(e.g. weighted_analysed_sst_diff_mean)
label_one: variable label for data 1 (e.g. SST diff 1x1)
label_two: variable label for data 2 (e.g. SST diff 2x2)
axs: axes to plot the data on
legend: True if legend wanted
"""
# Gathering data to plot
time
=
data_dic
[
name_one
][
0
].
time
var_1
=
data_dic
[
name_one
][
0
][
variable
]
var_2
=
data_dic
[
name_two
][
0
][
variable
]
axs
.
plot
(
time
,
var_1
,
label
=
label_one
)
axs
.
plot
(
time
,
var_2
,
label
=
label_two
)
return
{}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment