ncl 笔记

copy_VarAtts(var, data)                                       ; 将var的属性复制data
copy_VarCoords(var, data)                                  ; 将var的坐标复制

res@pmTickMarkDisplayMode   =“Always”坐标标签上添加“度”符号

NoCreate为不创建刻度,Never创建但不显示刻度,Always总是显示,Conditional在不覆盖已有图像的坐标前提下会显示

  opt = True
  opt@gsnShadeFillType = "pattern"
  opt@gsnShadeHigh     = 17;大于范围打点
  opt@gsnShadeLow      = 17
 ;小于范围打点

plot                 = gsn_contour_shade(plot1,-0.4,0.4,opt);大于0.4 小于-0.4 范围内打点

res@gsnYRefLine=(/-0.5,0,0.5/);画辅助线
res@gsnYRefLineDashPatterns =(/14,0,14/);定义辅助线实线、虚线
res@gsnYRefLineThicknesses =(/2,3,2/);

res@cnLevelSelectionMode ="ExplicitLevels";自定义
res@cnLevels=(/-0.8,-0.6,-0.4,-0.2,-0.1,0,0.1,0.2,0.4,0.6,0.8/)

NCL中计算相关系数的函数有好几个,常用的为escorc系列和regCoef系列。

escorc(x,y)是计算两个数组最右侧一列的相关系数。如果想指定计算的列数,比如想计算x(lat,lon)和y(lat,lon,year)在lat这一列上的相关系数,就要用到escorc_n: escorc_n(x,y,0)。

相关系数的检验方法包括t检验、f检验和显著性检验,分别为ttest,ftest,rtest。

regCoef系列的命令比escorc强大很多,因为它除了返回相关系数rc,还捎带手把两个序列的标准差(rc@rstd)和t检验结果(rc@tval)都给算了。

time =f1->time 
time=cd_calendar(time,-1) ;时间格式

  sst3     = sst1(12::12,0,:,:);以第12个数开始,间隔12输出

  

 fstation = "stationdata.txt";txt有3列,不能有中文
    data = readAsciiTable(fstation,3,"float",0);opt=1 ignore the first row

    Lat = data(:,1)
    Lat@long_name = "Latitude"
    Lat@units = "degrees_north"
    Lon = data(:,2)
    Lon@long_name = "Longitude"
    Lon@units = "degrees_east"

  • 0
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值