Print

Print


I am a novice Fortran 90 programmer.  If I wish to use a WHERE test on only a
portion of the dimensional domain of the 
arrays involved, do I write

where (ltest(1:nx,1:ny,1:nz)) a = b + c   or

where (ltest) a(1:nx,1:ny,1:nz) = b(1:nx,1:ny,1:nz) + c(1:nx,1:ny,1:nz)

or limit both the ltest and a,b,c arrays?

What is the most efficient and portable (or even legal)?

Thanks for your help.


Dave Rector
Staff Scientist, Fluid Dynamics
Pacific Northwest National Laboratory
Mail Stop K7-15
P.O. Box 999
Richland, WA 99352
509-372-4530 voice
509-375-3865 fax
[log in to unmask]





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%