<div dir="ltr">Dear Sir Dennis,<div><br></div><div>Thank you so much for the help.</div><div><br></div><div>One more point though in the documentation. I think this line should be corrected?</div><div><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-size:13.3333px;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;color:rgb(0,0,0)"><p style="margin:10px 0px 20px;padding:0px;color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:10pt;line-height:12pt;font-variant-numeric:normal;font-variant-east-asian:normal">                                 Less commonly used are the shear-deformation (SHD) and stretch-deformation (STD).
</p><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-size:10pt;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-indent:0em">               SHD = du/dx - dv/dy 
               STD = dv/dx + du/dy </pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-size:10pt;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-indent:0em">to </pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-size:10pt;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-indent:0em">               STD = du/dx - dv/dy</pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-size:10pt;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-indent:0em">               SHD = dv/dx + du/dy </pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-size:10pt;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-indent:0em"><br></pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-size:10pt;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-indent:0em">Sincerely,</pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-size:10pt;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-indent:0em">Lyndz</pre></pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 8, 2019 at 6:02 AM Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br></div><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 dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>This could well be a matter of definition.  NCL does not include any explicit negative (or positive) sign or coefficient (eg:  0.5).<br></div><div><br></div><div><b>  shear  = dvdx + dudy<br>  stretch= dudx - dvdy <br>  deform = sqrt(shear^2 + stretch^2)</b></div><div><br></div><div>where the gradients are determined by spherical harmonics.</div><div><br></div><div>You can associate signs/coefficients to these terms  as you wish.</div><div><br></div><div>====</div><div>You have <br></div><div>************************************************<br>; Stretch, deform, and total<br>;************************************************<br>  grdType = 1<br>  <b>cyclic  = False       ; <========  This should be True</b><br>  opt_ssd = 0<br><br>  ssdList = shear_stretch_deform(u,v,u&lat,grdType,opt_ssd)<br><br>  stretch_sph = ssdList[0]<br>  shear_sph   = ssdList[1]<br>  deform_sph  = ssdList[2]<br>  delete(ssdList)<br><br></div><div>======================================================================<br></div><div>I don't think anyone wants to download a 600+MB file from the cloud.</div><div><br></div><div>Use the netCDF operator the extract the exact subset</div><div><br></div><div><b>%></b> <b><span class="gmail-m_8716301817498483465gmail-m_8051496001854302422gmail-m_4076805668735785326gmail-il"><span class="gmail-m_8716301817498483465gmail-m_8051496001854302422gmail-il"><span class="gmail-m_8716301817498483465gmail-il">ncks</span></span></span></b> -O -d Time,tStrt,Tlast <a href="http://ncep_6h_jan.nc" target="_blank">ncep_6h_jan.nc</a>  <a href="http://NECP.deform.nc" target="_blank">NECP.deform.nc</a></div><div><br></div><div>where tStrt and tLast are the temporal index values of the specified time interval.<br></div><div><br></div><div>===</div><div>The following is 'ok'.<br></div><div><br></div><div>  u   = f->U_GRD_2_ISBL(:,:,:,:)       ; pull u off file<br>  v   = f->V_GRD_2_ISBL(:,:,:,:)       ; pull v off file</div><div><br></div><div>However, when reading an entire array, it is more efficient to use the following. You can indicate dimensionalit in comment<br></div><div><br></div><div>  u   = f->U_GRD_2_ISBL            ;         (:,:,:,:)       ; pull u off file<br>  v   = f->V_GRD_2_ISBL             ;         (:,:,:,:)       ; pull v off file</div><div><br></div><div>===</div><div>The following is superfluous</div><div><br></div><div>  lat = f->lat<br>  lon = f->lon</div><div><br></div><div>These coordinates are part of each variable's structure</div><div><br></div><div>   u&lat     ===> lat</div><div><br></div><div>===</div><div>What order are the variables? N-S or S-N ? The following reverses the order.<br></div><div><br></div><div>  u   = u(:,:,::-1,:)<br>  v   = v(:,:,::-1,:)<br></div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 6, 2019 at 1:34 AM Lyndz <<a href="mailto:olagueralyndonmark429@gmail.com" target="_blank">olagueralyndonmark429@gmail.com</a>> wrote:<br></div><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 dir="ltr">Dear NCL experts,<div><br></div><div>I am calculating the shear_stretch deformation routine in NCL (<a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/shear_stretch_deform.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Contributed/shear_stretch_deform.shtml</a>).</div><div><br></div><div>According to the description:</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:verdana,sans-serif;font-size:13.3333px"><i>"When the stretch-deformation is negative/positive the flow is confluent/diffluent."</i></span><br></div><div><span style="color:rgb(0,0,0);font-family:verdana,sans-serif;font-size:13.3333px"><i><br></i></span></div><div><font face="verdana, sans-serif" color="#000000"><span style="font-size:13.3333px">However, I encounter some inconsistensies in the results.</span></font></div><div><br></div><div><font face="verdana, sans-serif" color="#000000"><span style="font-size:13.3333px">Problems:</span></font></div><div><font face="verdana, sans-serif" color="#000000"><span style="font-size:13.3333px"><br></span></font></div><div><font face="verdana, sans-serif" color="#000000"><span style="font-size:13.3333px">[1] When I plot the stretch deformation term, I see positive values (diffluence) along a region of confluence (encircled region in red in the attached figure).</span></font></div><div><font face="verdana, sans-serif" color="#000000"><span style="font-size:13.3333px">This plot is for timestep 62. Shading is for the 925-hPa stretch deformation, while the streamline is for the 925-hPa winds.</span></font></div><div><br></div><div><font color="#000000">I am not sure if I implemented this routine correctly. I am attaching my script in this email. The file that I am using can be accessed here:</font></div><div><font color="#000000"><br></font></div><div><font color="#000000"><a href="https://www.dropbox.com/s/m4sy7n76piw2mwn/ncep_6h_jan.nc?dl=0" target="_blank">https://www.dropbox.com/s/m4sy7n76piw2mwn/ncep_6h_jan.nc?dl=0</a><br></font></div><div><font color="#000000"><br class="gmail-m_8716301817498483465gmail-m_768050899955527024gmail-m_-6309575156302031403gmail-Apple-interchange-newline">I would like to ask for suggestions on how to do this correctly in NCL.<br></font></div><div><font color="#000000"><br></font></div><div><font color="#000000">[2] I would like to draw line along the regions of positive stretch or total deformation. If yes, how can I do this in NCL?</font></div><div> <br></div><div>Thank you in advance for the help.</div><div>Sincerely,</div><div><br clear="all"><div><div dir="ltr" class="gmail-m_8716301817498483465gmail-m_768050899955527024gmail-m_-6309575156302031403gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font face="comic sans ms, sans-serif"><b><u>Lyndz</u></b></font><br><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
</blockquote></div>