LoginSignup
0
3

More than 5 years have passed since last update.

WRF > NCL > ベクトル図を描画してみた

Last updated at Posted at 2016-07-29

WRF(Weather Research and Forecasting Model)で使うことになるNCAR Command Language (NCL)。

http://qiita.com/7of9/items/825eec06a039bc016a5b
にて疑問に思ったベクトル図を描画してみた。

http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_vector.shtml
にExampleがあったので試した。

Exampleをそのまま実行してもエラーとなった。

以下が必要だった。

  • WRFを実行して、wrfout_d01_2000-01-24_12:00:00を作成する
  • 上記のファイルをwrfout_d01_2000-01-24_12:00:00.ncとしてシンボリックリンクを張る
  • Exampleのnclファイルにwrf_map_overlays()を追加

nclファイルは以下となった。

wrf_wps_vector.ncl
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

begin
  a = addfile("wrfout_d01_2000-01-24_12:00:00.nc","r")

  wks = gsn_open_wks("x11","test")

  u10 = wrf_user_getvar(a,"U10",0)   ; U component of the wind at 10m
  v10 = wrf_user_getvar(a,"V10",0)   ; V component of the wind at 10m

  res = True
  res@gsnDraw  = True    ; Forces the plot to be drawn
  res@gsnFrame = True    ; Frame advance
  vector = wrf_vector(a,wks,u10,v10,res)

  pltres = True
  mpres = True
  plot = wrf_map_overlays(a, wks, (/vector/),pltres, mpres);

end
$ ncl wrf_wps_vector.ncl

にて以下の図が出てきた。

qiita.png

描画しているのはWRFの結果のU10とV10成分からなるベクトル図のようだ。

ベクトルとcontourの重ね合わせ例は以下にも見つかった。
http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/BASIC_SFC/wrf_Surface1.htm

http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/NCL_examples.htm
のサンプルを見るのが使い方の理解には近道になりそうだ。

0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3