NCL學習筆記(天氣分析圖)
一、風向風速向量圖
先看一個風向風速的樣例圖片:
這裡與上一篇氣溫分佈圖的繪製方法基本相同,不同的地方在於
wplot = gsn_csm_vector_map(wks,ddata1,vdata1,wres) ; create plot
ddata1是插值後的風向,vdata1是插值後的風速
由於wplot要和之前的map疊加,使用overlayhas函式,最後在顯示疊加後的map
overlay(map,wplot)
draw(map)
二、地面氣象要素天氣分析圖
改圖為繪製樣例,不是真實資料。
1.各要素分析圖示
需要50char的字串用來顯示圖中左側的圖示,具體資料格式如下:
example:
imdat ="11721700181008020050300004983052026604007289086925"
A string (or array) of 50 characters encoded as per the WMO/NOAA(世界氣象組織/美國國家海洋大氣局) guidelines.
If an array, it must have the same shape as the x and y arrays.
In more detail (where the characters are numbered from left to right, starting at character number 0):
character 0 = iR - the precipitation data indicator (冰雹資料指數)
character 1 = iX - weather data and station type indicator(天氣資料和站點型別指數)
character 2 = h - height above ground of base of lowest cloud
characters 3-4 = VV - visibility in miles and fractions (能見度)
character 5 = N - total amount of cloud cover (總雲量)
characters 6-7 = dd - direction from which wind is blowing (風向)
characters 8-9 = ff - wind speed in knots(風速)
If character 10 = "1", then
character 11 = sn - sign of temperature
characters 12-14 = TTT - current air temperature
If character 15 = "2", then
character 16 = sn - sign of temperature
characters 17-19 = Td - dew point
If character 20 = "3", then
characters 21-24 = PO - station pressure (not plotted)
If character 25 = "4", then
characters 26-29 = PPPP - pressure reduced to sea level
If character 30 = "5", then
character 31 = a - characteristic of barograph
characters 32-34 = ppp - pressure change, last 3 hrs.
If character 35 = "6", then
characters 36-38 = RRR - precipitation
character 39 = tR - time duration of precipitation
If character 40 = "7", then
characters 41-42 = ww - present weather
character 43 = W1 - most significant past weather
character 44 = W2 - 2nd most sig. past weather
If character 45 = "8", then
character 46 = Nh - Fraction of sky cover
character 47 = CL - cloud type, low clouds
character 48 = CM - cloud type, medium clouds
character 49 = CH - cloud type, high clouds
可以根據實際資料需要將資料轉換成50char,傳送給
wmstnm(wks,lat_imdat,lon_imdat,imdat) 進行繪製
2.冷暖峰
wmsetp("fro","warm") ; Specify stationary front. ;cold or warm or stationary(interal)
wmsetp("cfc",3) ; Use blue for the triangles.
wmsetp("wfc",2) ; Use red for the bumps.
wmsetp("swi",0.02) ; Increase the size of the bumps and triangles.
wmsetp("nms",2) ; 設定峰的個數
wmsetp("sig",0.005)
wmsetp("slf",0) ;0 使用SL1和SL2 ,1 使用SL1 ,2 使用SL2 , 3 均不使用,預設值
wmsetp("sl1",90.) ; 起始方向與X軸的夾角
wmsetp("sl2",0.) ; 終止方向與X軸的夾角
xlat = (/ 25., 30./) ; Latitudes.
xlon = (/ 113., 116./) ; Longitudes.
wmdrft(wks, xlat, xlon)
3.繪製高低氣壓中心
以高氣壓為例,用紅色的"D"代表。
gsn_text(wks,map,"D",123.,51.,tres)
三、高空氣象要素天氣分析圖
就是等溫線和等壓線的疊加,使用函式map = gsn_csm_contour_map_overlay(wks,pdata,vdata,res,res2),即可,其他同地面氣象要素