NCL 天气分析图

一、风向风速矢量图

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

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

[email protected]         = 20.                ; make vectors larger
  [email protected]            = 0.030              ; ref vec length
  [email protected]            = "WindBarb"         ; select wind barbs
  [email protected]          = 0.025              ; thin out windbarbs
  [email protected]     = 3
以及最后调用的绘制函数

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

tres                      = True                ; text mods desired
  [email protected]        = 0.015               ; make smaller
  [email protected]          =  2                  ; 红色字体

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

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

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

时间: 2024-08-08 13:57:08

NCL 天气分析图的相关文章

ncl 实例参考

NCL中绘制中国任意省份的精确地图 NCL学习笔记(实战篇) 用NCL画垂直风场剖面图实例 NCL学习笔记(天气分析图)

hdoj1437 -- 天气情况

天气情况 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 707    Accepted Submission(s): 285 Problem Description 如 果我们把天气分为雨天,阴天和晴天3种,在给定各种天气之间转换的概率,例如雨天转换成雨天,阴天和晴天的概率分别为0.4,0.3,0.3.那么在雨天 后的第二天出现雨天,阴

C#+HtmlAgilityPack+XPath带你采集数据(以采集天气数据为例子)

转自原文C#+HtmlAgilityPack+XPath带你采集数据(以采集天气数据为例子) 阅读目录 1.HtmlAgilityPack简介 2.XPath技术介绍与使用 3.采集天气网站案例 4.资源 第一次接触HtmlAgilityPack是在5年前,一些意外,让我从技术部门临时调到销售部门,负责建立一些流程和寻找潜在客户,最后在阿里巴巴找到了很多客户信息,非常全面,刚开始是手动复制到Excel,是真尼玛的累,虽然那个时候C#还很菜,也想能不能通过程序来批量获取(所以平时想法要多才好).几

通过ip获取qq的天气json数据

需求:根据IP获取当地天气 参考:http://news.qq.com/    其页面中有获取天气的实现. 具体实现:1.查看上面网页,找出其相关代码(我使用的是chrom浏览器,F12调出调试模式) 2.解释主要代码: (1)<script src="http://fw.qq.com:80/ipaddress"></script> :加载这个js,返回的信息:var IPData = new Array("60.29.153.39",&qu

Unity3D手游开发日记(7) - 适合移动平台的天气效果

腾讯的天涯明月刀的天气很棒,以前我也在CE3的基础上做了一个效果差不多的,但是在手机上,还是斜下固定视角的游戏,是否还需要一个天气系统? 而且没有G-Buffer的支持,很多牛逼效果实现不了,比如角色身上的湿润感,水面的波纹涟漪等 考虑了一下,觉得可以做一个简单高效的. 以下雨天为例子.一阵风吹来,天色逐渐变暗,突然下起了雨来,雨越来越大,夹杂着雷声和闪电,过几分钟,雨逐渐消失... 1.风 前面文章已经实现了风引起植被的摆动 2.天色 这个比较麻烦,由于移动平台的场景用的基本都是lightma

微信公众号开发之天气应用

20151228更新:百度API对天气信息的返回结果做了改变,指数信息需要重新解析,原有的代码公众号调用时已经无法正常显示指数信息. 20151230更新:28号是百度API升级造成的短暂故障,现已恢复正常,代码不需要更改. 本天气应用,通过发送城市名或位置获取天气信息,利用百度SDK 百度Key申请:http://lbsyun.baidu.com/apiconsole/key 通过上一个链接申请到AK和SK,也可以只申请AK不申请SK,申请了SK的需要计算SN 接口的形式如:http://ap

hdu 1437 天气情况【概率DP】

天气情况 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 638    Accepted Submission(s): 257 Problem Description 如果我们把天气分为雨天,阴天和晴天3种,在给定各种天气之间转换的概率,例如雨天转换成雨天,阴天和晴天的概率分别为0.4,0.3,0.3.那么在雨天后的第二天出现雨天,阴天和

php地方天气

<?php header("Content-type: text/html; charset=utf-8"); //获取IP的函数 function GetIP(){ if(!empty($_SERVER["HTTP_CLIENT_IP"])){ $cip = $_SERVER["HTTP_CLIENT_IP"]; } elseif(!empty($_SERVER["HTTP_X_FORWARDED_FOR"])){ $

使用NGUI制作关联下拉菜单(查询全国天气)

关联菜单,在我们浏览网页时经常见到,它极大的方便了我们的操作,在游戏中,偶尔也会用到关联下拉菜单.下面,我们使用关联下拉菜单来查询下全国的天气. 首先,老规矩我们搭建基本的UI界面.我们就不自己去制作UI组件了,直接使用NGUI封装好的UI组件. 我们先创建于一个Sprite,重命名为BgSprite,为其选择图集和精灵. 在菜单中选择NGUI,选择Open,打开Prefab Toolbar,拖一个PopupList,重命名为ProvincePopupList.这里,我们要注意, 我们导入支持中