爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[其他] 求教关于NCL中libc.so.6和libgfortran.so.3找不到的问题

[复制链接]
发表于 2011-11-1 17:40:45 | 显示全部楼层

你的ncl可以运行么?比如你直接在命令行输入ncl
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2011-11-1 17:54:45 | 显示全部楼层
ztftom 发表于 2011-11-1 17:40
你的ncl可以运行么?比如你直接在命令行输入ncl

可以的,而且搞笑的是如果直接用这种交互式命令的话,我的load "/home/lux/other/lib/ncarg/nclscripts/csm/gsn_code.ncl"就可以直接写成是load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
但是直接在test1.ncl里面的话这么写就要报错,
fatal:Could not open ($NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl)
fatal:error at line 1 in file test1.ncl
fatal:syntax error: line -1 before or near  
所以我都是直接写全地址,但是昨天都行,今天就换了个问题,然后就更郁闷了
密码修改失败请联系微信:mofangbao
发表于 2011-11-1 19:37:07 | 显示全部楼层
陪着你的路人 发表于 2011-11-1 17:54
可以的,而且搞笑的是如果直接用这种交互式命令的话,我的load "/home/lux/other/lib/ncarg/nclscripts/c ...

从你贴的第一个帖子来看,可能是图形显示的问题,应该是在建workstation时,没法找到你的X11,你是在server上运行的ncl么? 你可以把那个gsn文件里的错误行给贴出来么?这样可以看一下是什么命令出问题了。

你的第二个问题确实挺奇怪。我大概推测可能有两个原因:
1. 你的电脑上可能不止有一个ncl安装在上面
2. 你的startup文件的问题,比如.bashrc,所以你重启电脑之后就又不行了。
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2011-11-1 21:21:49 | 显示全部楼层
ztftom 发表于 2011-11-1 19:37
从你贴的第一个帖子来看,可能是图形显示的问题,应该是在建workstation时,没法找到你的X11,你是在serv ...

是在服务器上转的,额~这个是3077附近的
  if(calldraw)
    draw(plot)
  end if

  if(callframe)
    frame(wks)           ; advance the frame
;
; Only set the device coordinates back if the frame is advanced, because
; if we do it when the frame hasn't been advanced, then anything that
; gets drawn on this plot later will be drawn under the old device
; coordinates.
;
; This means that the user will have to be aware that if he/she decides to
; advance the frame him/herself, then any subsequent plots draw (in which
; the device coordinates are not recalculated), may be drawn incorrectly.

然后这个是8657上下的:
    if(force_x_linear.or.force_x_log.or.force_y_linear.or.force_y_log)
      overlay_plot_object = plot_object
      delete(plot_object)

      plot_object = overlay_irregular(wks,wksname,overlay_plot_object,\
                                      data_object,force_x_linear,\
                                      force_y_linear,force_x_log, \
                                      force_y_log,"contour",llres)
    end if

    draw_and_frame(wks,plot_object,calldraw,callframe,0,maxbb)

; Return plot object and data object (as attribute of plot object).

    plot_object@data = data_object
    return(plot_object)
end

然后关于第二个问题,因为服务器上本来有嘛,所以有很多个,但是应该指向对了就不会有问题吧?我给你看看我的.bashrc

##set NCL ##
export NCARG_ROOT=/home/lux/other
export PATH=/home/lux/other/bin:$PATH

密码修改失败请联系微信:mofangbao
 楼主| 发表于 2011-11-1 21:22:47 | 显示全部楼层
ztftom 发表于 2011-11-1 19:37
从你贴的第一个帖子来看,可能是图形显示的问题,应该是在建workstation时,没法找到你的X11,你是在serv ...

是在服务器上转的,额~这个是3077附近的
  if(calldraw)
    draw(plot)
  end if

  if(callframe)
    frame(wks)           ; advance the frame
;
; Only set the device coordinates back if the frame is advanced, because
; if we do it when the frame hasn't been advanced, then anything that
; gets drawn on this plot later will be drawn under the old device
; coordinates.
;
; This means that the user will have to be aware that if he/she decides to
; advance the frame him/herself, then any subsequent plots draw (in which
; the device coordinates are not recalculated), may be drawn incorrectly.

然后这个是8657上下的:
    if(force_x_linear.or.force_x_log.or.force_y_linear.or.force_y_log)
      overlay_plot_object = plot_object
      delete(plot_object)

      plot_object = overlay_irregular(wks,wksname,overlay_plot_object,\
                                      data_object,force_x_linear,\
                                      force_y_linear,force_x_log, \
                                      force_y_log,"contour",llres)
    end if

    draw_and_frame(wks,plot_object,calldraw,callframe,0,maxbb)

; Return plot object and data object (as attribute of plot object).

    plot_object@data = data_object
    return(plot_object)
end

然后关于第二个问题,因为服务器上本来有嘛,所以有很多个,但是应该指向对了就不会有问题吧?我给你看看我的.bashrc

##set NCL ##
export NCARG_ROOT=/home/lux/other
export PATH=/home/lux/other/bin:$PATH

密码修改失败请联系微信:mofangbao
发表于 2011-11-1 22:20:32 | 显示全部楼层
陪着你的路人 发表于 2011-11-1 21:22
是在服务器上转的,额~这个是3077附近的
  if(calldraw)
    draw(plot)

如果是服务器的话,应该是没有Xwindows的原因。你画图的时候不要选X11,选pdf或者ps输出试试吧。第二个问题我不是很清楚哪里出的问题,看起来你的.bashrc里设置的也没什么特别的。能把你的test code贴出来么?
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2011-11-1 23:13:22 | 显示全部楼层
ztftom 发表于 2011-11-1 22:20
如果是服务器的话,应该是没有Xwindows的原因。你画图的时候不要选X11,选pdf或者ps输出试试吧。第二个问 ...

哇~~~高人啊~~~果然行了,pdf可以~~~谢谢啦~~~~
code应该很简单的,按照手册上的来的
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
begin
a=addfile("/home/lux/test1/WPS/geo_em.d01.nc","r")

type="x11"
;type="pdf"
;type="ps"
;type="ncgm"
wks=gsn_open_wks(type,"plt_geo_1")
ter=a->HGT_M(0,:,:)
plot=gsn_contour(wks,ter,True)
end

密码修改失败请联系微信:mofangbao
发表于 2011-11-2 14:40:05 | 显示全部楼层
恩,在server上的话没有Xwindows, 所以不能选x11。挺常见的问题。如果有时间的话,希望你能把这个问题描述得更清楚一些,然后换个标题发一个帖子,以便以后有人查阅这个问题。
密码修改失败请联系微信:mofangbao
0
早起挑战累计收入
发表于 2011-11-2 14:50:57 | 显示全部楼层
陪着你的路人 发表于 2011-11-1 23:13
哇~~~高人啊~~~果然行了,pdf可以~~~谢谢啦~~~~
code应该很简单的,按照手册上的来的
load "$NCARG_ROO ...

非常赞成@ztftom的说法,发个帖子总结下经验呗
密码修改失败请联系微信:mofangbao
发表于 2011-11-2 15:16:00 | 显示全部楼层
mofangbao 发表于 2011-11-2 14:50
非常赞成@ztftom的说法,发个帖子总结下经验呗

恩,主要是这个帖子里包含两个主题,不方便以后的人查阅。
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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