爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 6054|回复: 0

[作图] 我的浮点型数据转换为short型,就变成0了。。。。

[复制链接]
发表于 2019-3-3 16:42:02 | 显示全部楼层 |阅读模式

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

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

x
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load"$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

f1=addfile("C:/Users/Administrator/Desktop/data/uwnd.1987.nc","r")
g1=addfile("C:/Users/Administrator/Desktop/data/vwnd.1987.nc","r")
U=f1->uwnd(181:211,13,30:35,80:100)
V=g1->vwnd(181:211,13,30:35,80:100)
Lat=U&lat
Lon=U&lon
div=uv2dv_cfd(U,V,Lat,Lon,0)
Div=dim_avg_n_Wrap(div,0)
index=wgt_areaave(Div,1.0,1.0,0)
index@_FillValue= -9.96921e+36
b=floattoshort(index)
print(b)
Variable: b
Type: short
Total Size: 2 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes:   [1]
Coordinates:
Number Of Attributes: 1
  _FillValue :  -32767
(0)     0


密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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