爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
12
返回列表 发新帖
楼主: islandowner

求助,ncl程序运行出现错误

[复制链接]

新浪微博达人勋

 楼主| 发表于 2015-11-8 13:18:44 | 显示全部楼层
lanlaniris 发表于 2015-11-7 19:11
你怎么改成四维的?改完以后的报错信息是什么
你之后的错误应该都是这一条引起的,这个改了,应该一系列 ...

我把DATA改成了这样,相应错误行也不见了
if (getfilevartypes(f, varname).eq."short") then      ; clarity
      DATA = short2flt(f->$varname$(iYYYY,:,:,:))         
  else
      DATA = f->$varname$(iYYYY,:,:,:)
  end if
不过后面100零几行的data也出现了问题,然后改成这样
if (REDUCE) then
      data  = DATA(:,:, ::nskip,{lonL:lonR:mskip})
  else
      data  = DATA(:,:,:,{lonL:lonR})
  end if
  delete(DATA)         
目前的错误是下面这些

Variable: DATA
Type: float
Total Size: 52876800 bytes
            13219200 values
Number of Dimensions: 4
Dimensions and sizes:        [time | 612] x [depth | 1] x [lat | 120] x [lon | 180]
Coordinates:
            time: [-23.5..587.5]
            depth: [5.01..5.01]
            lat: [-29.75..29.75]
            lon: [30.25..119.75]
Number Of Attributes: 6
  pointwidth :         1
  standard_name :        sea_water_temperature
  missing_value :        -9.99e+33
  long_name :        TEMPERATURE
  units :        Celsius_scale
  _FillValue :        -9.99e+33

Variable: data
Type: float
Total Size: 52876800 bytes
            13219200 values
Number of Dimensions: 4
Dimensions and sizes:        [time | 612] x [depth | 1] x [lat | 120] x [lon | 180]
Coordinates:
            time: [-23.5..587.5]
            depth: [5.01..5.01]
            lat: [-29.75..29.75]
            lon: [30.25..119.75]
Number Of Attributes: 6
  _FillValue :        -9.99e+33
  units :        Celsius_scale
  long_name :        TEMPERATURE
  missing_value :        -9.99e+33
  standard_name :        sea_water_temperature
  pointwidth :         1
fatal:Number of dimensions in parameter (0) of (clmMonTLL) is (4), (3) dimensions were expected
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 114 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Number of dimensions in parameter (0) of (calcMonAnomTLL) is (4), (3) dimensions were expected
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 117 in file /home/gyy/pop/prn_osc_pat_1.ncl


Variable: datalp
Type: float
Total Size: 52876800 bytes
            13219200 values
Number of Dimensions: 4
Dimensions and sizes:        [time | 612] x [depth | 1] x [lat | 120] x [lon | 180]
Coordinates:
            time: [-23.5..587.5]
            depth: [5.01..5.01]
            lat: [-29.75..29.75]
            lon: [30.25..119.75]
Number Of Attributes: 7
  _FillValue :        -9.99e+33
  units :        Celsius_scale
  long_name :        Low Pass: TEMPERATURE
  missing_value :        -9.99e+33
  standard_name :        sea_water_temperature
  pointwidth :         1
  wgt_runave_op_ncl :        wgt_runave_n
fatal:["Execute.c":7432]:performASSIGN_VAR_VAR_OP: Number of subscripts on rhs do not match
                        number of dimensions of variable, (3) Subscripts used, (4) �Ã�

fatal:["Execute.c":8128]:Execute: Error occurred at or near line 150 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Variable (xlp) is undefined
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 156 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Variable (xlp) is undefined
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 157 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Variable (eof) is undefined
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 159 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Variable (eof_ts) is undefined
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 160 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Variable (eof) is undefined
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 166 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Variable (pop_results) is undefined
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 167 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Undefined identifier: (pop_results) is undefined, can't continue
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 175 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Variable (pop_ts) is undefined
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 176 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Undefined identifier: (pop_results) is undefined, can't continue
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 179 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Variable (pop_pat) is undefined
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 180 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Variable (pop_results) is undefined
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 183 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:["Execute.c":8128]:Execute: Error occurred at or near line 191 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Variable (yyyymm) is undefined
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 192 in file /home/gyy/pop/prn_osc_pat_1.ncl

fatal:Variable (yyyymm) is undefined
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 194 in file /home/gyy/pop/prn_osc_pat_1.ncl
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-11-8 14:49:49 | 显示全部楼层
islandowner 发表于 2015-11-8 13:18
我把DATA改成了这样,相应错误行也不见了
if (getfilevartypes(f, varname).eq."short") then      ; c ...

你是函数clmmontll用的有问题。你查一下官网里面的解释说明。
要求clmmomtll(x)里面x是三维的,x(time,lat,lon)
你之前如果函数维数顺序不对,要改一下
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-11-8 20:07:41 | 显示全部楼层
lanlaniris 发表于 2015-11-8 14:49
你是函数clmmontll用的有问题。你查一下官网里面的解释说明。
要求clmmomtll(x)里面x是三维的,x(tim ...

谢谢你的提醒,我把data改成三维了如下,(但不知这样符合之前的DATA的维数设置不)
if (REDUCE) then
      data  = DATA(:,::nskip,{lonL:lonR:mskip})
  else
      data  = DATA(:,:,{lonL:lonR})
  end if
运行后如下,不知什么原因(段错误,核心转储是什么意思)
gyy@gyy-virtual-machine:~$ ncl /home/gyy/pop/prn_osc_pat_1.ncl
Copyright (C) 1995-2013 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.1.2
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.

Variable: DATA
Type: float
Total Size: 52876800 bytes
            13219200 values
Number of Dimensions: 4
Dimensions and sizes:        [time | 612] x [depth | 1] x [lat | 120] x [lon | 180]
Coordinates:
            time: [-23.5..587.5]
            depth: [5.01..5.01]
            lat: [-29.75..29.75]
            lon: [30.25..119.75]
Number Of Attributes: 6
  pointwidth :         1
  standard_name :        sea_water_temperature
  missing_value :        -9.99e+33
  long_name :        TEMPERATURE
  units :        Celsius_scale
  _FillValue :        -9.99e+33
段错误 (核心已转储)
gyy@gyy-virtual-machine:~$
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-6-16 10:52:16 | 显示全部楼层
请问一下你最上面的load home目录下的三个ncl是怎么来的啊?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-6-16 15:04:02 | 显示全部楼层
晓小 发表于 2017-6-16 10:52
请问一下你最上面的load home目录下的三个ncl是怎么来的啊?

pop程序打包一起的啊,是被调用的,在ncl官网或者家园搜索pop程序可以找到
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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