zonal_analysis_region_definition.m 2.17 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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                         %
%   ZONAL VARIATIONS IN ENSO PROPERTIES   %
%   DEFINITION OF ANALYSIS REGIONS        %
%                                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ------------------------ %
% BASIN-DEPENDENT SETTINGS %
% ------------------------ %

    if strcmp(basin_name,'Pacific')

        % total zonal extent
        lon_cover = [160 280];

        % % which latitudinal and longitudinal extent should the boxes have?
        % % total extent is twice this value
        lat_extent  = 2;

        % % longitudinal extent
        lon_extent  = 2;

        % longitudinal steph width, i.e. how far are the
        % boxes apart longitudinally
        delta_lon = 1;

        % curve the central latitude away from the equator to the south
        % to account for the southward propagation of ENSO signals
        % in the far east
        % where does the branching off start?
        departure_lon = 265;

        % what is the farthest south the branching off should reach?
        departure_maximum_lat = -7.5;

    % Atlantic
    else

        % total extent
        lon_cover = [-40 10];

        lat_extent            = 2;
        lon_extent            = 2;

        delta_lon             = 1;

        departure_lon         = 0;
        departure_maximum_lat = -15;

    end

    % use equatorial data only?
    % replace the diversion longitudes and latitudes in this case
    if ~divert_south
        departure_lon         = lon_cover(2)-delta_lon;
        departure_maximum_lat = -0.001;
    end

% -------------------------- %
% DEFINE CENTRAL COORDINATES %
% -------------------------- %

    central_longitudes = [lon_cover(1):delta_lon:(lon_cover(2))];

    central_latitudes = zeros(size(central_longitudes));

    % where should the centers be off-equatorial?
    is_off_equatorial = ( central_longitudes > departure_lon );
    extent_off        = sum(is_off_equatorial);

    % linearly depart from the equator
    delta_lat = departure_maximum_lat/extent_off;

    % assign the branching off
    central_latitudes(is_off_equatorial) = ...
            [delta_lat:delta_lat:departure_maximum_lat];