<div dir="ltr"><div><div><div>[1] s(3,:,:,{70})<br><br></div>Presumably, s(time,level,lat,lon)<br><br></div><b>3</b> => fourth time step [NCL indices are 0-based]<br><br></div><div><b>:,:</b> => all levels, all latitudes<br><br></div><div><b>{</b>70<b>} </b>=><b> </b>70 longitude<b><br></b></div><div><b> {...} </b>please read about coordinate subscripting<br></div><br><div><div><br>===<br>[2]<br><div dir="auto"><span style="font-family:sans-serif">re: Plot=<b>gsn_csm_pres_hgt_vector</b>(w<wbr>ks,s(3,:,:,{70}),u</span><span style="font-family:sans-serif">(3,:,:,{70})<wbr>,v</span><span style="font-family:sans-serif">(3,:,:,{70}),res</span><span style="font-family:sans-serif">)</span></div><div dir="auto"><span style="font-family:sans-serif"> Is this averaging vertical column at 70E?<br><br></span></div><div><span style="font-family:sans-serif"> No. This is a plot function, it is plotting level x latitude. You can do:<br><br></span></div><div><span style="font-family:sans-serif"> <b>printVarSummary</b>( </span><span style="font-family:sans-serif"><span style="font-family:sans-serif">u</span><span style="font-family:sans-serif">(3,:,:,{70}) )<br></span></span></div><div><span style="font-family:sans-serif"><br></span></div><div><span style="font-family:sans-serif"> Also, see:<br><br> <a href="http://www.ncl.ucar.edu/Applications/height_lat.shtml#ex7" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/height_lat.shtml#<wbr>ex7</a><br><br>===<br>[3]<br></span></div><div><span style="font-family:sans-serif">re: </span><span style="font-family:sans-serif">Secondly, if I want to plot 4 time steps in a panel (1x4) then how to change the above lines?<br><br></span></div><div><span style="font-family:sans-serif"> </span><br><span style="font-family:sans-serif"> u=<b>short2flt</b>(in->t(<span class="m_4573228628802425978gmail-aBn"><span class="m_4573228628802425978gmail-aQJ">15:18</span></span>,:,::-1<wbr>,20:80))<br></span></div><div><span style="font-family:sans-serif"> <b>printVarSummary</b>(t) <wbr> ; what do you see?<br><br></span></div><div><span style="font-family:sans-serif"> dimu = <b>dimsizes</b>(u)<br></span></div><div><span style="font-family:sans-serif"> ntim = dimu(0)<br></span></div><div><span style="font-family:sans-serif"><br></span></div><div><span style="font-family:sans-serif"> Generate one plot for each time step<br><br></span></div><div><span style="font-family:sans-serif"> There are many panel examples at: <a href="http://www.ncl.ucar.edu/Applications/panel.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/panel.shtml</a><br></span></div><div> Please examine this carefully.<br><br></div><div> plot = <b>new</b>(ntim,"graphic")<br></div><div> do <b>nt</b>=0,ntim-1<br> plot(nt) = <span style="font-family:sans-serif"><b>gsn_csm_pres_hgt_vector</b>(wks,s(<b><wbr>nt</b>,:,:,{70}),u</span><span style="font-family:sans-serif">(<b>nt</b>,:,:,{70}),v</span><span style="font-family:sans-serif">(<b><wbr>nt</b>,:,:,{70}),res</span><span style="font-family:sans-serif">)<br></span></div><div><span style="font-family:sans-serif"> end do<br>==============================<wbr>=<br><br></span></div><div><span style="font-family:sans-serif">Please spend some time learning NCL: </span>A good source is:<br> <a href="http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/" target="_blank">http://www.ncl.ucar.edu/<wbr>Document/Manuals/NCL_User_<wbr>Guide/</a><br><br><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 24, 2018 at 1:33 AM, Soma Roy <span dir="ltr"><<a href="mailto:somaroy892@gmail.com" target="_blank">somaroy892@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="auto">Thank you! <div dir="auto"><br></div><div dir="auto">It worked. I want to know two things in this case.</div><div dir="auto"><br></div><div dir="auto">What this line suggests;</div><div dir="auto">Plot=gsn_csm_pres_hgt_vector(<wbr>wks,s(3,:,:,{70}),v<span style="font-family:sans-serif">(3,:,:,{70}<wbr>),u</span><span style="font-family:sans-serif">(3,:,:,{70}),res</span>)</div><div dir="auto"><br></div><div dir="auto">And if it is like below then what it says?</div><div dir="auto"><br></div><div dir="auto"><span style="font-family:sans-serif">Plot=gsn_csm_pres_hgt_vector(<wbr>wks,s(3,:,:,{70}),u</span><span style="font-family:sans-serif">(3,:,:,{70}<wbr>),v</span><span style="font-family:sans-serif">(3,:,:,{70}),res</span><span style="font-family:sans-serif">)</span></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif">Is this averaging vertical column at 70E?</span></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto">Secondly, if I want to plot 4 time steps in a panel (1x4) then how to change the above lines?</div><div dir="auto"><br></div><div dir="auto">For that case my input is like below,</div><div dir="auto"><br></div><div dir="auto">t=short2flt(in->t(15:18,:,::-<wbr>1,20:80))</div><div dir="auto"><span style="font-family:sans-serif">u=short2flt(in->u(15:18,:,::-<wbr>1,20:80))</span><br></div><div dir="auto"><span style="font-family:sans-serif">v=short2flt(in->v(15:18,:,::-<wbr>1,20:80))</span><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif">Thanks,</span></div><div dir="auto"><span style="font-family:sans-serif">Soma</span></div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Sun, Jun 24, 2018, 02:04 Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>The following indicates that you do not have enough memory on yor machine.<br><br>fatal:<b>NclMalloc </b>Failed:[errno=12]</div><div>Segmentation fault (core dumped)<br>============================<br>Total Size: <b>209943360 bytes</b><div> 52485840 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes: [time | 120] x [level | 22] x [latitude | 141] x [longitude | 141]<br><br></div><div>Each variable is ~210MB<br>===========================<br></div><div>W</div><div>For testing the code, try with a smaller time sample<br><br></div><div>tStrt = 0<br></div><div>tLast = 9<br></div><div><br>;---Read needed variables from file<br> t = short2flt(in->t(tStrt:tLast,:,<wbr>:,:)) ; select variable<br> v = short2flt(in->v(tStrt:tLast,:,<wbr>:,:))<br> u = short2flt(in->u(tStrt:tLast,:,<wbr>:,:)))<br><br></div><div>;---Better and more efficient to reorder <b>after </b>input<br><br></div><div> t = t(:,:,::-1,:) ; reorder South-to-North<br></div><div> u = u(:,:,::-1,:) <br> v = v(:,:,::-1,:) <br><br>===========<br>Within 'pot_vort_isobaric', other variables of size 210MB are calculated<br><br>pv = -G*(vr + con*(dvdp*dtdx-dudp*dtdy))*<wbr>dthdp<br><div><br></div>EG:<br></div><div><br> S = static_stability(p,t,npr,1) ; variable of type list<br><br> s = S[0] ; [...] is list syntax <br> theta = S[1]<br> dthdp = S[2]<br><br></div><div>also, gradients<br><br></div><div> dudp<br></div><div> dvdp<br></div><div> dtdx<br></div><div> dtdy<br></div><div><br></div><div>vorticity<br><br></div><div> vr [vorticity]<br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 23, 2018 at 8:54 AM, Soma Roy <span dir="ltr"><<a href="mailto:somaroy892@gmail.com" rel="noreferrer" target="_blank">somaroy892@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">Hello,<div><br></div><div>I am trying to calculate static stability and potential temperature in vertical profile using ERA-Interim pressure level data.</div><div><br></div><div>Summary of the input data used in this process is like below;</div><div><br></div><div><div>Variable: pnew</div><div>Type: double</div><div>Total Size: 176 bytes</div><div> 22 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes: [level | 22]</div><div>Coordinates:</div><div> level: [ 100..1000]</div><div>Number Of Attributes: 5</div><div> standard_name : air_pressure</div><div> long_name : pressure_level</div><div> units : Pa</div><div> positive : down</div><div> axis : Z</div><div><br></div><div>Variable: t</div><div>Type: float</div><div>Total Size: 209943360 bytes</div><div> 52485840 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes: [time | 120] x [level | 22] x [latitude | 141] x [longitude | 141]</div><div>Coordinates:</div><div> time: [994176..994890]</div><div> level: [ 100..1000]</div><div> latitude: [ 5..40]</div><div> longitude: [65..100]</div><div>Number Of Attributes: 7</div><div> standard_name : air_temperature</div><div> long_name : Temperature</div><div> units : K</div><div> _FillValue_original : -32767</div><div> _FillValue : -32767</div><div> missing_value_original : -32767</div><div> missing_value : -32767</div><div><br></div><div>Variable: u</div><div>Type: float</div><div>Total Size: 209943360 bytes</div><div> 52485840 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes: [time | 120] x [level | 22] x [latitude | 141] x [longitude | 141]</div><div>Coordinates:</div><div> time: [994176..994890]</div><div> level: [ 100..1000]</div><div> latitude: [ 5..40]</div><div> longitude: [65..100]</div><div>Number Of Attributes: 7</div><div> standard_name : eastward_wind</div><div> long_name : U component of wind</div><div> units : m s**-1</div><div> _FillValue_original : -32767</div><div> _FillValue : -32767</div><div> missing_value_original : -32767</div><div> missing_value : -32767</div><div><br></div><div>Variable: v</div><div>Type: float</div><div>Total Size: 209943360 bytes</div><div> 52485840 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes: [time | 120] x [level | 22] x [latitude | 141] x [longitude | 141]</div><div>Coordinates:</div><div> time: [994176..994890]</div><div> level: [ 100..1000]</div><div> latitude: [ 5..40]</div><div> longitude: [65..100]</div><div>Number Of Attributes: 7</div><div> standard_name : northward_wind</div><div> long_name : V component of wind</div><div> units : m s**-1</div><div> _FillValue_original : -32767</div><div> _FillValue : -32767</div><div> missing_value_original : -32767</div><div> missing_value : -32767</div></div><div><br></div><div>My code for this is attached below. <br></div><div><br></div><div>At run time it shows the following;</div><div><br></div><div><div>fatal:NclMalloc Failed:[errno=12]</div><div>Segmentation fault (core dumped)</div></div><div><br></div><div> </div><div>Please inform me how to resolve the issue.</div><div><br></div><div>Thanks,</div><div>Soma</div></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" rel="noreferrer" 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 noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div>