Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TSG QC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
US191
TSG QC
Commits
cb178083
Commit
cb178083
authored
6 years ago
by
jacques.grelet_ird.fr
Browse files
Options
Downloads
Patches
Plain Diff
comment axes and use it as first parameter of line
line(hPlotAxes(i), ...
parent
481bd1d1
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
tsg_util/plot_Climatology.m
+15
-10
15 additions, 10 deletions
tsg_util/plot_Climatology.m
with
15 additions
and
10 deletions
tsg_util/plot_Climatology.m
+
15
−
10
View file @
cb178083
...
...
@@ -70,33 +70,38 @@ for i = 1:2
continue
end
% for a valid parameter, plot climatology
% --------------------------------------
if
para
meanc
=
zeros
(
size
(
dayd
));
stdc
=
zeros
(
size
(
dayd
));
% prepare the interpolation
% ---------------------------
latc
=
tsg
.
levitus
.
data
.
WOA_LATX
;
lonc
=
tsg
.
levitus
.
data
.
WOA_LONX
;
clim
=
tsg
.
levitus
.
data
.
([
'WOA_MEAN_'
para
]);
% remove sigleton dimension
clim
=
squeeze
(
clim
(
time_dim
,
depth
,:,:));
% interpolation for 2-D gridded
meanc
=
interp2
(
lonc
,
latc
,
clim
,
lon
,
lat
);
% same for standard deviation
sclim
=
tsg
.
levitus
.
data
.
([
'WOA_STD_'
para
]);
sclim
=
squeeze
(
sclim
(
time_dim
,
depth
,:,:));
stdc
=
interp2
(
lonc
,
latc
,
sclim
,
lon
,
lat
);
% Select the axes
% ---------------
axes
(
hPlotAxes
(
i
)
);
%
axes( hPlotAxes(i) );
% Plot mean salinity climatology
% ------------------------------
line
(
dayd
,
meanc
,
...
line
(
hPlotAxes
(
i
),
dayd
,
meanc
,
...
'Tag'
,
[
'TAG_LINE_CLIMATO_MEAN_'
para
],
'Linestyle'
,
'-'
,
'Color'
,
'k'
);
% Plot with 3 standard deviation
% ------------------------------
line
(
dayd
,
meanc
+
3
*
stdc
,
...
line
(
hPlotAxes
(
i
),
dayd
,
meanc
+
3
*
stdc
,
...
'Tag'
,
[
'TAG_LINE_CLIMATO_STDDEV_PLUS_'
para
],
'Linestyle'
,
'-'
,
'Color'
,
'r'
);
line
(
dayd
,
meanc
-
3
*
stdc
,
...
line
(
hPlotAxes
(
i
),
dayd
,
meanc
-
3
*
stdc
,
...
'Tag'
,
[
'TAG_LINE_CLIMATO_STDDEV_MINUS_'
para
],
'Linestyle'
,
'-'
,
'Color'
,
'r'
);
% Plot marker if climatological value has no neighbour
...
...
@@ -104,11 +109,11 @@ for i = 1:2
indnon
=
find
(
isfinite
([
meanc
',nan]) & isnan(circshift([meanc'
,
nan
],[
0
1
]))
...
&
isnan
(
circshift
([
meanc
'
,
nan
],[
0
-
1
])));
if
~
isempty
(
indnon
)
line
(
dayd
(
indnon
),
meanc
(
indnon
),
...
line
(
hPlotAxes
(
i
),
dayd
(
indnon
),
meanc
(
indnon
),
...
'Tag'
,
[
'TAG_LINE_CLIMATO_MEAN_'
para
],
'Linestyle'
,
'none'
,
'Color'
,
'k'
,
'Marker'
,
'd'
);
line
(
dayd
(
indnon
),
meanc
(
indnon
)
+
3
*
stdc
(
indnon
),
...
line
(
hPlotAxes
(
i
),
dayd
(
indnon
),
meanc
(
indnon
)
+
3
*
stdc
(
indnon
),
...
'Tag'
,
[
'TAG_LINE_CLIMATO_STDDEV_PLUS_'
para
],
'Linestyle'
,
'none'
,
'Color'
,
'r'
,
'Marker'
,
'd'
);
line
(
dayd
(
indnon
),
meanc
(
indnon
)
-
3
*
stdc
(
indnon
),
...
line
(
hPlotAxes
(
i
),
dayd
(
indnon
),
meanc
(
indnon
)
-
3
*
stdc
(
indnon
),
...
'Tag'
,
[
'TAG_LINE_CLIMATO_STDDEV_MINUS_'
para
],
'Linestyle'
,
'none'
,
'Color'
,
'r'
,
'Marker'
,
'd'
);
end
...
...
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