Ignore:
Timestamp:
07/05/16 11:20:52 (8 years ago)
Author:
dumas
Message:

Merge branche iLOVECLIM sur rev 76

Location:
branches/iLoveclim
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/iLoveclim

  • branches/iLoveclim/SOURCES/diffusiv-polyn-0.6.f90

    r4 r77  
    3434 
    3535!     =============================================================== 
    36  
     36!$ USE OMP_LIB 
    3737USE module3D_phy 
    3838 
     
    4444REAL :: INV_4DX ! inverse de dx pour eviter les divisions =1/(4*dx) 
    4545REAL :: INV_4DY ! inverse de dy pour eviter les divisions =1/(4*dy) 
    46 INTEGER :: ii 
    47 integer :: ll 
    4846 
    4947if (itracebug.eq.1)  call tracebug(' Entree dans routine diffusiv') 
     
    6058 
    6159! initialisation de la diffusion 
     60!$OMP PARALLEL 
     61!$OMP WORKSHARE 
    6262diffmx(:,:)=0. 
    6363diffmy(:,:)=0. 
    64  
     64!$OMP END WORKSHARE 
     65!$OMP END PARALLEL 
    6566 
    6667! calcul de SDX, SDY et de la pente au carre en mx et en my : 
     
    8182! Calcul de la vitesse de glissement, qu'elle soit calculee par diagno ou par sliding 
    8283!------------------------------------------------------------------------------------ 
    83 !  
     84!$OMP PARALLEL 
     85!$OMP WORKSHARE 
    8486where (flgzmx(:,:)) 
    8587    ubx(:,:) = uxflgz(:,:) 
     
    9395    uby(:,:) = ddby(:,:)* (-sdy(:,:)) 
    9496endwhere 
    95  
    96  
     97!$OMP END WORKSHARE 
     98!$OMP END PARALLEL 
    9799if (itracebug.eq.1) call tracebug(' diffusiv  apres calcul glissement') 
    98100 
     
    101103! Deformation SIA : Calcul de ddy  et ddx pour chaque valeur de iglen 
    102104!------------------------------------------------------------------ 
    103  
    104105do iglen=n1poly,n2poly 
    105106   glenexp=max(0.,(glen(iglen)-1.)/2.) 
    106  
    107  
     107  !$OMP PARALLEL  
     108  !$OMP DO 
    108109   do j=1,ny 
    109110      do i=1,nx 
    110  
    111111         if (.not.flotmy(i,j)) then !  On calcule quand la deformation même pour les ice streams 
    112112            ddy(i,j,iglen)=((slope2my(i,j)**  &  ! slope2my calcule en debut de routine 
    113113                 glenexp)*(rog)**glen(iglen)) & 
    114114                 *hmy(i,j)**(glen(iglen)+1) 
    115  
    116  
    117115         endif 
    118116      end do 
    119117   end do 
     118   !$OMP END DO 
     119   !$OMP END PARALLEL 
    120120end do 
     121 
     122 
    121123 
    122124do iglen=n1poly,n2poly 
    123125   glenexp=max(0.,(glen(iglen)-1.)/2.) 
    124  
    125  
     126   !$OMP PARALLEL 
     127   !$OMP DO 
    126128   do j=1,ny   
    127129      do i=1,nx 
    128  
    129130         if (.not.flotmx(i,j)) then      ! bug y->x corrige le 5 avril 2008 ( 
    130                                      
    131131            ddx(i,j,iglen)=((slope2mx(i,j)**  & ! slope2mx calcule en debut de routine 
    132132                 glenexp)*(rog)**glen(iglen)) & 
     
    135135      end do 
    136136   end do 
     137   !$OMP END DO 
     138   !$OMP END PARALLEL 
    137139end do 
    138140 
     141 
    139142! vitesse due a la déformation----------------------------------------------- 
    140  
    141  
     143!$OMP PARALLEL 
     144!$OMP DO 
    142145ydef: do j=2,ny 
    143146       do i=1,nx  
     
    166169    end do 
    167170   end do ydef 
    168  
     171!$OMP END DO 
     172 
     173!$OMP DO 
    169174xdef: do j=1,ny 
    170175       do i=2,nx  
     
    194199    end do 
    195200   end do xdef 
     201!$OMP END DO 
    196202 
    197203if (itracebug.eq.1) call tracebug(' diffusiv  avant limit') 
     
    201207 
    202208! la limitation selon x 
     209!$OMP WORKSHARE 
    203210where(.not.flgzmx(:,:)) 
    204211   uxbar(:,:)=min(uxbar(:,:),ultot) 
     
    211218   uybar(:,:)=max(uybar(:,:),-ultot) 
    212219end where 
     220!$OMP END WORKSHARE 
    213221 
    214222!    cas particulier des sommets ou il ne reste plus de neige. 
     223!$OMP DO 
    215224do j=2,ny-1 
    216225   do i=2,nx-1 
     
    223232   end do 
    224233end do 
    225  
     234!$OMP END DO 
     235!$OMP END PARALLEL 
    226236if (itracebug.eq.1)  call tracebug(' fin diffusiv ') 
    227237 
Note: See TracChangeset for help on using the changeset viewer.