Windows
conda activate ncl_stable
NC数据读取和处理
; 去除海温趋势及年循环
yyfac = yyyymm_to_yyyyfrac(yyyymm, 0.0)
; sst1 = dtrend_msg_n(yyfac, sst, True, False,0)
sst1 = dtrend_quadratic_msg_n(sst, True, False,0)
copy_VarMeta(sst, sst1)
clStrt = 198101
clLast = 201012
iClmStrt = ind(yyyymm.eq.clStrt)
iClmLast = ind(yyyymm.eq.clLast)
xClm = clmMonTLL(sst1(iClmStrt:iClmLast,:,:))
sstana = calcMonAnomTLL ( sst1, xClm )
copy_VarMeta(sst, sstana)
printVarSummary(sstana)
绘制线图
设定坐标轴显示数字的精度
res@tmYLPrecision = 2
线图
wks = gsn_open_wks("pdf", "./picture")
res = True
res@gsnMaximize = True
res@gsnPaperOrientation = "portrait"
res@gsnDraw = False
res@gsnFrame = False
res@xyLineThicknessF = 3
res@xyMonoDashPattern = 1
res@vpHeightF = 0.3
res@vpWidthF = 0.7
res@trXMinF = 1900
res@trYMaxF = 20
res@tiXAxisString = "year"
res@xyLineColor = "darkgreen&