爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 7215|回复: 2

[作图] ncl 作图和WRF数据三维插值数据问题

[复制链接]

新浪微博达人勋

发表于 2015-7-10 10:34:41 | 显示全部楼层 |阅读模式

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

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

x
1、我将WRF的的数据插值处理,然后输出,数据如下
脚本是load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"  
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"   
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
begin   
; The WRF ARW input file.  
; This needs to have a ".nc" appended, so just do it.
  a = addfile("/data1/wrfout_d01_2014-10-10_00:00:00.nc","r")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; What times and how many time steps are in the data set?
   time = wrf_user_getvar(a,"times",-1)  ; get all times in the file
   ntime = dimsizes(time)         ; number of times in the file
; The specific height levels that we want the data interpolated to.
   height_levels = (/ 10,30,50,70/)   ; height levels to plot - in meter
   height = height_levels
   height_levels@description = "Altitude"
   height_levels@units    = "m"
;====================================================================================
;First get the variables we will need        
    it = -1
    z  = wrf_user_getvar(a, "z",it)        ; grid point height
    tc = wrf_user_getvar(a,"tc",it)        ; T in C
    tc_plane = wrf_user_intrp3d(tc,z,"h",height,0.,False)
    tc_plane@description = "Temperature"
    tc_plane@units       = "C"
;====================================================================================
   ;printVarSummary("min(tc_plane)="+min(tc_plane)+" max(tc_plane)="+max(tc_plane))
   ;print("min(tc)="+min(tc)+" max(tc)="+max(tc))
   print(tc_plane)
;====================================================================================
   delete([/tc, tc_plane/])
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  end
输出的数据全都如图所示
2、画降雨量和降雪量画出来是这样 空白的中间几个字是   CONSTANT FIELD - VALUE IS 0  应该是数据问题,因为没有降雨和降雪,都是0, 数据为0出现warning:ContourPlotInitialize: scalar field is constant; no contour lines will appear; use cnConstFEnableFill to enable fill
   当设置cnConstFEnableFill  为True时,  中间还是会出现CONSTANT FIELD - VALUE IS 0  只不过有颜色,依然出现warning:ContourPlotInitialize: scalar field is constant; no contour lines will appear; use cnConstFEnableFill to enable fill
以上两个问题,有哪位大神知道怎么解决吗  多谢

插值输出数据

插值输出数据
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-11-30 08:47:21 | 显示全部楼层
请问你这个问题解决了吗
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2016-12-1 08:58:04 | 显示全部楼层
zhangqh 发表于 2016-11-30 08:47
请问你这个问题解决了吗

时间过去太久了,应该是没有数据,因为我当时要的是地形高度而不是海拔高度
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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