爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5780|回复: 1

一个简单得gsn_csm_vector绘制问题

[复制链接]

新浪微博达人勋

发表于 2017-4-29 22:44:00 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
本帖最后由 主啊 于 2017-4-29 22:45 编辑

我弱弱的问一个简单的问题,我按照官网的实例。自己下载了ecmwf数据,对照数据改进,进行读取
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
; =================================================;
; gsn_vector_1.ncl
; =================================================;
;
; This file is loaded by default in NCL V6.2.0 and newer
; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
; =================================================;
begin
  f = addfile("/cygdrive/d/UV.nc","r")
  print(f)
  u    = f->u(0,0,:,:)    ; read in example data [2D only here]
  v    = f->v(0,0,:,:)
; =================================================;
; create plots
; =================================================;
  wks  = gsn_open_wks("png","gsn_vector1")          ; send graphics to PNG file
  res  = True                                      ; plot mods desired
  res@tiMainString     = "Basic Vector Plot"
  res@vcRefMagnitudeF  = 50.0                       ; add a reference vector
  res@vcRefLengthF     = 0.045                     ; what the ref length is
  res@vcGlyphStyle     = "CurlyVector"             ; turn on curly vectors
  plot = gsn_csm_vector(wks,u(::2,::2),v(::2,::2),res)
end

问题:
1、实在是看不懂 res@vcRefMagnitudeFres@vcRefLengthF是什么意思?我看了官网的解释,也不太懂,那个参数哟范围限制么?也改不对,而且我这样画出来的图也、、、、==
2、还有这几个绘图函数也把我看晕了?






文件:
Variable: f
Type: file
filename:       UV
path:   /cygdrive/d/UV.nc
   file global attributes:
      Conventions : CF-1.6
      history : 2017-04-07 18:17:24 GMT by grib_to_netcdf-2.1.0: grib_to_netcdf /data/data04/scratch/_mars-atls18-a562cefde8a29a7288fa0b8b7f9413f7-zG6pip.grib -o /data/data04/scratch/_grib2netcdf-atls01-a562cefde8a29a7288fa0b8b7f9413f7-ZWlzY9.nc -utime
   dimensions:
      longitude = 360
      latitude = 59
      level = 3
      time = 368  // unlimited
   variables:
      float longitude ( longitude )
         units :        degrees_east
         long_name :    longitude
      float latitude ( latitude )
         units :        degrees_north
         long_name :    latitude
      integer level ( level )
         units :        millibars
         long_name :    pressure_level
      integer time ( time )
         units :        hours since 1900-01-01 00:00:0.0
         long_name :    time
         calendar :     gregorian
      short u ( time, level, latitude, longitude )
         scale_factor : 0.001368343370792792
         add_offset :   5.082254976263822
         _FillValue :   -32767
         missing_value :        -32767
         units :        m s**-1
         long_name :    U component of wind
         standard_name :        eastward_wind
      short v ( time, level, latitude, longitude )
         scale_factor : 0.00149875987977312
         add_offset :   4.621443002872613
         _FillValue :   -32767
         missing_value :        -32767
         units :        m s**-1
         long_name :    V component of wind
         standard_name :        northward_wind

11.JPG
gsn_vector1.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-5-5 10:22:05 | 显示全部楼层
里面都有个Ref嘛,就都是用来调Reference的参数,RefMagnitude就是图右下角那个reference的长度所代表的量级大小,RefLength就是调整右下角那个箭头的长度。多用用就好了,控制一个变量随便改改,用多了就知道是干嘛的了。。。
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表