function [newHandles] = select_modis_domain(handles)

% Get corresponding MODIS elements
tmp = searchModisElementsRegion(handles.colloc.data, handles.airs.index);
modis_index = [tmp.index];
if isempty(modis_index)
  errordlg('No corresponding MODIS Elements', 'Try again');
  return
end

% Get selected domain in 2-D
val = find_domain(modis_index, handles.modis.pixels_across, handles.modis.scanlines);
handles.modis.sub_pixels_across = val.row;
handles.modis.sub_scanlines = val.col;
handles.modis.sub_pixels_across_size = val.row_size;
handles.modis.sub_scanlines_size = val.col_size;
handles.modis.index = modis_index;
clear val; clear modis_index;

% GET subsection latitude
tmp = zeros(handles.modis.pixels_across, handles.modis.scanlines);
tmp(:) = NaN;
tmp(handles.modis.index) = handles.modis.lat(handles.modis.index);
handles.modis.sub_lat = zeros(handles.modis.sub_pixels_across_size, ...
                              handles.modis.sub_scanlines_size);
handles.modis.sub_lat(:) = tmp( ...
                handles.modis.sub_pixels_across(1):handles.modis.sub_pixels_across(2), ...
                handles.modis.sub_scanlines(1):handles.modis.sub_scanlines(2));

% GET subsection longitude
tmp(:) = NaN;
tmp(handles.modis.index) = handles.modis.lon(handles.modis.index);
handles.modis.sub_lon = zeros(handles.modis.sub_pixels_across_size, ...
                              handles.modis.sub_scanlines_size);
handles.modis.sub_lon(:) =  tmp( ...
                handles.modis.sub_pixels_across(1):handles.modis.sub_pixels_across(2), ...
                handles.modis.sub_scanlines(1):handles.modis.sub_scanlines(2));

newHandles = handles;
