⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fixtime.m

📁 一个研究声多普勒计程仪很好的工具箱
💻 M
字号:
function[newj] = fixtime(filename, fastslow)  

%function[newj] = fixtime(filename, fastslow)  
%fixes the time for any netcdf file that has julian time called "TIM"
%filename = name of netcdf file
%fastslow = desired adjustment to time in seconds

% Written by Jessica M. Cote
% for the U.S. Geological Survey
% Coastal and Marine Geology Program
% Woods Hole, MA
% http://woodshole.er.usgs.gov/
% Please report bugs to jcote@usgs.gov

h = netcdf(filename,'write')
if isempty(h),return, end

ftime = h{'TIM'};
jtime = ftime(:);
if nargin < 2
   fastslow = h{'TIM'}.slow_by(:); %in sec
end
%needs to be in fraction of a day
tadj = (fastslow/3600)/24;

newj = jtime + tadj;

ftime(:) = newj(:);
close(h)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -