Re: Is there a function to calculate the advection?

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sun, 30 Apr 2006 08:19:12 -0600 (MDT)

> I am wondering if there is a function, built-in or contributed,
> which can be used to calculate the advection of a given
> variable, like ECMWF or NCEP temperature, in NCL?

I did not finish my previous response

So i you want a function and your data are global
on a gaussian grid:

function advectG(u,v,z)
                        ; variable to variable transfer of meta data
   z_grad_lon = z ; gradients returned to these arrays
   z_grad_lat = z
   gradsg (z, z_grad_lon, z_grad_lat)
  ;z_grad_lon_at_long_name = "longitudinal gradient (derivative)"
  ;z_grad_lat_at_long_name = "latitudinal gradient (derivative)"

   adv = u ; variable to variable transfer of meta data
   adv = u*z_grad_lon + v*z_grad_lat
   adv_at_long_name = "advection"

   if (isatt(u,"units") .and. isatt(z,"units")) then
       adv_at_units = "["+u_at_units+"] ["+z_at_units+"]"
       adv_at_units = ""
   end if

ncl-talk mailing list
Received on Sun Apr 30 2006 - 08:19:12 MDT

This archive was generated by hypermail 2.2.0 : Mon May 01 2006 - 10:50:06 MDT