[ncl-talk] query_regarding_sine_angle
Kyle Griffin
ksgriffin2 at wisc.edu
Tue Sep 20 18:58:10 MDT 2016
Kunal,
Latitude is likely a 1-dimensional variable, while I assume your variable
is 2-dimensional (lat x lon). You can't simply multiply arrays with
different dimensions (unless it is a scalar, in which case it's not really
an array).
Look up the 'conform' function on the NCL website and you can find out how
to make your sin(lat) into an array the same shape as your var1.
Good luck.
Kyle
On Tue, Sep 20, 2016 at 12:20 PM Kunal Bali <kunal.bali9 at gmail.com> wrote:
> Dear NCL users
>
> I need to calculate the given equation
>
> = var1*10^5/ 2*7.292*10*sin(latitude)
>
>
> I am calculating the equation as
>
> var1 = a->TAUYWTR(0,:,:)
>
>
> lat1 = a->lat
> lon1 = a->lon
>
> sin_f = sin(lat1)
>
> var2 = (var1)*(100000)/(2)*(7.2921)*(sin_f)
>
> but I am getting an error as
> fatal:Mul: Number of dimensions do not match, can't continue
>
>
> Could anyone please let me know, how to solve it.
>
>
> Regards
> Kunal Bali
>
>
>
> _______________________________________________
> 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/20160921/161a708d/attachment.html
More information about the ncl-talk
mailing list