> > real, dimension(size(ug_temp,1),size(ug_temp,2),size(ug_temp,3)) :: Z
> > real, dimension(size(ug_temp,1),size(ug_temp,2),size(ug_temp+1,3)) :: &
> > radius
> > ^^^^^^
>
> Making plausible assumptions about the declarations not shown, the
> code should compile ok. Although you underline a part, you don't say
> exactly what is wring with it, but I'm guessing that it's the +1.
> Presumably ug_temp is a numeric array of rank at least 3. In that
> case, ug_temp+1 is an array of the same shape as ug_temp, with 1 added
> to each element.
Now that I read it from a Fortran point of view, it does make sense.
ug_temp+1 is just what you said - an array of the same size and shape of
ug_temp. I was getting confused and thinking that ug_temp+1 was a
pointer to the first element of ug_temp and then incremented one space
in memory. Something like what C would do, if my extremely limited
understanding of that language is correct?
Catherine
--
------------------------------------------------------------------
Catherine Moroney ph: (520) 626-5123
Institute of Atmospheric Physics fax: (520) 621-6833
University of Arizona [log in to unmask]
P.O. Box 210081, Room 542
(1118 East 4th Street)
Tucson, AZ 85721-0081
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|