0001 function [w,jd]=tstau(cdf);
0002
0003
0004
0005
0006
0007
0008
0009
0010 [t]=mcvgt(cdf,'time');
0011 nt=length(t);
0012
0013 ncid=mexcdf('open',cdf);
0014 [name,datatype,ndims,dim,natts, status] = mexcdf('VARINQ',ncid, 'taux');
0015 mexcdf('close',ncid);
0016 ndims=1;
0017 if(ndims==1),
0018 u=mcvgt(cdf,'taux');
0019 v=mcvgt(cdf,'tauy');
0020 w=u+i*v;
0021 w=w.';
0022 else
0023 [stations]=mcvgt(cdf,'stations');
0024 nsta=length(stations);
0025 corner=[0 0 0 0];
0026 edges=[nt 1 1 nsta];
0027 u=mcvgt(cdf,'taux',corner,edges);
0028 v=mcvgt(cdf,'tauy',corner,edges);
0029 w=u+i*v;
0030 end
0031
0032 base_date=zeros(1,6);
0033 base_date(1:3)=mcagt(cdf,'global','base_date');
0034 jd0=julian(base_date);
0035 jd=jd0+t/3600/24;