爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 4729|回复: 13

[分享资料] 2种方法的资料合并出现错误

[复制链接]
发表于 2014-3-21 15:21:01 | 显示全部楼层 |阅读模式

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

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

x
我分别试了俩种方法试图将多个时次的hdf资料提取某些变量并合并,俩种方法都出现了错误
1
第一种我逐个打开文件,试图合并,grads显示下图错误,还能形成数据,但数据已发生改变
捕获.PNG
gs:
'reinit'
'sdfopen d:/zssdata/merra2/MERRA300.prod.assim.inst3_3d_asm_Cp.20110710.hdf'
'sdfopen d:/zssdata/merra2/MERRA300.prod.assim.inst3_3d_asm_Cp.20110711.hdf'
'sdfopen d:/zssdata/merra2/MERRA300.prod.assim.inst3_3d_asm_Cp.20110712.hdf'
'sdfopen d:/zssdata/merra2/MERRA300.prod.assim.inst3_3d_asm_Cp.20110713.hdf'
'sdfopen d:/zssdata/merra2/MERRA300.prod.assim.inst3_3d_asm_Cp.20110714.hdf'
'sdfopen d:/zssdata/merra2/MERRA300.prod.assim.inst3_3d_asm_Cp.20110715.hdf'
'set fwrite d:/zssdata/merra2/U.grd'
'set gxout fwrite'
i=1
while(i<=6)
'set dfile 'i''
tt=1
while(tt<=48)
'set t 'tt
zz=1
while(zz<=42)
'set z 'zz
'set x 108.125 130.625'
'set y 24.375 40.625'
'd U'
zz=zz+1
endwhile
tt=tt+1
endwhile
i=i+1
endwhile
'disable fwrite'
'reinit'
;
2
第二种我编写了一个批量描述ctl,来实现,grads出现下图错误

捕获.PNG
ctl:
dset d:/zssdata/merra2/MERRA300.prod.assim.inst3_3d_asm_Cp.201107%d2.hdf
options template
title MERRA reanalysis. GEOS-5.2.0
dtype hdfsds
undef 1e+15
xdef  288 linear -179.375 1.25
ydef  144 linear -89.375 1.25
zdef  42 levels 1000 975 950 925 900 875 850 825 800 775 750 725 700 650 600 550 500 450 400 350 300 250 200 150 100 70 50 40 30 20 10 7 5 4 3 2 1 0.7 0.5 0.4 0.3 0.1
tdef  48 linear 00Z10Jul2011 180mn
vars 18
SLP=>slp 0 t,y,x Sea-level pressure
PS=>ps 0 t,y,x Surface pressure
PHIS=>phis 0 t,y,x Surface Geopotential
H=>h 42 t,z,y,x Geopotential height
O3=>o3 42 t,z,y,x Ozone Mixing Ratio
QV=>qv 42 t,z,y,x Specific humidity
QL=>ql 42 t,z,y,x Cloud liquid water mixing ratio
QI=>qi 42 t,z,y,x Cloud ice mixing ratio
RH=>rh 42 t,z,y,x Ralative humidity
T=>t 42 t,z,y,x Air Temperature
U=>u 42 t,z,y,x Eastward wind component
V=>v 42 t,z,y,x Northward wind component
EPV=>epv 42 t,z,y,x Ertel potential vorticity
OMEGA=>omega 42 t,z,y,x Vertical pressure velocity
XDim=>xdim 0 x XDim
YDim=>ydim 0 y YDim
Height=>height 42 z Height
Time=>time 0 t Time
endvars


gs:
'reinit'
'open d:/zssdata/merra2/20110710test2.ctl'
'set fwrite d:/zssdata/merra2/U.dat'
'set gxout fwrite'
tt=1
while(tt<=48)
'set t 'tt
zz=1
while(zz<=42)
'set z 'zz
'set lon 108.125 130.625'
'set lat 24.375 40.625'
'd U'
zz=zz+1
endwhile
tt=tt+1
endwhile
'disable fwrite'
;

请问这俩个方法都错在了什么地方。。
密码修改失败请联系微信:mofangbao
发表于 2014-3-21 17:32:45 | 显示全部楼层

回帖奖励 +10 金钱

先看一下基础知识吧
密码修改失败请联系微信:mofangbao
发表于 2014-3-21 17:56:35 | 显示全部楼层

回帖奖励 +10 金钱

grands 直接可以打开.hdf格式的文件吗?
密码修改失败请联系微信:mofangbao
发表于 2014-3-23 12:47:47 | 显示全部楼层

回帖奖励 +10 金钱

'set x 108.125 130.625'
'set y 24.375 40.625'里面应该改成lon,lat吧
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-3-24 20:55:53 | 显示全部楼层
密码修改失败请联系微信:mofangbao
发表于 2014-3-25 09:59:14 | 显示全部楼层

回帖奖励 +10 金钱

{:eb502:}{:eb502:}{:eb502:}{:eb502:}{:eb502:}{:eb502:}{:eb502:}{:eb502:}{:eb502:}
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2014-3-25 17:11:15 | 显示全部楼层

回帖奖励 +10 金钱

追风的阳光 发表于 2014-3-24 20:55
请问到底是哪儿有问题呢。。。还是没发现。。

基础的错误,看一下手册就知道了
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-3-27 11:53:52 | 显示全部楼层
river 发表于 2014-3-25 17:11
基础的错误,看一下手册就知道了

求问。。到底是哪儿的问题啊。。搞几天了。。
密码修改失败请联系微信:mofangbao
发表于 2014-3-27 15:36:35 | 显示全部楼层
追风的阳光 发表于 2014-3-27 11:53
求问。。到底是哪儿的问题啊。。搞几天了。。

地板的回答,您老人家都看不见吗。
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-3-27 16:02:10 | 显示全部楼层
river 发表于 2014-3-27 15:36
地板的回答,您老人家都看不见吗。

不是lon,lat的问题啊。。。原先写的lon,lat,后来试着写的x,y,还是一样的错误。。
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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