-
Notifications
You must be signed in to change notification settings - Fork 0
/
do_filename.m
33 lines (28 loc) · 951 Bytes
/
do_filename.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
function [outfilename, dates, cuts]=do_filename(file, type, time, cut, format, width)
%function [outfilename, dates]=do_filename(file, type, time, cut, format, width)
%
%Returns a proper filename from input data
%format={png, jpg, bmp, eps, pdf ...}
model='Portugal'; % Users, change this manually
out_dir = [format,'/'];
%Transform date into string
serial_time = do_time(file);
datet = int2str(time);
dates = datestr(serial_time(time), 'dd-mmm-yyyy HH:MM');
datets = datestr(serial_time(time), 'yyyy-mm-dd');
%Transform lat/lon cut into string
vcut=do_cut(file, type, cut, width);
cuts=num2str(vcut, '%2.2f');
switch type
case 'xz'
cuts = [cuts, 'N'];
case 'yz'
cuts = [cuts, 'E'];
otherwise
end
outfilename=[ out_dir, 'TS_',...
model,'_',...
datets,'_',...
type,'_',...
cuts,'_',...
'.', format];