Changeset 993 for codes/icosagcm/devel/src/output/set_bounds.f90
- Timestamp:
- 11/15/19 11:03:17 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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)
Note: See TracChangeset
for help on using the changeset viewer.