Ignore:
Timestamp:
11/26/08 11:58:38 (15 years ago)
Author:
bellier
Message:

Removing trans_buff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • IOIPSL/trunk/src/mathelp.f90

    r386 r440  
    1010!- 
    1111  PRIVATE 
    12   PUBLIC :: mathop,moycum,trans_buff,buildop 
     12  PUBLIC :: mathop,moycum,buildop 
    1313!- 
    1414  INTERFACE mathop 
     
    31133113END SUBROUTINE moycum 
    31143114!=== 
    3115 SUBROUTINE trans_buff (ox,sx,oy,sy,oz,sz,xsz,ysz,zsz,v3d,sl,v1d) 
    3116 !--------------------------------------------------------------------- 
    3117 !- This subroutine extracts from the full 3D variable the slab of 
    3118 !- data that will be used later. Perhaps there are hardware routines 
    3119 !- for this task on some computers. This routine will be obsolete in 
    3120 !- a F90 environnement 
    3121 !- 
    3122 !-sc   V1d = reshape(V3id (ox:ox-1+sx,oy:oy-1+sy,oz:oz-1+sz), 
    3123 !-sc                 SHAPE= (/sx*sy*sz/) ) 
    3124 !- 
    3125 !- INPUT 
    3126 !- ox  : Origin of slab of data in X 
    3127 !- sx  : Size of slab in X 
    3128 !- oy  : Origin of slab of data in Y 
    3129 !- sy  : Size of slab in Y 
    3130 !- oz  : Origin of slab of data in Z 
    3131 !- sz  : Size of slab in Z 
    3132 !- xsz,ysz,zsz : 3 sizes of full variable v3d 
    3133 !- v3d : The full 3D variable 
    3134 !- sl  : size of variable v1d 
    3135 !- v1d : The 1D variable containing the slab 
    3136 !- 
    3137 !- VERSION 
    3138 !- 
    3139 !--------------------------------------------------------------------- 
    3140   IMPLICIT NONE 
    3141 !- 
    3142   INTEGER :: ox,sx,oy,sy,oz,sz 
    3143   INTEGER :: xsz,ysz,zsz 
    3144   INTEGER :: sl 
    3145   REAL :: v3d(xsz,ysz,zsz) 
    3146   REAL :: v1d(sl) 
    3147 !- 
    3148   INTEGER :: ix,iy,iz,ic 
    3149 !--------------------------------------------------------------------- 
    3150 !- 
    3151 ! We have to consider the case where the zoom starts at (1,1,1) 
    3152 ! but does not go over the full size. 
    3153 !- 
    3154   IF (     (ox .EQ. 1).AND.(oy.EQ. 1).AND.(oz.EQ. 1) & 
    3155  &    .AND.(sx .EQ. xsz).AND.(sy .EQ. ysz).AND.(sz .EQ. zsz) ) THEN  
    3156     DO ic=1,MAX(sx,1)*MAX(sy,1)*MAX(sz,1)  
    3157       v1d(ic) = v3d(ic,1,1) 
    3158     ENDDO  
    3159   ELSE IF (     (ox .EQ. 1).AND.(oy .EQ. 1) & 
    3160  &         .AND.(sx .EQ. xsz).AND.(sy .EQ. ysz)) THEN  
    3161     DO iz=oz,(oz-1+sz)  
    3162       DO ic=1,MAX(sx,1)*MAX(sy,1)  
    3163         v1d(ic) = v3d(ic,1,iz) 
    3164       ENDDO 
    3165     ENDDO 
    3166   ELSE  
    3167     ic = 0 
    3168     DO iz=oz,(oz-1+sz) 
    3169       DO iy=oy,(oy-1+sy) 
    3170         DO ix=ox,(ox-1+sx) 
    3171           ic = ic+1 
    3172           v1d(ic) = v3d(ix, iy, iz) 
    3173         ENDDO 
    3174       ENDDO 
    3175     ENDDO 
    3176   ENDIF 
    3177 !------------------------ 
    3178 END SUBROUTINE trans_buff 
    3179 !=== 
    31803115!----------------- 
    31813116END MODULE mathelp 
Note: See TracChangeset for help on using the changeset viewer.