-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot_kernel_regressions_single_site.m
36 lines (31 loc) · 1.29 KB
/
plot_kernel_regressions_single_site.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
function h_fig = plot_kernel_regressions_single_site( shallow, ...
mid, ...
deep, ...
clim_space )
% PLOT_KERNEL_REGRESSIONS_SINGLE_SITE -
h_fig = figure( 'Units', 'Inches', ...
'Position', [ 0, 0, 24, 13 ], ...
'Visible', 'on' );
% one panel for the flux kernel regression, one for each climate space year,
% and one for the all-time climate space
n_panels_h = numel( clim_space.year_idx ) + 2;
n_panels_v = 3; % four SWC depth panels vertically
% plot the NEE--T--SWC surfaces
flux_surfaces = { shallow, mid , deep };
for i = 1:numel( flux_surfaces )
this_ax = subplotrc( n_panels_v, n_panels_h, i, 1 );
plot( flux_surfaces{ i }, ...
'ax', this_ax, ...
'cbar_lab', 'NEE' );
end
% plot the annual climate spaces
for i = 1:numel( clim_space.year_idx )
this_ax = subplotrc( n_panels_v, n_panels_h, 1, i + 1 );
[ T_grid, swc_grid ] = meshgrid( clim_space.T_val, ...
clim_space.swc_val );
contourf( this_ax, ...
T_grid, ...
swc_grid, ...
clim_space.year_clim_space( :, :, i ) );
title( clim_space.year_idx( i ) );
end