- 积分
- 9
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-3-28
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
cd \
C:
cd C:\Program" "Files\OpenGrADS\Classic\bin
set char=%%%f3
set ens=%%%e
SETLOCAL ENABLEDELAYEDEXPANSION
for /f "tokens=1,2* delims=." %%a in (D:\work\ensemble\makectllist.txt) do (
echo %%a.%%b
set ymdf=%%b
set bymd=!ymdf:~0,10!
set comd=grib2ctl %%a.!bymd!!char! ^>D:\work\ensemble\high%%b.ctl
echo !comd!
grib2ctl %%a.!bymd!!char! >D:\work\ensemble\high%%b.ctl
rem 改写ctl
rem 读取原始ctl
for /f "tokens=1* delims=" %%c in (D:\work\ensemble\high%%b.ctl) do (
echo %%c|findstr /C:"vars" &&echo edef 51 names ec0 ec1 ec2 ec3 ec4 ec5 ec6 ec7 ec8 ec9>>D:\work\ensemble\high%%b-1.ctl&&echo ec10 ec11 ec12 ec13 ec14 ec15 ec16 ec17 ec18 ec19 >>D:\work\ensemble\high%%b-1.ctl&&echo ec20 ec21 ec22 ec23 ec24 ec25 ec26 ec27 ec28 ec29>>D:\work\ensemble\high%%b-1.ctl&&echo ec30 ec31 ec32 ec33 ec34 ec35 ec36 ec37 ec38 ec39>>D:\work\ensemble\high%%b-1.ctl&&echo ec40 ec41 ec42 ec43 ec44 ec45 ec46 ec47 ec48 ec49 ec50 >>D:\work\ensemble\high%%b-1.ctl
echo %%c|findstr /C:"tdef" &&for /f "tokens=1,2,3,4,5* delims= " %%d in ("%%c") do echo %%d 7 %%f %%g 12hr >>D:\work\ensemble\high%%b-1.ctl
echo %%c|findstr /C:"tdef" ||echo %%c >>D:\work\ensemble\high%%b-1.ctl
echo %%c|findstr /C:"dset" &&for /f "tokens=1,2,3,4,5* delims=\." %%d in ("%%c") do echo %%d\%%e\%%f\!ens!.%%h>D:\work\ensemble\high%%b-1.ctl
)
del /Q D:\work\ensemble\high%%b.ctl
rename D:\work\ensemble\high%%b-1.ctl high%%b.ctl
gribmap -v -i D:\work\ensemble\high%%b.ctl >D:\work\ensemble\macth%%b-high.txt
)
endlocal
pause
|
|