- 积分
- 18746
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-6-21
- 最后登录
- 1970-1-1
|
发表于 2015-4-24 10:59:27
|
显示全部楼层
不会啊,我原来也批量画过的
- 'reinit'
- 'sdfopen Z:\ncep\uwnd.2009.nc'
- 'sdfopen Z:\ncep\vwnd.2009.nc'
- 'sdfopen Z:\ncep\air.2009.nc'
- 'sdfopen Z:\ncep\rhum.2009.nc'
- tt=1
- while(tt<=1460)
- 'set t 'tt
- 'set grads off'
- 'set grid off'
- 'set csmooth on'
- 'set lon 112.5'
- 'set lat 22.5'
- 'set lev 1000 200'
- 'define t=air.3-273.15'
- 'define rH=rhum.4'
- 'define td=t-((14.55+0.114*t)*(1-0.01*RH) + pow((2.5+0.007*t)*(1-0.01*RH),3) + (15.9+0.37*T)*pow((1-0.01*RH),14))'
- 'define uv=mag(uwnd,vwnd.2)'
- 'define pi=3.14159'
- if (uwnd>=0.)
- if (vwnd.2>=0.)
- 'define dir=180+atan2(uwnd,vwnd.2)*180/pi'
- endif
- endif
- if (vwnd.2<=0.)
- if (uwnd>=0.)
- 'define dir=270+atan2(uwnd,vwnd.2)*180/pi'
- endif
- endif
- if (uwnd<=0.)
- if (vwnd.2>=0.)
- 'define dir=180-atan2(uwnd,vwnd.2)*180/pi'
- endif
- endif
- if (vwnd.2<0.)
- if (uwnd<=0.)
- 'define dir=270-atan2(uwnd,vwnd.2)*180/pi'
- endif
- endif
- rc=plotskew(t,td,uv,dir)
- 'q time'
- str=subwrd(result,3)
- year=substr(str,9,4)
- month=substr(str,6,3)
- day=substr(str,4,2)
- hour=substr(str,1,2)
- if(month=JAN)
- month=01
- endif
- if(month=FEB)
- month=02
- endif
- if(month=MAR)
- month=03
- endif
- if(month=APR)
- month=04
- endif
- if(month=MAY)
- month=05
- endif
- if(month=JUN)
- month=06
- endif
- if(month=JUL)
- month=07
- endif
- if(month=AUG)
- month=08
- endif
- if(month=SEP)
- month=09
- endif
- if(month=OCT)
- month=10
- endif
- if(month=NOV)
- month=11
- endif
- if(month=DEC)
- month=12
- endif
- say year '-' month '-'day' 'hour':00 UTC'
- 'draw title 'year'-' month'-'day' 'hour':00 UTC '
- 'printim E:\NCEP\tlogp\'year''month''day''hour'.png black'
- 'c'
- tt=tt+1
- endwhile
- function plotskew(sndtemp,snddewp,sndspd,snddir)
复制代码 |
|