Changeset 811 for branches/dev_001_SBC/NEMO/LIM_SRC/limrst.F90
- Timestamp:
- 2008-02-07T17:00:12+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dev_001_SBC/NEMO/LIM_SRC/limrst.F90
r717 r811 54 54 !!---------------------------------------------------------------------- 55 55 ! 56 IF( kt == nit000 ) lrst_ice = .FALSE. 57 58 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nitend - nit000 + 1 <= nn_fsbc ) THEN59 ! beware if model runs less than nn_fsbc + 1 time step60 ! beware of the format used to write kt (default is i8.8, that should be large enough)61 IF( nitrst > 1.0e9 ) THEN62 WRITE(clkt,*) nitrst63 ELSE64 WRITE(clkt,'(i8.8)') nitrst56 IF( kt == nit000 ) lrst_ice = .FALSE. ! default definition 57 58 ! to get better performances with NetCDF format: 59 ! we open and define the ice restart file one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1) 60 ! except if we write ice restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1 61 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 62 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 63 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 64 ELSE ; WRITE(clkt, '(i8.8)') nitrst 65 65 ENDIF 66 66 ! create the file 67 IF(lwp) WRITE(numout,*)68 67 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_restart_ice" 69 IF(lwp) WRITE(numout,*) ' open ice restart.output NetCDF file: '//clname 68 IF(lwp) THEN 69 WRITE(numout,*) 70 SELECT CASE ( jprstlib ) 71 CASE ( jprstdimg ) ; WRITE(numout,*) ' open ice restart binary file: '//clname 72 CASE DEFAULT ; WRITE(numout,*) ' open ice restart NetCDF file: '//clname 73 END SELECT 74 IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN 75 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp 76 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp 77 ENDIF 78 ENDIF 79 70 80 CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib ) 71 81 lrst_ice = .TRUE. … … 86 96 !!---------------------------------------------------------------------- 87 97 88 iter = kt + nn_fsbc - 1 98 iter = kt + nn_fsbc - 1 ! ice restarts are written at kt == nitrst - nn_fsbc + 1 89 99 90 100 IF( iter == nitrst ) THEN 91 101 IF(lwp) WRITE(numout,*) 92 IF(lwp) WRITE(numout,*) 'lim_rst_write : write ice restart .output NetCDFfile kt =', kt102 IF(lwp) WRITE(numout,*) 'lim_rst_write : write ice restart file kt =', kt 93 103 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~' 94 104 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.