- 积分
- 111
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2021-3-24
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2021-4-11 09:06:07
|
显示全部楼层
'reinit'
* change the directory name
* u
'sdfopen F:\climatedata\uwnd.mon.mean.nc'
* v
'sdfopen F:\climatedata\vwnd.mon.mean.nc'
* height
'sdfopen F:\climatedata\hgt.mon.mean.nc'
* gas constant
'define Ra=290'
* earth radius
'define a=6400000'
*角度制转弧度制
'define dlat = cdiff(lat,y)*3.1416/180'
'define dlon = cdiff(lon,x)*3.1416/180'
'define coslat = cos(lat*3.1416/180)'
'define sinlat = sin(lat*3.1416/180)'
* Coriolis parameter
'define f = 2*7.24/100000*sinlat'
'define f0 = 2*7.24/100000*sin(43*3.1416/180)'
'define g=9.8'
* unit [hPa] 200
'set lev 200'
* For drawing polar projection map
'set lon 0 360'
'set lat 0 90'
* making basic state (climatology)
'define uclm = smth9((ave(u.1,time=jun1981,time=jul2010,1yr)+ave(u.1,time=jul1981,time=jun2010,1yr))/2)'
'define vclm = smth9((ave(v.2,time=jun1981,time=jul2010,1yr)+ave(v.2,time=jul1981,time=jun2010,1yr))/2)'
'define zclm = smth9((ave(z.3,time=jun1981,time=jul2010,1yr)+ave(z.3,time=jul1981,time=jun2010,1yr))/2/g)'
* anomalies
'define zano=smth9(ave(z.3,time=jun2020,time=jul2020)/g))-zclm'
*去除纬向
'define za=zano-ave(zano,lon=0,lon=360,-b)'
* QG stream function
'define psia=g*za/f'
*psia lat mean
'define psiam=ave(psia,lon=0,lon=360,-b)'
* magnitude of basic state wind speed
'define magU = mag(uclm,vclm)'
'define dpsidlon = cdiff(psia,x)/dlon'
'define ddpsidlonlon = cdiff(dpsidlon,x)/dlon'
'define dpsidlat = cdiff(psia,y)/dlat'
'define ddpsidlatlat = cdiff(dpsidlat,y)/dlat'
'define ddpsidlatlon = cdiff(dpsidlat,x)/dlon'
'define termxu = dpsidlon*dpsidlon-psia*ddpsidlonlon'
'define termxv = dpsidlon*dpsidlat-psia*ddpsidlatlon'
'define termyv = dpsidlat*dpsidlat-psia*ddpsidlatlat'
* "p" is normalized by 1000hPa
'define coeff=coslat*(lev/1000)/(2*magU)'
*x-component
*'define px = coeff/(a*a*coslat)*( uclm*termxu+ vclm/coslat*termxv)'
* corrected on 14th Sep. 2015: Thanks to Yan Jin.
'define px = coeff/(a*a*coslat)*( uclm*termxu/coslat + vclm*termxv)'
*y-component
'define py = coeff/(a*a)*( uclm/coslat*termxv + vclm*termyv)'
'set parea 0.5 5.5 0 8.5'
'set lon 180 360'
'set lat 0 90'
'set ccolor 1'
'set cint 10'
'set gxout contour'
'set map 0'
* QG stream-function
*'set black -0.1 0.1'
*'set cthick 20'
*'set cint 2000000'
*'d maskout( (psia-psiam), abs(lat)-10)'
'd za'
* horizontal wave-activity flux
'set arrscl 0.6 10 '
'set arrowhead -0.3'
* maskout regions where
* (i) QG approximation is supposed to be invalid (lower latitudes)
* (ii) westerly wind speed is weak or negative
*'d skip(px,2,2);maskout(maskout( py , abs(lat)-10),magU-5)'
'd skip(px,30,20);maskout(maskout( py , abs(lat)-10),magU-5)'
'set parea 5.5 10.5 0 8.5'
'set lon 0 180'
'set lat 0 90'
'set gxout contour'
'set ccolor 1'
'set mpdset lowres'
'set map 1'
'set ylab off'
* QG stream-function
*'set black -0.1 0.1'
*'set cthick 20'
*'set cint 2000000'
*'d maskout( (psia-psiam), abs(lat)-10)'
*'d za'
* horizontal wave-activity fluza
'set arrscl 0.6 10 '
'set arrowhead -0.3'
* maskout regions where
* (i) QG approximation is supposed to be invalid (lower latitudes)
* (ii) westerly wind speed is weak or negative
*'d skip(px,2,2);maskout(maskout( py , abs(lat)-10),magU-5)'
'd skip(px,30,20);maskout(maskout( py , abs(lat)-10),magU-5)'
'set parea 0.5 10.5 0 8.5'
'set lon -180 180'
'set ccolor 1 '
'set xlab off'
'd za'
'draw title WAF in Jun and July,meanly,2020'
'printim F:\200hPajunjulqvchuweixiang2020-TN01.png white' |
|