- 积分
- 109
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-8-16
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
;----------------------------------------------------------------------
; contoursym_1.ncl
;
; Concepts illustrated:
; - Using a symmetric color map
; - Using a blue-red color map
; - Explicitly setting contour levels
;----------------------------------------------------------------------
;
; These files are loaded by default in NCL V6.2.0 and newer
; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
;---Open file and read in Sea Surface Temperature Anomalies
a = addfile("sst.nc","r")
sst = a->sst
lon1 = a->longitude
lat1 = a->latitude
dim1=dimsizes(sst)
ave1=new((/dim1(0),dim1(1)/),"float")
ave1=0
copy_VarCoords(sst(:,:,1),ave1)
ave1!0 = "lon"
ave1!1 = "lat"
ave1&lon=lon1
ave1&lat=lat1
lat@units = "degrees_north"
lon@units = "degrees_east"
;---Start the graphics
wks = gsn_open_wks("png","contoursym") ; send graphics to PNG file
res = True
res@gsnMaximize = True ; maximize plot in frame
res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
res@cnMinLevelValF = 0. ; set min contour level
res@cnMaxLevelValF = 30. ; set max contour level
res@cnLevelSpacingF = 0.5 ; set contour spacing
res@cnFillOn = True ; turn on contour fill
res@cnLinesOn = False ; turn off contour lines
res@cnLineLabelsOn = False ; turn off contour labels
res@cnFillPalette = "BlueRed" ; set color map
plot = gsn_csm_contour_map(wks,ave1,res)
end
|
-
|