- 积分
- 404
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-5-1
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 Anonymous888 于 2018-7-3 22:44 编辑
使用ncep fnl 资料画500hPa高度场和850hPa风场
- begin
- filename = "fnl_20180516_00_00"
- f = addfile(filename + ".grib2", "r")
- hgt = f->HGT_P0_L100_GLL0({50000}, :, :)
- hgt = hgt * 0.1
- u = f->UGRD_P0_L100_GLL0({85000}, ::4, ::4)
- u = u * 2.5
- v = f->VGRD_P0_L100_GLL0({85000}, ::4, ::4)
- v =v * 2.5
- wks = gsn_open_wks("pdf", "./test/" + filename)
- res = True
- res@gsnDraw = False
- res@gsnFrame = False
- res@gsnLeftString = ""
- res@gsnRightString = ""
- ;>---------------------------------------<
- ; set for the map
- ;>---------------------------------------<
- mpres = res
- mpres@mpFillOn = False
- mpres@mpMinLatF = 10.
- mpres@mpMaxLatF = 80.
- mpres@mpMinLonF = 60.
- mpres@mpMaxLonF = 140.
- mpres@mpDataBaseVersion = "MediumRes"
- mpres@mpDataSetName = "Earth..4"
- mpres@mpOutlineSpecifiers = (/"China:states"/)
- mpres@pmTickMarkDisplayMode = "Always"
- mpres@tmXBMajorLengthF = 0.005
- ;>---------------------------------------<
- ;>---------------------------------------<
- ; set resource for contour plot
- ;>---------------------------------------<
- cnres = res
- cnres@cnSmoothingOn = True ;
- cnres@cnSmoothingDistanceF = 0.001
- cnres@cnLevelSelectionMode = "ManualLevels"
- cnres@cnMinLevelValF = 500
- cnres@cnMaxLevelValF = 600
- cnres@cnLevelSpacingF = 4
- cnres@cnInfoLabelOn = False
- cnres@cnLineLabelsOn = True
- cnres@cnLineLabelFontHeightF = 0.01
- cnres@cnLineThicknessF = 2.0
- cnres@cnLineLabelInterval = 1
- ;>---------------------------------------<
- ;>---------------------------------------<
- ; set resource for windBarb plot
- ;>---------------------------------------<
- vcres = res
- vcres@gsnAddCyclic = False
- vcres@vcGlyphStyle = "WindBarb"
- vcres@vcRefLengthF = 0.02
- vcres@vcRefAnnoOn = False
- vcres@vcWindBarbLineThicknessF = 1.5
- vcres@vcWindBarbColor = "black"
- vcres@vcMinMagnitudeF = 0.01
- vcres@vcWindBarbTickLengthF = 0.35
- ;>---------------------------------------<
- mapplot = gsn_csm_map(wks, mpres)
- cnplot = gsn_csm_contour(wks, hgt, cnres)
- vcplot = gsn_csm_vector(wks, u, v, vcres)
- overlay(mapplot, cnplot)
- overlay(mapplot, vcplot)
- draw(mapplot)
- frame(wks)
- end
|
|