function readCodarMnty( path )
if( nargin == 0 )
    path = '2006_2007';
end

disp( ['Reading directory of ' path] );
D = dir(path);
entries = 0;
for( i = 1: length( D ) )
    if( ~ D(i).isdir & D(i).bytes > 30000 ) 
        entries = entries + 1;
    end
end
disp( [num2str(entries) ' entries.'] );

codar_time = zeros( 1, entries );
codar_u = zeros( 462, entries );
codar_v = codar_u;

index = 0;
for( i = 1:length( D ) )
    if( D(i).isdir | D(i).bytes < 30000 ) 
        continue;
    end
    index = index + 1;
    name = D(i).name;
    bytes = D(i).bytes;
    % example name: tuv_MNTY_200611821
    disp(name);
    year = str2num( name(10:13) );
    day = str2num( name(14:16));
    hour = str2num( name(17:18) );
    codar_time(1, index) = datenum( year, 1, day, hour, 0, 0);
    fid = fopen( [path '/' name], 'r');
    if( bytes < 50000 ) 
        latLonUVJunk = textscan(fid, '%f %f %f %f %f %f %f %f', 462, 'headerlines', 13);
    else
        latLonUVJunk = textscan(fid, '%f %f %f %f %f %f %f', 462, 'headerlines', 13);
    end
    if( length( latLonUVJunk{1} ) ~= 462 ) 
        error('incorect size');
    end
    fclose( fid );
    if( index == 1 )
        codar_lat = latLonUVJunk{1};
        codar_lon = latLonUVJunk{2};
    end
    codar_u(:,index) = latLonUVJunk{3};
    codar_v(:,index) = latLonUVJunk{4};
end

disp( 'Assigning NaNs' )
bad = find( codar_u == -999 | codar_v == -999 );
codar_u( bad ) = NaN;
codar_v( bad ) = NaN;

save( path, 'codar_time', 'codar_lat', 'codar_lon', 'codar_u', 'codar_v' );