[data,config] = agetmat('a_');
nx1_names = {...
        'dday',
     'heading',
       'wmean',
       'uship',
       'vship',
    'uship_sm',
    'vship_sm',
         'lon',
         'lat',
     'ref_std',
       'smmps',
           'x',
           'y'};

nxm_names = {...           
          'pg',
       'depth',
       'pflag',
         'amp',
          'sw',
       'umeas',
       'vmeas',
           'w',
           'e',
     'uabs_sm',
     'vabs_sm',
       'fmeas',
       'pmeas',
     'fabs_sm',
     'pabs_sm'};
   
refbins = config.rl_range;
dd = nx1ref(data, nx1_names, nxm_names, refbins);

dd.date = cell(size(dd.dday));
for ii=1:length(dd.date)
   dd.date{ii}=sprintf('%4d/%02d/%02d %02d:%02d:%02d',data.time(ii,:));
end


tspoke(dd,'dday','x','lon','y','lat');

