- 积分
- 622
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2021-7-22
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
;load WRF ARW model data
;***********************************************
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/wrf/WRFUserARW.ncl"
;***********************************************
begin
;************************************************
; open file and read in data
;************************************************
dir = "./"
fn = systemfunc ("ls -1 " + dir + "202002"+".nc")
in = addfiles (fn(:),"r")
ListSetType(in,"cat")
sshf1 = short2flt(in[:]->sshf(:,:,:))
dim=dimsizes(sshf1)
sshf1_ave = dim_avg_n_Wrap(sshf1,0)/3600
;print(sshf1_ave)
;
wks_type = "png"
wks = gsn_open_wks(wks_type,"sshf202002")
res = True
res@gsnMaximize = True
res@gsnDraw = False
res@gsnFrame = False
res@tmBorderThicknessF = 3.0
res@mpMinLatF = 15 ; Asia limits
res@mpMaxLatF = 53
res@mpMinLonF = 84
res@mpMaxLonF = 127
res@cnLevelSelectionMode = "ExplicitLevels"
res@cnFillOn = True
res@cnLinesOn = False ;等值线不显示
res@cnLineLabelsOn = False
res@cnFillDrawOrder = "PreDraw" ; draw contours first
res@cnFillPalette = "BlAqGrYeOrRe" ;depth_qiu_02
;res@cnLevels = (/-130,-120,-110,-100,-90,-80,-70,-60,-50,-40,-30,-20,-10,0,10,20/)
;res@cnFillColors = (/5,8,11,15,20,25,30,35,44,50,60,70,74,80,90,95,98,99/)
res@lbLabelBarOn = True ;LabelBar显示
res@tiMainOffsetYF = 0.02 ;set place for main title along Y,offset
res@tiMainFontHeightF = 0.02 ;set main title font size
res@tiMainString = "SSHF"
res@gsnAddCyclic = False ;由于我们的数据不是循环地球一周的,因此必须把这个置否
res@mpDataSetName = "/data1/pub_data/ncl_database/Earth..4" ; This new database contains
res@mpDataBaseVersion = "MediumRes" ; Medium resolution database
res@mpOutlineOn = True ; Turn on map outlines
res@mpOutlineSpecifiers = (/"China","China:Provinces"/) ;China:states
res@mpFillBoundarySets = "NoBoundaries"
res@mpOutlineBoundarySets = "NoBoundaries"
res@mpMaskAreaSpecifiers = (/"China:states"/)
res@mpAreaMaskingOn = True ;使能填充覆盖
res@mpOceanFillColor = 0 ;用白色填充海洋 0是colormap的索引值
res@mpInlandWaterFillColor= 0 ;用白色填充内陆湖水
res@mpGeophysicalLineThicknessF= 2. ; double the thickness of geophysical boundaries
res@mpNationalLineThicknessF= 2. ; double the thickness of national boundaries
res@mpProjection = "LambertConformal" ;兰伯特投影
res@mpLambertMeridianF = 110.0
res@mpLimitMode = "LatLon"
res@mpLambertParallel1F = .001 ;Default: .001 ;可以自己改一改,看看投影有什么不同,挺有趣的
res@mpLambertParallel2F = 89.999 ;Default: 89.999
;---------------------------------------------------------------
res1 = True
res1@gsnMaximize = False
res1@gsnDraw = False
res1@gsnFrame = False
res1@tmBorderThicknessF = 3.0
res1@mpMinLatF = 2.5 ; Asia limits
res1@mpMaxLatF = 24
res1@mpMinLonF = 106.5
res1@mpMaxLonF = 120.5
res1@vpXF = 0.8 ;左边距
res1@vpYF = 0.756 ;上边距
res1@vpWidthF = 0.11 ; height and width of plot
res1@vpHeightF = 0.85
res1@cnFillOn = True
res1@cnLinesOn = False ;等值线不显示
res1@cnLineLabelsOn = False
res1@cnFillDrawOrder = "PreDraw" ; draw contours first
res1@cnFillPalette = "BlAqGrYeOrRe" ;depth_qiu_02
res1@lbLabelBarOn = False ;LabelBar显示
res1@tiMainOffsetYF = 0.02 ;set place for main title along Y,offset
res1@tiMainFontHeightF = 0.02 ;set main title font size
res1@tiMainString = ""
res1@gsnRightString = ""
res1@gsnLeftString = ""
res1@gsnAddCyclic = False ;由于我们的数据不是循环地球一周的,因此必须把这个置否
res1@mpDataSetName = "/data1/pub_data//ncl_database/Earth..4" ; This new database contains
res1@mpDataBaseVersion = "MediumRes" ; Medium resolution database
res1@mpOutlineOn = True ; Turn on map outlines
res1@mpOutlineSpecifiers = (/"China","China:Provinces"/) ;China:states
res1@mpFillBoundarySets = "NoBoundaries"
res1@mpOutlineBoundarySets = "NoBoundaries"
res1@mpMaskAreaSpecifiers = (/"China:states"/)
res1@mpAreaMaskingOn = True ;使能填充覆盖
res1@mpOceanFillColor = 0 ;用白色填充海洋 0是colormap的索引值
res1@mpInlandWaterFillColor= 0 ;用白色填充内陆湖水
res1@mpGeophysicalLineThicknessF= 2. ; double the thickness of geophysical boundaries
res1@mpNationalLineThicknessF= 2. ; double the thickness of national boundaries
res1@mpProjection = "LambertConformal" ;兰伯特投影
res1@mpLambertMeridianF = 110.0
res1@mpLimitMode = "LatLon"
res1@mpLambertParallel1F = .001 ;Default: .001 ;可以自己改一改,看看投影有什么不同,挺有趣的
res1@mpLambertParallel2F = 89.999 ;Default: 89.999
;------------------------------------------------------------------------
;xx map=gsn_csm_contour_map_ce(wks,blh_mon_ave(:,:),res)
map=gsn_csm_contour_map_ce(wks,sshf1_ave(:,:),res)
map1=gsn_csm_contour_map(wks,sshf1_ave(:,:),res1)
dgres = False
dgres@gsLineThicknessF = 2.0
dgres@gsLineColor = "Black"
plot1 = gsn_add_shapefile_polylines(wks,map,"/data3/wangyan/bou-files/bou2_4l_cn50.shp",dgres)
plot11 = gsn_add_shapefile_polylines(wks,map1,"/data3/wangyan/bou-files/bou2_4l_cn50.shp",dgres)
draw(map)
draw(map1)
frame(wks)
end
|
-
|