请选择 进入手机版 | 继续访问电脑版
爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 19772|回复: 23

NCL新手遇到的问题,救命

[复制链接]

新浪微博达人勋

发表于 2014-4-8 16:30:53 | 显示全部楼层 |阅读模式
NCL
系统平台:
问题截图: -
问题概况: 运行ncl脚本后出现:Huanglei@Huanglei-PC:/home/Huanglei>ncl /home/Huanglei/wrf_CrossSection1.ncl
/home/Huanglei/bin/ncl.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
我看过提问的智慧: 看过
自己思考时长(天): 1

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

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

x
刚刚清风大哥说我提问区不对,帖子被删了。。。改了版好不习惯
Huanglei@Huanglei-PC:/home/Huanglei>ncl /home/Huanglei/wrf_CrossSection1.ncl
/home/Huanglei/bin/ncl.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

我在运行官网那些简单的例子gsun..等是还可以运行并出图,现在参考官网上WRF-NCL自己画就出现了这个问题我的NCL是在cygwin下安装的
我查了ncl。exe。还有加载的两个数据库都有,但是就是出现这个问题。
曲折的学习之路,求路过的大神看看是什么原因


脚本:
就是问号。我刚刚查了,大家遇到的问题都是libc.so文件找不到我的就是问号
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

begin
;
; The WRF ARW input file.  
; This needs to have a ".nc" appended, so just do it.
  a = addfile("/home/Huanglei/data/d03"+".nc","r")


; We generate plots, but what kind do we prefer?
  type = "pdf"
; type = "pdf"
; type = "ps"
; type = "ncgm"
  wks = gsn_open_wks(type,"plt_CrossSection1")


; Set some basic resources
  res = True
  res@MainTitle = "REAL-TIME WRF"
  res@Footer = False
  
  pltres = True


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  FirstTime = True
  times  = wrf_user_getvar(a,"times",-1) ; get times in the file
  ntimes = dimsizes(times)          ; number of times in the file

  mdims = getfilevardimsizes(a,"P") ; get some dimension sizes for the file
  nd = dimsizes(mdims)

;---------------------------------------------------------------

  do it = 0,ntimes-1,2             ; TIME LOOP

    print("Working on time: " + times(it) )
    res@TimeLabel = times(it)   ; Set Valid time to use on plots

    tc  = wrf_user_getvar(a,"tc",it)     ; T in C
    rh = wrf_user_getvar(a,"QICE",it)      ; relative humidity
    z   = wrf_user_getvar(a, "z",it)     ; grid point height

    if ( FirstTime ) then                ; get height info for labels
      zmin = 0.
      zmax = max(z)/1000.
      nz   = floattoint(zmax/2 + 1)
      FirstTime = False
    end if

;---------------------------------------------------------------

          angle = 0.
   
        plane = new(2,float)
        plane = (/ mdims(nd-1)/2, mdims(nd-2)/2 /)    ; pivot point is center of domain (x,y)
        opts = False  

        rh_plane = wrf_user_intrp3d(rh,z,"v",plane,angle,opts)
        tc_plane = wrf_user_intrp3d(tc,z,"v",plane,angle,opts)

        dim = dimsizes(rh_plane)                      ; Find the data span - for use in labels
        zspan = dim(0)

        
      ; Options for XY Plots
        opts_xy                         = res
        opts_xy@tiYAxisString           = "Height (km)"
        opts_xy@cnMissingValPerimOn     = True
        opts_xy@cnMissingValFillColor   = 0
        opts_xy@cnMissingValFillPattern = 11
        opts_xy@tmYLMode                = "Explicit"
        opts_xy@tmYLValues              = fspan(0,zspan,nz)                    ; Create tick marks
        opts_xy@tmYLLabels              = sprintf("%.1f",fspan(zmin,zmax,nz))  ; Create labels   
        opts_xy@tiXAxisFontHeightF      = 0.020
        opts_xy@tiYAxisFontHeightF      = 0.020
        opts_xy@tmXBMajorLengthF        = 0.02
        opts_xy@tmYLMajorLengthF        = 0.02
        opts_xy@tmYLLabelFontHeightF    = 0.015
        opts_xy@PlotOrientation         = tc_plane@Orientation


      ; Plotting options for RH
        opts_rh = opts_xy
        opts_rh@pmLabelBarOrthogonalPosF = -0.07
        opts_rh@cnFillOn                = True
        
      ; Plotting options for Temperature
        opts_tc = opts_xy
        opts_tc@cnInfoLabelOrthogonalPosF = 0.00
        opts_tc@ContourParameters  = (/ 5. /)


      ; Get the contour info for the rh and temp
        contour_tc = wrf_contour(a,wks,tc_plane,opts_tc)
        contour_rh = wrf_contour(a,wks,rh_plane,opts_rh)


      ; MAKE PLOTS         
        plot = wrf_overlays(a,wks,(/contour_rh,contour_tc/),pltres)

      ; Delete options and fields, so we don't have carry over
        delete(opts_tc)
        delete(opts_rh)
        delete(tc_plane)
        delete(rh_plane)

   
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  end do        ; END OF TIME LOOP

end



QQ图片20140408160849.jpg
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-4-8 16:40:49 | 显示全部楼层
你这是画什么图?变量~~~
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-4-8 16:42:18 | 显示全部楼层
andrewsoong 发表于 2014-4-8 16:40
你这是画什么图?变量~~~

画剖面图,变量是Qice,再加上温度垂直分布
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-4-8 16:42:55 | 显示全部楼层
o(∩∩)o...哈哈,我说咋帖子瞬间就木有了。提问有专区了,也好!不过,还要适应一下。

你cd进入ncl可执行程序所在的bin目录,然后运行ldd ncl,看看输出里面有没有类似“not found”之类的,会提示你缺少什么库。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-4-8 16:43:43 | 显示全部楼层
andrewsoong 发表于 2014-4-8 16:40
你这是画什么图?变量~~~

类似于这种
plt_CrossSection1-2.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-4-8 16:46:34 | 显示全部楼层
longlivehj 发表于 2014-4-8 16:42
o(∩∩)o...哈哈,我说咋帖子瞬间就木有了。提问有专区了,也好!不过,还要适应一下。

你cd进入ncl可执 ...

貌似没有啊
QQ图片20140408164509.jpg
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-4-8 16:56:33 | 显示全部楼层

给你发个链接,你用里面提到的一个cygcheck命令试试先。我没有cygwin,所以……
cygcheck
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-4-8 17:03:07 | 显示全部楼层
longlivehj 发表于 2014-4-8 16:56
给你发个链接,你用里面提到的一个cygcheck命令试试先。我没有cygwin,所以……
cygcheck

找到了
cygcheck: track_down:could not find cygheimntlm-0.dll
那接下来我该怎么办?在网上找到这个文件下载后,放到bin文件夹里吗?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-4-8 17:04:45 | 显示全部楼层

1.jpg
没问题啊~~~你的有问题,如果系统一样,我可以拷贝一个你需要的库给你。我的是
Centos 6.4 64位的。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-4-8 17:07:47 | 显示全部楼层
黄小仙儿 发表于 2014-4-8 17:03
找到了
cygcheck: track_down:could not find cygheimntlm-0.dll
那接下来我该怎么办?在网上找到这个 ...

Good!对,下载了放在bin里面!
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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