立即注册 登录
气象家园 返回首页

主啊的个人空间 https://bbs.06climate.com/?69999 [收藏] [复制] [分享] [RSS]

日志

ncl读取era数据练习

已有 331 次阅读2017-4-29 16:31

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
f    = addfile("/cygdrive/d/hgt.nc","r")
print(f)
lat=f->latitude
lon=f->longitude
u=f->z(0,{500},:,:)
us=(u*u@scale_factor+u@add_offset)/9.8
copy_VarAtts(u,us)
us@units="gpm"
us!0="lat"
us!1="lon"
us&lat=lat
us&lon=lon
us&lat@units="degrees_north"
us&lon@units = "degrees_east"
wks  = gsn_open_wks("png","UV_contour")     ; send graphics to PNG file
plot = gsn_csm_contour_map(wks,us,False) ; contour the variable
end


输出:
dimensions:
      longitude = 360
      latitude = 181
      level = 3
      time = 92  // 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 z ( time, level, latitude, longitude )
         scale_factor : 0.8003769331863336
         add_offset :   32780.72871778341
         _FillValue :   -32767
         missing_value :        -32767
         units :        m**2 s**-2
         long_name :    Geopotential
         standard_name :        geopotential


参考兰溪 NCL 学习  http://blog.sina.com.cn/s/blog_e7d0ac340102w0uo.html
some tips
http://blog.sina.com.cn/s/blog_e7d0ac340102w0uo.html

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 立即注册

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

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

返回顶部