[ncl-talk] Is the eady_growth_rate function description correct?

Rohit Ghosh ghosh.met at gmail.com
Tue Aug 20 07:43:07 MDT 2019


Thanks a lot Rick!

On Tue, Aug 20, 2019 at 3:12 PM Rick Brownrigg <brownrig at ucar.edu> wrote:

> Hi,
>
> 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.
>
> Rick
>
> ;-------------------------------
> undef("eady_growth_rate")
> function eady_growth_rate(th:numeric, u:numeric, z:numeric, lat:numeric,
>  opt[1]:integer, ndimz[1]:integer)
> ;
> ; Maximum Eady Growth Rate
> ;
> ; Reference:
> ;   R. S. Lindzen and Brian Farrell, 1980:
> ;   A Simple Approximate Result for the Maximum Growth Rate of Baroclinic
> Instabilities.
> ;   J. Atmos. Sci., 37, 1648–1654.
> ;    http://dx.doi.org/10.1175/1520-0469(1980)037<1648:ASARFT>2.0.CO;2
> ;
> ;   Simmonds, I., and E.-P. Lim (2009):
> ;   Biases in the calculation of Southern Hemisphere mean baroclinic eddy
> growth rate
> ;   Geophys. Res. Lett., 36, L01707
> ;   doi:10.1029/2008GL036320
> ;
> ;   Vallis, G.K. (2006)
> ;   Atmospheric and Oceanic Dynamics: Fundamentals and Large-Scale
> Circulation
> ;   Cambridge Univ. Press, New York.
> ;
> ; Nomenclature
> ; th   - potential temperature (K)
> ;        http://glossary.ametsoc.org/wiki/potential_temperature
> ;
> https://www.ncl.ucar.edu/Document/Functions/Contributed/pot_temp.shtml
> ; u    - zonal wind components (m/s) ; same dimensionality as 'th'
> ; z    - height (m)
> ; lat  - latitude of each grid point ; same dimensionality as 'th'
> ; opt  - =0 (egr only);
> ; ndimz- dimension of 'th' for which vertical gradient is to be calculated
> ;        th(:), wspd(:), z(:) ..... ndimz=0
> ;        th(:,:,:)  , z(:) or z(:,:,:)   and the left is the vertical dim,
> ndimz=0
> ;        th(:,:,:,:), z(:) or z(:,:,:,:) and the left is the time
> dimension
> ;                                        and the next is height,  ndimz=1
> ;
> ;
> local dimth, dimu, dimz, dimth, dimlat, rankth, ranku, rankz, rankth,
> ranklat \
>     , u_shear, brunt, fcor, g, omega, con, rad, egr
> begin
>                                 ; dimension checking
>   dimu    = dimsizes(u)
>   dimz    = dimsizes(z)
>   dimth   = dimsizes(th)
>   dimlat  = dimsizes(lat)
>
>   ranku   = dimsizes(dimu)
>   rankz   = dimsizes(dimz)
>   rankth  = dimsizes(dimth)
>   ranklat = dimsizes(dimlat)
>
>   if (.not.(rankth.eq.ranku .and. rankth.eq.rankz .and. rankth.eq.ranklat)
> \
>       .and. all(dimth.eq.dimu) .and. all(dimth.eq.dimz) .and.
> all(dimth.eq.dimlat)) then
>       print("eady_growth_rate: th, u, lat and must have the same rank &
> sizes")
>       print("ranku="+ranku+"  rankth="+rankth+"  rankz="+rankz+"
>  ranklat="+ranklat)
>       print(dimth)
>       print(dimu)
>       print(dimz)
>       print(dimlat)
>       exit
>   end if
>
>   brunt   = brunt_vaisala_atm(th, z, 0, ndimz)
>
>   dudz    = center_finite_diff_n(u , z, False, 0, ndimz)
>
>   copy_VarCoords(u, dudz)
>   dudz at long_name  = "vertical gradient of the zonal wind (zonal wind
> shear): du/dz"
>   dudz at units      = "1/s"
>  ;print("eady_growth_rate: dudz: min="+min(dudz)+"   max="+max(dudz))
>
>   g     = 9.80665                    ; m/s2 ; gravity at 45 deg lat used
> by the WMO
>   con   = 0.3098
>   fcor  = coriolis_param(lat)        ; (1/s)     ; coriolis parameter
>                                      ; prevent 1/0
>   if (any(brunt.eq.0)) then
>       if (.not.isatt(brunt,"_FillValue")) then
>           if (typeof(brunt).eq."double") then
>               brunt at _FillValue = 1d20
>           else
>               brunt at _FillValue = 1e20
>           end if
>        end if
>        brunt = where(brunt.eq.0, brunt at _FillValue, brunt)
>   end if
>
>   egr   = con*abs(fcor)*abs(dudz)/brunt
>   egr at long_name = "maximum eady growth rate"
>   egr at units     = ""
>   copy_VarCoords(u, egr)
>
>   if (opt.eq.0) then
>       return (egr)
>   else if (opt.eq.1) then
>       return ( [/egr, dudz /] )
>   else if (opt.eq.2) then
>       return ( [/egr, dudz, brunt /] )
>   end if
>   end if
>   end if
>
> end
>
> On Tue, Aug 20, 2019 at 6:47 AM Rohit Ghosh via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
>> Hello,
>>
>>
>> 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.
>>
>>
>>
>> https://www.ncl.ucar.edu/Document/Functions/Contributed/eady_growth_rate.shtml
>>
>>
>> Thank you very much.
>>
>>
>> Look forward to your response.
>>
>>
>> Regards,
>>
>> Rohit
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190820/e2ed644b/attachment.html>


More information about the ncl-talk mailing list