Ignore:
Timestamp:
07/25/18 13:57:35 (6 years ago)
Author:
ymipsl
Message:

Adding halo transfer for scalar field ad vorticity point.
=> Use request "req_z1_scal" with transfer function

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/trunk/src/sphere/metric.f90

    r548 r711  
    77    INTEGER :: neighbour(0:5) 
    88    INTEGER :: edge(0:5) 
     9    INTEGER :: vertex(0:5) 
    910    INTEGER :: assign_face 
    1011    INTEGER :: assign_i 
     
    3233  END TYPE t_edge_glo 
    3334     
     35  TYPE t_vertices_glo 
     36   INTEGER :: assign_domain 
     37   INTEGER :: assign_i 
     38   INTEGER :: assign_j 
     39   INTEGER :: assign_pos 
     40   INTEGER :: assign_delta 
     41  END TYPE t_vertices_glo     
    3442  
    3543  TYPE(t_vertex_glo),ALLOCATABLE,SAVE :: vertex_glo(:,:,:) 
    3644  TYPE(t_cell_glo),ALLOCATABLE,SAVE :: cell_glo(:) 
    3745  TYPE(t_edge_glo),ALLOCATABLE,SAVE :: edge_glo(:) 
     46  TYPE(t_vertices_glo),ALLOCATABLE,SAVE :: vertices_glo(:) 
    3847  INTEGER :: ncell_glo 
    3948   
     
    93102    ALLOCATE(tab_index(nb_face,nb_face,0:5)) 
    94103    ALLOCATE(edge_glo(ncell_glo*3)) 
     104    ALLOCATE(vertices_glo(ncell_glo*2)) 
    95105     
    96106    DO ind=1,ncell_glo 
     
    824834  END SUBROUTINE  set_cell_edge     
    825835         
     836  SUBROUTINE set_cell_vertex 
     837  IMPLICIT NONE 
     838    INTEGER :: i,j,k,k2 
     839    INTEGER :: ind,ind1,ind2 
     840    INTEGER :: ng1,ng2 
     841    INTEGER :: ne      
     842   
     843    DO ind=1,ncell_glo 
     844      cell_glo(ind)%vertex(:)=0 
     845    ENDDO 
     846     
     847    ne=0 
     848    DO ind=1,ncell_glo 
     849      DO k=0,5 
     850        IF (cell_glo(ind)%vertex(k)==0) THEN 
     851          ind1=cell_glo(ind)%neighbour(k) 
     852          DO ng1=0,5 
     853            ind2=cell_glo(ind1)%neighbour(ng1) 
     854            DO ng2=0,5 
     855              IF (cell_glo(ind2)%neighbour(ng2)==ind) THEN 
     856                DO k2=0,5 
     857                  IF (cell_glo(ind)%neighbour(k2)==ind2) THEN 
     858                    IF (k2==k+1 .OR. k2==k+2 .OR. k2+6==k+1 .AND. k2+6==k+2) THEN 
     859                      IF (cell_glo(ind1)%vertex(ng1)==0 .AND. cell_glo(ind2)%vertex(ng2)==0) THEN 
     860                        ne=ne+1 
     861                        cell_glo(ind)%vertex(k)=ne  
     862                        cell_glo(ind1)%vertex(ng1)=ne 
     863                        cell_glo(ind2)%vertex(ng2)=ne 
     864                      ELSE IF (cell_glo(ind1)%vertex(ng1)==0) THEN 
     865                        cell_glo(ind)%vertex(k)=cell_glo(ind2)%vertex(ng2) 
     866                        cell_glo(ind1)%vertex(ng1)=cell_glo(ind2)%vertex(ng2) 
     867                      ELSE IF (cell_glo(ind2)%vertex(ng2)==0) THEN 
     868                        cell_glo(ind)%vertex(k)=cell_glo(ind1)%vertex(ng1) 
     869                        cell_glo(ind2)%vertex(ng2)=cell_glo(ind1)%vertex(ng1) 
     870                      ENDIF 
     871                    ENDIF 
     872                  ENDIF 
     873                ENDDO 
     874              ENDIF 
     875            ENDDO 
     876          ENDDO 
     877        ENDIF 
     878      ENDDO 
     879    ENDDO                       
     880                      
     881  
     882  END SUBROUTINE set_cell_vertex 
     883 
     884         
    826885  SUBROUTINE set_vertex_edge 
    827886  IMPLICIT NONE 
     
    850909      ENDDO 
    851910    ENDDO 
     911 
     912 
    852913  END SUBROUTINE set_vertex_edge  
    853914      
     
    864925    CALL compute_extended_face_bis 
    865926    CALL set_cell_edge 
     927    CALL set_cell_vertex 
    866928    CALL set_vertex_edge 
    867929     
Note: See TracChangeset for help on using the changeset viewer.