|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
首先感谢3群的一位朋友给我提供了很多他用过的gs文件,这些文件就是从那里面得到了,如果这些文件对比有帮助,不妨也可以贴出你自己的gs文件,分享给大家,谢谢~
1、700hpa水汽通量散度(标准)
- 'reinit'
- 'open d:\12090.ctl'
- 'set lev 700'
- #'set lev 850'
- 'set lat 20 35'
- 'set lon 100 120'
- 'set t 5'
- 'set mpdset cnworld'
- 'set xlopts 1 4 0.15'
- 'set ylopts 1 4 0.15'
- 'set grads off'
- 'set timelab off'
- 'set grid off'
- #'tc=(tmpprs-273.16)'
- 'td=tc-((14.55+0.114*tc)*(1-0.01*rh) + pow((2.5+0.007*tc)*(1-0.01*rh),3) + (15.9+0.37*tc)*pow((1-0.01*rh),14))'
- 'vapr=6.112*exp((17.67*td)/(td+243.5))'
- 'e=vapr*1.001+(lev-100)/900*0.0034'
- 'define mixr=0.62137*(e/(lev-e))*1000'
- 'define qx=u*mixr'
- 'define qy=v*mixr'
- 'define mconv=hdivg(qx,qy)*1e6/9.8'
- #水汽通量的计算方法就是hdivg(q*v)/g,负值区就是水汽的辐合区。单位是g/cm2.hpa.s. 量级为10-6到10-7.
- #'define mconv=(-1)*hdivg(qx,qy)*1e6/9.8',这个在前面加-1就相反,正值区为辅合区
- 'enable print d:\tlsandu1.gmf'
- 'd mconv'
- 'print'
- 'disable print'
复制代码
2、水汽通量与等值线
- #该gs绘出水汽通量是阴影图
- 'reinit'
- 'open f:\tt.ctl'
- 'enable print d:\1243567788sqtl.gmf'
- #经纬度设置
- 'set lat 20 35 '
- 'set lon 100 120'
- 'set lev 700'
- #先设定时间循环
- t=1
- while(t<=9)
- 'c'
- 'set t 't''
- #设置图片角标底图
- 'set grads off'
- 'set grid off'
- 'set mpdset cnworld'
- #'set map 15 5 1'
- #'draw map'
- #设置划线格式
- #'set cthick 9'
- #'set xlopts 1 4 0.12'
- #'set ylopts 1 4 0.12'
- #'set cint 0.5'
- #★重点:编程水气通量的算法
- 'define prs=lev'
- #饱和水汽压的计算,单位:毫巴
- 'define es=6.112*exp(17.67*(Tk-273.15)/(Tk-29.65))'
- #饱和比湿的计算 单位:克/克
- 'define qs=0.622*es/(lev-0.278*es)'
- #rh是比湿,利用比湿求水汽
- 'define q=rh*qs/100'
- #a为|V|
- 'define a=sqrt(u*u+v*v)'
- #地球引力系数
- 'define g=9.8'
- #以阴影图显示,命令一直到run cbarn.gs
- 'set gxout shaded'
- 'set cmin 10'
- #10以上才画阴影图
- 'd a*q*1000/9.8'
- #本来是q*|V|/g,但这里q的单位为:克/克,而水汽通量中的q一般取克、千克,所以乘以1000
- #显示一下尺度标,画阴影图用
- 'run cbarn.gs'
- #set gxout contour是重新设定图形输出格式为二维等值线图,叠加在阴影上,所以一般先画阴影,再画等值线,不然阴影覆盖了等值线
- 'set gxout contour'
- 'set ccolor 0'
- 'set cmin 6'
- #只画值为6以上的等值线
- 'd a*q*1000/9.8'
- 'print'
- pull dummy
- t=t+1
- endwhile
- 'disable print'
复制代码
3、水汽通量-标准
- * This is a script for displaying moisture convergence
- * Written by Michael Maxwell
- *
- * rh = Relative Humidity in %
- * t = Temp at *set level in degrees Kelvin
- * tc = Temp in degrees C
- * td = Dewpoint at *set level in degrees C
- * e = Vapor pressure
- * mixr = Mixing ratio
- * u = U-wind in m/s
- * v = V-wind in m/s
- * mconv = moisture convergence/divergence. convergence is positive and divergence is negative.
- 'reinit'
- 'open d:\12090.ctl'
- 'set lev 700'
- 'set lat 20 35'
- 'set lon 100 120'
- 'set t 5'
- 'set mpdset cnworld'
- 'set xlopts 1 4 0.15'
- 'set ylopts 1 4 0.15'
- 'set grads off'
- 'set timelab off'
- 'set grid off'
- #'tc=(tmpprs-273.16)'
- 'td=tc-((14.55+0.114*tc)*(1-0.01*rh) + pow((2.5+0.007*tc)*(1-0.01*rh),3) + (15.9+0.37*tc)*pow((1-0.01*rh),14))'
- 'vapr=6.112*exp((17.67*td)/(td+243.5))'
- 'e=vapr*1.001+(lev-100)/900*0.0034'
- 'define mixr=0.62137*(e/(lev-e))*1000/9.8'
- #通过此gs文件算出的水汽通量的单位是g/(cm.s),一般为 十几到几十
- 'define qx=u*mixr'
- 'define qy=v*mixr'
- 'define mconv=hdivg(qx,qy)*1e6'
- 'enable print d:\2lb-shuiqi900.gmf'
- 'set arrscl 1 500'
- #'set lon 124'
- #'set cmin 30'
- 'set gxout shaded'
- 'd mag(qx,qy)'
- #'set cmin 30'
- 'set gxout contour'
- 'd mag(qx,qy)'
- #'d theta'
- #'d skip(u,8);skip(v,8)'
- 'print'
- 'disable print'
复制代码
|
|