Re: do loop

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 2 Jul 2009 15:37:21 -0600 (MDT)

Michael,

In order to use "conform", the second argument must be a subset
of the size of the first argument.

So, it looks like you'd first have to tranpose toa.

Then, the third argument of "conform" should be the dimensions of
"trans" that match the transposed toa. This will be (/0,1/):

      toa_con = conform(trans, transpose(toa), (/0,1/) )
      solar = trans * toa_con

--Mary

On Thu, 2 Jul 2009, Michael Notaro wrote:

> Thanks. I tried that but got this error:
> fatal:conform: the dimensions sizes of the second argument do not
> match those indicated by the third argument
> fatal:Execute: Error occurred at or near line 69
>
>
> On Jul 2, 2009, at 4:20 PM, whobbs_at_ucla.edu wrote:
>
>> Michael
>>
>> You could use the 'conform' function to expand the 'toa' array to the
>> same size as 'trans':
>>
>> toa_con = conform(trans, toa, (/1,2/) )
>>
>> solar = trans * toa_con
>>
>> See http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml
>>
>> Will
>>
>> Quoting Michael Notaro <mnotaro_at_wisc.edu>:
>>
>>> Can this be performed without a do loop?
>>>
>>> do id=0,364
>>> do ilat=0,47
>>> solar(id,ilat,:)=trans(id,ilat,:)*toa(ilat,id)
>>> end do
>>> end do
>>>
>>> Thanks, Michael
>>> _______________________________________________
>>> 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
>
> _______________________________________________
> 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 Jul 02 2009 - 15:37:21 MDT

This archive was generated by hypermail 2.2.0 : Tue Jul 07 2009 - 11:13:18 MDT