1

我最近安装了 GDL,因为我没有 IDL 的许可证。

我试图运行 IDL (.pro) 脚本来模拟系外行星过境(带外卫星),但遇到了一些问题:

GDL> .reset_session                                                 

(gdl:16530): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()
GDL> 
GDL> restore, 'paramk63.save', /v
% Procedure not found: RESTORE
% Execution halted at: $MAIN$          
GDL> 
GDL> Per = PER
GDL> ap = A
% Variable is undefined: A
% Execution halted at: $MAIN$          
GDL> Rplan = RP
% Variable is undefined: RP
% Execution halted at: $MAIN$          
GDL> inc = INC
GDL> Pm = 1
GDL> Rmoon = 0.03
GDL> dmoon = 4.0
GDL> tetam0 = 0.0
GDL> dt = 1.0
GDL> wl = WL
GDL> 
GDL> eclipse_moon,Per,ap,Rplan,inc,Pm,Rmoon,dmoon,tetam0,dt,wl,/plot
% Compiled module: ECLIPSE_MOON.
% ECLIPSE_MOON: Ambiguous: Variable is undefined: MEAN or: Function not found: MEAN
% Execution halted at: ECLIPSE_MOON        23 /home/fabian/Downloads/eclipse_moon.pro
%                      $MAIN$          
GDL> 0:45 / 9:10
% ECLIPSE_MOON: Parser syntax error: unexpected token: 0
GDL> 

我在安装了 IDL 的 linux 上运行了相同的代码,它非常好。

看来我必须安装更多的东西。那正确吗?

4

1 回答 1

1

看起来它找不到名为MEAN. 确保它在您的 !path 中并且您正确调用它。当 IDL(或 GDL)运行一个函数或程序时,它会搜索变量中的所有目录!path以找到它。如果找到,IDL 将加载该函数并继续编译。在这种情况下,我希望函数在第 23 行ECLIPSE_MOON调用MEAN。但是MEAN(通常内置在 IDL 中)在 GDL 中找不到。所以你需要确保它可以被找到。

要检查您的路径,请在 GDL 会话类型中print,!path并确保该函数MEAN位于这些目录之一中。

于 2017-11-28T15:12:16.373 回答