爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 4569|回复: 9

[分享资料] 把NCEP湿位涡程序终于修改成细网格T639湿位涡程序了

[复制链接]

新浪微博达人勋

发表于 2014-9-17 14:21:48 | 显示全部楼层 |阅读模式

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

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

x
第一步
'reinit'
'set gxout fwrite'
'set fwrite D:\grads\T639\gradsmpv\thse.dat'
'open D:\grads\T639\T6390708.ctl'
rtt.1=1000
rtt.2=975
rtt.3=950
rtt.4=925
rtt.5=900
rtt.6=850
rtt.7=800
rtt.8=750
rtt.9=700
rtt.10=650
rtt.11=600
rtt.12=550
rtt.13=500
rtt.14=450
rtt.15=400
rtt.16=350
rtt.17=300

i=1
while(i<=41)
'set lat 0.000099 90.000099'
'set lon 0.000099 180.000099'
'set t 'i''
'set lev 1000'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 975'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 950'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 925'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 900'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 850'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 800'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 750'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 700'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 650'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 600'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 550'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 500'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 450'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 400'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 350'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
'set lev 300'
'define prs=lev*100'
'define ms=17.67*(TMPprs-273.15)/(TMPprs-29.65)'
'define es=100*(6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65)))'
'define qs=0.62197*es/(prs-es)'
'define qv=RHprs*qs/100'
'define e=(prs/100.)*qv/(0.62197+qv)+1e-10'
'define tlcl=55.0+2840.0/(3.5*log(TMPprs)-log(e)-4.775)'
'undefine e'
'define theta=TMPprs*pow((100000./prs),(0.2854*(1.0-0.28*qv)))'
'define thse=theta*exp(((3376./tlcl)-2.54)*qv*(1.0+0.81*qv))'
'd thse'
   j=1
   while(j<=17)
   'set lat 0.000099 90.000099'
   'set lon 0.000099 180.000099'
   'set t 'i''
   'set lev 'rtt.j''
   'd UGRDprs'
    j=j+1
    endwhile
    j=1
   while(j<=17)
***'set lat 26.125 36.25'
***'set lon 97 110.5'
   'set lat 0.000099 90.000099'
   'set lon 0.000099 180.000099'
   'set t 'i''
   'set lev 'rtt.j''
   'd VGRDprs'
    j=j+1
    endwhile
i=i+1
endwhile
'disable fwrite'
'reinit'

评分

参与人数 1金钱 +12 贡献 +3 收起 理由
mofangbao + 12 + 3 多谢分享

查看全部评分

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

新浪微博达人勋

发表于 2014-9-17 14:38:04 | 显示全部楼层
支持原创,请楼主把ctl也贴出来,方便大家学习.
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-9-17 14:39:16 | 显示全部楼层

ncep湿位涡转换成T639细网格第二步,难啊

花了三天时间,终于搞定ncep湿位涡到T639细网格湿位涡的转换

gradsmpv.rar

1.13 KB, 下载次数: 22, 下载积分: 金钱 -5

评分

参与人数 1金钱 +12 贡献 +3 收起 理由
mofangbao + 12 + 3

查看全部评分

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

新浪微博达人勋

 楼主| 发表于 2014-9-17 14:40:55 | 显示全部楼层
wangjb 发表于 2014-9-17 14:38
支持原创,请楼主把ctl也贴出来,方便大家学习.

应你要求,ctl附上
DSET D:\grads\T639\gradsmpv\thse.dat
undef -9.96921E+36
title 4x daily ncep 1*1 2006
ydef 321 linear 0.000099 0.28125
xdef 641 linear 0.000099 0.281250
zdef 17 levels 1000 975 950 925 900 850 800 750 700 650 600 550 500 450 400 350 300
tdef  41  linear 12z08Jul2014 3hr
vars 3
thse 17 99 temps
UGRDprs 17 99 u-wind
VGRDprs 17 99 v-wind
endvars
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-9-17 15:12:37 | 显示全部楼层

T639细网格资料湿位涡的制作步骤,学习ncep得来

T639细网格数据是0.28*0.28,经纬度更细,更有利于绘制精确湿位涡,程序分段显示,简单,有点啰嗦,请高手指教

第一步:根据T639细网格资料,对假相当位温计算,生成二进制数据,并制作该二进制数据的ctl

第二步:计算湿位涡分层二进制数据,并写好二进制数据的ctl

第三步:绘图,可以绘制湿位涡分量、剖面、一维、多维,这里只有一维的某一层

gradsmpv(第一步).rar

992 Bytes, 下载次数: 20, 下载积分: 金钱 -5

gradsmpv(第二步).rar

1.11 KB, 下载次数: 22, 下载积分: 金钱 -5

gradsmpv(第三步).rar

980 Bytes, 下载次数: 15, 下载积分: 金钱 -5

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

新浪微博达人勋

发表于 2014-9-17 15:27:43 | 显示全部楼层
谢谢楼主,{:eb502:}{:eb502:}
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

0
早起挑战累计收入
发表于 2014-9-17 16:25:49 | 显示全部楼层
两个帖子内容类似  合并了  多谢楼主分享
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-5-14 17:11:20 | 显示全部楼层
{:lxm_24:}
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

发表于 2015-10-23 09:33:49 | 显示全部楼层
感谢楼主的分享了
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-5-19 18:35:49 | 显示全部楼层
请问楼主,t639   0.28125 的数据是什么投影模式的?
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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