爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 4982|回复: 2

[作图] 怎么定义三维变量,再怎么把这个变量输出到一个文件里

[复制链接]

新浪微博达人勋

发表于 2015-5-7 14:46:00 | 显示全部楼层 |阅读模式

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

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

x
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
begin
year=ispan(1998,2011,1)
month=(/"01","02","03","04","05","06","07","08","09","10","11","12"/)
n=0
out=addfile("/out.hdf","c")
do i=0,13
  do j=0,11
fnl=addfile("/PF.RPF."+year(i)+month(j)+"_LEVEL.EastAsia.HDF","r")
;lat= fnl->LAT(1:536767)                     ;数据太大
;lon= fnl->LON(1:536767)
;flashcount=fnl->FLASHCOUNT(1:536767)

dimNames=(/"lat","lon","flashcount"/)
dimSizes=(/-1,-1,-1/)

do k=0,536766
if (fnl->LAT(k).gt.0.and.fnl->LAT(k).lt.34)then
  if (fnl->LON(k).gt.80.and.fnl->LON(k).lt.144)then
    count&lat(n)=fnl->LAT(k)
    count&lon(n)=fnl->LON(k)
    count&flashcount(n)=flashcount(k)
    n=n+1
  end if
end if
end do
end do
end do
out->lat=(/lat/)
out->lon=(/lon/)
out->flashcount=(/flashcount/)
end



错误fatal:Could not create (/out.hdf)
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 25 in file flashcount.ncl
25行   count&lat(n)=fnl->LAT(k)



密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-5-7 15:13:58 | 显示全部楼层
haod3e4!!!!!!!!!!!!
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2015-5-7 15:40:23 | 显示全部楼层

纳尼?你说啥?
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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