compare_aviso_oras4_strengths_Atl3_Nino34_settings.m 4.22 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                               %
%   COMPARE FEEDBACK STRENGTHS IN ATL3/NINO34   %
%   SETTINGS                                    %
%                                               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ------- %
% GENERAL %
% ------- %

    % CHANGEABLE
    % ++++++++++

        % reference_name, lag_name, basin_name in wrapper

        % set up
        all_datasets = {'aviso','oras4'};

        start_year = 1993;
        stop_year  = 2009;

    % FIXED AND CONSEQUENCES
    % ++++++++++++++++++++++

        n_datasets = length(all_datasets);

        % index names
        all_indices = struct('Atlantic',struct(...
                                 'ssh', 'Atl3',...
                                 'sst', 'Atl3',...
                                 'ustr','WAtl'),...
                             'Pacific',struct(...
                                 'ssh', 'Nino34',...
                                 'sst', 'Nino34',...
                                 'ustr','Nino4'));

        % dataset names associated with the variables
        all_data_names = struct('aviso',struct(...
                                    'ssh','aviso',...
                                    'sst','ersst',...
                                    'ustr','era_sfcstress'),...
                                'oras4',struct(...
                                    'ssh','oras4',...
                                    'sst','oras4',...
                                    'ustr','era_oras4_forcing'));

        % maximum of lag analysis
        if strcmp(basin_name,'Atlantic')
            maximum_lag = 8;
        else
            maximum_lag = 12;
        end

        % analysis type
        analysis_type = 'rreg';

        % for the bootstrapping
        n_bootstraps = 1000;
        alpha        = 0.1;

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

    perform_calculations = false;
    save_data            = perform_calculations;
    plot_results         = true;

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

    index_path   = '<path where single indices are stored>';
    infile_dummy = [index_path,'@DATASET_NAME@_@VAR_NAME@_@INDEX_NAME@.mat'];

    data_path = '<path where data for zonal analysis is stored>';
    out_file  = [data_path,...
                 'regional_index_feedback_comparison_',...
                 char(all_datasets{1}),'-',char(all_datasets{2}),'_',...
                 analysis_type,'_',...
                 basin_name,'_',...
                 reference_name,'-',lag_name,'_',...
                 num2str(start_year),'-',num2str(stop_year),'.mat'];


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

    % COLOURS AND LIMITS
    % ++++++++++++++++++

        colours      = struct('positive',[204 0 0]./255,'negative',[0 102 204]./255);
        marker_types = struct('aviso','p','oras4','s');
        my_grey      = [0.5 0.5 0.5];
        light_grey   = [0.85 0.85 0.85];

        y_limits = struct('ssh',[-20 80],'sst',[-0.08 0.06],'ustr',[-4 15]);

    % NAMING
    % ++++++

        fig_title = [basin_name,' ',upper(reference_name),'-',upper(lag_name)];
        fig_name  = ['compare_monthly_regional_',...
                     basin_name,'_',...
                     char(all_datasets{1}),'-',char(all_datasets{2}),'_',...
                     reference_name,'-',lag_name,'_',...
                     num2str(start_year),'-',num2str(stop_year),'.png'];

    % OTHER
    % +++++

        scale_figure_width  = 1;
        scale_figure_height = 1;

        axes_offset_x      = 0.075;
        axes_offset_y      = -0.05;
        axes_offset_width  = -0.2;
        axes_offset_height = 0;
        axes_offset        = [axes_offset_x axes_offset_y ...
                              axes_offset_width axes_offset_height];

        % hard wirde position
        axes_position = [0.2121    0.2263    0.5679    0.6627];

        res_flag = '-r200';

        marker_size = 10;

        scale_font_size = 2.5;

        % x position of y_label
        ylabel_x_position = -0.2516;

% ------------- %
% MISCELLANEOUS %
% ------------- %

    % month names
    month_ids = {'J','F','M','A','M','J','J','A','S','O','N','D'};

    % switch off robust regression warning
    warn_id = 'stats:statrobustfit:IterationLimit';