Changeset 1403 for LMDZ4/trunk/libf/filtrez/mod_filtre_fft.F90
- Timestamp:
- Jul 1, 2010, 11:02:53 AM (14 years ago)
- Location:
- LMDZ4/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk
- Property svn:mergeinfo changed
-
LMDZ4/trunk/libf/filtrez/mod_filtre_fft.F90
r1279 r1403 1 ! 2 ! $Id$ 3 ! 4 1 5 MODULE mod_filtre_fft 2 6 … … 23 27 INTEGER :: index_vp(iim) 24 28 INTEGER :: i,j 25 29 INTEGER :: l,ll_nb 30 26 31 index_vp(1)=1 27 32 DO i=1,iim/2 … … 98 103 ENDDO 99 104 100 105 #ifdef FFT_FFTW 106 107 WRITE (*,*)"COTH jfiltnu,jfiltsu,jfiltnv,jjm-jfiltsv" 108 WRITE (*,*)jfiltnu,jfiltsu,jfiltnv,jjm-jfiltsv 109 WRITE (*,*)MAX(jfiltnu-2,jjm-jfiltsu,jfiltnv-2,jjm-jfiltsv)+1 110 CALL Init_FFT(iim,(llm+1)*(MAX(jfiltnu-2,jjm-jfiltsu,jfiltnv-2,jjm-jfiltsv)+1)) 111 #else 101 112 CALL Init_FFT(iim,(jjm+1)*(llm+1)) 102 113 #endif 103 114 104 115 END SUBROUTINE Init_filtre_fft … … 118 129 119 130 REAL :: vect(iim+inc,jj_end-jj_begin+1,nbniv) 120 ! REAL :: vect_test(iim+inc,jj_end-jj_begin+1,nbniv) 121 COMPLEX*16 :: TF_vect(iim/2+1,jj_end-jj_begin+1,nbniv) 122 ! COMPLEX*16 :: TF_vect_test(iim/2+1,jj_end-jj_begin+1,nbniv) 131 COMPLEX :: TF_vect(iim/2+1,jj_end-jj_begin+1,nbniv) 123 132 INTEGER :: nb_vect 124 133 INTEGER :: i,j,l 125 134 INTEGER :: ll_nb 126 ! REAL :: vect_tmp(iim+inc,jj_end-jj_begin+1,nbniv)127 135 128 136 ll_nb=0 … … 140 148 nb_vect=(jj_end-jj_begin+1)*ll_nb 141 149 142 ! vect_tmp=vect143 144 150 CALL FFT_forward(vect,TF_vect,nb_vect) 145 146 ! CALL FFT_forward(vect,TF_vect_test,nb_vect)147 ! PRINT *,"XXXXXXXXXXXXX Filtre_u_FFT xxxxxxxxxxxx"148 ! DO j=1,jj_end-jj_begin+1149 ! DO i=1,iim/2+1150 ! PRINT *,"====",i,j,"----->",TF_vect_test(i,j,1)151 ! ENDDO152 ! ENDDO153 151 154 152 DO l=1,ll_nb … … 159 157 ENDDO 160 158 ENDDO 161 159 162 160 CALL FFT_backward(TF_vect,vect,nb_vect) 163 ! CALL FFT_backward(TF_vect_test,vect_test,nb_vect) 164 165 ! PRINT *,"XXXXXXXXXXXXX Filtre_u_FFT xxxxxxxxxxxx" 166 ! DO j=1,jj_end-jj_begin+1 167 ! DO i=1,iim 168 ! PRINT *,"====",i,j,"----->",vect_test(i,j,1) 169 ! ENDDO 170 ! ENDDO 171 161 162 172 163 ll_nb=0 173 164 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) … … 199 190 200 191 REAL :: vect(iim+inc,jj_end-jj_begin+1,nbniv) 201 COMPLEX *16:: TF_vect(iim/2+1,jj_end-jj_begin+1,nbniv)192 COMPLEX :: TF_vect(iim/2+1,jj_end-jj_begin+1,nbniv) 202 193 INTEGER :: nb_vect 203 194 INTEGER :: i,j,l … … 260 251 REAL,INTENT(INOUT) :: vect_inout(iim+1,nlat,nbniv) 261 252 262 REAL :: vect(iim+inc,jj_end-jj_begin+1,nbniv)263 COMPLEX *16:: TF_vect(iim/2+1,jj_end-jj_begin+1,nbniv)253 REAL :: vect(iim+inc,jj_end-jj_begin+1,nbniv) 254 COMPLEX :: TF_vect(iim/2+1,jj_end-jj_begin+1,nbniv) 264 255 INTEGER :: nb_vect 265 256 INTEGER :: i,j,l … … 305 296 306 297 END SUBROUTINE Filtre_inv_fft 307 308 309 ! SUBROUTINE get_ll_index(nbniv,ll_index,ll_nb)310 ! IMPLICIT NONE311 ! INTEGER,INTENT(IN) :: nbniv312 ! INTEGER,INTENT(OUT) :: ll_index(nbniv)313 ! INTEGER,INTENT(OUT) :: ll_nb314 !315 ! INTEGER :: l,ll_begin, ll_end316 ! INTEGER :: omp_rank,omp_size317 ! INTEGER :: OMP_GET_NUM_THREADS318 ! INTEGER :: omp_chunk319 ! EXTERNAL OMP_GET_NUM_THREADS320 ! INTEGER :: OMP_GET_THREAD_NUM321 ! EXTERNAL OMP_GET_THREAD_NUM322 !323 !324 ! omp_size=OMP_GET_NUM_THREADS()325 ! omp_rank=OMP_GET_THREAD_NUM()326 ! omp_chunk=nbniv/omp_size+min(1,MOD(nbniv,omp_size))327 !328 ! ll_begin=omp_rank*OMP_CHUNK+1329 ! ll_nb=0330 ! DO WHILE (ll_begin<=nbniv)331 ! ll_end=min(ll_begin+OMP_CHUNK-1,nbniv)332 ! DO l=ll_begin,ll_end333 ! ll_nb=ll_nb+1334 ! ll_index(ll_nb)=l335 ! ENDDO336 ! ll_begin=ll_begin+omp_size*OMP_CHUNK337 ! ENDDO338 !339 ! END SUBROUTINE get_ll_index340 298 341 299 END MODULE mod_filtre_fft
Note: See TracChangeset
for help on using the changeset viewer.