爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 5372|回复: 5

[作图] 绘制wrfchemi_00z_d02文件变量E_PM_10图出错

[复制链接]
发表于 2016-12-8 20:37:37 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 悠然一梦123 于 2016-12-8 20:40 编辑

绘制E_PM_10,出现下列错误提示
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 13 in file E_PM_10。
脚本如下:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

begin
a = addfile("/WRF/WRFV3/test/em_real/wrfchemi_00z_d02","r")

wks = gsn_open_wks(pdf,"E1")

ter = a->E_PM_10(0,0,:,:)

ter!0="lat"
ter&lat=E_PM_10&lat(错误提示行)
ter!1="lon"
ter&lon=E_PM_10&lon
ter&lat@units = "degrees_north"
ter&lon@units = "degrees_east"

res                   = True                  
res@cnFillOn          = True                                
res@cnLinesOn         = False                  
res@cnLevelSelectionMode = "ManualLevels"      
res@cnMinLevelValF       = 0                  
res@cnMaxLevelValF       =  0.5                  
res@cnLevelSpacingF      =  0.05                 
res@mpDataSetName              = "Earth..4"
res@mpDataBaseVersion          = "MediumRes"
res@mpAreaMaskingOn            = True
res@mpMaskAreaSpecifiers       = (/"China"/)
res@mpOutlineSpecifiers        = (/"China","China:Provinces"/)

plot = gsn_csm_contour_map(wks,ter,res)
end

E_PM_10变量如下:
float E_PM_10(Time, emissions_zdim, south_north, west_east) ;
                E_PM_10:FieldType = 104 ;
                E_PM_10:MemoryOrder = "XYZ" ;
                E_PM_10:description = "EMISSIONS" ;
                E_PM_10:units = "mol km^-2 hr^-1" ;
                E_PM_10:stagger = "" ;
                E_PM_10:coordinates = "XLONG XLAT" ;

密码修改失败请联系微信:mofangbao
发表于 2016-12-8 20:46:49 | 显示全部楼层
PM_10=wrf_user_getvar(a,“E_PM_10”)
ter=PM_10(0,0,:,:)
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2016-12-8 20:58:05 | 显示全部楼层
qiu79879 发表于 2016-12-8 20:46
PM_10=wrf_user_getvar(a,“E_PM_10”)
ter=PM_10(0,0,:,:)


修改添加你所说的
E_PM_10=wrf_user_getvar(a,"E_PM_10",0)
ter=E_PM_10(0,:,:),出现如下错误提示

(0)        check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.
(0)        A valid latitude coordinate array should have a 'units' attribute equal to one of the following values:
(0)            'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0)        check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.
(0)        A valid longitude coordinate array should have a 'units' attribute equal to one of the following values:
(0)            'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
密码修改失败请联系微信:mofangbao
发表于 2016-12-8 20:59:10 | 显示全部楼层
ter=wrf_user_getvar(a,"E_PM_10",0)
就行了,如果你不做循环
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2016-12-8 21:01:08 | 显示全部楼层
qiu79879 发表于 2016-12-8 20:59
ter=wrf_user_getvar(a,"E_PM_10",0)
就行了,如果你不做循环

数据就一个时次的,没做循环
密码修改失败请联系微信:mofangbao
发表于 2019-4-10 11:36:20 | 显示全部楼层
wrfchem用ncl作图变量在哪里查啊?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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