compare_lagged_instantaneous_feedback_strengths_settings.m 3.06 KB
Newer Older
Claas Faber's avatar
Claas Faber committed
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                         %
%   COMPARE LAGGED AND INSTANTANEOUS FEEDBACK STRENGTHS   %
%   SETTINGS                                              %
%                                                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ----- %
% BASIC %
% ----- %

    % reference_name, response_name, basin_name in the wrapper

    all_datasets = struct('ssh','aviso',...
                          'sst','ersst',...
                          'ustr','era_sfcstress');

    start_year = 1993;
    stop_year  = 2012;

    analysis_type = 'rreg';

    divert_south = false;
    zonal_analysis_region_definition;

% ----- %
% FLAGS %
% ----- %

    plot_difference = true;

% --------------- %
% FILES AND PATHS %
% --------------- %

    in_path = '<paths where data for zonal analysis is stored>';

    file_trunk = [analysis_type,'_',...
                  num2str(start_year),'-',num2str(stop_year),'_',...
                  basin_name,'_',...
                  all_datasets.(reference_name),'-',reference_name,'_',...
                  all_datasets.(response_name),'-',response_name];

    in_lagged        = [in_path,'lagged_feedback_strengths_',file_trunk,'.mat'];
    in_instantaneous = [in_path,'instantaneous_feedback_strengths_',file_trunk,'.mat'];

% -------- %
% PLOTTING %
% -------- %

    % colors, colorbar handles, common axes
    atlantic_asymmetric_bjf_plot_settings;

    % AXES
    % ++++

        scale_figure_width = 1;
        scale_figure_height = 0.91;

        x_axes_offset      = 0;
        y_axes_offset      = -0.01;
        width_axes_offset  = 0;
        height_axes_offset = -0.067;
        axes_offset        = [x_axes_offset y_axes_offset ...
                              width_axes_offset height_axes_offset];

        scale_font_size = 2.4;

    % THE NINO BOXES
    % ++++++++++++++

        % height offset for the offset for the hax_labels
        hax_labels_height_offset = struct('Atlantic',0.035,'Pacific',0.057);

    % COLOR LIMITS ETC
    % ++++++++++++++++

        if strcmp(reference_name,'ssh')
            c_limits = [-30 30];
            n_colors = 24;
        elseif strcmp(reference_name,'sst')
            c_limits = [-0.03 0.03];
            n_colors = 24;
        elseif strcmp(reference_name,'ustr')
            c_limits = [-8 8];
            n_colors = 24;
        else
            error('Unknown reference variable.');
        end

        use_cmap = centered(n_colors);
        use_cmap(12:13,:) = 1;

    % NAMING
    % ++++++

        title_dummy = ['@ANOMALY_TYPE@ ',upper(reference_name),'-',upper(response_name)];
        name_dummy  = ['comparison_instantaneous_lagged_total_bjf_',...
                        basin_name,'_@ANOMALY_TYPE@_',...
                        all_datasets.(reference_name),'-',reference_name,'_',...
                        all_datasets.(response_name),'-',response_name,'_',...
                        num2str(start_year),'-',num2str(stop_year),'.png'];

    % OTHER
    % +++++

        res_flag        = '-r200';