- 积分
- 541
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-10-19
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本人刚学ncl,花了两张丑图,一个温度场,一个气压场。问题1:为什么陆地总是绿色的。还有就是色标数值大小是单位K吧。有没有命令可以只画陆地或只画海洋
问题2:气压场中气压值怎么让它单位是hpa。
问题3:如何让亚洲这一块处在中间位置。现在的地图是北美在图的中间
都是小问题,但是这些东西找起来也费劲。希望熟练ncl的人能帮助一下。或者推荐一下这些问题的网址。感谢啦
温度场脚本:
;************************************
;
; CSM_Graphics: ocean_1.ncl
;
;************************************
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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
;************************************
begin
;************************************
in = addfile("/lustre/home/niehw/msst.nc","r")
sst=in->sst ; get rid of cyclic points (req to plt)
;************************************
wks = gsn_open_wks("x11","ocean") ; open a x11 file
gsn_define_colormap(wks,"BlAqGrYeOrRe")
;res@gsnSpreadcolorStart =14
res = True
res@cnFillOn = True ; turn on color fill
res@mpFillOn = True ; turn off gray continents
res@mpFillColor = "gray"
res@mpOutlineOn = True ; turn off continental outline
res@gsnDraw = False ; do not draw picture
res@gsnFrame = False ; do not advance frame
res@cnMinLevelValF = 195.0 ; 最小值
res@cnMaxLevelValF = 328.0 ; 最大值
;res@cnLevelSpacingF = 2.25 ; 间隔
res@gsnSpreadColorStart = 14 ; 起始于color index 14
sst2=sst@add_offset+sst*sst@scale_factor
copy_VarMeta(sst,sst2)
sst_mean=dim_avg_n_Wrap(sst2,0)
printVarSummary(sst2)
plot = gsn_csm_contour_map_ce(wks,sst_mean,res) ; create plot
draw(plot)
frame(wks)
;************************************
end
气压场脚本
;************************************
;
; CSM_Graphics: ocean_1.ncl
;
;************************************
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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
;************************************
begin
;************************************
in = addfile("/lustre/home/niehw/mslp.nc","r")
msl=in->msl ; get rid of cyclic points (req to plt)
msl&longitude@units ="degrees_east"
msl&latitude@units ="degrees_north"
;************************************
wks = gsn_open_wks("x11","oceanpresure") ; open a x11 file
gsn_define_colormap(wks,"BlAqGrYeOrRe")
res = True
res@cnFillOn = False ; turn on color fill
res@mpOutlineOn = True ; turn off continental outline
msl2=msl@add_offset+msl*msl@scale_factor
copy_VarMeta(msl,msl2)
msl_mean=dim_avg_n_Wrap(msl2,0)
printVarSummary(msl2)
plot = gsn_csm_contour_map_ce(wks,msl_mean,res) ; create plot
draw(plot)
frame(wks)
;************************************
end
|
|
|
-
-
|