Re: Need help : dimension problems

From: Xi Chang <xi.chang01_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 06 2014 - 09:08:48 MST

HI Dennis,
Thanks for the hints,
Yes B and C are in degrees.
However, just simply verify the calculation from yours and I found this :

Variable: Y
Type: float
Total Size: 480 bytes
            120 values
Number of Dimensions: 4
Dimensions and sizes: [2] x [3] x [4] x [5]
Coordinates:

*(0,0,0,0) -125.4169(0,0,0,1) -23.16384(0,0,0,2)
17.28738(0,0,0,3) 146.5444*
(0,0,0,4) -42.50797
(0,0,1,0) -125.4169
(0,0,1,1) -23.16384
(0,0,1,2) 17.28738
(0,0,1,3) 146.5444
(0,0,1,4) -42.50797
(0,0,2,0) -125.4169
(0,0,2,1) -23.16384
(0,0,2,2) 17.28738
(0,0,2,3) 146.5444
(0,0,2,4) -42.50797
(0,0,3,0) -125.4169
(0,0,3,1) -23.16384
(0,0,3,2) 17.28738
(0,0,3,3) 146.5444
(0,0,3,4) -42.50797
(0,1,0,0) -125.4169

It seems *not correct at all* (the results are too big) if your initial
data let's say A as in you example is:

Variable: A
Type: float
Total Size: 96 bytes
            24 values
Number of Dimensions: 3
Dimensions and sizes: [2] x [3] x [4]
Coordinates:

*(0,0,0) 0.8703274(0,0,1) 0.8729238(0,0,2) 1.946794*
(0,0,3) 0.9825296
(0,1,0) 0.3539646
(0,1,1) -0.1269965
(0,1,2) -0.8589329
(0,1,3) 0.8771248
(0,2,0) 0.9319632
(0,2,1) -1.167621
(0,2,2) 0.9179119
(0,2,3) 0.7354526
(1,0,0) -2.82497
(1,0,1) 0.01385049
(1,0,2) 0.05359069
(1,0,3) 0.7547207
(1,1,0) 0.1774226
(1,1,1) -0.618634
(1,1,2) 1.015617
(1,1,3) -0.5024392
(1,2,0) 1.169137
(1,2,1) -0.6706365

On Thu, Feb 6, 2014 at 3:59 PM, Dennis Shea <shea@ucar.edu> wrote:

> This is a bit confusing (to me anyway).
>
> Arrays B and C must conform to allow (B+C).
>
> B and C must then have units of radians for 'cos(B+C)'
>
> See attached
>
>
>
> On 2/5/14, 12:20 PM, Xi Chang wrote:
>
>> Hallo NCL,
>>
>> I have a question regarding dimension problem.
>> I want to solve this equation *Y= A cos (B+C) *in NCL,
>>
>> where:
>> A: is two dimensional field (time, lat,lev)
>> B: is two dimensional field (time, lat,lev)
>> C: is an array for longitude, let say expands from ispan (-180,180,2)
>>
>> How could I solve this problem in order to produce Y with dimension
>> *(time, lev, lat, lon)*
>>
>> Thank you
>> Chang
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 6 09:09:05 2014

This archive was generated by hypermail 2.1.8 : Fri Feb 07 2014 - 16:39:11 MST