%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                 VTOOLS                 %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
%Victor Chavarrias (victor.chavarrias@deltares.nl)
%
%$Revision$
%$Date$
%$Author$
%$Id$
%$HeadURL$
%
%

function gridInfo=D3D_read_grid_SMTD3D4(fpath_map)

ndd=numel(fpath_map);
gridInfo=EHY_getGridInfo(fpath_map{1},{'face_nodes_xy','XYcen','XYcor','no_layers','grid'},'mergePartitions',1); 

for kdd=2:ndd
    gridInfo_aux=EHY_getGridInfo(fpath_map{kdd},{'face_nodes_xy','XYcen','XYcor','no_layers','grid'},'mergePartitions',1); 

    gridInfo.Xcor=D3D_SMTD3D4_concatenate(gridInfo.Xcor,gridInfo_aux.Xcor,0);
    gridInfo.Ycor=D3D_SMTD3D4_concatenate(gridInfo.Ycor,gridInfo_aux.Ycor,0);
    gridInfo.Xcen=D3D_SMTD3D4_concatenate(gridInfo.Xcen,gridInfo_aux.Xcen,1);
    gridInfo.Ycen=D3D_SMTD3D4_concatenate(gridInfo.Ycen,gridInfo_aux.Ycen,1);
    
    gridInfo.grid=cat(1,gridInfo.grid,gridInfo_aux.grid);
end
