爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5799|回复: 6

[脚本编辑] 批量处理grib2后生成共用的一个ctl文件

[复制链接]

新浪微博达人勋

发表于 2020-1-11 14:08:42 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 Bravo_lff 于 2020-1-11 21:38 编辑

想请教一下各位前辈,在按照兰溪的步骤之后,批量处理了ncep的grib2格式的数据,得到了一个共用ctl文件之后,该怎么利用这个ctl文件得到相应的位势、温度等图像?我的ctl文件是24个时次的小时数据得到的,可是当创建gs文件时可以直接用Grads进行run吗?grads显示无法读取描述文件ctl,我该怎么写gs文件呢?刚学习grads不久,问题可能有些肤浅,希望大神能进行一些指导~
不知道ctl和gs问题在哪里?想知道怎么批量的画出位势/温度等变量的图?

2011072800.ctl

11.35 KB, 下载次数: 3, 下载积分: 金钱 -5

这是生成的共用的ctl

2011072800.gs

820 Bytes, 下载次数: 7, 下载积分: 金钱 -5

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

新浪微博达人勋

发表于 2020-1-11 16:13:36 | 显示全部楼层

回帖奖励 +1 金钱

vars 127 后面应该还有
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2020-1-11 16:24:33 | 显示全部楼层
本帖最后由 Bravo_lff 于 2020-1-11 16:28 编辑
苏拉苏拉 发表于 2020-1-11 16:13
vars 127 后面应该还有

我没有完全贴出来,因为字数限制好像;我重新上传了附件
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2020-1-11 21:39:35 | 显示全部楼层
这是我的ctl
dset D:/DATA/CFSR/2011/20110728/20110728%h2.grib2
options template
index D:/DATA/CFSR/2011/20110728/2011072800.grib2.idx
undef 9.999E+20
title D:/DATA/CFSR/2011/20110728/2011072800.grib2
* produced by g2ctl v0.1.1
* command line options: D:/DATA/CFSR/2011/20110728/2011072800.grib2
* griddef=1:0:(720 x 361):grid_template=0:winds(N/S): lat-lon grid:(720 x 361) units 1e-06 input WE:NS output WE:SN res 48 lat 90.000000 to -90.000000 by 0.500000 lon 0.000000 to 359.500000 by 0.500000 #points=259920:winds(N/S)

dtype grib2
ydef 361 linear -90.000000 0.5
xdef 720 linear 0.000000 0.500000
tdef 24 linear 00Z28jul2011 1hr
* PROFILE hPa
zdef 37 levels 100000 97500 95000 92500 90000 87500 85000 82500 80000 77500 75000 70000 65000 60000 55000 50000 45000 40000 35000 30000 25000 22500 20000 17500 15000 12500 10000 7000 5000 3000 2000 1000 700 500 300 200 100
options pascals
vars 127
no4LFTXsfc   0,1,0   0,7,193 ** surface Best (4 layer) Lifted Index [K]
no5WAVA500mb   0,100,50000   0,3,197 ** 500 mb 5-Wave Geopotential Height Anomaly [gpm]
no5WAVH500mb   0,100,50000   0,3,193 ** 500 mb 5-Wave Geopotential Height [gpm]
ABSVprs    37,100  0,2,10 ** (1000 975 950 925 900.. 7 5 3 2 1) Absolute Vorticity [1/s]
CAPEsfc   0,1,0   0,7,6 ** surface Convective Available Potential Energy [J/kg]
CAPE180_0mb  0,108,18000,0   0,7,6 ** 180-0 mb above ground Convective Available Potential Energy [J/kg]
CINsfc   0,1,0   0,7,7 ** surface Convective Inhibition [J/kg]
CIN180_0mb  0,108,18000,0   0,7,7 ** 180-0 mb above ground Convective Inhibition [J/kg]
CLWMRprs    32,100  0,1,22 ** (1000 975 950 925 900.. 70 50 30 20 10) Cloud Mixing Ratio [kg/kg]
CWATclm   0,200,0   0,6,6 ** entire atmosphere (considered as a single layer) Cloud Water [kg/m^2]
DPT30_0mb  0,108,3000,0   0,0,6 ** 30-0 mb above ground Dew Point Temperature [K]
GPA1000mb   0,100,100000   0,3,9 ** 1000 mb Geopotential Height Anomaly [gpm]
GPA500mb   0,100,50000   0,3,9 ** 500 mb Geopotential Height Anomaly [gpm]
HGTsfc   0,1,0   0,3,5 ** surface Geopotential Height [gpm]
HGTprs    37,100  0,3,5 ** (1000 975 950 925 900.. 7 5 3 2 1) Geopotential Height [gpm]
HGT0p5pv   0,109,5e-07   0,3,5 ** PV=5e-07 (Km^2/kg/s) surface Geopotential Height [gpm]
HGTneg0p5pv   0,109,-5e-07   0,3,5 ** PV=-5e-07 (Km^2/kg/s) surface Geopotential Height [gpm]
HGT1pv   0,109,1e-06   0,3,5 ** PV=1e-06 (Km^2/kg/s) surface Geopotential Height [gpm]
HGTneg1pv   0,109,-1e-06   0,3,5 ** PV=-1e-06 (Km^2/kg/s) surface Geopotential Height [gpm]
HGT1p5pv   0,109,1.5e-06   0,3,5 ** PV=1.5e-06 (Km^2/kg/s) surface Geopotential Height [gpm]
HGTneg1p5pv   0,109,-1.5e-06   0,3,5 ** PV=-1.5e-06 (Km^2/kg/s) surface Geopotential Height [gpm]
HGT2pv   0,109,2e-06   0,3,5 ** PV=2e-06 (Km^2/kg/s) surface Geopotential Height [gpm]
HGTneg2pv   0,109,-2e-06   0,3,5 ** PV=-2e-06 (Km^2/kg/s) surface Geopotential Height [gpm]
HGTtop0C   0,204,0   0,3,5 ** highest tropospheric freezing level Geopotential Height [gpm]
HGT0C   0,4,0   0,3,5 ** 0C isotherm Geopotential Height [gpm]
HGTmwl   0,6,0   0,3,5 ** max wind Geopotential Height [gpm]
HGTtrop   0,7,0   0,3,5 ** tropopause Geopotential Height [gpm]
HLCY3000_0m  0,103,3000,0   0,7,8 ** 3000-0 m above ground Storm Relative Helicity [m^2/s^2]
HLCY1000_0m  0,103,1000,0   0,7,8 ** 1000-0 m above ground Storm Relative Helicity [m^2/s^2]
LFTXsfc   0,1,0   0,7,192 ** surface Surface Lifted Index [K]
O3MRprs    37,100  0,14,192 ** (1000 975 950 925 900.. 7 5 3 2 1) Ozone Mixing Ratio [kg/kg]
PLI30_0mb  0,108,3000,0   0,7,0 ** 30-0 mb above ground Parcel Lifted Index (to 500 mb) [K]
POTsig995   0,104,0.995   0,0,2 ** 0.995 sigma level Potential Temperature [K]
PRESsfc   0,1,0   0,3,0 ** surface Pressure [Pa]
PRESmsl   0,101,0   0,3,0 ** mean sea level Pressure [Pa]
PRES0p5pv   0,109,5e-07   0,3,0 ** PV=5e-07 (Km^2/kg/s) surface Pressure [Pa]
PRESneg0p5pv   0,109,-5e-07   0,3,0 ** PV=-5e-07 (Km^2/kg/s) surface Pressure [Pa]
PRES1pv   0,109,1e-06   0,3,0 ** PV=1e-06 (Km^2/kg/s) surface Pressure [Pa]
PRESneg1pv   0,109,-1e-06   0,3,0 ** PV=-1e-06 (Km^2/kg/s) surface Pressure [Pa]
PRES1p5pv   0,109,1.5e-06   0,3,0 ** PV=1.5e-06 (Km^2/kg/s) surface Pressure [Pa]
PRESneg1p5pv   0,109,-1.5e-06   0,3,0 ** PV=-1.5e-06 (Km^2/kg/s) surface Pressure [Pa]
PRES2pv   0,109,2e-06   0,3,0 ** PV=2e-06 (Km^2/kg/s) surface Pressure [Pa]
PRESneg2pv   0,109,-2e-06   0,3,0 ** PV=-2e-06 (Km^2/kg/s) surface Pressure [Pa]
PRESmwl   0,6,0   0,3,0 ** max wind Pressure [Pa]
PREStrop   0,7,0   0,3,0 ** tropopause Pressure [Pa]
PRMSLmsl   0,101,0   0,3,1 ** mean sea level Pressure Reduced to MSL [Pa]
PWAT30_0mb  0,108,3000,0   0,1,3 ** 30-0 mb above ground Precipitable Water [kg/m^2]
PWATclm   0,200,0   0,1,3 ** entire atmosphere (considered as a single layer) Precipitable Water [kg/m^2]
RHprs    37,100  0,1,1 ** (1000 975 950 925 900.. 7 5 3 2 1) Relative Humidity [%]
RHsg330_1000  0,104,0.33,1   0,1,1 ** 0.33-1 sigma layer Relative Humidity [%]
RHsg440_1000  0,104,0.44,1   0,1,1 ** 0.44-1 sigma layer Relative Humidity [%]
RHsg720_940  0,104,0.72,0.94   0,1,1 ** 0.72-0.94 sigma layer Relative Humidity [%]
RHsg440_720  0,104,0.44,0.72   0,1,1 ** 0.44-0.72 sigma layer Relative Humidity [%]
RHsig995   0,104,0.995   0,1,1 ** 0.995 sigma level Relative Humidity [%]
RH30_0mb  0,108,3000,0   0,1,1 ** 30-0 mb above ground Relative Humidity [%]
RHclm   0,200,0   0,1,1 ** entire atmosphere (considered as a single layer) Relative Humidity [%]
RHtop0C   0,204,0   0,1,1 ** highest tropospheric freezing level Relative Humidity [%]
RH0C   0,4,0   0,1,1 ** 0C isotherm Relative Humidity [%]
SPFHprs    37,100  0,1,0 ** (1000 975 950 925 900.. 7 5 3 2 1) Specific Humidity [kg/kg]
SPFH30_0mb  0,108,3000,0   0,1,0 ** 30-0 mb above ground Specific Humidity [kg/kg]
STRMprs    37,100  0,2,4 ** (1000 975 950 925 900.. 7 5 3 2 1) Stream Function [m^2/s]
TMPprs    37,100  0,0,0 ** (1000 975 950 925 900.. 7 5 3 2 1) Temperature [K]
TMP_1829m   0,102,1829   0,0,0 ** 1829 m above mean sea level Temperature [K]
TMP_2743m   0,102,2743   0,0,0 ** 2743 m above mean sea level Temperature [K]
TMP_3658m   0,102,3658   0,0,0 ** 3658 m above mean sea level Temperature [K]
TMP_4572m   0,102,4572   0,0,0 ** 4572 m above mean sea level Temperature [K]
TMPsig995   0,104,0.995   0,0,0 ** 0.995 sigma level Temperature [K]
TMP30_0mb  0,108,3000,0   0,0,0 ** 30-0 mb above ground Temperature [K]
TMP0p5pv   0,109,5e-07   0,0,0 ** PV=5e-07 (Km^2/kg/s) surface Temperature [K]
TMPneg0p5pv   0,109,-5e-07   0,0,0 ** PV=-5e-07 (Km^2/kg/s) surface Temperature [K]
TMP1pv   0,109,1e-06   0,0,0 ** PV=1e-06 (Km^2/kg/s) surface Temperature [K]
TMPneg1pv   0,109,-1e-06   0,0,0 ** PV=-1e-06 (Km^2/kg/s) surface Temperature [K]
TMP1p5pv   0,109,1.5e-06   0,0,0 ** PV=1.5e-06 (Km^2/kg/s) surface Temperature [K]
TMPneg1p5pv   0,109,-1.5e-06   0,0,0 ** PV=-1.5e-06 (Km^2/kg/s) surface Temperature [K]
TMP2pv   0,109,2e-06   0,0,0 ** PV=2e-06 (Km^2/kg/s) surface Temperature [K]
TMPneg2pv   0,109,-2e-06   0,0,0 ** PV=-2e-06 (Km^2/kg/s) surface Temperature [K]
TMPmwl   0,6,0   0,0,0 ** max wind Temperature [K]
TMPtrop   0,7,0   0,0,0 ** tropopause Temperature [K]
TOZNEclm   0,200,0   0,14,0 ** entire atmosphere (considered as a single layer) Total Ozone [Dobson]
UGRDprs    37,100  0,2,2 ** (1000 975 950 925 900.. 7 5 3 2 1) U-Component of Wind [m/s]
UGRD_1829m   0,102,1829   0,2,2 ** 1829 m above mean sea level U-Component of Wind [m/s]
UGRD_2743m   0,102,2743   0,2,2 ** 2743 m above mean sea level U-Component of Wind [m/s]
UGRD_3658m   0,102,3658   0,2,2 ** 3658 m above mean sea level U-Component of Wind [m/s]
UGRD_4572m   0,102,4572   0,2,2 ** 4572 m above mean sea level U-Component of Wind [m/s]
UGRDsig995   0,104,0.995   0,2,2 ** 0.995 sigma level U-Component of Wind [m/s]
UGRD30_0mb  0,108,3000,0   0,2,2 ** 30-0 mb above ground U-Component of Wind [m/s]
UGRD0p5pv   0,109,5e-07   0,2,2 ** PV=5e-07 (Km^2/kg/s) surface U-Component of Wind [m/s]
UGRDneg0p5pv   0,109,-5e-07   0,2,2 ** PV=-5e-07 (Km^2/kg/s) surface U-Component of Wind [m/s]
UGRD1pv   0,109,1e-06   0,2,2 ** PV=1e-06 (Km^2/kg/s) surface U-Component of Wind [m/s]
UGRDneg1pv   0,109,-1e-06   0,2,2 ** PV=-1e-06 (Km^2/kg/s) surface U-Component of Wind [m/s]
UGRD1p5pv   0,109,1.5e-06   0,2,2 ** PV=1.5e-06 (Km^2/kg/s) surface U-Component of Wind [m/s]
UGRDneg1p5pv   0,109,-1.5e-06   0,2,2 ** PV=-1.5e-06 (Km^2/kg/s) surface U-Component of Wind [m/s]
UGRD2pv   0,109,2e-06   0,2,2 ** PV=2e-06 (Km^2/kg/s) surface U-Component of Wind [m/s]
UGRDneg2pv   0,109,-2e-06   0,2,2 ** PV=-2e-06 (Km^2/kg/s) surface U-Component of Wind [m/s]
UGRDmwl   0,6,0   0,2,2 ** max wind U-Component of Wind [m/s]
UGRDtrop   0,7,0   0,2,2 ** tropopause U-Component of Wind [m/s]
USTM6000_0m  0,103,6000,0   0,2,194 ** 6000-0 m above ground U-Component Storm Motion [m/s]
VGRDprs    37,100  0,2,3 ** (1000 975 950 925 900.. 7 5 3 2 1) V-Component of Wind [m/s]
VGRD_1829m   0,102,1829   0,2,3 ** 1829 m above mean sea level V-Component of Wind [m/s]
VGRD_2743m   0,102,2743   0,2,3 ** 2743 m above mean sea level V-Component of Wind [m/s]
VGRD_3658m   0,102,3658   0,2,3 ** 3658 m above mean sea level V-Component of Wind [m/s]
VGRD_4572m   0,102,4572   0,2,3 ** 4572 m above mean sea level V-Component of Wind [m/s]
VGRDsig995   0,104,0.995   0,2,3 ** 0.995 sigma level V-Component of Wind [m/s]
VGRD30_0mb  0,108,3000,0   0,2,3 ** 30-0 mb above ground V-Component of Wind [m/s]
VGRD0p5pv   0,109,5e-07   0,2,3 ** PV=5e-07 (Km^2/kg/s) surface V-Component of Wind [m/s]
VGRDneg0p5pv   0,109,-5e-07   0,2,3 ** PV=-5e-07 (Km^2/kg/s) surface V-Component of Wind [m/s]
VGRD1pv   0,109,1e-06   0,2,3 ** PV=1e-06 (Km^2/kg/s) surface V-Component of Wind [m/s]
VGRDneg1pv   0,109,-1e-06   0,2,3 ** PV=-1e-06 (Km^2/kg/s) surface V-Component of Wind [m/s]
VGRD1p5pv   0,109,1.5e-06   0,2,3 ** PV=1.5e-06 (Km^2/kg/s) surface V-Component of Wind [m/s]
VGRDneg1p5pv   0,109,-1.5e-06   0,2,3 ** PV=-1.5e-06 (Km^2/kg/s) surface V-Component of Wind [m/s]
VGRD2pv   0,109,2e-06   0,2,3 ** PV=2e-06 (Km^2/kg/s) surface V-Component of Wind [m/s]
VGRDneg2pv   0,109,-2e-06   0,2,3 ** PV=-2e-06 (Km^2/kg/s) surface V-Component of Wind [m/s]
VGRDmwl   0,6,0   0,2,3 ** max wind V-Component of Wind [m/s]
VGRDtrop   0,7,0   0,2,3 ** tropopause V-Component of Wind [m/s]
VPOTprs    37,100  0,2,5 ** (1000 975 950 925 900.. 7 5 3 2 1) Velocity Potential [m^2/s]
VSTM6000_0m  0,103,6000,0   0,2,195 ** 6000-0 m above ground V-Component Storm Motion [m/s]
VVELprs    37,100  0,2,8 ** (1000 975 950 925 900.. 7 5 3 2 1) Vertical Velocity (Pressure) [Pa/s]
VVELsig995   0,104,0.995   0,2,8 ** 0.995 sigma level Vertical Velocity (Pressure) [Pa/s]
VWSH0p5pv   0,109,5e-07   0,2,192 ** PV=5e-07 (Km^2/kg/s) surface Vertical speed sheer [1/s]
VWSHneg0p5pv   0,109,-5e-07   0,2,192 ** PV=-5e-07 (Km^2/kg/s) surface Vertical speed sheer [1/s]
VWSH1pv   0,109,1e-06   0,2,192 ** PV=1e-06 (Km^2/kg/s) surface Vertical speed sheer [1/s]
VWSHneg1pv   0,109,-1e-06   0,2,192 ** PV=-1e-06 (Km^2/kg/s) surface Vertical speed sheer [1/s]
VWSH1p5pv   0,109,1.5e-06   0,2,192 ** PV=1.5e-06 (Km^2/kg/s) surface Vertical speed sheer [1/s]
VWSHneg1p5pv   0,109,-1.5e-06   0,2,192 ** PV=-1.5e-06 (Km^2/kg/s) surface Vertical speed sheer [1/s]
VWSH2pv   0,109,2e-06   0,2,192 ** PV=2e-06 (Km^2/kg/s) surface Vertical speed sheer [1/s]
VWSHneg2pv   0,109,-2e-06   0,2,192 ** PV=-2e-06 (Km^2/kg/s) surface Vertical speed sheer [1/s]
VWSHtrop   0,7,0   0,2,192 ** tropopause Vertical speed sheer [1/s]
ENDVARS
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2020-2-12 09:19:07 | 显示全部楼层
楼主您好!您能试试最新的fnl资料还可以用原来兰溪提供的方法提取ctl文件吗?我现在老是报错。

fnl_20200116_00_00.grib2

24.18 MB, 下载次数: 20, 下载积分: 金钱 -5

密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2020-2-13 08:13:30 | 显示全部楼层
本帖最后由 Bravo_lff 于 2020-2-13 08:19 编辑
星雨 发表于 2020-2-12 09:19
楼主您好!您能试试最新的fnl资料还可以用原来兰溪提供的方法提取ctl文件吗?我现在老是报错。

你下的g2ctl.exe是最新版本吗?我之前也不行后来重新下载了一个新版本就可以了的。我试了一下你的grib2数据文件,我的是可以生成ctl文件的,你可以下载一下我这个g2ctl.exe试试

g2ctl.exe

1.3 MB, 下载次数: 5, 下载积分: 金钱 -5

密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2020-2-13 15:43:06 | 显示全部楼层
Bravo_lff 发表于 2020-2-13 08:13
你下的g2ctl.exe是最新版本吗?我之前也不行后来重新下载了一个新版本就可以了的。我试了一下你的grib2数 ...

谢谢您,我已经解决了。
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

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