爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 7972|回复: 6

[其他] 【提问】NCL在Linux下安装出错

[复制链接]
发表于 2016-4-21 08:22:05 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
按家园里的教程(http://mp.weixin.qq.com/s?__biz=MzA4MTAzMjQzMQ==&mid=400537877&idx=1&sn=5e5fb91395656c17a70b330f021348a8&scene=23&srcid=1113yjWsV119wXzcGwDJzYVA#rd)安装的,但是在解压后./bin/ncl 时出现错误提示:
[root@localhost NCL]# ./bin/ncl
Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.3.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
warning:Unable to load System Resource File /home/YJ/NCL/lib/ncarg/sysresfile
warning:WorkstationClassInitialize:Unable to access rgb color database - named colors unsupported:[errno=2]
warning:["Palette.c":1850]:NhlLoadColormapFiles: Invalid colormap directory: /home/YJ/NCL/lib/ncarg/colormaps
ncl 0>
不知道是什么原因,求大神指教,我的服务器是Red Hat Enterprise Linux Server release 5.9 (Tikanga),gcc4.1.2,装的是ncl_ncarg-6.3.0.Linux_RHEL5.11_x86_64_gcc412.tar.gz不知道是不是版本问题。
密码修改失败请联系微信:mofangbao
发表于 2016-4-21 08:36:57 | 显示全部楼层
本帖最后由 xuebiz 于 2016-4-21 08:41 编辑

感觉不是什么大错,找不到一些配置文件,但是ncl是运行起来了的。
因为后面出现了ncl命令提示符:ncl 0>

你可以自己进入这几个目录看看文件或者目录在不在:
/home/YJ/NCL/lib/ncarg/sysresfile
/home/YJ/NCL/lib/ncarg/colormaps

你先接着做下一步,配置环境变量,说不定就好了。

如果不行的话,可以考虑换个更匹配的版本,一般就低不就高。gcc是一定要匹配的。
服务器是Red Hat Enterprise Linux Server release 5.9 (Tikanga),gcc4.1.2,
装的是ncl_ncarg-6.3.0.Linux_RHEL5.11_x86_64_gcc412.tar.gz不知道是不是版本问题。
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2016-4-21 09:04:18 | 显示全部楼层
xuebiz 发表于 2016-4-21 08:36
感觉不是什么大错,找不到一些配置文件,但是ncl是运行起来了的。
因为后面出现了ncl命令提示符:ncl 0>
...

感谢亲的提示,搞定了,但是还有个问题,现在运行NCL自带的ng4ex gsun01n;会出现这种提示:

This example was set up to display the output to an
X11 window.

  Copying gsun01n.ncl

Running NCL...
Copyright (C) 1995-2012 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.1.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
warning:GKS:GOPWK: --X driver error: DISPLAY environment variable not set
fatal:Workstation with PID#8 is not open
fatal:Unable to open Workstation-Can't Create
fatal:Unable to access object with id:-4
fatal:_NhlCreate:Invalid Parent id #-4
fatal:NhlGetValues:PID #-4 is invalid
fatal:["Execute.c":7743]:Execute: Error occurred at or near line 11829 in file $NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl

fatal:["Execute.c":7741]:Execute: Error occurred at or near line 11
密码修改失败请联系微信:mofangbao
发表于 2016-4-21 09:16:17 | 显示全部楼层
参考下这篇http://bbs.06climate.com/forum.p ... &extra=page%3D3

(3)设置DISPLAY环境变量
         (a)可敲入“xeyes”,如果在你屏幕上会挑出几个眼睛图案,那OK。(有时也不必须,可通过测试ncl脚本来决定)
         (b)如果没有,跳出“Error: Can‘t open display”提示信息,则需设定DISPLAY环境变量,其值为你电脑的IP地址。
密码修改失败请联系微信:mofangbao
发表于 2017-1-5 19:14:00 | 显示全部楼层
我也遇到相同的问题
密码修改失败请联系微信:mofangbao
发表于 2017-1-5 19:14:29 | 显示全部楼层
环境变量已经设置了也没用
密码修改失败请联系微信:mofangbao
发表于 2017-9-7 18:55:22 | 显示全部楼层
warning:["Palette.c":1850]:NhlLoadColormapFiles: Invalid colormap directory: /home/ncl/colormaps遇到同样的情况,实际问题所在就是/home/ncl/colormaps目录文件不存在
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表