C+ C NAME: C t3d_loc_fnc C PURPOSE: C Statements functions calculating linear index in C multi-dimensional arrays. C CATEGORY: C Include C CALLING SEQUENCE: C include 't3d_loc_fnc.h' C RESTRICTIONS: C Contains statement function, so must be called at the end C of the declaration section. C PROCEDURE: C > The main reason for using these statement functions is to avoid C having to pass all dimensions of multi-dimensional arrays as arguments C to functions and subroutines. Instead the t3d array is passed, C containing all the necessary information. C C > The information in t3d needs is used to set up all required C constants (nLng, nLat, etc.). This is done in the include file C 't3d_loc_exec.h' C C > PRJ__N is defined in include file 'los_param.h' C MODIFICATION HISTORY: C AUG-2001, Paul Hick (UCSD; pphick@ucsd.edu) C- C Linear index for array[nLng,nLat,*] locSS ( I,J, L) = I + nLng*( J-1 + nLat*( L-1 ) ) ! Linear index for array[nLng,nLat,nRad,*] locVOL ( I,J,K,L) = I + nLng*( J-1 + nLat*( K-1 + nRad*(L-1) ) ) ! Linear index for array[PRJ__N,nLng,nLat,nRad,*] locSHFT(M,I,J,K,L) = M + PRJ__N*( I-1 + nLng*( J-1 + nLat*( K-1 + nRad*(L-1) ) ) ) ! Linear index for array[NLOS,*] locLOS ( I,J) = I + NLOS*(J-1) ! Linear index for array[LOS__N,NLOS,*] locPOS (M,I,J) = M + LOS__N*( I-1 + NLOS*(J-1) ) ! Linear index for array[PRJ__N,NLOS,*] locPRJ (M,I,J) = M + PRJ__N*( I-1 + NLOS*(J-1) )