<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I&#39;m sorry for the delayed response.  I didn&#39;t have time to look at your email in detail until just now.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I believe if you use dim_avg_n_Wrap you can get what you need:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Rot_st_avg = dim_avg_n_Wrap_Rot_st,(/0,1/))</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You should do a printVarSummary on that to make sure the dimensions are what you expect.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 18, 2016 at 3:32 AM, Amadou Coulibaly <span dir="ltr">&lt;<a href="mailto:mpapin24@gmail.com" target="_blank">mpapin24@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace;font-size:large">Hello NCL users,<br><br></div><div class="gmail_default" style="font-family:courier new,monospace;font-size:large">I want to have an overlay plot aver time and <font size="2">levels. Let say I have:<br>height_levels = ispan(100, 25900, 500) ; height levels to plot - in meter<br>nlevels = dimsizes(height_levels)<br>times = wrf_user_getvar(a,&quot;times&quot;,-1)  ; get all times in the file<br>ntimes = dimsizes(times)    ; number of times in the file<br><br></font></div><div class="gmail_default" style="font-family:courier new,monospace;font-size:large"><font size="4">I am working 3-hourly data of </font><font size="2"><font size="4">on one day, which means that ntimes=8.</font><br></font></div><div class="gmail_default" style="font-family:courier new,monospace"><font size="4">I want to plot the contour map of the following parameter:<br></font></div><div class="gmail_default" style="font-family:courier new,monospace;font-size:large"><font size="2"><font size="4">Rot_st = new((/ntimes, nlevels, nlat, nlon/), float)</font><br></font></div><div class="gmail_default" style="font-family:courier new,monospace;font-size:large"><font size="2"><br></font></div>Variable: Rot_st<br>Type: float<br>Total Size: 20653568 bytes<br>            5163392 values<br>Number of Dimensions: 4<br>Dimensions and sizes:    [8] x [52] x [107] x [116]<br>Coordinates: <br>Number Of Attributes: 1<br>  _FillValue :  <font size="2">  9.96921e+36<br><br></font><div class="gmail_default" style="font-family:courier new,monospace;font-size:large"><font size="2">​<font size="4">The following command lines plot that parameter at each time for each level. But I want to have a plot averaged over times and levels​.<br></font><br>  do it = 0,ntimes-1             ; TIME LOOP<br>      print(&quot;Working on time: &quot; + times(it) )<br>      res@TimeLabel = times(it)   ; Set Valid time to use on plots<br><br>      do level = 0, nlevels-1            ; LOOP OVER LEVELS<br>           pressure = height_levels(level)<br>           ; Add some level info to the plot<br>           res@PlotLevelID = pressure + &quot;m&quot;<br><br>    ; Plotting options for RH                <br>        opts = res                          <br>        opts@cnFillOn = True  <br>        opts@pmLabelBarOrthogonalPosF = -0.1<br>        opts@ContourParameters = (/0.6/)<br>        opts@cnFillColors = (/&quot;White&quot;,&quot;White&quot;,&quot;White&quot;, \<br>                              &quot;White&quot;,&quot;Chartreuse&quot;,&quot;Green&quot;,\<br>                              &quot;Green3&quot;,&quot;Green4&quot;, \<br>                              &quot;ForestGreen&quot;,&quot;PaleGreen4&quot;/)<br>        contour_rot =         wrf_contour(a,wks,Rot_st(it,level,:,:),opts)<br>        delete(opts)<br><br>    ; MAKE PLOTS                                       <br>      plot = wrf_map_overlays(a,wks,(/contour_rot/),pltres,mpres)<br><br>    end do      ; END OF LEVEL LOOP<br><br>  end do        ; END OF TIME LOOP</font><br></div><br><div class="gmail_default" style="font-family:courier new,monospace;font-size:large">​Is there a way to transform the above command lines in such that to have a plot averaged over times and levels?<br><br></div><div class="gmail_default" style="font-family:courier new,monospace;font-size:large">Best regards​</div><br>-- <br><div><div dir="ltr"><div><div dir="ltr"><b style="font-size:small;font-family:tahoma,sans-serif"><font color="#000066"> </font><font color="#000066">COULIBALY   </font><font color="#000066">AMADOU   </font></b><br><span style="color:rgb(0,0,102);font-family:tahoma,sans-serif;font-size:small">PhD  Student  on  West  African  Climate  System (WACS)</span><br><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">FUTA</font><font style="font-size:small;font-family:tahoma,sans-serif" color="#000066"> - </font><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">F</font><font style="font-size:small;font-family:tahoma,sans-serif" color="#000066">ederal  </font><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">U</font><font style="font-size:small;font-family:tahoma,sans-serif" color="#000066">niversity  of  </font><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">T</font><font style="font-size:small;font-family:tahoma,sans-serif" color="#000066">echnology of </font><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">A</font><font style="font-size:small;font-family:tahoma,sans-serif" color="#000066">kure, <span style="color:rgb(0,0,255)">N</span>igeria</font><div><font color="#000066" face="tahoma, sans-serif" size="2"><br></font><div><span style="color:rgb(76,17,48)"><span style="font-family:arial,helvetica,sans-serif"><i style="font-weight:bold">Visiting Student - </i></span><i style="font-weight:bold"><span style="font-family:arial,helvetica,sans-serif"><i><font size="1"><span style="font-size:13px">University of Cologne, Germany</span></font></i></span><br></i><i><span style="font-family:arial,helvetica,sans-serif">Institute of Geophysics and Meteorology</span></i><span style="font-family:arial,helvetica,sans-serif"><br></span></span><div style="letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><span style="color:rgb(76,17,48)"><span style="font-family:arial,helvetica,sans-serif"><font size="1">Pohligstr. 3 / Office 3.102</font></span></span></div><div style="letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><span style="color:rgb(76,17,48)"><span style="font-family:arial,helvetica,sans-serif"><font size="1">D-50969 Köln</font></span></span></div></div></div><div style="color:rgb(80,0,80)"><i style="color:rgb(34,34,34);font-family:&quot;bookman old style&quot;,&quot;new york&quot;,times,serif"><font size="1"><span style="color:rgb(0,0,127)"><span style="font-size:13px"><br></span></span></font></i></div><span style="font-size:small;font-family:tahoma,sans-serif;color:rgb(0,0,102)"><u>Project</u>: </span><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">WASCAL</font><span style="font-size:small;font-family:tahoma,sans-serif;color:rgb(0,0,102)"> (</span><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">W</font><span style="font-size:small;font-family:tahoma,sans-serif;color:rgb(0,0,102)">est </span><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">A</font><span style="font-size:small;font-family:tahoma,sans-serif;color:rgb(0,0,102)">frican </span><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">S</font><span style="font-size:small;font-family:tahoma,sans-serif;color:rgb(0,0,102)">cience </span><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">S</font><span style="font-size:small;font-family:tahoma,sans-serif;color:rgb(0,0,102)">ervice </span><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">C</font><span style="font-size:small;font-family:tahoma,sans-serif;color:rgb(0,0,102)">entre on </span><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">C</font><span style="font-size:small;font-family:tahoma,sans-serif;color:rgb(0,0,102)">limate </span><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">C</font><span style="font-size:small;font-family:tahoma,sans-serif;color:rgb(0,0,102)">hange and </span><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">A</font><span style="font-size:small;font-family:tahoma,sans-serif;color:rgb(0,0,102)">dapted </span><font style="font-size:small;font-family:tahoma,sans-serif" color="#0000ff">L</font><span style="font-size:small;font-family:tahoma,sans-serif;color:rgb(0,0,102)">and <span style="color:rgb(0,0,255)">U</span>se) </span><br><font style="font-family:tahoma,sans-serif;font-size:small;color:rgb(0,0,102)" color="#000066">Phone:<a href="tel:%28%2B234%29%20812%20965%203659" value="+2348129653659" target="_blank">(+234) 812 965 3659</a> </font><font style="font-family:tahoma,sans-serif;font-size:small" color="#ff0000">/</font><font style="font-family:tahoma,sans-serif;font-size:small;color:rgb(0,0,102)" color="#000066"><a href="tel:%28%2B223%29%2090%2008%2026%2071" value="+22390082671" target="_blank">(+223) 90 08 26 71</a> </font><font style="font-family:tahoma,sans-serif;font-size:small" color="#ff0000">/</font><font style="font-family:tahoma,sans-serif;font-size:small;color:rgb(0,0,102)" color="#000066"><a href="tel:%28%2B226%29%2064%2057%2037%2027" value="+22664573727" target="_blank">(+226) 64 57 37 27</a> </font><font style="font-size:small;font-family:tahoma,sans-serif" color="#000066"><span style="color:rgb(34,34,34)"></span><font color="#ff0000">/</font></font><font style="font-family:tahoma,sans-serif;font-size:small;color:rgb(0,0,102)" color="#000066"><a href="tel:%2B49%2015218352574" value="+4915218352574" target="_blank">+49 15218352574</a><br></font><div><p><font style="font-size:small;font-family:tahoma,sans-serif" color="#000066"></font></p><div style="text-align:left"><font style="font-size:small;font-family:tahoma,sans-serif" color="#000066"><font color="#000066">E-mail: </font><a href="mailto:mpapin24@gmail.com" style="color:rgb(0,0,255)" target="_blank">mpapin24@gmail.com</a><span style="color:rgb(34,34,34)"> </span><font color="#ff0000">/ </font><span style="color:rgb(0,0,255)"><a href="mailto:coulibalya68@yahoo.com" target="_blank">coulibalya68@yahoo.com</a> </span></font></div><p></p></div><div><font face="verdana,sans-serif" size="2"><p><font color="#ff9900">&quot;<i>The time is always right to do right&quot;: <b>Nelson Mandela</b></i></font></p><p><i><font color="#ff9900">&quot;Character is like a tree and reputation like a shadow.  The shadow is what we think of it; the tree is the real thing&quot; : <b>Abraham Lincoln</b></font></i></p><p><i><font color="#ff9900">&quot;Do what you can, with what you have, where you are&quot; <b>Theodore Roosevelt</b></font></i></p></font><p><b><font color="#000066" size="2"><i> </i></font></b></p><p><b><font color="#000066" size="4"> </font></b></p><div> </div></div></div></div></div></div>
</div>
<br>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>