爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 9383|回复: 2

请问wrf官网上求cape的ncl脚本中,level指什么,并且为何只有18点

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

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

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

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
4K(}SA5XC80O`6$}F`(Q[SR.png
G{2853UG0BZ}K$[S858W5MQ.png
密码修改失败请联系微信:mofangbao
发表于 2021-9-30 15:43:32 | 显示全部楼层
it = ntimes-1 你设置的就是画一个时刻的啊
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2021-11-4 17:29:14 | 显示全部楼层
level是你有18层的气压
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

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