advection term

From: Alexander Semenov <asemenov_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 29 2012 - 13:00:49 MST

Hello

I'm trying to calculate the advection term (u*(dT/dx)+v*(dT/dy)). I wanted
to do this in 2 steps: 1st step is to calculate the gradient, the 2nd is to
multiply it by u and v

So I calculated gradient as shown in the example:
http://www.ncl.ucar.edu/Document/Functions/Built-in/igradsF.shtml

T_grad_lon = theta ; create arrays to hold output, same
size and type as input
  T_grad_lat = theta
                                ; this procedure will overwrite
                                ; values in T_grad_lon and T_grad_lat

  *gradsf* <http://www.ncl.ucar.edu/Document/Functions/Built-in/gradsf.shtml>
(theta, T_grad_lon, T_grad_lat)
  T_grad_lon@long_name = "longitudinal gradient (derivative)"
  T_grad_lat@long_name = "latitudinal gradient (derivative)"
  theta = *igradsF* (T_grad_lon, T_grad_lat)

Then I had to multiply gradient by u and v to get (u*(dT/dx)+v*(dT/dy).

I did 2 different ways:

1st way.

u*T_grad_lat+v*T_grad_lon. You may see on the picture ("1way.png")
that the plot looks pretty much the same all over the domain. I don't
see the maximum advection where it is supposed to be by the west coast
of Greenland.

2 way

u*theta+v*theta. I got the right pattern, but values are off. There
can't be advection 700 K/s.

I think that this way is not correct because theta has 2 dimensions:
theta(T_grad_lon,T_grad_lat), so when I do the multiplication (
u*theta+v*theta) I end up having:

u*T_grad_lon+u*T_grad_lat+v*T_grad_lon+v*T_grad_lat, whereas I need
only 2 highlighted terms

Could you help me find out what is wrong and how can I get it fixed?

-- 
regards
*******************************************************
*Alexander Semenov*
*
*
PhD Student - Research Assistant
International Arctic Research Center
Department of atmospheric sciences
University of Alaska Fairbanks
930 Koyukuk dr, 408c3
Fairbanks, AK, USA, 99775
work phone +19074742672



_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

1way.png 2nd_way.png
Received on Wed Feb 29 13:01:03 2012

This archive was generated by hypermail 2.1.8 : Mon Mar 05 2012 - 14:12:07 MST