- Timestamp:
- 11/15/19 11:03:17 (5 years ago)
- Location:
- codes/icosagcm/devel/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/src/icosa_init.f90
r992 r993 45 45 !$OMP PARALLEL 46 46 CALL switch_omp_no_distrib_level 47 48 ! RPNL 2019/11 Temp hack to use read_metric and devel cellset structure 49 CALL allocate_geometry 50 CALL compute_geometry 51 47 52 CALL read_metric 48 53 CALL compute_geometry -
codes/icosagcm/devel/src/output/set_bounds.f90
r880 r993 32 32 cells%ncell = n 33 33 34 ! now set bounds 35 ALLOCATE(cells%ij(n), cells%lon(n), cells%lat(n), cells%ind_glo(n)) 36 ALLOCATE(cells%bnds_lon(0:5,n), cells%bnds_lat(0:5,n)) 34 IF ( .NOT. ALLOCATED(cells%ij) ) THEN 35 ! now set bounds 36 ALLOCATE(cells%ij(n), cells%lon(n), cells%lat(n), cells%ind_glo(n)) 37 ALLOCATE(cells%bnds_lon(0:5,n), cells%bnds_lat(0:5,n)) 38 END IF 37 39 38 40 n=0 … … 74 76 cells%ncell = n 75 77 76 ! now set bounds 77 ALLOCATE(cells%ind_glo(n)) ! not set but must be allocated 78 ALLOCATE(cells%ij(n), cells%lon(n), cells%lat(n)) 79 ALLOCATE(cells%bnds_lon(0:2,n), cells%bnds_lat(0:2,n)) 78 IF ( .NOT. ALLOCATED( cells%ind_glo ) ) THEN 79 ! now set bounds 80 ALLOCATE(cells%ind_glo(n)) ! not set but must be allocated 81 ALLOCATE(cells%ij(n), cells%lon(n), cells%lat(n)) 82 ALLOCATE(cells%bnds_lon(0:2,n), cells%bnds_lat(0:2,n)) 83 END IF 80 84 81 85 n=0 … … 138 142 cells%ncell = n 139 143 140 ! now set bounds 141 ALLOCATE(cells%ij(n), cells%lon(n), cells%lat(n), cells%ind_glo(n)) 142 ALLOCATE(cells%sgn(n)) ! flip sign when reading/writing 143 ALLOCATE(cells%bnds_lon(2,n), cells%bnds_lat(2,n)) 144 IF ( .NOT. ALLOCATED( cells%ij ) ) THEN 145 ! now set bounds 146 ALLOCATE(cells%ij(n), cells%lon(n), cells%lat(n), cells%ind_glo(n)) 147 ALLOCATE(cells%sgn(n)) ! flip sign when reading/writing 148 ALLOCATE(cells%bnds_lon(2,n), cells%bnds_lat(2,n)) 149 END IF 144 150 145 151 CALL swap_dimensions(ind) -
codes/icosagcm/devel/src/sphere/compute_geometry.f90
r880 r993 123 123 CALL update_circumcenters 124 124 125 DO ind=1,ndomain 126 IF (.NOT. assigned_domain(ind) .OR. .NOT. is_omp_level_master ) CYCLE 127 d=>domain(ind) 128 CALL swap_dimensions(ind) 129 CALL swap_geometry(ind) 130 DO j=jj_begin,jj_end 131 DO i=ii_begin,ii_end 132 n=(j-1)*iim+i 133 DO k=0,5 134 x1(:) = xyz_v(n+z_pos(k+1),:) 135 x2(:) = d%vertex(:,k,i,j) 136 IF (norm(x1-x2)>1e-10) THEN 137 PRINT*,"vertex diff ",ind,i,j,k 138 PRINT*,x1 139 PRINT*,x2 140 ENDIF 141 ENDDO 142 ENDDO 143 ENDDO 144 ENDDO 125 !ym you get discrepency if you try to read metric from file, vertex are not saved in file 126 ! DO ind=1,ndomain 127 ! IF (.NOT. assigned_domain(ind) .OR. .NOT. is_omp_level_master ) CYCLE 128 ! d=>domain(ind) 129 ! CALL swap_dimensions(ind) 130 ! CALL swap_geometry(ind) 131 ! DO j=jj_begin,jj_end 132 ! DO i=ii_begin,ii_end 133 ! n=(j-1)*iim+i 134 ! DO k=0,5 135 ! x1(:) = xyz_v(n+z_pos(k+1),:) 136 ! x2(:) = d%vertex(:,k,i,j) 137 ! IF (norm(x1-x2)>1e-10) THEN 138 ! PRINT*,"vertex diff ",ind,i,j,k 139 ! PRINT*,x1 140 ! PRINT*,x2 141 ! ENDIF 142 ! ENDDO 143 ! ENDDO 144 ! ENDDO 145 ! ENDDO 145 146 146 147 … … 539 540 USE init_unstructured_mod, ONLY : read_local_mesh 540 541 USE set_bounds_mod, ONLY : set_bounds 541 CALL allocate_geometry 542 543 ! CALL allocate_geometry 542 544 543 545 SELECT CASE(grid_type)
Note: See TracChangeset
for help on using the changeset viewer.