- Timestamp:
- 01/16/15 15:18:53 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/branches/SATURN_DYNAMICO/ICOSAGCM/src/restart.f90
r316 r319 51 51 REAL(rstd),ALLOCATABLE :: lon(:),lat(:),bounds_lon(:,:),bounds_lat(:,:) 52 52 LOGICAL,SAVE :: first=.TRUE. 53 CHARACTER(LEN=16) :: str_it 53 54 !$OMP THREADPRIVATE(first) 54 55 … … 83 84 84 85 85 IF (is_mpi_root .AND. first) THEN 86 status = NF90_CREATE(TRIM(ADJUSTL(restart_file_name))//'.nc', IOR(NF90_CLOBBER,NF90_NETCDF4), ncid) 86 IF (is_mpi_root) THEN 87 WRITE(str_it,*) it 88 status = NF90_CREATE(TRIM(ADJUSTL(restart_file_name))//"_"//TRIM(ADJUSTL(str_it))//'.nc', IOR(NF90_CLOBBER,NF90_NETCDF4), ncid) 87 89 IF (status/=NF90_NOERR) THEN 88 WRITE(*,*) "write_restart error: failed to create ",TRIM(ADJUSTL(restart_file_name))// '.nc'90 WRITE(*,*) "write_restart error: failed to create ",TRIM(ADJUSTL(restart_file_name))//"_"//TRIM(ADJUSTL(str_it))//'.nc' 89 91 WRITE(*,*) TRIM(NF90_STRERROR(status)) 90 92 ELSE 91 WRITE(*,*) "write_restart: created ",TRIM(ADJUSTL(restart_file_name))// '.nc'93 WRITE(*,*) "write_restart: created ",TRIM(ADJUSTL(restart_file_name))//"_"//TRIM(ADJUSTL(str_it))//'.nc' 92 94 ENDIF 93 95 status = NF90_DEF_DIM(ncid,'cell',ncell_glo,cellId) … … 191 193 192 194 IF (is_mpi_root) THEN 193 status = NF90_ SYNC(ncid)195 status = NF90_CLOSE(ncid) 194 196 IF (status/=NF90_NOERR) THEN 195 WRITE(*,*) "write_restart error: failed to close ",TRIM(ADJUSTL(restart_file_name))// '.nc'197 WRITE(*,*) "write_restart error: failed to close ",TRIM(ADJUSTL(restart_file_name))//"_"//TRIM(ADJUSTL(str_it))//'.nc' 196 198 WRITE(*,*) TRIM(NF90_STRERROR(status)) 197 199 STOP 198 200 ELSE 199 WRITE(*,*) "write_restart: finished writing ",TRIM(ADJUSTL(restart_file_name))// '.nc'201 WRITE(*,*) "write_restart: finished writing ",TRIM(ADJUSTL(restart_file_name))//"_"//TRIM(ADJUSTL(str_it))//'.nc' 200 202 ENDIF 201 203 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.