爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 5055|回复: 1

[作图] 绘制土地利用率

[复制链接]
发表于 2022-12-17 20:06:09 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
将wrf输出结果中的土地利用类型可视化,默认20种类型(见下图)
a2 = addfile("./wrfdata_output/geo_em.d03.nc","r")
LAT = wrf_user_getvar(a2, "lat", 0)
LON = wrf_user_getvar(a2, "lon", 0)
land1 = a2->LU_INDEX
land2 = a2->LANDMASK
land3 = a2->LANDUSEF


ds = dimsizes(LAT)
nrow = ds(0)-1
ncol = ds(1)-1


wks = gsn_open_wks("png", "./landuse3")
res = True
res@gsnDraw = False
res@gsnFrame = False
res@mpGridAndLimbOn = True
res@mpLandFillColor            = "white"
res@mpInlandWaterFillColor     = "white"
res@mpOceanFillColor           = "white"
; res@mpOutlineBoundarySets   = "National"
res@mpOutlineOn = True
res@mpDataSetName="Earth..4"
res@mpOutlineSpecifiers = (/"China: states","Taiwan"/)
res@mpDataBaseVersion = "MediumRes"
res@mpFillDrawOrder = "PostDraw"
res@mpFillOn = True
res@mpFillAreaSpecifiers = (/"water","land"/)
res@mpSpecifiedFillColors = (/"white","white"/)
res@mpSpecifiedFillColors = (/0,0/)
res@mpAreaMaskingOn         = True
res@mpMaskAreaSpecifiers    = (/"China: states","Taiwan"/)
res@cnLinesOn = False
res@cnLineLabelsOn = False
res@cnInfoLabelOn = True
res@cnFillOn = True
res@cnFillPalette = "default"
res@cnLevelSpacingF = 1
res@cnLevelSelectionMode = "ManualLevels"
res@pmTickMarkDisplayMode = "Always"
res@lbLabelBarOn = True
res@mpProjection = "LambertConformal"
res@mpLambertMeridianF = 108
res@mpLambertParallel1F = 30
res@mpLambertParallel2F = 60
res@mpLimitMode = "Corners"
res@mpLeftCornerLatF = LAT(0,0)
res@mpLeftCornerLonF = LON(0,0)
res@mpRightCornerLatF = LAT(nrow,ncol)
res@mpRightCornerLonF = LON(nrow,ncol)
res@tmXTOn = False
res@tmYROn = False
res@gsnAddCyclic = False
res@tfDoNDCOverlay = True
setvalues NhlGetWorkspaceObjectId()
"wsMaximumSize" : 100000000000000
end setvalues
plot = gsn_csm_contour_map(wks, land1(0,:,:), res)
draw(plot)
frame(wks)
end



Vegetation.png
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2022-12-17 20:10:16 | 显示全部楼层
绘制得到的结果
landuse3.png
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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