Skip to content

Commit

Permalink
Converts newer METEOBLUE csv data files into mat files
Browse files Browse the repository at this point in the history
  • Loading branch information
fjsimons committed Sep 25, 2020
1 parent 5820dd8 commit 7276299
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion meteobluf.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function varargout=meteobluf(fname)
% [t,d]=METEOBLUE(fname)
% [t,d]=METEOBLUF(fname)
%
% Reads, and converts a CSV file from METEOBLUE data to a MATLAB file
% including proper date-time variables. The format of the data is
Expand Down Expand Up @@ -100,6 +100,9 @@
eval(sprintf('d.(char(z))=char(e{%i});',index))
end

% Assign structure
d.msg=sprintf('Created by [email protected] using %s on %s',upper(mfilename),date);

% Convert the time stamps, see MARK2MAT
convt=@(x) char(abs(x)-[zeros(1,8) 52 zeros(1,4)]);
t=datetime(cellfun(convt,a{1},'UniformOutput',0),'InputFormat','yyyyMMddHHmm');
Expand Down

0 comments on commit 7276299

Please sign in to comment.