Home > omviz > ecomtime.m

ecomtime

PURPOSE ^

ECOMTIME Julian time data from POM.CDF or ECOM.CDF type file

SYNOPSIS ^

function [jd]=ecomtime(cdf,ind)

DESCRIPTION ^

 ECOMTIME Julian time data from POM.CDF or ECOM.CDF type file
 function [jd]=ecomtime(cdf,[ind])
    cdf= ecom.cdf file name

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [jd]=ecomtime(cdf,ind)
0002 % ECOMTIME Julian time data from POM.CDF or ECOM.CDF type file
0003 % function [jd]=ecomtime(cdf,[ind])
0004 %    cdf= ecom.cdf file name
0005 %
0006 mexcdf('setopts',0);
0007 ncid=mexcdf('open',cdf,'nowrite');
0008 [nam,nt]=mexcdf('diminq',ncid,'time');
0009 base_date=[0 0 0 0 0 0];
0010 base_date(1:3)=mexcdf('attget',ncid,'global','base_date');
0011 if(nargin==1),
0012    t=mexcdf('varget',ncid,'time',0,nt);
0013 else
0014    t=mexcdf('varget1',ncid,'time',ind-1);
0015 end
0016 jd0=julian(base_date);
0017 jd=jd0+t;
0018 mexcdf('close',ncid);

Generated on Thu 01-Dec-2005 08:50:35 by m2html © 2003