Changeset 474


Ignore:
Timestamp:
09/12/16 10:05:57 (8 years ago)
Author:
ymipsl
Message:

Bug fix : on physic_column. The "own" variable is correctly defined only inside local domain and on firts halo.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/trunk/src/physics_interface.f90

    r472 r474  
    125125       END DO 
    126126    CASE(3) ! Copy non-halo points only, one at a time (works, slow ?) 
    127        n=COUNT(own,1) 
     127       n=0 
     128       n(jj_begin:jj_end)=COUNT(own(ii_begin:ii_end,jj_begin:jj_end),1) 
    128129       ngrid=SUM(n) 
    129130       info%ngrid=ngrid 
     
    146147    CASE DEFAULT ! Copy non-halo points only, as contiguous segments (works) 
    147148       n=0 
    148        n=COUNT(own,1) 
     149       n(jj_begin:jj_end)=COUNT(own(ii_begin:ii_end,jj_begin:jj_end),1) 
    149150       ngrid=SUM(n) 
    150151       info%ngrid=ngrid 
     
    154155       ALLOCATE(info%ij(nseg)) 
    155156       ALLOCATE(info%k(nseg)) 
    156  
     157       info%n(:)=0 
     158       info%ij(:)=0 
     159       info%k(:)=0 
     160        
    157161       jj=1 
    158162       k=1 
    159        DO j=1,jjm 
     163       DO j=jj_begin,jj_end 
    160164          IF(n(j)>0) THEN 
    161165             ! find first .TRUE. value in own(:,j) 
    162              DO i=1,iim 
     166             DO i=ii_begin,ii_end 
    163167                IF(own(i,j)) THEN 
    164168                   info%n(jj)=n(j) 
Note: See TracChangeset for help on using the changeset viewer.