爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
楼主: river

[分享资料] GrADS中批量描述的基础形式和基础模板

  [复制链接]
发表于 2014-9-2 10:48:44 | 显示全部楼层
在么,river,问你一个问你啊,有点急,关于把grib文件格式解析成文本格式该如何处理,第一次接触
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-9-2 12:32:17 | 显示全部楼层
杨敖彪 发表于 2014-9-2 10:48
在么,river,问你一个问你啊,有点急,关于把grib文件格式解析成文本格式该如何处理,第一次接触

论坛很多相关帖子,自己搜索一下
密码修改失败请联系微信:mofangbao
发表于 2014-9-24 08:42:57 | 显示全部楼层
正需要
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2014-9-28 18:56:18 | 显示全部楼层
您好,想请教一下。合并t639模式数据时的问题,一共25个时次的数据,合并之后只有前8个时次能画出图,请问一下原因好吗?谢谢。
这是合并前的ctl,能正确出图
dset E:\test\1\Z_NAFP_C_BABJ_2014092700_P_gmf-639-2014092700000.grib1
index E:\test\1\Z_NAFP_C_BABJ_2014092700_P_gmf-639-2014092700000.grib1.idx
undef 9.999E+20
title E:\test\1\Z_NAFP_C_BABJ_2014092700_P_gmf-639-2014092700000.grib1
*  produced by grib2ctl v0.9.12.5p39c
dtype grib 255
options yrev
ydef 91 linear 0.000000 1
xdef 181 linear 0.000000 1.000000
tdef 1 linear 00Z27sep2014 1mo
*  z has 9 levels, for prs
zdef 9 levels
1000 925 850 700 600 500 400 300 200
vars 22
DEPRprs 3 18,100,0 ** (profile) Dew point depression [K]
EPOTprs 3 14,100,0 ** (profile) Pseudo-adiabatic pot. temp. [K]
HGTprs 9 7,100,0 ** (profile) Geopotential height [gpm]
KXmsl  0 133,102,0  ** unknown level K index [K]
LRGHRprs 3 241,100,0 ** (profile) Large scale condensation heating [K/s]
MCONVprs 3 135,100,0 ** (profile) Horizontal moisture divergence [kg/kg/s]
PRESsfc  0 1,1,0  ** surface Pressure [Pa]
PRMSLmsl  0 2,102,0  ** unknown level Pressure reduced to MSL [Pa]
RELDprs 4 44,100,0 ** (profile) Relative divergence
RELVprs 4 43,100,0 ** (profile) Relative vorticity
RHprs 9 52,100,0 ** (profile) Relative humidity [%]
RH2m  0 52,105,2 ** 2 m above ground Relative humidity [%]
SPFHprs 9 51,100,0 ** (profile) Specific humidity [kg/kg]
SXprs 3 134,100,0 ** (profile) Sweat index [K]
TMPprs 9 11,100,0 ** (profile) Temp. [K]
TMP2m  0 11,105,2 ** 2 m above ground Temp. [K]
TTRADprs 3 216,100,0 ** (profile) Temp. tendency by all radiation [K/s]
UGRDprs 9 33,100,0 ** (profile) u wind [m/s]
UGRD10m  0 33,105,10 ** 10 m above ground u wind [m/s]
VGRDprs 9 34,100,0 ** (profile) v wind [m/s]
VGRD10m  0 34,105,10 ** 10 m above ground v wind [m/s]
VVELprs 9 39,100,0 ** (profile) Pressure vertical velocity [Pa/s]
ENDVARS

这是合并之后的
dset E:\test\1\Z_NAFP_C_BABJ_2014092700_P_gmf-639-2014092700%h3.grib1
OPTIONS template
index E:\test\1\Z_NAFP_C_BABJ_2014092700_P_gmf-639-2014092700000.grib1.idx
undef 9.999E+20
title E:\test\1\Z_NAFP_C_BABJ_2014092700_P_gmf-639-2014092700000.grib1
*  produced by grib2ctl v0.9.12.5p39c
dtype grib 255
options yrev
ydef 91 linear 0.000000 1
xdef 181 linear 0.000000 1.000000
tdef 25 linear 00Z27sep2014 3hr
*  z has 9 levels, for prs
zdef 9 levels
1000 925 850 700 600 500 400 300 200
vars 22
DEPRprs 3 18,100,0 ** (profile) Dew point depression [K]
EPOTprs 3 14,100,0 ** (profile) Pseudo-adiabatic pot. temp. [K]
HGTprs 9 7,100,0 ** (profile) Geopotential height [gpm]
KXmsl  0 133,102,0  ** unknown level K index [K]
LRGHRprs 3 241,100,0 ** (profile) Large scale condensation heating [K/s]
MCONVprs 3 135,100,0 ** (profile) Horizontal moisture divergence [kg/kg/s]
PRESsfc  0 1,1,0  ** surface Pressure [Pa]
PRMSLmsl  0 2,102,0  ** unknown level Pressure reduced to MSL [Pa]
RELDprs 4 44,100,0 ** (profile) Relative divergence
RELVprs 4 43,100,0 ** (profile) Relative vorticity
RHprs 9 52,100,0 ** (profile) Relative humidity [%]
RH2m  0 52,105,2 ** 2 m above ground Relative humidity [%]
SPFHprs 9 51,100,0 ** (profile) Specific humidity [kg/kg]
SXprs 3 134,100,0 ** (profile) Sweat index [K]
TMPprs 9 11,100,0 ** (profile) Temp. [K]
TMP2m  0 11,105,2 ** 2 m above ground Temp. [K]
TTRADprs 3 216,100,0 ** (profile) Temp. tendency by all radiation [K/s]
UGRDprs 9 33,100,0 ** (profile) u wind [m/s]
UGRD10m  0 33,105,10 ** 10 m above ground u wind [m/s]
VGRDprs 9 34,100,0 ** (profile) v wind [m/s]
VGRD10m  0 34,105,10 ** 10 m above ground v wind [m/s]
VVELprs 9 39,100,0 ** (profile) Pressure vertical velocity [Pa/s]
ENDVARS

数据文件名分别是
Z_NAFP_C_BABJ_2014092700_P_gmf-639-2014092700000
Z_NAFP_C_BABJ_2014092700_P_gmf-639-2014092700003
Z_NAFP_C_BABJ_2014092700_P_gmf-639-2014092700006
。。。
Z_NAFP_C_BABJ_2014092700_P_gmf-639-2014092700072
共25个。
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-9-28 21:02:18 | 显示全部楼层
balfulosa 发表于 2014-9-28 18:56
您好,想请教一下。合并t639模式数据时的问题,一共25个时次的数据,合并之后只有前8个时次能画出图,请问 ...

修改完ctl 之后,有正常生成idx文件吗?
密码修改失败请联系微信:mofangbao
发表于 2014-9-28 21:28:54 | 显示全部楼层
river 发表于 2014-9-28 21:02
修改完ctl 之后,有正常生成idx文件吗?

换乘%f2之后读对了。。还是谢谢您,以后多交流。
密码修改失败请联系微信:mofangbao
发表于 2014-10-7 15:27:35 | 显示全部楼层
和风细雨,重在积累。
密码修改失败请联系微信:mofangbao
发表于 2014-11-20 15:21:40 | 显示全部楼层
楼主,这份批处理您说的我大概明白的。然后自己做了一个批处理文件,和gs.问题就出来了,,,所有00时的结果一样,所有06时的结果一样。。。。
我附上我的批量描述文件:
dset D:\Fortran\ARWpost\201401\201401%d2.dat
options template
options big_endian
undef 1.e30
title  OUTPUT FROM WRF V3.4.1 MODEL
pdef   60  90 lcc  32.000  118.800   30.500   45.500  60.00000  30.00000  118.80000   3000.000   3000.000
xdef  162 linear  117.70152   0.01351351
ydef  199 linear   30.65261   0.01351351
zdef   34 linear 1 1  
tdef   31 linear 00Z01JAN2014     360MN      
VARS    7
pressure      34  0  Model pressure (hPa)
geopt         34  0  Geopotential (m2/s2)
height        34  0  Model height (km)
tk            34  0  Temperature (K)
tc            34  0  Temperature (C)
td            34  0  Dewpoint Temperature (C)
rh            34  0  Relative Humidity (%)
ENDVARS

gs我这样写的;
'reinit'
'open D:/Fortran/ARWpost/a_ctl.ctl'
dy=1
while( dy <=31)
'set gxout fwrite'
'set lat 32.0'
'set lon 118.8'
it=1
while(it<5)
'set t 'it
'q time'
m=substr(result,13,3)
d=substr(result,11,2)
h=substr(result,8,2)
if(dy<10)
    'set fwrite D:/Fortran/ARWpost/201401/2014010'dy''h'.grd'
else
    'set fwrite D:/Fortran/ARWpost/201401/201401'dy''h'.grd'
endif
i=1
***** here,we need to change i ,this time ,we set max i is 34
while(i<35)
'set z 'i
'd height'
'd pressure'
'd tk'
'd tc'
'd td'
'd rh'
i=i+1
endwhile
'disable fwrite'
it=it+1
endwhile
dy=dy +1
endwhile
'reinit'
;


这样的情况让我很郁闷。。。是我理解不到位吗?

文件存放情况

文件存放情况
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-11-20 17:42:36 | 显示全部楼层
白兔糖0217 发表于 2014-11-20 15:21
楼主,这份批处理您说的我大概明白的。然后自己做了一个批处理文件,和gs.问题就出来了,,,所有00时的结 ...

disable fwrite放到循环外面去
密码修改失败请联系微信:mofangbao
发表于 2014-11-20 17:52:09 | 显示全部楼层
river 发表于 2014-11-20 17:42
disable fwrite放到循环外面去

还是报错。。。。 QQ截图20141120175001.png
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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