- Timestamp:
- 2015-07-08T17:13:59+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5107_hadgem3_mct/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90
r5279 r5568 50 50 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 51 51 CHARACTER(LEN=50) :: clname ! ice output restart file name 52 CHARACTER(len=150) :: clpath ! full path to ice output restart file 52 53 !!---------------------------------------------------------------------- 53 54 ! … … 58 59 ! 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 59 60 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 60 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 61 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 62 ELSE ; WRITE(clkt, '(i8.8)') nitrst 61 IF( nitrst <= nitend .AND. nitrst > 0 ) 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 ENDIF 66 ! create the file 67 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out) 68 clpath = TRIM(cn_icerst_outdir) 69 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath)//'/' 70 IF(lwp) THEN 71 WRITE(numout,*) 72 SELECT CASE ( jprstlib ) 73 CASE ( jprstdimg ) 74 WRITE(numout,*) ' open ice restart binary file: ',TRIM(clpath)//clname 75 CASE DEFAULT 76 WRITE(numout,*) ' open ice restart NetCDF file: ',TRIM(clpath)//clname 77 END SELECT 78 IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN 79 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp 80 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp 81 ENDIF 82 ENDIF 83 84 CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kiolib = jprstlib ) 85 lrst_ice = .TRUE. 63 86 ENDIF 64 ! create the file65 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out)66 IF(lwp) THEN67 WRITE(numout,*)68 SELECT CASE ( jprstlib )69 CASE ( jprstdimg ) ; WRITE(numout,*) ' open ice restart binary file: '//clname70 CASE DEFAULT ; WRITE(numout,*) ' open ice restart NetCDF file: '//clname71 END SELECT72 IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN73 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp74 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp75 ENDIF76 ENDIF77 78 CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib )79 lrst_ice = .TRUE.80 87 ENDIF 81 88 ! … … 188 195 ! eventually read netcdf file (monobloc) for restarting on different number of processors 189 196 ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90 190 INQUIRE( FILE = TRIM(cn_icerst_in )//'.nc', EXIST = llok )197 INQUIRE( FILE = TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in)//'.nc', EXIST = llok ) 191 198 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF 192 199 ENDIF 193 200 194 CALL iom_open ( cn_icerst_in, numrir, kiolib = jlibalt )201 CALL iom_open ( TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in), numrir, kiolib = jlibalt ) 195 202 196 203 CALL iom_get( numrir, 'kt_ice' , ziter )
Note: See TracChangeset
for help on using the changeset viewer.