Changeset 4780 for branches/2014/dev_r4650_UKMO11_restart_functionality
- Timestamp:
- 2014-09-19T18:45:49+02:00 (10 years ago)
- Location:
- branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/1_namelist_ref
r4775 r4780 40 40 cn_ocerst_outdir = "." ! directory in which to write output ocean restarts 41 41 nn_istate = 0 ! output the initial state (1) or not (0) 42 ln_rst_list = .false. ! output restarts at list of times using nn_stocklist (T) or at set frequency with nn_stock (F) 42 43 nn_stock = 5475 ! frequency of creation of a restart file (modulo referenced to 1) 43 44 nn_write = 5475 ! frequency of write in the output file (modulo referenced to nn_it000) -
branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/namelist_ref
r4775 r4780 41 41 cn_ocerst_outdir = "." ! directory in which to write output ocean restarts 42 42 nn_istate = 0 ! output the initial state (1) or not (0) 43 ln_rst_list = .false. ! output restarts at list of times using nn_stocklist (T) or at set frequency with nn_stock (F) 43 44 nn_stock = 5475 ! frequency of creation of a restart file (modulo referenced to 1) 44 45 nn_write = 5475 ! frequency of write in the output file (modulo referenced to nn_it000) -
branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90
r4775 r4780 59 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 60 60 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 61 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 62 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 63 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. 64 86 ENDIF 65 ! create the file66 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out)67 clpath = TRIM(cn_icerst_outdir)68 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath)//'/'69 IF(lwp) THEN70 WRITE(numout,*)71 SELECT CASE ( jprstlib )72 CASE ( jprstdimg )73 WRITE(numout,*) ' open ice restart binary file: ',TRIM(clpath)//clname74 CASE DEFAULT75 WRITE(numout,*) ' open ice restart NetCDF file: ',TRIM(clpath)//clname76 END SELECT77 IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN78 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp79 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp80 ENDIF81 ENDIF82 83 CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kiolib = jprstlib )84 lrst_ice = .TRUE.85 87 ENDIF 86 88 ! -
branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90
r4775 r4780 65 65 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc & 66 66 & .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 67 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 68 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 69 ELSE ; WRITE(clkt, '(i8.8)') nitrst 67 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 68 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 69 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 70 ELSE ; WRITE(clkt, '(i8.8)') nitrst 71 ENDIF 72 ! create the file 73 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out) 74 clpath = TRIM(cn_icerst_outdir) 75 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath)//'/' 76 IF(lwp) THEN 77 WRITE(numout,*) 78 SELECT CASE ( jprstlib ) 79 CASE ( jprstdimg ) 80 WRITE(numout,*) ' open ice restart binary file: ',TRIM(clpath)//clname 81 CASE DEFAULT 82 WRITE(numout,*) ' open ice restart NetCDF file: ',TRIM(clpath)//clname 83 END SELECT 84 IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN 85 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp 86 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp 87 ENDIF 88 ENDIF 89 ! 90 CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kiolib = jprstlib ) 91 lrst_ice = .TRUE. 70 92 ENDIF 71 ! create the file72 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out)73 clpath = TRIM(cn_icerst_outdir)74 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath)//'/'75 IF(lwp) THEN76 WRITE(numout,*)77 SELECT CASE ( jprstlib )78 CASE ( jprstdimg )79 WRITE(numout,*) ' open ice restart binary file: ',TRIM(clpath)//clname80 CASE DEFAULT81 WRITE(numout,*) ' open ice restart NetCDF file: ',TRIM(clpath)//clname82 END SELECT83 IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN84 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp85 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp86 ENDIF87 ENDIF88 !89 CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kiolib = jprstlib )90 lrst_ice = .TRUE.91 93 ENDIF 92 94 ! -
branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r4775 r4780 135 135 !!---------------------------------------------------------------------- 136 136 USE ioipsl 137 NAMELIST/namrun/ cn_ocerst_indir, cn_ocerst_outdir, 137 NAMELIST/namrun/ cn_ocerst_indir, cn_ocerst_outdir, nn_stocklist, ln_rst_list, & 138 138 & nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl, & 139 139 & nn_it000, nn_itend , nn_date0 , nn_leapy , nn_istate , nn_stock , & … … 181 181 WRITE(numout,*) ' leap year calendar (0/1) nn_leapy = ', nn_leapy 182 182 WRITE(numout,*) ' initial state output nn_istate = ', nn_istate 183 WRITE(numout,*) ' frequency of restart file nn_stock = ', nn_stock 183 IF( ln_rst_list ) THEN 184 WRITE(numout,*) ' list of restart dump times nn_stocklist =', nn_stocklist 185 ELSE 186 WRITE(numout,*) ' frequency of restart file nn_stock = ', nn_stock 187 ENDIF 184 188 WRITE(numout,*) ' frequency of output file nn_write = ', nn_write 185 189 WRITE(numout,*) ' multi file dimgout ln_dimgnnn = ', ln_dimgnnn … … 198 202 ninist = nn_istate 199 203 nstock = nn_stock 204 nstocklist = nn_stocklist 200 205 nwrite = nn_write 201 206 neuler = nn_euler 202 IF ( neuler == 1 .AND. .NOT. ln_rstart ) THEN207 IF ( neuler == 1 .AND. .NOT. ln_rstart ) THEN 203 208 WRITE(ctmp1,*) 'ln_rstart =.FALSE., nn_euler is forced to 0 ' 204 209 CALL ctl_warn( ctmp1 ) -
branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
r4775 r4780 30 30 CHARACTER(lc) :: cn_ocerst_outdir !: restart output directory 31 31 LOGICAL :: ln_rstart !: start from (F) rest or (T) a restart file 32 LOGICAL :: ln_rst_list !: output restarts at list of times (T) or by frequency (F) 32 33 INTEGER :: nn_no !: job number 33 34 INTEGER :: nn_rstctl !: control of the time step (0, 1 or 2) … … 40 41 INTEGER :: nn_write !: model standard output frequency 41 42 INTEGER :: nn_stock !: restart file frequency 43 INTEGER, DIMENSION(10) :: nn_stocklist !: restart dump times 42 44 LOGICAL :: ln_dimgnnn !: type of dimgout. (F): 1 file for all proc 43 45 !: (T): 1 file per proc … … 80 82 INTEGER :: nwrite !: model standard output frequency 81 83 INTEGER :: nstock !: restart file frequency 84 INTEGER, DIMENSION(10) :: nstocklist !: restart dump times 82 85 83 86 !!---------------------------------------------------------------------- … … 87 90 LOGICAL :: lrst_oce !: logical to control the oce restart write 88 91 INTEGER :: numror, numrow !: logical unit for cean restart (read and write) 92 INTEGER :: nrst_lst !: number of restart to output next 89 93 90 94 !!---------------------------------------------------------------------- -
branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r4775 r4780 63 63 IF( kt == nit000 ) THEN ! default definitions 64 64 lrst_oce = .FALSE. 65 nitrst = nitend 66 ENDIF 67 IF( MOD( kt - 1, nstock ) == 0 ) THEN 65 IF( ln_rst_list ) THEN 66 nrst_lst = 1 67 nitrst = nstocklist( nrst_lst ) 68 ELSE 69 nitrst = nitend 70 ENDIF 71 ENDIF 72 73 ! frequency-based restart dumping (nn_stock) 74 IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nstock ) == 0 ) THEN 68 75 ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment 69 76 nitrst = kt + nstock - 1 ! define the next value of nitrst for restart writing … … 74 81 ! except if we write ocean restart files every time step or if an ocean restart file was writen at nitend - 1 75 82 IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 76 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 77 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 78 ELSE ; WRITE(clkt, '(i8.8)') nitrst 79 ENDIF 80 ! create the file 81 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_ocerst_out) 82 clpath = TRIM(cn_ocerst_outdir) 83 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 84 IF(lwp) THEN 85 WRITE(numout,*) 86 SELECT CASE ( jprstlib ) 87 CASE ( jprstdimg ) ; WRITE(numout,*) & 88 ' open ocean restart binary file: ',TRIM(clpath)//clname 89 CASE DEFAULT ; WRITE(numout,*) & 90 ' open ocean restart NetCDF file: ',TRIM(clpath)//clname 91 END SELECT 92 IF ( snc4set%luse ) WRITE(numout,*) ' opened for NetCDF4 chunking and compression' 93 IF( kt == nitrst - 1 ) THEN ; WRITE(numout,*) ' kt = nitrst - 1 = ', kt 94 ELSE ; WRITE(numout,*) ' kt = ' , kt 83 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 84 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 85 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 86 ELSE ; WRITE(clkt, '(i8.8)') nitrst 95 87 ENDIF 96 ENDIF 97 ! 98 CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE., kiolib = jprstlib ) 99 lrst_oce = .TRUE. 88 ! create the file 89 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_ocerst_out) 90 clpath = TRIM(cn_ocerst_outdir) 91 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 92 IF(lwp) THEN 93 WRITE(numout,*) 94 SELECT CASE ( jprstlib ) 95 CASE ( jprstdimg ) ; WRITE(numout,*) & 96 ' open ocean restart binary file: ',TRIM(clpath)//clname 97 CASE DEFAULT ; WRITE(numout,*) & 98 ' open ocean restart NetCDF file: ',TRIM(clpath)//clname 99 END SELECT 100 IF ( snc4set%luse ) WRITE(numout,*) ' opened for NetCDF4 chunking and compression' 101 IF( kt == nitrst - 1 ) THEN ; WRITE(numout,*) ' kt = nitrst - 1 = ', kt 102 ELSE ; WRITE(numout,*) ' kt = ' , kt 103 ENDIF 104 ENDIF 105 ! 106 CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE., kiolib = jprstlib ) 107 lrst_oce = .TRUE. 108 ENDIF 100 109 ENDIF 101 110 ! … … 144 153 IF( kt == nitrst ) THEN 145 154 CALL iom_close( numrow ) ! close the restart file (only at last time step) 146 IF( .NOT. lk_trdmld ) lrst_oce = .FALSE. 155 IF( .NOT. lk_trdmld ) THEN 156 IF( ln_rst_list ) THEN 157 nrst_lst = nrst_lst + 1 158 nitrst = nstocklist( nrst_lst ) 159 ENDIF 160 lrst_oce = .FALSE. 161 ENDIF 147 162 ENDIF 148 163 !
Note: See TracChangeset
for help on using the changeset viewer.