Colleagues
I am being a bit thick about how to code a matrix multiplication (#),
and request your help.
I have an array with three coordinate variables: time, latitude, and
longitude
ncl 14> print(dimsizes(curl))
(0) 557
(1) 31
(2) 26
I want to multiply each of the curl values at each unique latitude by
1/(rho * f(i))
where:
rho = 1024 ; kg m^-3
f = 2 * omega * sin(latitude) ; Coriolis parameter
and omega = 7.27*10^-5 ; units = s^-1
ncl 15> print(dimsizes(f))
(0) 31
The temptation is to use a do loop and then stack the matrices by time
steps, but I know there is a better way using vectorization.
Thanks, Sam
--
Sam McClatchie,
Supervisory oceanographer, Fisheries oceanography
Southwest Fisheries Science Center, NOAA,
8901 La Jolla Shores Dr.
La Jolla, CA 92037-1509, U.S.A.
email <Sam.McClatchie@noaa.gov>
Office: 858 546 7083, Cellular: 858 752 8495
Research home page <www.fishocean.info>
/\
...>><xX(¡>
//// \\\\
<¡)Xx><<
///// \\\\\\
><(((¡>
>><(((¡> ...>><xX(¡>O<¡)Xx><<
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jun 21 14:17:14 2013
This archive was generated by hypermail 2.1.8 : Mon Jun 24 2013 - 11:46:47 MDT