Commit 0cf77a00 authored by NGK Observatory Data's avatar NGK Observatory Data
Browse files

Aufraeumen auf obs251

parent d3ef8aa4
A_scriptstart*
calculate_baselines_environment_*
last_DI_matlab.txt
recent-DI.mat
parameters_*
!parameters_default.m
*~
*asv
% -> 1-sec Program für Kyoto
% produce_IAGA_2002_min = '0'; % kann auch 'n' sein, warum?
% produce_IAGA_2002_sec = '0'; % kann auch 'n' sein, warum?
% -------------------------------------------------------------------------
% Pflicht-Parameter
% -------------------------------------------------------------------------
clear all
close all
%station = ['SMA0g']
%station = ['SHE0g';'TTB1l']
%station = ['VNA1s']
%station = ['NGK0g']
%station = ['TDC1d']
%station = ['TTB1l']
%station = ['BFO1s']
%station = ['NGK0g';'NGK1g';'NGK2g';'NGK6g';'WNG0g';'WNG1g';'WNG2g';'WNG3g';'VNA1s';'SHE0g';'VSS0g';'TTB0g';'TTB1l';'VSS1g';'SMA0g';'PUL0g';'TEL0g'];
starttime = '2017-05-08';
stoptime = '2017-05-2'; % nicht für Varlab
% -------------------------------------------------------------------------
% ppmsec2cdf
% -------------------------------------------------------------------------
% braucht keine weiteren Paramter
ppmsec2cdf('starttime',starttime,'stoptime',stoptime,'station',station);
% -------------------------------------------------------------------------
% cdf2def
% -------------------------------------------------------------------------
% - produce_IAGA_2002_min/sec '0' (default) no output
% 'P' provisional data
% 'D' definitive data
% 'Q' quasi-definitive data
% 'V' variation (V)
%
% - output_resolution '0' (default) don't write mat-file
% 's' means that also 1-second values are
% saved in matlab format.
%
% - calculate_IAGA_F 'n' (default) 888888 is set in the F-column for
% types Q, D, P, V
% 'y' for type other than V), then F is
% calculated from XYZ
%
% - output_format 'c' (default) means calibrated, all types of files
% 'r' means raw, only raw-file 1 second
% and IAGA V
%
% -------------------------------------------------------------------------
% varlab
% -------------------------------------------------------------------------
% geht auch direkt aufzurufen
varlab_01('parfile','parameters_win_JM.txt','date',starttime,...
'station',station(1:4));
% % -------------------------------------------------------------------------
% % Start programs
% % -------------------------------------------------------------------------
%
% ppmsec2cdf('starttime',starttime,'stoptime',stoptime,'station',station);
%
% cdf2def('starttime',starttime,'stoptime',stoptime,...
% 'station',station)
%
% cdf2def('starttime',starttime,'stoptime',stoptime,...
% 'station',station,...
% 'produce_IAGA_2002_min',produce_IAGA_2002_min,...
% 'produce_IAGA_2002_sec',produce_IAGA_2002_min)
%
% varlab_01('parfile','parameters_win_JM.txt','date',starttime,...
% 'station',station(1:4));
%
% for s=1:size(station,1)
%
% h=varlab_01('parfile','parameters_win_JM.txt','date',starttime,...
% 'station',station(s,1:4));
% waitfor(h);
%
% pressed=questdlg('Aufrufen von cdf2def ?','Was jetzt?',...
% 'Ja','Nein','Abbrechen','Nein');
% switch pressed
% case 'Nein'
% continue
% case 'Abbrechen'
% break
% end
%
% cdf2def('starttime',starttime,'stoptime',stoptime,...
% 'station',station(s,:),...
% 'produce_IAGA_2002_min',produce_IAGA_2002_min,...
% 'produce_IAGA_2002_sec',produce_IAGA_2002_min);
%
% end
% -------------------------------------------------------------------------
% FROM cdf2def_auto
% -------------------------------------------------------------------------
%station_array = 'NGK0g';
%station_array = ['BFO1s';'VNA1s']
%station_array = 'VNA1s'
%station_array = ['MAR1l']
%station_array = 'BFO1s';
%station_array = 'MSN0g';
%station_array = 'VNA1s';
%station_array = 'TDC1d';
%station_array = 'NGK0g';
%station_array = 'WNG1g';
%station_array = 'BFO1s';
%station_array = 'TTB0g';
%station_array = 'SMA0g';
%station_array = 'VSS0g';
%station_array = 'SHE0g';
% station_array = [...
%'TDC1d';...% 1
%'ROE1d';...% 2
%'BFE4d';...% 3
%'BFE6d';...% 4
%'NAQ4d';...% 5
%'NAQ6d';...% 6
%'FHB1d';...% 7
%'GHB1d';...% 8
%'SKT1d';...% 9
%'STF1d';...% 10
%'ATU1d';...% 11
%'GDH4d';...% 12
%'GDH6d';...% 13
%'UMQ1d';...% 14
%'UPN1d';...% 15
%'KUV1d';...% 16
%'SVS1d';...% 17
%'TAB1d';...% 18
%'THL4d';...% 19
%'THL6d';...% 20
%'NRD1d';...% 21
%'DMH1d';...% 22
%'SCO1d';...% 23
% 'AMK1d';...%
% ]; % 24
% station_array = [...
% %'TDC1d';...% 1
% %'ROE1d';...% 2
% %'BFE4d';...% 3
% %'BFE6d';...% 4
% %'NAQ4d';...% 5
% 'NAQ6d';...% 6
% %'FHB1d';...% 7
% %'GHB1d';...% 8
% 'SKT1d';...% 9
% 'STF1d';...% 10
% 'ATU1d';...% 11
% %'GDH4d';...% 12
% 'GDH6d';...% 13
% 'UMQ1d';...% 14
% %'UPN1d';...% 15
% %'KUV1d';...% 16
% %'SVS1d';...% 17
% %'TAB1d';...% 18
% %'THL4d';...% 19
% %'THL6d';...% 20
% %'NRD1d';...% 21
% %'DMH1d';...% 22
% %'SCO1d';...% 23
% % 'AMK1d';...%
% ]; % 24
% station_array = 'THL6d';
% station_array = 'GDH6d';
% station_array = 'NAQ6d';
% station_array = 'TDC1d';
% station_array = 'SHE0g';
% station_array = 'VNA1s';
% station_array = 'VSS0g';
% station_array = 'LOK0g';
% station_array = [... % all variometer stations
% 'TAB1d';...%
% 'SVS1d';...%
% 'KUV1d';...%
% 'UPN1d';...%
% 'UMQ1d';...%
% 'ATU1d';...%
% 'STF1d';...%
% 'SKT1d';...%
% 'GHB1d';...%
% 'FHB1d';...%
% 'STN1d';...
% 'DNB1d';...
% 'SCO1d';...
% 'AMK1d'...
% ]; %
\ No newline at end of file
%% program to transfer IAGA2002-files by email to Kyoto
%
% works only from thinlink
%
% works with Q-files and P-files
% here was an error in our declination baseline for NAQ affecting data sent
% to Kyoto and Intermagnet from April 17 to 23,
% If you can send them with the similar method as the realtime data (i.e.,
% just changing the header from "R" to "Q"), Kyoto GIN will be able
% to handle them. But I need time to modify my program.
% dtudata@swdc234.kugi.kyoto-u.ac.jp
%
% header:
% tdc20120520pmin.min
%
% attachment: same file
clear all
startdate = jd2000(2017, 11, 21); % HERE START DATE FOR non-online
enddate = jd2000(2017, 12, 19); % HERE END DATE FOR non-online
%station = 'VNA1';
%station = 'WNG1';
station = 'BFO1';
%station = 'TDC1';
%station = 'NGK0';
IAGAtype = 'P'; % preliminary data
%IAGAtype = 'Q'; % quasi definitive data
%IAGAtype = 'P'; % quasi definitive data
recipient = {'gfzdata@swdc234.kugi.kyoto-u.ac.jp'};
if strcmp(station(1:3), 'VNA')
recipient = {'neumayer-geo@awi.de'
'gfzdata@swdc234.kugi.kyoto-u.ac.jp'
'Alfons.Eckstaller@awi.de'};
end %if
% recipient = {'gfzdata@swdc234.kugi.kyoto-u.ac.jp'
% 'jrgm@space.dtu.dk'};
% recipient = 'dtudata@swdc234.kugi.kyoto-u.ac.jp'; %
% recipient = 'jrgm@space.dtu.dk'; %
%recipient = 'David.Calp@NRCan-RNCan.gc.ca'
opsys = computer;
hostname=char(java.net.InetAddress.getLocalHost.getHostName);
if strcmp(opsys(1:5), 'MACI6') == 1
% setup for Juergens Mac in GFZ VPN or network
path1 = '/Users/jmat/work/IAGA2002_Kyoto_transfer/';
bs = '/'; % slash
%setpref('Internet','SMTP_Server','smtp.gfz-potsdam.de');
%setpref('Internet','E_mail','jmat@gfz-potsdam.de');
setpref('Internet','SMTP_Server','smtp.gfz-potsdam.de');
setpref('Internet','E_mail','tornow@gfz-potsdam.de');
elseif strcmp(opsys(1:2), 'PC') == 1
path1 = 'O:\jmat\IAGA2002_Kyoto_transfer\';
bs = '\'; % slash
setpref('Internet','SMTP_Server','smtp.gfz-potsdam.de');
setpref('Internet','E_mail','jmat@gfz-potsdam.de');
elseif strcmp(hostname,'obs251')
path1 = '/home/variomet/jmat/IAGA2002_Kyoto_transfer/';
bs = '/'; % slash
setpref('Internet','SMTP_Server','smtp.gfz-potsdam.de');
setpref('Internet','E_mail','jmat@gfz-potsdam.de');
else
diplay('operating system not recognised');
end
for i = 1:size(recipient, 1)
for idate = startdate:enddate
[year month day] = jd2date(idate);
IAGA_pathname = [path1 upper(IAGAtype) '_files' bs station(1:3) bs...
num2str(year, '%4.4d') bs];
IAGA_filename = [lower(station(1:3)) num2str(year, '%4.4d')...
num2str(month, '%2.2d') num2str(day, '%2.2d')...
lower(IAGAtype) 'min.min'];
IAGA_pathfile = [IAGA_pathname IAGA_filename]
if exist(IAGA_pathfile, 'file') == 2
% sendmail(recipients,subject,message,attachments)
sendmail(recipient{i}, IAGA_filename, '', IAGA_pathfile)
display(['sent ' IAGA_filename ' to ' recipient{i}]);
else
display(['not found: ' IAGA_filename]);
end
end %for idate
end %for i
\ No newline at end of file
File deleted
File deleted
File deleted
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment