function []=writemet2(met)
% given a 9 column array:
% time, precip, evap, airtemp, humid, barop, swobs, wspd, wdir
% writes an appopriate file for ecomsi

[m,n]=size(met);
if(n~=9),disp('Error: not 9 columns'),return,end
fid=fopen('run_data.e','w');
fprintf(fid,'%s\n','AVERAGED            USE_SW_AS_FLUX');
for i=1:m,
  fprintf(fid,'%10.2f\n',met(i,1));
  fprintf(fid,'%5.1f%6.1f%6.1f%7.1f%9.1f%9.1f%8.2f%8.1f\n',met(i,[2:9]));
end
