爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 5491|回复: 3

怎么把点和图画在一张上面

[复制链接]
发表于 2015-4-29 22:53:45 | 显示全部楼层 |阅读模式

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

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

x
画了一张温度图,想点几个站点位置在上面,结果就变成了一张图画得是站点,一张图画得是温度平面图,怎么把他们结合在一起?

;   Example script to produce plots for a WRF real-data run,
;   with the ARW coordinate dynamics option.

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
;load "./WRFUserARW.ncl"

begin
;
; The WRF ARW input file.
; This needs to have a ".nc" appended, so just do it.
  a = addfile("./wrfout.nc","r")
; We generate plots, but what kind do we prefer?
  type = "png"
; type = "pdf"
; type = "ps"
; type = "ncgm"
  wks = gsn_open_wks(type,"L")
  gsn_define_colormap(wks,"default")

; Set some basic resources
  res = True
  res@MainTitle                   = "REAL-TIME WRF"
  pltres = True
  mpres = True


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; What times and how many time steps are in the data set?

    it=0

; First get the variables we will need

     L = wrf_user_getvar(a,"T2",it)
; Plotting options for T
      opts = res
      opts@cnFillOn = True
      opts@ContourParameters = (/ 0., 24., 1./)
      contour_tc = wrf_contour(a,wks,L,opts)
      delete(opts)
   ;Plotting Provincial boundary
     mpres@mpDataBaseVersion="MediumRes"
     mpres@mpDataSetName="Earth..4"
     mpres@mpGeophysicalLineColor = "Black"
     mpres@mpNationalLineColor    = "Black"
     mpres@mpGridLineColor        = "Black"
     mpres@mpLimbLineColor        = "Black"
mpres@mpPerimLineColor       = "Black"
     mpres@mpUSStateLineThicknessF     = 2
     mpres@mpNationalLineThicknessF    = 2
     mpres@mpUSStateLineColor="Black"
     mpres@mpOutlineSpecifiers="China:states"

    ; MAKE PLOTS
      plot = wrf_map_overlays(a,wks,(/contour_tc/),pltres,mpres)

    ; plot
      lat =(/38.93/)
      lon = (/100.43/)
      mres = True
mres@gsMarkerSizeF = 10.
      mres@gsMarkerIndex = 16
      mres@gsMarkerColor = "black"
      dum1 =gsn_add_polymarker(wks,plot,lon,lat,mres)
      draw(wks);
      frame(wks)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
end
密码修改失败请联系微信:mofangbao
发表于 2015-4-30 07:28:54 | 显示全部楼层
overlay............
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2015-4-30 09:25:02 | 显示全部楼层
增加页面设置的属性呀!
mpres@gsnDraw=False
mpres@gsnFrame=False
密码修改失败请联系微信:mofangbao
发表于 2015-9-9 11:31:17 | 显示全部楼层
本帖最后由 janweis 于 2015-9-9 12:11 编辑

由于wrf_map_overlays为NCL_WRF的功能,
原函数为wrf_overlays (nc_file, wks, (/graphics/), pltres)
在设置中需要加上pltres@FramePlot=False
而后在后面加上frame(wks)
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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