爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 6382|回复: 1

求助:如何用fwrite提取wrfout中单个变量,指定层次上的数据?

[复制链接]

新浪微博达人勋

发表于 2014-11-10 17:24:57 | 显示全部楼层 |阅读模式

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

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

x
我想从wrfout_d03.dat中提取850hPa上geopt的值,fwrite的gs和ctl等文件如下:
1.对wrfout_d03.ctl做了如下修改
dset e:\wrf\data\wrfout_d03.dat
options  byteswapped
undef 1.e30
title  OUTPUTFROM WRF V3.5.1 MODEL
*pdef  666 399 lcc 29.591  117.547  333.500 200.000  60.00000  30.00000 118.50000   1500.000  1500.000
*xdef 1602 linear  112.09885  0.00675676
*ydef  841 linear  26.67278   0.00675676
xdef 666 linear 112.09885   0.00675676
ydef 399 linear  26.67278   0.00675676
zdef   19levels  
1000.00000
950.00000
900.00000
850.00000

2.提取的gs文件:
'reinit'
'open e:\wrf\data\wrfout_d03.ctl'
'set fwrite e:\wrf\data\geopt\850.grd'
'set gxout fwrite'
'set x 1 666'
'set y 1 399'
'set t 1 31'
'set z 4'
'd geopt'
'disable fwrite'
;

3.对提取出的数据的ctl文件
dset E:\WRF\data\geopt\850.grd
undef 1.e30
title OUTPUT FROM WRF V3.5.1 MODEL
pdef  666 399lcc  29.591  117.547 333.500  200.000  60.00000 30.00000 118.50000   1500.000   1500.000
xdef 1602 linear 112.09885   0.00675676
ydef  841linear   26.67278   0.00675676
*xdef 666 linear 112.09885   0.00675676
*ydef 399 linear  26.67278   0.00675676
zdef 1 levels 850.000000
tdef 31 linear 18Z13JUN2011      60MN     
vars 1
geopt 1  0  Geopotential (m2/s2)
endvars


4.画出的图:
捕获.PNG



麻烦各位大神帮我看一下,问题出现在哪边?万分感激!



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

新浪微博达人勋

 楼主| 发表于 2014-11-11 22:05:27 | 显示全部楼层
{:5_275:}{:5_275:}
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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