@@ -20,7 +20,7 @@ function sefran3(name,fdate)
2020% Authors: Francois Beauducel, Didier Lafon, Alexis Bosson, Jean-Marie Saurel, WEBOBS/IPGP
2121% Created: 2012-02-09 in Paris, France
2222% (based on legacy sefran.m, 2002 and sefran2.m, 2007)
23- % Updated: 2022-06-12
23+ % Updated: 2022-07-22
2424
2525WO = readcfg ;
2626wofun = sprintf(' WEBOBS{%s }' ,mfilename );
@@ -137,7 +137,7 @@ function sefran3(name,fdate)
137137
138138% imports SEFRAN3 channel parameters
139139fid = fopen(SEFRAN3 .CHANNEL_CONF ,' rt' );
140- C = textscan(fid ,' %q%q%q%q%q%q%q%*[^ \n ] ' ,' CommentStyle' ,' #' );
140+ C = textscan(fid ,' %q%q%q%q%q%q%q' ,' CommentStyle' ,' #' );
141141fclose(fid );
142142% C{1} = channel name (alias)
143143% C{2} = channel stream
@@ -191,7 +191,7 @@ function sefran3(name,fdate)
191191 t1 = t0 + daymn ;
192192 tv = datevec(t0 );
193193 pdat = sprintf(' %s /%4d /%4d%02d%02d ' ,SEFRAN3 .ROOT ,tv(1 ),tv(1 : 3 ));
194- f = sprintf(' %s /%s /%4d%02d%02d%02d%02d%02d ' ,pdat ,SEFRAN3 .PATH_IMAGES_MINUTE ,tv );
194+ f = sprintf(' %s /%s /%4d%02d%02d%02d%02d%02.0f ' ,pdat ,SEFRAN3 .PATH_IMAGES_MINUTE ,tv );
195195 fpng = sprintf(' %s .png' ,f );
196196 fpng_high = sprintf(' %s _high.png' ,f );
197197
@@ -466,7 +466,7 @@ function sefran3(name,fdate)
466466 else
467467 pngq = ' ' ;
468468 end
469- fpng = sprintf(' %s /%s /%4d%02d%02d%02d%02d%02d s .png' ,pdat ,sgrampath ,tv );
469+ fpng = sprintf(' %s /%s /%4d%02d%02d%02d%02d%02.0f s .png' ,pdat ,sgrampath ,tv );
470470 fprintf(' %s : creating %s ... ' ,wofun ,fpng );
471471 ftmp3 = sprintf(' %s /sgram.eps' ,ptmp );
472472 fsxy = [vits ,hip ]; % image size (in inches)
@@ -691,7 +691,7 @@ function sefran3(name,fdate)
691691 dt = 0 ;
692692 end
693693 % makes SeedLink request and save to temporary miniseed file
694- wosystem(sprintf(' %s -d -o %s -S "%s " -tw %d ,%d ,%d ,%d ,%d ,%d : %g ,%d ,%d ,%d ,%d ,%g %s ' , ...
694+ wosystem(sprintf(' %s -d -o %s -S "%s " -tw %d ,%d ,%d ,%d ,%d ,%1.0f : %d ,%d ,%d ,%d ,%d ,%1.0f %s ' , ...
695695 slinktool ,fmsd ,streams ,datevec(t0 - max(dt )),datevec(t1 ),datasource ),SEFRAN3 ,' warning' );
696696 else
697697 fprintf(' %s : ** WARNING ** SEEDLINK server %s at %s has no channel available !\n ' ,wofun ,datasource ,datestr(t1 ));
@@ -709,7 +709,7 @@ function sefran3(name,fdate)
709709 fid = fopen(freq ,' wt' );
710710 for n = 1 : length(sfr )
711711 c = textscan(sfr{n },' %s ' ,' Delimiter' ,' .:' ); % splits Network, Station, Loc and Channel codes
712- fprintf(fid ,' %d ,%d ,%d ,%d ,%d ,%g %d ,%d ,%d ,%d ,%d ,%g %s %s %s %s\n ' ,datevec(t0 - dt0(n )),datevec(t1 ),c{1 }{1 },c{1 }{2 },c{1 }{4 },c{1 }{3 });
712+ fprintf(fid ,' %d ,%d ,%d ,%d ,%d ,%1.0f %d ,%d ,%d ,%d ,%d ,%1.0f %s %s %s %s\n ' ,datevec(t0 - dt0(n )),datevec(t1 ),c{1 }{1 },c{1 }{2 },c{1 }{4 },c{1 }{3 });
713713 end
714714 fclose(fid );
715715 % makes ArcLink request and save to temporary miniseed file
@@ -732,6 +732,7 @@ function sefran3(name,fdate)
732732 % builds request line for dataselect WebService POST file
733733 fprintf(fid ,' %s %s %s %s %04d -%02d -%02d T%02d :%02d :%02.0f %04d -%02d -%02d T%02d :%02d :%02.0f\n ' ,c{1 }{1 },c{1 }{2 },c{1 }{3 },c{1 }{4 },datevec(t0 - dt0(n )),datevec(t1 ));
734734 end
735+ fclose(fid );
735736 % request the data
736737 wosystem(sprintf(' wget -nv -O %s --post-file %s "%s "' ,fmsd ,fpost ,datasource ),SEFRAN3 );
737738
0 commit comments