<div>Hi All</div><div><br></div><div>I always met a warning:</div><div>Dimension (0) has not been defined&nbsp;</div><div>when use &nbsp;dim_stddev_n_Wrap or dim_variance_n_Wrap to compute ensemble std or var on given height. I'm not sure about the result calculate from dim_stddev_n_Wrap. Does anyone has met this warning and give me some advise? Thanks a lot.&nbsp;</div><div><br></div><div>-------------------------------------------------------------------------------</div><div>Here is the output</div><div><br></div><div><div>&nbsp;Copyright (C) 1995-2015 - All Rights Reserved</div><div>&nbsp;University Corporation for Atmospheric Research</div><div>&nbsp;NCAR Command Language Version 6.3.0</div><div>&nbsp;The use of this software is governed by a License Agreement.</div><div>&nbsp;See http://www.ncl.ucar.edu/ for more details.</div><div>(0)<span class="Apple-tab-span" style="white-space:pre">        </span>================================================================</div><div>(0)<span class="Apple-tab-span" style="white-space:pre">        </span>Time 2013-05-31_21:00:00 0</div><div>(0)<span class="Apple-tab-span" style="white-space:pre">        </span>Read in prior</div><div><br></div><div><br></div><div>Variable: fils</div><div>Type: string</div><div>Total Size: 16 bytes</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span class="Apple-tab-span" style="white-space:pre">        </span>[2]</div><div>Coordinates:&nbsp;</div><div>(0)<span class="Apple-tab-span" style="white-space:pre">        </span>/home/qiuxb/WRF_DART/Data/20130531/CONV_12/Plot/WRFOUT/wrffcst_d01_2013-05-31_21:00:00_1</div><div>(1)<span class="Apple-tab-span" style="white-space:pre">        </span>/home/qiuxb/WRF_DART/Data/20130531/CONV_12/Plot/WRFOUT/wrffcst_d01_2013-05-31_21:00:00_2</div><div>warning:Dimension (0) has not been defined</div><div>(0)<span class="Apple-tab-span" style="white-space:pre">        </span>Read in post</div><div><br></div><div><br></div><div>Variable: fils</div><div>Type: string</div><div>Total Size: 16 bytes</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span class="Apple-tab-span" style="white-space:pre">        </span>[2]</div><div>Coordinates:&nbsp;</div><div>(0)<span class="Apple-tab-span" style="white-space:pre">        </span>/home/qiuxb/WRF_DART/Data/20130531/CONV_12/Plot/WRFOUT/wrfout_d01_2013-05-31_21:00:00_1</div><div>(1)<span class="Apple-tab-span" style="white-space:pre">        </span>/home/qiuxb/WRF_DART/Data/20130531/CONV_12/Plot/WRFOUT/wrfout_d01_2013-05-31_21:00:00_2</div><div>warning:Dimension (0) has not been defined</div><div>(0)<span class="Apple-tab-span" style="white-space:pre">        </span>------------------temp------------------</div></div><div><br></div><div>-------------------------------------------------------------------------------</div><div>Here is the scripts</div><div><br></div><div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div><div><br></div><div>;-----------------------------------------------------------------------------------------</div><div><br></div><div>begin</div><div><br></div><div>;-----------------------------------------------------------------------------------------</div><div><br></div><div>wrfout_dir = "/home/qiuxb/WRF_DART/Data/20130531/CONV_12/Plot/WRFOUT"</div><div>plot_dir &nbsp; = "/home/qiuxb/WRF_DART/Data/20130531/CONV_12/Plot/WRFOUT"</div><div><br></div><div>prior_post_name = (/ "fcst", "out" /)</div><div><br></div><div>dimx = 250</div><div>dimy = 200</div><div>dimz = 50</div><div>ens_size = 2</div><div><br></div><div>x_start = 80; 75</div><div>x_end &nbsp; = &nbsp;dimx - 75 ;dimx-60</div><div>y_start = 65 ;60</div><div>y_end &nbsp; = dimy-60 ;dimy-50</div><div><br></div><div>type = "png"</div><div>wks &nbsp;= gsn_open_wks(type, plot_dir + "/ens_spread" ) &nbsp; &nbsp; ; open a ps file</div><div><br></div><div>ntimes = 1</div><div>time_ini = "20130531210000"</div><div>time_intvl = 5 ; minute</div><div><br></div><div>z_intvl = (/ 1, 5, 10, 15, 20, 22, 24, 26, 30, 33 /)</div><div>height = 2000 ; msl &nbsp;</div><div><br></div><div>;gsn_define_colormap(wks,"BlGrYeOrReVi200")</div><div>gsn_define_colormap(wks,"WhBlGrYeRe")</div><div><br></div><div>z_mem &nbsp; &nbsp; = new((/dimz,dimy,dimx/),"float") ; grid point height</div><div>dbz_mem &nbsp; = new((/ens_size,dimz,dimy,dimx/),"float")</div><div>dbz_plane = new((/ens_size,dimy,dimx/),"float")</div><div>dbz_prior = new((/dimy,dimx/),"float")</div><div>dbz_post &nbsp;= new((/dimy,dimx/),"float")</div><div>T_mem &nbsp; &nbsp; = new((/ens_size,dimz,dimy,dimx/),"float")</div><div>T_plane &nbsp; = new((/ens_size,dimy,dimx/),"float")</div><div>T_prior &nbsp; = new((/dimy,dimx/),"float")</div><div>T_post &nbsp; &nbsp;= new((/dimy,dimx/),"float")</div><div>P_mem &nbsp; &nbsp; = new((/ens_size,dimz,dimy,dimx/),"float")</div><div>P_plane &nbsp; = new((/ens_size,dimy,dimx/),"float")</div><div>P_prior &nbsp; = new((/dimy,dimx/),"float")</div><div>P_post &nbsp; &nbsp;= new((/dimy,dimx/),"float")</div><div>Q_mem &nbsp; &nbsp; = new((/ens_size,dimz,dimy,dimx/),"float")</div><div>Q_plane &nbsp; = new((/ens_size,dimy,dimx/),"float")</div><div>Q_prior &nbsp; = new((/dimy,dimx/),"float")</div><div>Q_post &nbsp; &nbsp;= new((/dimy,dimx/),"float")</div><div>U_mem &nbsp; &nbsp; = new((/ens_size,dimz,dimy,dimx/),"float")</div><div>U_plane &nbsp; = new((/ens_size,dimy,dimx/),"float")</div><div>U_prior &nbsp; = new((/dimy,dimx/),"float")</div><div>U_post &nbsp; &nbsp;= new((/dimy,dimx/),"float")</div><div>V_mem &nbsp; &nbsp; = new((/ens_size,dimz,dimy,dimx/),"float")</div><div>V_plane &nbsp; = new((/ens_size,dimy,dimx/),"float")</div><div>V_prior &nbsp; = new((/dimy,dimx/),"float")</div><div>V_post &nbsp; &nbsp;= new((/dimy,dimx/),"float")</div><div>W_mem &nbsp; &nbsp; = new((/ens_size,dimz,dimy,dimx/),"float")</div><div>W_plane &nbsp; = new((/ens_size,dimy,dimx/),"float")</div><div>W_prior &nbsp; = new((/dimy,dimx/),"float")</div><div>W_post &nbsp; &nbsp;= new((/dimy,dimx/),"float")</div><div>;-----------------------------------------------------------------------------------------</div><div>time_wrf = systemfunc("da_advance_time.exe " + time_ini + " " + "0m -w")</div><div>fin = addfile(wrfout_dir + "/wrfout_d01_" + time_wrf + "_1" + ".nc","r")</div><div>z = wrf_user_getvar(fin, "z",0) &nbsp; &nbsp; &nbsp; &nbsp;; grid point height</div><div>XLAT &nbsp;= wrf_user_getvar(fin, "XLAT",0)</div><div>XLONG = wrf_user_getvar(fin, "XLONG",0)</div><div><br></div><div>do tm = 0,ntimes-1</div><div>&nbsp; &nbsp; time_wrf = systemfunc("da_advance_time.exe " + time_ini + " " + tostring(time_intvl * tm) + "m -w")</div><div>&nbsp; &nbsp; print( "================================================================" )</div><div>&nbsp; &nbsp; print( "Time " + time_wrf + " " + tm)&nbsp;</div><div><br></div><div>&nbsp; &nbsp; print( "Read in prior" )</div><div>&nbsp; &nbsp; fils = systemfunc("ls " + wrfout_dir + "/wrffcst_d01_" + time_wrf + "_*")</div><div>&nbsp; &nbsp; print(fils)</div><div>&nbsp; &nbsp; f = addfiles(fils + ".nc","r")</div><div><br></div><div>&nbsp; &nbsp; do j=0, ens_size - 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; z_mem(:,:,:) &nbsp; &nbsp; = wrf_user_getvar(f[j], "z",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; dbz_mem(j,:,:,:) = wrf_user_getvar(f[j],"REFL_10CM",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; T_mem(j,:,:,:) &nbsp; = wrf_user_getvar(f[j],"T",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; P_mem(j,:,:,:) &nbsp; = wrf_user_getvar(f[j],"P",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Q_mem(j,:,:,:) &nbsp; = wrf_user_getvar(f[j],"QVAPOR",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; U_mem(j,:,:,:) &nbsp; = wrf_user_getvar(f[j],"ua",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; V_mem(j,:,:,:) &nbsp; = wrf_user_getvar(f[j],"va",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; W_mem(j,:,:,:) &nbsp; = wrf_user_getvar(f[j],"wa",0)</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; dbz_plane(j,:,:) = wrf_user_intrp3d(dbz_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; T_plane(j,:,:) &nbsp; = wrf_user_intrp3d(T_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; P_plane(j,:,:) &nbsp; = wrf_user_intrp3d(P_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Q_plane(j,:,:) &nbsp; = wrf_user_intrp3d(Q_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; U_plane(j,:,:) &nbsp; = wrf_user_intrp3d(U_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; V_plane(j,:,:) &nbsp; = wrf_user_intrp3d(V_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; W_plane(j,:,:) &nbsp; = wrf_user_intrp3d(W_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; end do</div><div>; &nbsp; &nbsp;dbz_prior(:,:) = dim_variance_n_Wrap(dbz_plane, 0)</div><div>&nbsp; &nbsp; T_prior &nbsp; = dim_stddev_n_Wrap(T_plane, 0)</div><div>; &nbsp; &nbsp;P_prior(:,:) &nbsp; = dim_variance_n_Wrap(P_plane, 0)</div><div>; &nbsp; &nbsp;Q_prior(:,:) &nbsp; = dim_variance_n_Wrap(Q_plane, 0)</div><div>; &nbsp; &nbsp;U_prior(:,:) &nbsp; = dim_variance_n_Wrap(U_plane, 0)</div><div>; &nbsp; &nbsp;V_prior(:,:) &nbsp; = dim_variance_n_Wrap(V_plane, 0)</div><div>; &nbsp; &nbsp;W_prior(:,:) &nbsp; = dim_variance_n_Wrap(W_plane, 0)</div><div><br></div><div>&nbsp; &nbsp; delete(fils)</div><div>&nbsp; &nbsp; delete(f)</div><div>&nbsp; &nbsp; z_mem = 0.0</div><div>&nbsp; &nbsp; dbz_mem = 0.0</div><div>&nbsp; &nbsp; T_mem = 0.0</div><div>&nbsp; &nbsp; P_mem = 0.0</div><div>&nbsp; &nbsp; Q_mem = 0.0</div><div>&nbsp; &nbsp; U_mem = 0.0</div><div>&nbsp; &nbsp; V_mem = 0.0</div><div>&nbsp; &nbsp; W_mem = 0.0</div><div>&nbsp; &nbsp; dbz_plane = 0.0</div><div>&nbsp; &nbsp; T_plane = 0.0</div><div>&nbsp; &nbsp; P_plane = 0.0</div><div>&nbsp; &nbsp; Q_plane = 0.0</div><div>&nbsp; &nbsp; U_plane = 0.0</div><div>&nbsp; &nbsp; V_plane = 0.0</div><div>&nbsp; &nbsp; W_plane = 0.0</div><div><br></div><div>&nbsp; &nbsp; print( "Read in post" )</div><div>&nbsp; &nbsp; fils = systemfunc("ls " + wrfout_dir + "/wrfout_d01_" + time_wrf + "_*")</div><div>&nbsp; &nbsp; print(fils)</div><div>&nbsp; &nbsp; f = addfiles(fils + ".nc","r")</div><div><br></div><div>&nbsp; &nbsp; do j=0, ens_size - 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; z_mem(:,:,:) &nbsp; &nbsp; = wrf_user_getvar(f[j], "z",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; dbz_mem(j,:,:,:) = wrf_user_getvar(f[j],"REFL_10CM",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; T_mem(j,:,:,:) &nbsp; = wrf_user_getvar(f[j],"T",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; P_mem(j,:,:,:) &nbsp; = wrf_user_getvar(f[j],"P",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Q_mem(j,:,:,:) &nbsp; = wrf_user_getvar(f[j],"QVAPOR",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; U_mem(j,:,:,:) &nbsp; = wrf_user_getvar(f[j],"ua",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; V_mem(j,:,:,:) &nbsp; = wrf_user_getvar(f[j],"va",0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; W_mem(j,:,:,:) &nbsp; = wrf_user_getvar(f[j],"wa",0)</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; dbz_plane(j,:,:) = wrf_user_intrp3d(dbz_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; T_plane(j,:,:) &nbsp; = wrf_user_intrp3d(T_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; P_plane(j,:,:) &nbsp; = wrf_user_intrp3d(P_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Q_plane(j,:,:) &nbsp; = wrf_user_intrp3d(Q_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; U_plane(j,:,:) &nbsp; = wrf_user_intrp3d(U_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; V_plane(j,:,:) &nbsp; = wrf_user_intrp3d(V_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; W_plane(j,:,:) &nbsp; = wrf_user_intrp3d(W_mem(j,:,:,:),z_mem(:,:,:),"h",height,0.,False)</div><div>&nbsp; &nbsp; end do</div><div>; &nbsp; &nbsp;dbz_post (:,:) = dim_variance_n_Wrap(dbz_plane, 0)</div><div>&nbsp; &nbsp; T_post &nbsp; &nbsp;= dim_stddev_n_Wrap(T_plane, 0)</div><div>; &nbsp; &nbsp;P_post (:,:) &nbsp; = dim_variance_n_Wrap(P_plane, 0)</div><div>; &nbsp; &nbsp;Q_post (:,:) &nbsp; = dim_variance_n_Wrap(Q_plane, 0)</div><div>; &nbsp; &nbsp;U_post (:,:) &nbsp; = dim_variance_n_Wrap(U_plane, 0)</div><div>; &nbsp; &nbsp;V_post (:,:) &nbsp; = dim_variance_n_Wrap(V_plane, 0)</div><div>; &nbsp; &nbsp;W_post (:,:) &nbsp; = dim_variance_n_Wrap(W_plane, 0)</div></div><div><br></div><div>end do</div><div>end</div><div><br></div><div>Best,</div><div>Xiaobin</div>