<div dir="ltr"><div>I do not have your WRF file so I used a local file: wrfout_d02_2011-01-18_00:00:<a href="http://00.nc">00.nc</a><br></div>It has only one time step (it=0) and dimension sizes different than your but it can be for illustration.<br><br>;;filename = "/home/gaurav/wrf_exp/wrfout_d02_2014-10-26_00:00:<a href="http://00-fnl-myjbmj.nc">00-fnl-myjbmj.nc</a>"<br>;;a = addfile(filename,"r")<br>;;it = 07<br>;---Open WRF output file<br> filename = "./wrfout_d02_2011-01-18_00:00:<a href="http://00.nc">00.nc</a>" ; LOCAL FILE<br> a = addfile(filename,"r")<br> it = 0 ; ONE TIME STEP <br><br><div>===<br>The WRF model uses 'terrain following' vertical coordinates. Hence, the pressure levels at each grid point vary. You have:<br><br> pressure_level = (/ 850./) ; pressure levels to plot<br> nlevels = dimsizes(pressure_level) ; number of pressure levels<br> p = wrf_user_getvar(a, "pressure",it)<br> <span style="color:rgb(255,0,0)"><b>printVarSummary(p) ; <=== I added this!</b></span><br><br>====<br>Variable: p<br>Type: float<br>Total Size: 7830000 bytes<br> 1957500 values<br>Number of Dimensions: 3<br>Dimensions and sizes: <span style="color:rgb(255,0,0)"><b> [bottom_top | 27] x [south_north | 250] x [west_east | 290]</b></span><br>====<br><br></div><div>Then you have the following which <b>only</b> makes sense <b>if you have interpolated to 850 hPa (isobaric level)<br></b></div><div><b>and created new u and v at the interpolated level(s): say <span style="color:rgb(255,0,0)">up</span> and <span style="color:rgb(255,0,0)">vp</span>. I believe WRF has functions for this. Please read about this.<br></b></div><div><br>nlevels = dimsizes(pressure_level) ; number of pressure levels<br> do level = 0,nlevels-1<br> pressure = pressure_level(level)<br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br> if ( pressure .eq. 850 ) then <b> ; <span style="color:rgb(255,0,0)">only if you have interpolated</span></b><br> contour = wrf_contour(a,wks,<b><span style="color:rgb(255,0,0)">up</span>(level,:,:)</b>,opts)<br> plot = wrf_map_overlays(a,wks,(/contour/),pltres,map_res)<br> draw(contour)<br> ; frame(wks)<br> end if<br> end do<br><br>========================<br></div><div>Just for plots at each vertical level <b>without</b> interpolating, the following should work.<br></div><div><br> do level = 0,nlevels-1 <br> contour = wrf_contour(a,wks,<b>u(level,:,:)</b>,opts) <br> plot = wrf_map_overlays(a,wks,(/contour/),pltres,map_res)<br> draw(contour)<br> frame(wks)<br> end do<br><br>==============================<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 6, 2017 at 9:40 AM, Gaurav Tiwari <span dir="ltr"><<a href="mailto:gaurav16@iiserb.ac.in" target="_blank">gaurav16@iiserb.ac.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div> I tried many things suggested by you but still I am at the same level. Below is the output of my screen:</div><div><br></div><div><span class=""><div><font color="#0000ff">Variable: u</font></div><div><font color="#0000ff">Type: float</font></div><div><font color="#0000ff">Total Size: 26261400 bytes</font></div><div><font color="#0000ff"> 6565350 values</font></div><div><font color="#0000ff">Number of Dimensions: 3</font></div><div><font color="#0000ff">Dimensions and sizes:<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>[bottom_top | 55] x [south_north | 345] x [west_east_stag | 346]</font></div><div><font color="#0000ff">Coordinates: </font></div><div><font color="#0000ff">Number Of Attributes: 6</font></div><div><font color="#0000ff"> FieldType :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>104</font></div><div><font color="#0000ff"> MemoryOrder :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>XYZ</font></div><div><font color="#0000ff"> description :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>x-wind component</font></div><div><font color="#0000ff"> units :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>m s-1</font></div><div><font color="#0000ff"> stagger :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>X</font></div><div><font color="#0000ff"> coordinates :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>XLONG_U XLAT_U XTIME</font></div><div><font color="#0000ff"><br></font></div></span><div><font color="#0000ff">Variable: v</font></div><span class=""><div><font color="#0000ff">Type: float</font></div><div><font color="#0000ff">Total Size: 26261400 bytes</font></div><div><font color="#0000ff"> 6565350 values</font></div><div><font color="#0000ff">Number of Dimensions: 3</font></div></span><div><font color="#0000ff">Dimensions and sizes:<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>[bottom_top | 55] x [south_north_stag | 346] x [west_east | 345]</font></div><span class=""><div><font color="#0000ff">Coordinates: </font></div><div><font color="#0000ff">Number Of Attributes: 6</font></div><div><font color="#0000ff"> FieldType :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>104</font></div><div><font color="#0000ff"> MemoryOrder :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>XYZ</font></div></span><div><font color="#0000ff"> description :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>y-wind component</font></div><div><font color="#0000ff"> units :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>m s-1</font></div><div><font color="#0000ff"> stagger :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>Y</font></div><div><font color="#0000ff"> coordinates :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>XLONG_V XLAT_V XTIME</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff">Variable: wks</font></div><div><font color="#0000ff">Type: obj</font></div><div><font color="#0000ff">Total Size: 4 bytes</font></div><div><font color="#0000ff"> 1 values</font></div><div><font color="#0000ff">Number of Dimensions: 1</font></div><div><font color="#0000ff">Dimensions and sizes:<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>[1]</font></div><div><font color="#0000ff">Coordinates: </font></div><div><font color="#0000ff">Number Of Attributes: 2</font></div><div><font color="#0000ff"> name :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>wind</font></div><div><font color="#0000ff"> app :<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>wind<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>appClass<span class="m_-6165052364207180311gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>7</font></div><div><font color="#0000ff">fatal:Number of dimensions in parameter (2) of (wrf_vector) is (3), (2) dimensions were expected </font></div><div><font color="#0000ff">fatal:["Execute.c":8640]:<wbr>Execute: Error occurred at or near line 60 in file Zwind.ncl</font></div><div><br></div></div><div>What I feel, the way as I fixed the pressure level is not working properly. Kindly see my script (and) or give me any idea how can I plot U,V wind at some 850 hPa obtained from WRF model output.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>--Gaurav</div></font></span><div><div class="h5"><div class="gmail_extra"><br clear="all"><div><div class="m_-6165052364207180311gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br><br></div><div><br></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Dec 6, 2017 at 12:16 PM, swati shewale <span dir="ltr"><<a href="mailto:shewaleswati16@gmail.com" target="_blank">shewaleswati16@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">To get rid of the error <br><span><br><span style="font-size:12.8px">fatal:Number of dimensions in parameter (1) of (gsn_csm_vector) is (3), (2) dimensions were expected<br><br></span></span>I think you need to keep atleast one (pressure) level fix (from dimension 'bottom_top | 55]' ) at which you want to do plotting. <br></div><div class="m_-6165052364207180311HOEnZb"><div class="m_-6165052364207180311h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 5, 2017 at 10:06 PM, Gaurav Tiwari <span dir="ltr"><<a href="mailto:gaurav16@iiserb.ac.in" target="_blank">gaurav16@iiserb.ac.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Rick,<div><span style="font-size:12.8px">printVarSummary tells the given message about the </span><span style="font-size:12.8px">variables "u" and "v"</span><br></div><div> </div><div><br></div><div><div>Variable: u</div><div>Type: float</div><div>Total Size: 26261400 bytes</div><div> 6565350 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:<span class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>[bottom_top | 55] x [south_north | 345] x [west_east_stag | 346]</div><div>Coordinates: </div><div>Number Of Attributes: 6</div><div> FieldType :<span class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>104</div><div> MemoryOrder :<span class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>XYZ</div><div> description :<span class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>x-wind component</div><div> units :<span class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>m s-1</div><div> stagger :<span class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>X</div><div> coordinates :<span class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>XLONG_U XLAT_U XTIME</div></div><div><br></div><div>(similarly for v)</div><div><br></div><div class="gmail_extra">Although I tried what Dennis suggested me but still my concern is to overcome by following error</div><div class="gmail_extra"><br></div><div class="gmail_extra"><span style="font-size:12.8px">fatal:Number of dimensions in parameter (1) of (gsn_csm_vector) is (3), (2) dimensions were expected</span><br clear="all"><div><div class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br>Actually, wrf output variable U10, V10 have two dimensions and and U,V have three dimension, so kindly give me some idea about the above error.</div><div><br></div><div><br></div><div>Thanks,</div><div> </div><div><br></div></div></div></div></div></div></div></div></div></div><div><div class="m_-6165052364207180311m_-8280436636704879685h5">
<br><div class="gmail_quote">On Mon, Dec 4, 2017 at 11:06 PM, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">It is very difficult to tell what is wrong -- what does a printVarSummary tell you about the variables "u" and "v"?<br><br><br></div><div class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-HOEnZb"><div class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 2, 2017 at 4:45 AM, Gaurav Tiwari <span dir="ltr"><<a href="mailto:gaurav16@iiserb.ac.in" target="_blank">gaurav16@iiserb.ac.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Dennis,<div><br></div><div> I done few changes what you suggested but still I am getting some error. </div><div>Current error is attached below</div><div><br></div><div><div>fatal:VectorFieldInitialize: dimensions of vfUDataArray and vfVDataArray are inconsistent</div><div>fatal:Unable to initialize layer-Can't Create</div><div>fatal:Unable to access object with id:-4</div><div>fatal:Unable to access object with id:-4</div><div>warning:Unable to add DataItem "(null)" to DataList "vcVectorFieldData"</div><div>fatal:CompileDataList:DataList has no valid members</div></div><div><br></div><div><br></div><div><br></div><div>Kindly let me know some ideas to plot wrf wind at different different pressure levels.</div><div><br></div><div><br></div><div>-Gaurav</div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-m_5388920348670201650m_-6997865666513341679gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br><br><br>******************************<wbr>******************************<wbr>********</div><b>Gaurav Tiwari</b><div>Research Scholar</div><div>Department of Earth and Environmental Sciences</div><div>Indian Institute of Science Education and Research Bhopal <br>(IISER B)</div><div>Bhopal- 462066, Madhya Pradesh</div><div><span style="font-size:12.8px">Mob: <a href="tel:+91%2074711%2012407" value="+917471112407" target="_blank">+91-7471112407</a></span><br></div><div><a href="https://www.linkedin.com/in/gaurav-tiwari-bb36357a?trk=hp-identity-name" target="_blank">LinkedIn</a> <a href="https://www.researchgate.net/profile/Gaurav_Tiwari5" target="_blank">Research gate</a><br><br></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Nov 28, 2017 at 9:13 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div> <br></div><div>u10 = wrf_user_getvar(f, "U10",it)<br> printVarSummary(u10) ; ===> [south_north | ?] x [west_east | ?]<br><br><br>---<br></div>u = wrf_user_getvar(f, "U",it)<br></div>printVarSummary(u) ; ===> [bottom_top | ?] x [south_north | ?] x [west_east_stag | ?]<br><br>---<br><pre>function gsn_csm_vector (
wks [1] : graphic,
u [*][*] : numeric, <=== 2-dimensions
v [*][*] : numeric, <=== 2-dimensions
res [1] : logical
)</pre></div>kl = 5<br>vector = gsn_csm_vector(wks,u(kl,:,:),v<wbr>(kl,:,:),vec_res)<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-m_5388920348670201650m_-6997865666513341679h5">On Mon, Nov 27, 2017 at 11:09 PM, Gaurav Tiwari <span dir="ltr"><<a href="mailto:gaurav16@iiserb.ac.in" target="_blank">gaurav16@iiserb.ac.in</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-m_5388920348670201650m_-6997865666513341679h5"><div dir="ltr"><div><div class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-m_5388920348670201650m_-6997865666513341679m_-1793808802693886668m_8246810015438070381m_-1803451719635502582gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear Mary,</div><div><br></div><div> I am trying to plot WRF model output wind at different different atmospheric pressure levels, but I am facing an error</div><div><br></div><div><div>atal:Number of dimensions in parameter (1) of (gsn_csm_vector) is (3), (2) dimensions were expected </div><div>fatal:["Execute.c":8640]:Execu<wbr>te: Error occurred at or near line 42 in file Zwind.ncl</div></div><div><br></div><div><br></div><div>The same script is working for U10, V10 but not for U,V.</div><span class="m_-6165052364207180311m_-8280436636704879685m_4619244035705309697gmail-m_5388920348670201650m_-6997865666513341679m_-1793808802693886668HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>--Gaurav</div><div><br></div></font></span></div></div></div></div></div></div></div></div></div>
</div>
<br></div></div>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></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>