2017年8月4日金曜日

GDLSSW004_en, sswdb and make_mirror.pro

Notebook for using SSW (Solar Soft Ware) on GDL (GNU Data Language).

In the previous article, the errors on 'ON_IOERROR' are modified.

Next, sswdb_upgrade.pro stoped in make_mirror.pro.

make_mirror.pro




In sswdb_upgrade.pro, file transfer via FTP is executed by PERL (MIRROR).

A setting file for PERL is made in make_mirror.pro.

The following is an error message in this procedure.

% STRING: Format parser: NoViableAlt
% Execution halted at: MAKE_MIRROR        197 /???/ssw/gen/idl/system/make_mirror.pro

197th line is 'file_append' procedure.

> form='(' + strtrim(npacks,2) + '(1h#,/,a,/,'+ strtrim(ntags-1,2) + '(3x,a,/)))'
> file_append,mirror_file,string(allpacks,format=form)    ;, /new

'file_append' is a writing procedure, 'mirror_file' is the setting file, information on instruments are included in 'allpacks' (a structure array)

'npacks' is the number of the instruments, and 'ntags' is the number of information on a instrument.

Contents of 'allpacks' is described via 'form'

The error occurs here.

If I typed, 'GDL> print, string(allpacks,format=form)', an error occurs.

But, I can print data on ONE instrument.

For example, for seven instruments, 'form' is the following.

IDL> form=(7(1h#,/,a,/,15(3x,a,/)))

'1h#,/,a,/,15(3x,a,/)' is the format for an instrument.

GDL> print, string(allpacks[0],format="(1h#,/,a,/,15(3x,a,/))")

So, I modified lines to add lines for each instrument.

< form='(1H#,/,a,/,'+ strtrim(ntags-1,2) + '(3x,a,/))'
<for i0=0,npacks-1 do begin
<   s1=string(allpacks[i0],format=form)
<   file_append,mirror_file,s1 ;, /new
<   if i0 eq npacks-1 then goto,L100
<endfor
<L100:

Because 'for-loop' did not stop at 'npacks-1', it is forced to escape via 'goto'.

After this modification, sswdb_upgrade.pro can get files.



Additional notes


Later, in trying to install SSWDB, GDL itself stopped with the following messages.

gdl: /build/gnudatalanguage-yJFcE3/gnudatalanguage-0.9.6v2/src/gdlarray.hpp:210: T& GDLArray<T, IsPOD>::operator[](SizeT) [with T = std::__cxx11::basic_string<char>; bool IsPOD = false; SizeT = long long unsigned int]: Assertion `ix < sz' failed.
Magick: abort due to signal 6 (SIGABRT) "Abort"...
Abort (core dumped)

GDL may be insteady.

0 件のコメント:

コメントを投稿

注目の投稿

【貨幣循環】名目GDPと M=G+I と V=1/(1-β) の成長率

「 【貨幣循環】貨幣循環導入の3点セット 」では、貨幣循環の定式化である M=G+I と V=1/(1-β) を紹介した。「 【貨幣循環】歳出伸び率とGDP成長率の関係 」では、名目GDPの成長率と政府支出Gの成長率の関係を紹介した。本記事では、MとV、および名目GDPの成長率...

人気の投稿