<div dir="ltr">Thanks a lot Rick!<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 20, 2019 at 3:12 PM Rick Brownrigg <<a href="mailto:brownrig@ucar.edu">brownrig@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>Hi,</div><div><br></div><div>Below is the NCL for the function. I see that "g" is defined, but never referenced (?), so no it is not part of the computation.<br></div><div><br></div><div>Rick</div><div><font size="2"><span style="font-family:monospace"><br></span></font></div><div><font size="2"><span style="font-family:monospace">;-------------------------------<br>undef("eady_growth_rate")<br>function eady_growth_rate(th:numeric, u:numeric, z:numeric, lat:numeric,  opt[1]:integer, ndimz[1]:integer)<br>;<br>; Maximum Eady Growth Rate  <br>;<br>; Reference: <br>;   R. S. Lindzen and Brian Farrell, 1980: <br>;   A Simple Approximate Result for the Maximum Growth Rate of Baroclinic Instabilities. <br>;   J. Atmos. Sci., 37, 1648–1654. <br>;    <a href="http://dx.doi.org/10.1175/1520-0469(1980)037" target="_blank">http://dx.doi.org/10.1175/1520-0469(1980)037</a><1648:ASARFT><a href="http://2.0.CO" target="_blank">2.0.CO</a>;2<br>;<br>;   Simmonds, I., and E.-P. Lim (2009): <br>;   Biases in the calculation of Southern Hemisphere mean baroclinic eddy growth rate <br>;   Geophys. Res. Lett., 36, L01707 <br>;   doi:10.1029/2008GL036320<br>;<br>;   Vallis, G.K. (2006) <br>;   Atmospheric and Oceanic Dynamics: Fundamentals and Large-Scale Circulation<br>;   Cambridge Univ. Press, New York.<br>;    <br>; Nomenclature<br>; th   - potential temperature (K)<br>;        <a href="http://glossary.ametsoc.org/wiki/potential_temperature" target="_blank">http://glossary.ametsoc.org/wiki/potential_temperature</a><br>;        <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/pot_temp.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Contributed/pot_temp.shtml</a><br>; u    - zonal wind components (m/s) ; same dimensionality as 'th'<br>; z    - height (m)<br>; lat  - latitude of each grid point ; same dimensionality as 'th'  <br>; opt  - =0 (egr only); <br>; ndimz- dimension of 'th' for which vertical gradient is to be calculated<br>;        th(:), wspd(:), z(:) ..... ndimz=0<br>;        th(:,:,:)  , z(:) or z(:,:,:)   and the left is the vertical dim, ndimz=0<br>;        th(:,:,:,:), z(:) or z(:,:,:,:) and the left is the time dimension <br>;                                        and the next is height,  ndimz=1 <br>;<br>;<br>local dimth, dimu, dimz, dimth, dimlat, rankth, ranku, rankz, rankth, ranklat \<br>    , u_shear, brunt, fcor, g, omega, con, rad, egr<br>begin<br>                                ; dimension checking<br>  dimu    = dimsizes(u)<br>  dimz    = dimsizes(z)<br>  dimth   = dimsizes(th)<br>  dimlat  = dimsizes(lat)<br><br>  ranku   = dimsizes(dimu)   <br>  rankz   = dimsizes(dimz)   <br>  rankth  = dimsizes(dimth)<br>  ranklat = dimsizes(dimlat)   <br><br>  if (.not.(rankth.eq.ranku .and. rankth.eq.rankz .and. rankth.eq.ranklat) \<br>      .and. all(dimth.eq.dimu) .and. all(dimth.eq.dimz) .and. all(dimth.eq.dimlat)) then<br>      print("eady_growth_rate: th, u, lat and must have the same rank & sizes")<br>      print("ranku="+ranku+"  rankth="+rankth+"  rankz="+rankz+"  ranklat="+ranklat)<br>      print(dimth)<br>      print(dimu) <br>      print(dimz) <br>      print(dimlat) <br>      exit<br>  end if<br><br>  brunt   = brunt_vaisala_atm(th, z, 0, ndimz)<br><br>  dudz    = center_finite_diff_n(u , z, False, 0, ndimz) <br><br>  copy_VarCoords(u, dudz)<br>  dudz@long_name  = "vertical gradient of the zonal wind (zonal wind shear): du/dz"<br>  dudz@units      = "1/s"<br> ;print("eady_growth_rate: dudz: min="+min(dudz)+"   max="+max(dudz))<br><br>  g     = 9.80665                    ; m/s2 ; gravity at 45 deg lat used by the WMO<br>  con   = 0.3098<br>  fcor  = coriolis_param(lat)        ; (1/s)     ; coriolis parameter<br>                                     ; prevent 1/0<br>  if (any(brunt.eq.0)) then<br>      if (.not.isatt(brunt,"_FillValue")) then<br>          if (typeof(brunt).eq."double") then<br>              brunt@_FillValue = 1d20<br>          else<br>              brunt@_FillValue = 1e20<br>          end if<br>       end if<br>       brunt = where(brunt.eq.0, brunt@_FillValue, brunt)<br>  end if<br><br>  egr   = con*abs(fcor)*abs(dudz)/brunt<br>  egr@long_name = "maximum eady growth rate"<br>  egr@units     = ""<br>  copy_VarCoords(u, egr)<br><br>  if (opt.eq.0) then<br>      return (egr)<br>  else if (opt.eq.1) then<br>      return ( [/egr, dudz /] )<br>  else if (opt.eq.2) then<br>      return ( [/egr, dudz, brunt /] )<br>  end if<br>  end if<br>  end if<br><br>end</span></font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 20, 2019 at 6:47 AM Rohit Ghosh via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@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">

<p style="margin:0px;text-indent:0px;white-space:pre-wrap">Hello,</p>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><br></p>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">I am going to use the eady_growth_rate function from ncl. In the description of the function I find the gravitation term (g) is multiplied while calculating the Eady growth rate. Unfortunately, I could not find g multiplied in any references of Eady growth rate. Moreover, multiplication of g would not give the units of Eady growth rate (1/s). Could you please confirm that if it is a typo error or this multiplication is really done inside the script? That would be very helpful.</p>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><br></p><p style="margin:0px;text-indent:0px;white-space:pre-wrap"><a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/eady_growth_rate.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Contributed/eady_growth_rate.shtml</a></p><p style="margin:0px;text-indent:0px;white-space:pre-wrap"><br></p>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">Thank you very much.</p>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><br></p>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">Look forward to your response.</p>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><br></p>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">Regards,</p>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">Rohit</p></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></blockquote></div>
</blockquote></div>