[ncl-talk] Error in computing heat sources (Q1) and sinks (Q2)

Dennis Shea shea at ucar.edu
Fri Sep 13 08:29:35 MDT 2019


*https://www.ncl.ucar.edu/Applications/wind.shtml*
<https://www.ncl.ucar.edu/Applications/wind.shtml>

See bottom example.

This example uses daily mean data from NOAA/OAR/ESRL PSD, Boulder,
Colorado, USA. Specifically, *NCEP_Reanalysis 2*
<https://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis2.html>
daily mean data spanning 3-9 April 1993.

This is a *test script*. It is not fully tested. The returned quantities
are:

         q1 =   (dT/dt) - [omega*static_stability - V.grad(T)]  ; K/day
         q2 = -[(dH/dt) +  V.grad(H) +omega*(dH/dp)]            ; g/(kg-Pa)


On Fri, Sep 13, 2019 at 4:28 AM Lyndz via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Dear NCL-experts,
>
> *This is related to my previous emails here.
>
> *[Details]*
>
> I am calculating the heat sources and sinks. My input files can be
> downloaded from these links:
>
> *uwnd:* https://www.dropbox.com/s/9esjzhe9q9bodow/lag-lead_uwnd.nc?dl=0
> *vwnd:* https://www.dropbox.com/s/o4nf0vhv2u9c80v/lag-lead_vwnd.nc?dl=0
> *omega:* https://www.dropbox.com/s/kgoe8sf7z7peq1a/lag-lead_omega.nc?dl=0
> *mixing ratio: *
> https://www.dropbox.com/s/u1w0hg8fvoecqhr/lag-lead_mixratio.nc?dl=0
> *temp:* https://www.dropbox.com/s/9wxf5lbzjsrfukq/lag-lead_temp.nc?dl=0
>
> Attached in this email is the script that I am using.
>
>
> *[Problems]*
>
> *[1] *I am getting -Inf for Q2. The error occurs when calculating *dHdp*.
> I can't figure out why this gives -Inf. The calculation is straightforward
> as:
>    p2 = conform(H,p,1)
>    dHdp = center_finite_diff_n (H,p2,False,1,0)
>
> *[2] *The values of Q1 is very large (min=-62600.10594520718
> max=81387.3026968562)
> I was expecting this to be less than 1000.
>
> Any suggestions on how I can do this correctly in NCL?
>
> I'll appreciate any help....
>
> Sincerely,
> Lyndz
>
> _______________________________________________
> 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/20190913/7a971442/attachment.html>


More information about the ncl-talk mailing list