Changeset 711 for codes/icosagcm/trunk/src/sphere
- Timestamp:
- 07/25/18 13:57:35 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/sphere/metric.f90
r548 r711 7 7 INTEGER :: neighbour(0:5) 8 8 INTEGER :: edge(0:5) 9 INTEGER :: vertex(0:5) 9 10 INTEGER :: assign_face 10 11 INTEGER :: assign_i … … 32 33 END TYPE t_edge_glo 33 34 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 34 42 35 43 TYPE(t_vertex_glo),ALLOCATABLE,SAVE :: vertex_glo(:,:,:) 36 44 TYPE(t_cell_glo),ALLOCATABLE,SAVE :: cell_glo(:) 37 45 TYPE(t_edge_glo),ALLOCATABLE,SAVE :: edge_glo(:) 46 TYPE(t_vertices_glo),ALLOCATABLE,SAVE :: vertices_glo(:) 38 47 INTEGER :: ncell_glo 39 48 … … 93 102 ALLOCATE(tab_index(nb_face,nb_face,0:5)) 94 103 ALLOCATE(edge_glo(ncell_glo*3)) 104 ALLOCATE(vertices_glo(ncell_glo*2)) 95 105 96 106 DO ind=1,ncell_glo … … 824 834 END SUBROUTINE set_cell_edge 825 835 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 826 885 SUBROUTINE set_vertex_edge 827 886 IMPLICIT NONE … … 850 909 ENDDO 851 910 ENDDO 911 912 852 913 END SUBROUTINE set_vertex_edge 853 914 … … 864 925 CALL compute_extended_face_bis 865 926 CALL set_cell_edge 927 CALL set_cell_vertex 866 928 CALL set_vertex_edge 867 929
Note: See TracChangeset
for help on using the changeset viewer.