compare_oras4_ersst_settings.m 2.98 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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                      %
%   COMPARE ORAS4 AND ERSST ATL3 SST   %
%   SETTINGS                           %
%                                      %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

    if strcmp(var_name,'ssh')

        all_data   = {'oras4','aviso'};
        data_names = {'ORAS4','AVISO'};

    elseif strcmp(var_name,'sst')

        all_data   = {'oras4','ersst'};
        data_names = {'ORAS4','ERSST'};

    elseif strcmp(var_name,'ustr')

        all_data   = {'era_oras4_forcing','era_sfcstress'};
        data_names = {'ORAS4','ERAI'};

    end

    n_data   = length(all_data);

    start_base = 1993;
    stop_base  = 2009;

    % from which year should the anomalies be plotted?
    start_anomalies = 1958;
    stop_anomalies  = 2012;

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

    file_path  = '<path where single indices are stored>';
    file_dummy = [file_path,...
            '@DATASET_NAME@_',var_name,'_',index_name,'.mat'];

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

    % COLOURS
    % +++++++

        all_colours = struct(char(all_data{1}),[0 102 204]./255,...
                             char(all_data{2}),[204 0 0]./255);
        my_gray = [0.85 0.85 0.85];

    % AXES AND FIGURE ISSUES
    % ++++++++++++++++++++++

        % common y limits in all plots
        y_limits_anomalies = struct(...
                'ssh', [-0.2 0.2],...
                'sst', [-3 3],...
                'ustr',[-0.06 0.08]);
        y_limits_stddev = struct(...
                'ssh', [0.01 0.09],...
                'sst', [0.25 1.4],...
                'ustr',[0.003 0.027]);

        % figure aspect ratio
        scale_figure_width  = 1;
        scale_figure_height = 0.65;
        scale_figure_x      = 1;
        scale_figure_y      = 1;

        scale_figure = [scale_figure_x scale_figure_y scale_figure_width scale_figure_height];

        % axes position
        % fix this to have the same axes in all panels
        % offsets
        axes_offset_y      = 0.1;
        axes_offset_width  = 0.05;
        axes_offset_heigth = -0.15;
        axes_offset        = [0 axes_offset_y axes_offset_width axes_offset_heigth];

        axes_position = [0.2404   0.1100   0.4384   0.7763]+axes_offset;

        % common x position of the ylabel
        % this is in normalized units and
        y_label_position = [-0.3553   0.5000   0];

    % NAMING
    % ++++++

        % title_dummy = [index_name,'-',upper(var_name),': ',...
        %         upper(char(all_data{1})),' vs ',upper(char(all_data{2})),...
        %         ', @PLOT_TYPE@'];
        title_dummy = [index_name,'-',upper(var_name)];
        name_dummy  = [index_name,'-',var_name,'_',...
                char(all_data{1}),'-',char(all_data{2}),...
                '_@PLOT_TYPE@.png'];

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

        res_flag = '-r200';

        month_names = {'J','F','M','A','M','J','J','A','S','O','N','D'};
        scale_font_size = 3;