爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 3566|回复: 1

ncl新手一些简单的问题求帮助

[复制链接]

新浪微博达人勋

发表于 2016-10-26 16:04:18 | 显示全部楼层 |阅读模式
GrADS
系统平台: ncl
问题截图: -
问题概况: ncl绘图小技巧
我看过提问的智慧: 看过
自己思考时长(天): 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




QQ图片20161026155756.png
QQ图片20161026155812.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2016-10-26 16:05:18 | 显示全部楼层
气压场脚本
;************************************
;
; 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
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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