爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 5817|回复: 2

求助,NCL画FLUX通量有错误

[复制链接]
发表于 2014-4-4 17:38:40 | 显示全部楼层 |阅读模式

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

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

x
这是我的代码,请各位大神指点
  2 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
  3 load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
  4 ;load "./WRFUserARW.ncl"
  5
  6 begin
  7 ;
  8 ; The WRF ARW input file.
  9 ; This needs to have a ".nc" appended, so just do it.
10   a = addfile("wrfout_d01_2014-03-19_00:00:00.nc","r")
11
12
13 ; We generate plots, but what kind do we prefer?
14   type = "x11"
15 ; type = "pdf"
16 ; type = "ps"
17 ; type = "ncgm"
18   wks = gsn_open_wks(type,"plt_Surface2")
19
20 ; Set some Basic Plot options
21   res = True
22   res@MainTitle                   = "REAL-TIME WRF"
23
pltres = True
25   mpres = True
26
27
28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
30
31 ; What times and how many time steps are in the data set?
32   times = wrf_user_getvar(a,"times",-1)  ; get all times in the file
33   ntimes = dimsizes(times)         ; number of times in the file
34
35 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
36
37     res@TimeLabel = times(0)    ; Set Valid time to use on plots
38
39 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
40  ; HFX_FORCE
41
42       hfx= wrf_user_getvar(a,"HFX_FORCE",0)
43       opts = res
44      hfx@description= "HFX_FORCE"
45      hfx@units="Wm-2"
46       opts@cnFillOn = True
   opts@cnLinesOn =True
48       opts@ContourParameters = (/-10., 50.,1. /)
49       contour = wrf_contour(a,wks,hfx,opts)
50       plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
51
52 end

错误是:fatal:Number of dimensions in parameter (2) of (wrf_contour) is (1), (2) dimensions were expected
fatal:Execute: Error occurred at or near line 49 in file hfx.nc


密码修改失败请联系微信:mofangbao
发表于 2014-4-4 22:15:44 | 显示全部楼层
hfx是一维的,只有一个time维。一维数据咋做等值线图啊?!
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-4-5 09:27:41 | 显示全部楼层
longlivehj 发表于 2014-4-4 22:15
hfx是一维的,只有一个time维。一维数据咋做等值线图啊?!

我本来还觉得这个加了时间维,会更靠谱呢,,,,
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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