<div dir="ltr">Ehsan,<br><br>The problem is that the tke variable has one more level than the z variable because it's on a staggered set of levels<span class="gmail_default" style="font-size:small"> and the "z" array you gave it is not</span>. The wrf_user_intrp3d routine only works on a z array with the same number of levels.<div><br></div><div><div class="gmail_default" style="font-size:small">To be clear, the purpose of wrf_user_intrp3d is not to interpolate from one set of levels to another, but rather to interpolate a 3D grid onto a 2D plane. This requires that you do this using the same vertical levels that define the vertical dimension of your 3D grid. You should look on your WRF output file to find the 1D vertical levels of length bottom_top_stag (31) that represent the levels of TKE.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you still need help with this, then I suggest writing to the new WRF help forum:</div><br><a href="http://forum.mmm.ucar.edu/phpBB3/">http://forum.mmm.ucar.edu/phpBB3/</a><br><br>You'll see a link to "Post-processing/Utilities" and you can post your question there.<span class="gmail_default" style="font-size:small"></span></div><div><span class="gmail_default" style="font-size:small"><br></span></div><div><span class="gmail_default" style="font-size:small">Good luck,</span></div><div><span class="gmail_default" style="font-size:small"><br></span></div><div><span class="gmail_default" style="font-size:small">--Mary</span></div><div><span class="gmail_default" style="font-size:small"></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 16, 2018 at 12:22 PM, Ehsan Taghizadeh <span dir="ltr"><<a href="mailto:ehsantaghizadeh@yahoo.com" target="_blank">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_1583498615946033715ydp62248da7yahoo-style-wrap" style="font-family:bookman old style,new york,times,serif;font-size:16px"><div></div>
        <div>Dear Mary,</div><div><br></div><div>I have same problem as Alina. May I answer your question about printVarSummary(z,tke)?</div><div>Following are the answers:</div><div><br></div><div><br></div><div><div>Variable: tke</div><div>Type: float</div><div>Total Size: 1008886320 bytes</div><div>            252221580 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes:   [Time | 61] x [<span style="background-color:rgb(253,248,105)">bottom_top_stag</span> | 31] x [south_north | 342] x [west_east | 390]</div><div>Coordinates:</div><span class=""><div>Number Of Attributes: 6</div><div>  FieldType :   104</div><div>  MemoryOrder : XYZ</div><div>  description : TKE from PBL</div></span><div>  units :       m2 s-2</div><span class=""><div>  stagger :     Z</div><div>  coordinates : XLONG XLAT XTIME</div><div><br></div></span><div>Variable: z</div><div>Type: float</div><div>Total Size: 976341600 bytes</div><div>            244085400 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes:   [Time | 61] x [<span style="background-color:rgb(253,248,105)">bottom_top</span> | 30] x [south_north | 342] x [west_east | 390]</div><div>Coordinates:</div><div>Number Of Attributes: 6</div><div>  coordinates : XLONG XLAT</div><div>  stagger :</div><div>  units :       m</div><div>  description : Height</div><div>  MemoryOrder : XYZ</div><div>  FieldType :   104       </div><br></div><div>It seems the only difference is about (bottom_top) and (bottom_top_stag) dimension names.</div><div>I think "wrf_user_interp3d" doesn't work for TKE_PBL? I also used this script (<a href="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/LEVELS_INTERP/wrf_Height2.ncl" rel="nofollow" target="_blank">http://www2.mmm.ucar.edu/wrf/<wbr>OnLineTutorial/Graphics/NCL/<wbr>Examples/LEVELS_INTERP/wrf_<wbr>Height2.ncl</a>) for "TKE_PBL" variable of WRF, but same error has occured:</div><span class=""><div><br></div><div>"<span>mension size mismatch, dimension (1) of left hand side reference does not have the same size as the right hand side reference after subscripting.</span>"</div><div><br></div></span><div>Sincerely</div><span class="HOEnZb"><font color="#888888"><div>Ehsan</div>
        
        </font></span></div><div><div class="h5"><div id="m_1583498615946033715yahoo_quoted_9781787036" class="m_1583498615946033715yahoo_quoted">
            <div style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;color:#26282a">
                
                <div>
                    On Tuesday, October 16, 2018, 9:31:43 PM GMT+3:30, Mary Haley <<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="m_1583498615946033715yiv5621110271"><div><div dir="ltr"><div dir="ltr"><div class="m_1583498615946033715yiv5621110271gmail_default" style="font-size:small">Hi Alina,</div><div class="m_1583498615946033715yiv5621110271gmail_default" style="font-size:small"><br clear="none"></div><div class="m_1583498615946033715yiv5621110271gmail_default" style="font-size:small">I'm guessing that the error is in how wrf_user_intrp3d is being called.  If you look at the documentation:</div><div class="m_1583498615946033715yiv5621110271gmail_default" style="font-size:small"><br clear="none"></div><div class="m_1583498615946033715yiv5621110271gmail_default"><a rel="nofollow" shape="rect" href="http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_intrp3d.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Document/Functions/WRF_arw/<wbr>wrf_user_intrp3d.shtml</a><br clear="none"></div><div class="m_1583498615946033715yiv5621110271gmail_default"><br clear="none"></div><div class="m_1583498615946033715yiv5621110271gmail_default">and read the section on input arguments, it takes that the first two input arrays must be the same size, which in your case is tke and z. Did you do a printVarSummary on z to see what size it is? </div><div class="m_1583498615946033715yiv5621110271gmail_default"><br clear="none"></div><div class="m_1583498615946033715yiv5621110271gmail_default">--Mary</div><div class="m_1583498615946033715yiv5621110271gmail_default"><br clear="none"></div></div></div><div class="m_1583498615946033715yiv5621110271gmail_extra"><br clear="none"><div class="m_1583498615946033715yiv5621110271yqt3631984135" id="m_1583498615946033715yiv5621110271yqtfd25422"><div class="m_1583498615946033715yiv5621110271gmail_quote">On Thu, Oct 11, 2018 at 9:41 AM, Schuster Alina <span dir="ltr"><<a rel="nofollow" shape="rect" href="mailto:alina-galchenko@yandex.ru" target="_blank">alina-galchenko@yandex.ru</a>></span> wrote:<br clear="none"><blockquote class="m_1583498615946033715yiv5621110271gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br clear="none">
Dear colleagues!<br clear="none">
<br clear="none">
I am using a scm wrf model (an idealised case) and need to plot a variable TKE (turbulent kinetic energy) vs time and height. But I get an error<br clear="none">
<br clear="none">
fatal:Dimension size mismatch, dimension (1) of left hand side reference does not have the same size as the right hand side reference after subscripting.<br clear="none">
fatal:["Execute.c":8640]: Execute: Error occurred at or near line 246 in file /home/alina/NCL64/lib/ncarg/ nclscripts/wrf/WRFUserARW.ncl<br clear="none">
<br clear="none">
fatal:["Execute.c":8640]: Execute: Error occurred at or near line 29 in file TKE.ncl<br clear="none">
<br clear="none">
I don't know how to fix it.<br clear="none">
<br clear="none">
Line 246 contains:<br clear="none">
 if ( nd .eq. 4 ) then<br clear="none">
       var3(0,:,:,:,:) = var3d(:,:,:,:)<br clear="none">
          z(0,:,:,:,:) = z_in(:,:,:,:)<br clear="none">
     end if<br clear="none">
<br clear="none">
Don't know what's wrong. It can be the problem is with the variable TKE and its 4 dimensions:<br clear="none">
Variable: tke<br clear="none">
Type: float<br clear="none">
Total Size: 57600 bytes<br clear="none">
            14400 values<br clear="none">
Number of Dimensions: 4<br clear="none">
Dimensions and sizes: [Time | 60] x [bottom_top_stag | 60] x [south_north | 2] x [west_east | 2]<br clear="none">
Coordinates:<br clear="none">
            Time: [ 0.. 59]<br clear="none">
Number Of Attributes: 6<br clear="none">
  FieldType : 104<br clear="none">
  MemoryOrder : XYZ<br clear="none">
  description : TKE from PBL<br clear="none">
  units : J<br clear="none">
  stagger : Z<br clear="none">
  coordinates : XLONG XLAT XTIME<br clear="none">
<br clear="none">
May be someone could advise me an alternative to the command wrf_user_intrp3d or may be someone has a ready script for TKE vs height and time (gsn_csm_contour).<br clear="none">
Thanks in advance!<br clear="none">
<br clear="none">
Best Regards,<br clear="none">
Alina Schuster<br clear="none">
<br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/ mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div></div><div class="m_1583498615946033715yqt3631984135" id="m_1583498615946033715yqtfd23509">______________________________<wbr>_________________<br clear="none">ncl-talk mailing list<br clear="none"><a shape="rect" href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br clear="none">List instructions, subscriber options, unsubscribe:<br clear="none"><a shape="rect" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br clear="none"></div></div>
            </div>
        </div></div></div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>