zonal_enso_properties_settings.m 5.35 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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                           %
%   ZONAL DISTRIBUTION OF ENSO PROPERTIES AND ASYMMETRIES   %
%   SETTINGS                                                %
%                                                           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

addpath('<path where the functions are stored>');

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

    % basic
    var_name     = 'sst';
    dataset_name = 'ersst';
    basin_name   = 'Atlantic';

    % which season to analyse?
    season_def      = [10 11 12];     % summer: MJJ, winter: OND, or 10:12 for Pac

    % time period; AVISO: 1993-2012s
    start_year = 1993;
    stop_year  = 2012;

    % identification threshold for events
    t_id = 0.5;

    % significance level for test
    alpha = 0.1;

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

    % use equatorial data only?
    % or account for a diversion towards SH
    % in the far east?
    divert_south = false;
    zonal_analysis_region_definition;

    % splicing the script
    load_data               = true;

    perform_calculations    = load_data;
        calculate_events    = true;     % calculate anomaly of event strengths?
        calculate_anomalies = false;

    produce_plots         = true;
        poster_plots      = true;      % simple name
        show_significance = false;
        show_events       = true;      % plot event strengths?
        show_anomalies    = calculate_anomalies;      % plot anomaly strengths?
        overlay_counts    = false;     % show counts as well (robustness of statistics)

    % for plotting and aignificance testing:
    % which data is present?
    all_data = {};
    if calculate_events;    all_data{end+1} = 'events';    end;
    if calculate_anomalies; all_data{end+1} = 'anomalies'; end;

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

    % variable storage according to dataset
    data_path = '<path where the SST dataset is stored>';

    % file containing the variable
    in_file = [data_path,'<name of the SST dataset>'];

    % mat-name of the relevant variable
    field_name = 'monthly_mean';
    date_name  = 'date_vector';

    % grids
    grid_file = '<path of the grid file>';

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

    % GENERAL
    % +++++++

        atlantic_asymmetric_bjf_plot_settings;

        % axes fine tuning
        scale_figure_height = 1;    % Pac: 1; Atl: 1.5
        scale_figure_width  = 1.5;      % Pac: 1.5; Atl: 1

        % position of the axes
        x_axes_offset = -0.02;           % Pac: ??, Atl: 0.05
        y_axes_offset = 0.17;           % Pac: ??, Atl: 0.15
        width_axes_offset = 0.065;       % Pac: ??, Atl: -0.025
        height_axes_offset = -0.17;      % Pac: ??, Atl: -0.15

        axes_offset = [x_axes_offset y_axes_offset ...
                       width_axes_offset height_axes_offset];

        % legend issues
        legend_horizontal_position = 0.0;  % for font 2, scale 1.5: 0.06
        set_legend_horizontally    = true;

    % MISCELLANEOUS
    % +++++++++++++

        % for monthy labelling
        month_ids = {'J','F','M','A','M','J','J','A','S','O','N','D'};
        season_tag = char(month_ids{season_def})';

        print_res = '-r200';

        font_size_scale = 2;

    % COLOURS
    % +++++++

        my_red   = [255 51 51]./255;
        my_blue  = [0 102 204]./255;
        my_white = [254 254 254]./255;

        % colour assignment
        colour_chart = struct('events',...
                    struct('positive',my_red,'negative',my_blue),...
                'anomalies',...
                    struct('positive',[255 153 153]./255,'negative',[153 224 255]./255));

        event_colours = struct('positive',my_red,'negative',my_blue);
        index_colours = struct('stddev',my_red,'skew',my_blue,'kurt',[0 0 0]);

        % which colours should these regions be marked in?
        region_colours = [...
                224 224 224;...
                96 96 96;...
                160 160 160]./255;

    % DATA ORGANIZATION
    % +++++++++++++++++

        % which parameters to plot?
        index_properties = {'stddev','skew','kurt'};
        event_properties = {'lengths','strengths','n_events'};
        parameter_names = struct(...
                'stddev','Std dev',...
                'skew','Skewness',...
                'kurt','Intermittency',...
                'lengths','Lengths',...
                'strengths','Strengths',...
                'n_events','Event counts');

    % AXES LIMITS AND OFFSET
    % ++++++++++++++++++++++

        % y limit issues
        if strcmp(basin_name,'Pacific')
            y_limits = [0.2 2.5];
        else
            y_limits = [0.1 1.4];
        end

    % LABELLING
    % +++++++++

        title_dummy  = [basin_name,' @PARAMETER@, ',...
                num2str(start_year),'-',num2str(stop_year)];
        title_dummy  = strrep(title_dummy,'_',', ');
        poster_title = [basin_name,', ',season_tag];

        % ignore the season tag if you analyse the entire year
        if ( length(season_def) == 12 )
            title_dummy  = strrep(title_dummy,[', ',season_tag],'');
            poster_title = strrep(poster_title,[', ',season_tag],'');
        end

        name_dummy = ['zonal_',basin_name,'_@PARAMETER@_',...
                season_tag,'_',dataset_name,'_',...
                num2str(start_year),'-',num2str(stop_year),'.png'];