码迷,mamicode.com
首页 > 其他好文 > 详细

NCL 天气分析图

时间:2014-09-03 22:25:37      阅读:470      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   http   color   os   io   使用   ar   

一、风向风速矢量图

    先看一个风向风速的样例图片:

bubuko.com,布布扣

这里与上一篇气温分布图的绘制方法基本相同,不同的地方在于

  wres@vcRefMagnitudeF         = 20.                ; make vectors larger
  wres@vcRefLengthF            = 0.030              ; ref vec length
  wres@vcGlyphStyle            = "WindBarb"         ; select wind barbs
  wres@vcMinDistanceF          = 0.025              ; thin out windbarbs
  wres@vcWindBarbColor     = 3
以及最后调用的绘制函数

  wplot = gsn_csm_vector_map(wks,ddata1,vdata1,wres)           ; create plot

  ddata1是插值后的风向,vdata1是插值后的风速

由于wplot要和之前的map叠加,使用overlayhas函数,最后在显示叠加后的map

  overlay(map,wplot)
  draw(map)
二、地面气象要素天气分析图

   bubuko.com,布布扣

改图为绘制样例,不是真实数据。

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"代表。

  tres                      = True                ; text mods desired
  tres@txFontHeightF        = 0.015               ; make smaller
  tres@txFontColor          =  2                  ; 红色字体

  gsn_text(wks,map,"D",123.,51.,tres)

 

三、高空气象要素天气分析图

   就是等温线和等压线的叠加,使用函数map = gsn_csm_contour_map_overlay(wks,pdata,vdata,res,res2),即可,其他同地面气象要素

NCL 天气分析图

标签:des   style   blog   http   color   os   io   使用   ar   

原文地址:http://www.cnblogs.com/tiandi/p/3954548.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!