[ncl-talk] Question on moisture advection example

Dennis Shea shea at ucar.edu
Fri Mar 1 09:52:50 MST 2019


[1] As indicated in the documentation, the advection is via:

       *adv_X = U*(dX/dlon) + V*(dX/dlat)*

     There is *no* minus sign*. *

    Perhaps, something your are looking at has a convention*:*


*      minus_adv_X_ =  -( U*(dX/dlon) + V*(dX/dlat) )*

*[2]* As indicated in the documentation: If *opt_adv=1*, then:

   adv_X = *advect_variable*(u,v,X,gridType,long_name,units,*opt_adv*)

; For clarity: explicitly extract the returned elements of the list
variable. All meta data is present.

   Xadv = adv_X[0]           ; advected quantity
   Xgrx = adv_X[1]           ; longitudinal gradient
   Xgry = adv_X[2]           ; latitudinal  gradient

   *printVarSummary*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/printVarSummary.shtml>(Xadv)
   ; advection of 'X'
   printMinMax(Xadv, 0)
   print("---")

   *printVarSummary*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/printVarSummary.shtml>(Xgrx)
   ; longitudinal gradient
   *printVarSummary*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/printVarSummary.shtml>(Xgry)
   ; latitudinal gradient

*[3] *You can add the following





*   meridional_advX = v*Xgry   meridional_advX at long_name = "..."
meridional_advX at units = "..."   copy_VarCoords(v, meridional_advX)*


*   printVarSummary(meridional_advX)   printMinMax(meridional_advX, 0)*



*   zonal_adv_X = u*Xgrx   ...*


On Thu, Feb 28, 2019 at 11:54 PM Lyndz <olagueralyndonmark429 at gmail.com>
wrote:

> Dear NCL-experts,
>
> I just want to clarify the following:
>
> I am calculating moisture advection from this example:
>
> https://www.ncl.ucar.edu/Document/Functions/Contributed/advect_variable.shtml
>
> Problems:
> [1] I am a little confused about the sign of the given equation here.
> Should the final output (advection) be multipled by -1? Not multiplying by
> -1 seems to give me the correct result, but if this is the case, all the
> terms should be negative in the equation:
> *adv_X = -U*(dX/dlon) -V*(dX/dlat)*
>
> [2] If I have to separate the zonal and meridional components, they should
> be also multiplied by -1?
>
> 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/20190301/535bf788/attachment.html>


More information about the ncl-talk mailing list