- 积分
- 45
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-3-13
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
附上代码
; Example script to produce cape/cin/lcl/lfc plotsload "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"begin;; The WRF ARW input file. ; This needs to have a ".nc" appended, so just do it. a = addfile("../wrfout_d01_2000-01-24_12:00:00.nc","r"); We generate plots, but what kind do we prefer? type = "x11"; type = "pdf"; type = "ps"; type = "ncgm" wks = gsn_open_wks(type,"plt_cape") gsn_define_colormap(wks,"WhViBlGrYeOrReWh"); Set some basic resources res = True res@MainTitle = "REAL-TIME WRF" pltres = True mpres = True mpres@mpGeophysicalLineColor = "Black" mpres@mpNationalLineColor = "Black" mpres@mpUSStateLineColor = "Black" mpres@mpGridLineColor = "Black" mpres@mpLimbLineColor = "Black" mpres@mpPerimLineColor = "Black" mpres@mpGridSpacingF = 10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Which times and how many time steps are in the data set? times = wrf_user_getvar(a,"times",-1) ; get all times in the file ntimes = dimsizes(times) ; number of times in the file it = ntimes-1 ; only interested in last time res@TimeLabel = times(it) ; set Valid time to use on plot cape2d = wrf_user_getvar(a,"cape_2d",it) cape3d = wrf_user_getvar(a,"cape_3d",it) ; extract the data from the multi-dimensional fields cape = cape3d(0,:,:,:) cin = cape3d(1,:,:,:) mcape = cape2d(0,:,:) mcin = cape2d(1,:,:) lcl = cape2d(2,:,:) lfc = cape2d(3,:,:) opts = res opts@cnFillOn = True opts@cnLineLabelsOn = False opts@FieldTitle = "mcape" opts@ContourParameters = (/ 500., 3000., 250./) contour = wrf_contour(a,wks,mcape,opts) plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres) opts@FieldTitle = "mcin" opts@ContourParameters = (/ 0., 125., 25./) contour = wrf_contour(a,wks,mcin,opts) plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres) opts@FieldTitle = "lfc" opts@ContourParameters = (/ 200., 3800., 400./) contour = wrf_contour(a,wks,lfc,opts) plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres) opts@FieldTitle = "lcl" opts@ContourParameters = (/ 200., 3800., 400./) contour = wrf_contour(a,wks,lcl,opts) plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres) opts@FieldTitle = "cape" opts@ContourParameters = (/ 250., 3250., 250./) do il = 0,9 ; only interested in the first 10 levels ilev = il + 1 opts@PlotLevelID = "level " + ilev contour = wrf_contour(a,wks,cape(il,:,:),opts) plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres) end do opts@FieldTitle = "cin" opts@ContourParameters = (/ 0., 300., 25./) do il = 0,9 ; only interested in the first 10 levels ilev = il + 1 opts@PlotLevelID = "level " + ilev contour = wrf_contour(a,wks,cin(il,:,:),opts) plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres) end do;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;end
|
-
-
|