- Timestamp:
- 2015-06-03T16:59:46+02:00 (9 years ago)
- Location:
- trunk/NEMOGCM
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/CONFIG/SHARED/namelist_ref
r5329 r5341 28 28 nn_it000 = 1 ! first time step 29 29 nn_itend = 5475 ! last time step (std 5475) 30 nn_date0 = 20061101 ! date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1)30 nn_date0 = 010101 ! date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1) 31 31 nn_leapy = 0 ! Leap year calendar (1) or not (0) 32 32 ln_rstart = .false. ! start from rest (F) or from a restart file (T) … … 37 37 ! = 2 nn_date0 read in restart ; nn_it000 : check consistancy between namelist and restart 38 38 cn_ocerst_in = "restart" ! suffix of ocean restart name (input) 39 cn_ocerst_indir = "." ! directory from which to read input ocean restarts 39 40 cn_ocerst_out = "restart" ! suffix of ocean restart name (output) 41 cn_ocerst_outdir = "." ! directory in which to write output ocean restarts 40 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) 41 44 nn_stock = 5475 ! frequency of creation of a restart file (modulo referenced to 1) 45 nn_stocklist = 0,0,0,0,0,0,0,0,0,0 ! List of timesteps when a restart file is to be written 42 46 nn_write = 5475 ! frequency of write in the output file (modulo referenced to nn_it000) 43 47 ln_dimgnnn = .false. ! DIMG file format: 1 file for all processors (F) or by processor (T) -
trunk/NEMOGCM/CONFIG/SHARED/namelist_top_ref
r5102 r5341 21 21 ! = 2 calendar parameters read in the restart file 22 22 cn_trcrst_in = "restart_trc" ! suffix of pass. sn_tracer restart name (input) 23 cn_trcrst_indir = "." ! directory from which to read input passive tracer restarts 23 24 cn_trcrst_out = "restart_trc" ! suffix of pass. sn_tracer restart name (output) 25 cn_trcrst_outdir = "." ! directory to which to write output passive tracer restarts 24 26 / 25 27 !----------------------------------------------------------------------- -
trunk/NEMOGCM/NEMO/LIM_SRC_2/ice_2.F90
r5123 r5341 24 24 ! !!* namicerun read in iceini * 25 25 CHARACTER(len=32) , PUBLIC :: cn_icerst_in !: suffix of ice restart name (input) 26 CHARACTER(len=256) , PUBLIC :: cn_icerst_indir !: ice restart in directory 26 27 CHARACTER(len=32) , PUBLIC :: cn_icerst_out !: suffix of ice restart name (output) 28 CHARACTER(len=256) , PUBLIC :: cn_icerst_outdir !: ice restart out directory 27 29 LOGICAL , PUBLIC :: ln_limdyn !: flag for ice dynamics (T) or not (F) 28 30 LOGICAL , PUBLIC :: ln_limdmp !: Ice damping -
trunk/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90
r4624 r5341 40 40 !!---------------------------------------------------------------------- 41 41 !! NEMO/LIM2 4.0 , UCL - NEMO Consortium (2011) 42 !! $Id$ 42 !! $Id$ 43 43 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 44 44 !!---------------------------------------------------------------------- … … 123 123 !! ** input : Namelist namicerun 124 124 !!------------------------------------------------------------------- 125 NAMELIST/namicerun/ cn_icerst_in, cn_icerst_out, ln_limdyn, ln_limdmp, acrit, hsndif, hicdif 125 NAMELIST/namicerun/ cn_icerst_in, cn_icerst_indir, cn_icerst_out, cn_icerst_outdir, & 126 ln_limdyn, ln_limdmp, acrit, hsndif, hicdif 126 127 INTEGER :: ios ! Local integer output status for namelist read 127 128 !!------------------------------------------------------------------- -
trunk/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90
r2528 r5341 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 ) -
trunk/NEMOGCM/NEMO/LIM_SRC_3/ice.F90
r5167 r5341 373 373 INTEGER , PUBLIC :: nlay_s !: number of snow layers 374 374 CHARACTER(len=32), PUBLIC :: cn_icerst_in !: suffix of ice restart name (input) 375 CHARACTER(len=256), PUBLIC :: cn_icerst_indir !: ice restart input directory 375 376 CHARACTER(len=32), PUBLIC :: cn_icerst_out !: suffix of ice restart name (output) 377 CHARACTER(len=256), PUBLIC :: cn_icerst_outdir!: ice restart output directory 376 378 LOGICAL , PUBLIC :: ln_limdyn !: flag for ice dynamics (T) or not (F) 377 379 LOGICAL , PUBLIC :: ln_icectl !: flag for sea-ice points output (T) or not (F) -
trunk/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90
r5128 r5341 55 55 CHARACTER(LEN=20) :: clkt ! ocean time-step define as a character 56 56 CHARACTER(LEN=50) :: clname ! ice output restart file name 57 CHARACTER(len=256) :: clpath ! full path to ice output restart file 57 58 !!---------------------------------------------------------------------- 58 59 ! … … 64 65 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc & 65 66 & .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 66 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 67 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 68 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. 69 92 ENDIF 70 ! create the file71 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out)72 IF(lwp) THEN73 WRITE(numout,*)74 SELECT CASE ( jprstlib )75 CASE ( jprstdimg ) ; WRITE(numout,*) ' open ice restart binary file: '//clname76 CASE DEFAULT ; WRITE(numout,*) ' open ice restart NetCDF file: '//clname77 END SELECT78 IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN79 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp80 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp81 ENDIF82 ENDIF83 !84 CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib )85 lrst_ice = .TRUE.86 93 ENDIF 87 94 ! … … 143 150 CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 144 151 END DO 145 152 146 153 DO jl = 1, jpl 147 154 WRITE(zchar,'(I1)') jl … … 327 334 ! eventually read netcdf file (monobloc) for restarting on different number of processors 328 335 ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90 329 INQUIRE( FILE = TRIM(cn_icerst_in )//'.nc', EXIST = llok )336 INQUIRE( FILE = TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in)//'.nc', EXIST = llok ) 330 337 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF 331 338 ENDIF 332 339 333 CALL iom_open ( cn_icerst_in, numrir, kiolib = jprstlib )340 CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir, kiolib = jprstlib ) 334 341 335 342 CALL iom_get( numrir, 'nn_fsbc', zfice ) -
trunk/NEMOGCM/NEMO/OFF_SRC/domain.F90
r4990 r5341 116 116 USE ioipsl 117 117 INTEGER :: ios ! Local integer output status for namelist read 118 NAMELIST/namrun/ nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl, & 118 NAMELIST/namrun/ cn_ocerst_indir, cn_ocerst_outdir, nn_stocklist, ln_rst_list, & 119 & nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl, & 119 120 & nn_it000, nn_itend , nn_date0 , nn_leapy , nn_istate , nn_stock , & 120 121 & nn_write, ln_dimgnnn, ln_mskland , ln_clobber , nn_chunksz, nn_euler … … 171 172 ninist = nn_istate 172 173 nstock = nn_stock 174 nstocklist = nn_stocklist 173 175 nwrite = nn_write 174 176 -
trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r4990 r5341 135 135 !!---------------------------------------------------------------------- 136 136 USE ioipsl 137 NAMELIST/namrun/ nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl, & 137 NAMELIST/namrun/ cn_ocerst_indir, cn_ocerst_outdir, nn_stocklist, ln_rst_list, & 138 & nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl, & 138 139 & nn_it000, nn_itend , nn_date0 , nn_leapy , nn_istate , nn_stock , & 139 140 & nn_write, ln_dimgnnn, ln_mskland , ln_clobber , nn_chunksz, nn_euler … … 169 170 WRITE(numout,*) ' experiment name for output cn_exp = ', cn_exp 170 171 WRITE(numout,*) ' file prefix restart input cn_ocerst_in= ', cn_ocerst_in 172 WRITE(numout,*) ' restart input directory cn_ocerst_indir= ', cn_ocerst_indir 171 173 WRITE(numout,*) ' file prefix restart output cn_ocerst_out= ', cn_ocerst_out 174 WRITE(numout,*) ' restart output directory cn_ocerst_outdir= ', cn_ocerst_outdir 172 175 WRITE(numout,*) ' restart logical ln_rstart = ', ln_rstart 173 176 WRITE(numout,*) ' start with forward time step nn_euler = ', nn_euler … … 178 181 WRITE(numout,*) ' leap year calendar (0/1) nn_leapy = ', nn_leapy 179 182 WRITE(numout,*) ' initial state output nn_istate = ', nn_istate 180 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 181 188 WRITE(numout,*) ' frequency of output file nn_write = ', nn_write 182 189 WRITE(numout,*) ' multi file dimgout ln_dimgnnn = ', ln_dimgnnn … … 195 202 ninist = nn_istate 196 203 nstock = nn_stock 204 nstocklist = nn_stocklist 197 205 nwrite = nn_write 198 206 neuler = nn_euler 199 IF ( neuler == 1 .AND. .NOT. ln_rstart ) THEN207 IF ( neuler == 1 .AND. .NOT. ln_rstart ) THEN 200 208 WRITE(ctmp1,*) 'ln_rstart =.FALSE., nn_euler is forced to 0 ' 201 209 CALL ctl_warn( ctmp1 ) -
trunk/NEMOGCM/NEMO/OPA_SRC/ICB/icbrst.F90
r5215 r5341 64 64 ! start and count arrays 65 65 LOGICAL :: ll_found_restart 66 CHARACTER(len=256) :: cl_path 66 67 CHARACTER(len=256) :: cl_filename 67 68 CHARACTER(len=NF90_MAX_NAME) :: cl_dname … … 70 71 !!---------------------------------------------------------------------- 71 72 72 ! Find a restart file 73 ! Find a restart file. Assume iceberg restarts in same directory as ocean restarts. 74 cl_path = TRIM(cn_ocerst_indir) 75 IF( cl_path(LEN_TRIM(cl_path):) /= '/' ) cl_path = TRIM(cl_path) // '/' 73 76 cl_filename = ' ' 74 77 IF ( lk_mpp ) THEN 75 78 cl_filename = ' ' 76 79 WRITE( cl_filename, '("restart_icebergs_",I4.4,".nc")' ) narea-1 77 INQUIRE( file=TRIM(cl_ filename), exist=ll_found_restart )80 INQUIRE( file=TRIM(cl_path)//TRIM(cl_filename), exist=ll_found_restart ) 78 81 ELSE 79 82 cl_filename = 'restart_icebergs.nc' 80 INQUIRE( file=TRIM(cl_ filename), exist=ll_found_restart )83 INQUIRE( file=TRIM(cl_path)//TRIM(cl_filename), exist=ll_found_restart ) 81 84 ENDIF 82 85 … … 86 89 87 90 IF (nn_verbose_level >= 0 .AND. lwp) & 88 WRITE(numout,'(2a)') 'icebergs, read_restart_bergs: found restart file = ',TRIM(cl_ filename)89 90 nret = NF90_OPEN(TRIM(cl_ filename), NF90_NOWRITE, ncid)91 WRITE(numout,'(2a)') 'icebergs, read_restart_bergs: found restart file = ',TRIM(cl_path)//TRIM(cl_filename) 92 93 nret = NF90_OPEN(TRIM(cl_path)//TRIM(cl_filename), NF90_NOWRITE, ncid) 91 94 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, read_restart_bergs: nf_open failed') 92 95 … … 228 231 INTEGER :: jn ! dummy loop index 229 232 INTEGER :: ix_dim, iy_dim, ik_dim, in_dim 233 CHARACTER(len=256) :: cl_path 230 234 CHARACTER(len=256) :: cl_filename 231 235 TYPE(iceberg), POINTER :: this … … 233 237 !!---------------------------------------------------------------------- 234 238 239 ! Assume we write iceberg restarts to same directory as ocean restarts. 240 cl_path = TRIM(cn_ocerst_outdir) 241 IF( cl_path(LEN_TRIM(cl_path):) /= '/' ) cl_path = TRIM(cl_path) // '/' 235 242 IF( lk_mpp ) THEN 236 WRITE(cl_filename,'( "icebergs_",I8.8,"_restart_",I4.4,".nc")')kt, narea-1243 WRITE(cl_filename,'(A,"_icebergs_",I8.8,"_restart_",I4.4,".nc")') TRIM(cexper), kt, narea-1 237 244 ELSE 238 WRITE(cl_filename,'( "icebergs_",I8.8,"_restart.nc")')kt239 ENDIF 240 IF (nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, write_restart: creating ',TRIM(cl_ filename)241 242 nret = NF90_CREATE(TRIM(cl_ filename), NF90_CLOBBER, ncid)245 WRITE(cl_filename,'(A,"_icebergs_",I8.8,"_restart.nc")') TRIM(cexper), kt 246 ENDIF 247 IF (nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, write_restart: creating ',TRIM(cl_path)//TRIM(cl_filename) 248 249 nret = NF90_CREATE(TRIM(cl_path)//TRIM(cl_filename), NF90_CLOBBER, ncid) 243 250 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_create failed') 244 251 … … 372 379 ENDIF 373 380 ENDDO 374 IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_ filename),' var: stored_ice written'381 IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_path)//TRIM(cl_filename),' var: stored_ice written' 375 382 376 383 nret = NF90_PUT_VAR( ncid, nkountid, num_bergs(:) ) … … 379 386 nret = NF90_PUT_VAR( ncid, nsheatid, berg_grid%stored_heat(:,:) ) 380 387 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var stored_heat failed') 381 IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_ filename),' var: stored_heat written'388 IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_path)//TRIM(cl_filename),' var: stored_heat written' 382 389 383 390 nret = NF90_PUT_VAR( ncid, ncalvid , src_calving(:,:) ) … … 385 392 nret = NF90_PUT_VAR( ncid, ncalvhid, src_calving_hflx(:,:) ) 386 393 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var calving_hflx failed') 387 IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_ filename),' var: calving written'394 IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_path)//TRIM(cl_filename),' var: calving written' 388 395 389 396 IF ( ASSOCIATED(first_berg) ) THEN -
trunk/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
r4990 r5341 26 26 CHARACTER(lc) :: cn_exp !: experiment name used for output filename 27 27 CHARACTER(lc) :: cn_ocerst_in !: suffix of ocean restart name (input) 28 CHARACTER(lc) :: cn_ocerst_indir !: restart input directory 28 29 CHARACTER(lc) :: cn_ocerst_out !: suffix of ocean restart name (output) 30 CHARACTER(lc) :: cn_ocerst_outdir !: restart output directory 29 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) 30 33 INTEGER :: nn_no !: job number 31 34 INTEGER :: nn_rstctl !: control of the time step (0, 1 or 2) … … 38 41 INTEGER :: nn_write !: model standard output frequency 39 42 INTEGER :: nn_stock !: restart file frequency 43 INTEGER, DIMENSION(10) :: nn_stocklist !: restart dump times 40 44 LOGICAL :: ln_dimgnnn !: type of dimgout. (F): 1 file for all proc 41 45 !: (T): 1 file per proc … … 78 82 INTEGER :: nwrite !: model standard output frequency 79 83 INTEGER :: nstock !: restart file frequency 84 INTEGER, DIMENSION(10) :: nstocklist !: restart dump times 80 85 81 86 !!---------------------------------------------------------------------- … … 85 90 LOGICAL :: lrst_oce !: logical to control the oce restart write 86 91 INTEGER :: numror, numrow !: logical unit for cean restart (read and write) 92 INTEGER :: nrst_lst !: number of restart to output next 87 93 88 94 !!---------------------------------------------------------------------- -
trunk/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90
r4689 r5341 61 61 INTEGER, DIMENSION(2,5), INTENT(in ), OPTIONAL :: kdompar ! domain parameters: 62 62 63 CHARACTER(LEN= 100) :: clinfo ! info character64 CHARACTER(LEN= 100) :: cltmp ! temporary character63 CHARACTER(LEN=256) :: clinfo ! info character 64 CHARACTER(LEN=256) :: cltmp ! temporary character 65 65 INTEGER :: iln ! lengths of character 66 66 INTEGER :: istop ! temporary storage of nstop … … 393 393 INTEGER, DIMENSION(4) :: idimsz ! dimensions size 394 394 INTEGER, DIMENSION(4) :: idimid ! dimensions id 395 CHARACTER(LEN= 100) :: clinfo ! info character395 CHARACTER(LEN=256) :: clinfo ! info character 396 396 CHARACTER(LEN= 12), DIMENSION(4) :: cltmp ! temporary character 397 397 INTEGER :: if90id ! nf90 file identifier -
trunk/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r4990 r5341 57 57 !! 58 58 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 59 CHARACTER(LEN=50) :: clname ! ice output restart file name 59 CHARACTER(LEN=50) :: clname ! ocean output restart file name 60 CHARACTER(lc) :: clpath ! full path to ocean output restart file 60 61 !!---------------------------------------------------------------------- 61 62 ! 62 63 IF( kt == nit000 ) THEN ! default definitions 63 64 lrst_oce = .FALSE. 64 nitrst = nitend 65 ENDIF 66 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 67 75 ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment 68 76 nitrst = kt + nstock - 1 ! define the next value of nitrst for restart writing … … 73 81 ! except if we write ocean restart files every time step or if an ocean restart file was writen at nitend - 1 74 82 IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 75 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 76 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 77 ELSE ; WRITE(clkt, '(i8.8)') nitrst 78 ENDIF 79 ! create the file 80 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_ocerst_out) 81 IF(lwp) THEN 82 WRITE(numout,*) 83 SELECT CASE ( jprstlib ) 84 CASE ( jprstdimg ) ; WRITE(numout,*) ' open ocean restart binary file: '//clname 85 CASE DEFAULT ; WRITE(numout,*) ' open ocean restart NetCDF file: '//clname 86 END SELECT 87 IF ( snc4set%luse ) WRITE(numout,*) ' opened for NetCDF4 chunking and compression' 88 IF( kt == nitrst - 1 ) THEN ; WRITE(numout,*) ' kt = nitrst - 1 = ', kt 89 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 90 87 ENDIF 91 ENDIF 92 ! 93 CALL iom_open( clname, numrow, ldwrt = .TRUE., kiolib = jprstlib ) 94 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 95 109 ENDIF 96 110 ! … … 142 156 !!gm not sure what to do here ===>>> ask to Sebastian 143 157 lrst_oce = .FALSE. 158 IF( ln_rst_list ) THEN 159 nrst_lst = MIN(nrst_lst + 1, SIZE(nstocklist,1)) 160 nitrst = nstocklist( nrst_lst ) 161 ENDIF 162 lrst_oce = .FALSE. 144 163 ENDIF 145 164 ! … … 156 175 !! the file has already been opened 157 176 !!---------------------------------------------------------------------- 158 INTEGER :: jlibalt = jprstlib 159 LOGICAL :: llok 177 INTEGER :: jlibalt = jprstlib 178 LOGICAL :: llok 179 CHARACTER(lc) :: clpath ! full path to ocean output restart file 160 180 !!---------------------------------------------------------------------- 161 181 ! … … 171 191 ENDIF 172 192 193 clpath = TRIM(cn_ocerst_indir) 194 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 173 195 IF ( jprstlib == jprstdimg ) THEN 174 196 ! eventually read netcdf file (monobloc) for restarting on different number of processors 175 197 ! if {cn_ocerst_in}.nc exists, then set jlibalt to jpnf90 176 INQUIRE( FILE = TRIM(cn_ocerst_in )//'.nc', EXIST = llok )198 INQUIRE( FILE = TRIM(cn_ocerst_indir)//'/'//TRIM(cn_ocerst_in)//'.nc', EXIST = llok ) 177 199 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF 178 200 ENDIF 179 CALL iom_open( cn_ocerst_in, numror, kiolib = jlibalt )201 CALL iom_open( TRIM(clpath)//cn_ocerst_in, numror, kiolib = jlibalt ) 180 202 ENDIF 181 203 END SUBROUTINE rst_read_open -
trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
r5167 r5341 346 346 !!------------------------------------------------------------------- 347 347 INTEGER :: ios ! Local integer output status for namelist read 348 NAMELIST/namicerun/ jpl, nlay_i, nlay_s, cn_icerst_in, cn_icerst_ out,&348 NAMELIST/namicerun/ jpl, nlay_i, nlay_s, cn_icerst_in, cn_icerst_indir, cn_icerst_out, cn_icerst_outdir, & 349 349 & ln_limdyn, rn_amax, ln_limdiahsb, ln_limdiaout, ln_icectl, iiceprt, jiceprt 350 350 !!------------------------------------------------------------------- -
trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl_rst.F90
r5215 r5341 27 27 !!--------------------------------------------------------------------------------- 28 28 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 29 !! $Id$ 29 !! $Id$ 30 30 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 31 31 !!--------------------------------------------------------------------------------- … … 43 43 INTEGER :: jk ! loop indice 44 44 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 45 CHARACTER(LEN=50) :: clname ! ice output restart file name 45 CHARACTER(LEN=50) :: clname ! output restart file name 46 CHARACTER(LEN=256) :: clpath ! full path to restart file 46 47 !!-------------------------------------------------------------------------------- 47 48 … … 56 57 ! create the file 57 58 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_trdrst_out) 59 clpath = TRIM(cn_ocerst_outdir) 60 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 58 61 IF(lwp) THEN 59 62 WRITE(numout,*) … … 67 70 ENDIF 68 71 69 CALL iom_open( clname, nummxlw, ldwrt = .TRUE., kiolib = jprstlib )72 CALL iom_open( TRIM(clpath)//TRIM(clname), nummxlw, ldwrt = .TRUE., kiolib = jprstlib ) 70 73 ENDIF 71 74 … … 133 136 INTEGER :: jlibalt = jprstlib 134 137 LOGICAL :: llok 138 CHARACTER(LEN=256) :: clpath ! full path to restart file 135 139 !!----------------------------------------------------------------------------- 136 140 … … 140 144 WRITE(numout,*) ' ~~~~~~~~~~~~~~~~' 141 145 ENDIF 146 147 clpath = TRIM(cn_ocerst_indir) 148 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 149 142 150 IF ( jprstlib == jprstdimg ) THEN 143 151 ! eventually read netcdf file (monobloc) for restarting on different number of processors 144 152 ! if {cn_trdrst_in}.nc exists, then set jlibalt to jpnf90 145 INQUIRE( FILE = TRIM(c n_trdrst_in)//'.nc', EXIST = llok )153 INQUIRE( FILE = TRIM(clpath)//TRIM(cn_trdrst_in)//'.nc', EXIST = llok ) 146 154 IF ( llok ) THEN ; jlibalt = jpnf90 147 155 ELSE ; jlibalt = jprstlib … … 149 157 ENDIF 150 158 151 CALL iom_open( cn_trdrst_in, inum, kiolib = jlibalt )159 CALL iom_open( TRIM(clpath)//TRIM(cn_trdrst_in), inum, kiolib = jlibalt ) 152 160 153 161 IF( ln_trdmxl_instant ) THEN -
trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90
r5215 r5341 39 39 ! 40 40 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 41 CHARACTER(LEN=50) :: clname ! ice output restart file name 41 CHARACTER(LEN=50) :: clname ! output restart file name 42 CHARACTER(LEN=256) :: clpath ! full path to restart file 42 43 CHARACTER (len=35) :: charout 43 44 INTEGER :: jl, jk, jn ! loop indice … … 51 52 ENDIF 52 53 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_trdrst_trc_out) 53 IF(lwp) WRITE(numout,*) ' open ocean restart_mld_trc NetCDF '//clname 54 CALL iom_open( clname, nummldw_trc, ldwrt = .TRUE., kiolib = jprstlib ) 54 clpath = TRIM(cn_trcrst_outdir) 55 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 56 IF(lwp) WRITE(numout,*) ' open ocean restart_mld_trc NetCDF 'TRIM(clpath)//TRIM(clname) 57 CALL iom_open( TRIM(clpath)//TRIM(clname), nummldw_trc, ldwrt = .TRUE., kiolib = jprstlib ) 55 58 ENDIF 56 59 … … 133 136 INTEGER :: jlibalt = jprstlib 134 137 LOGICAL :: llok 138 CHARACTER(LEN=256) :: clpath ! full path to restart file 135 139 !!----------------------------------------------------------------------------- 136 140 … … 141 145 ENDIF 142 146 147 clpath = TRIM(cn_trcrst_indir) 148 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 149 143 150 IF ( jprstlib == jprstdimg ) THEN 144 151 ! eventually read netcdf file (monobloc) for restarting on different number of processors 145 152 ! if {cn_trdrst_trc_in}.nc exists, then set jlibalt to jpnf90 146 INQUIRE( FILE = TRIM(c n_trdrst_trc_in)//'.nc', EXIST = llok )153 INQUIRE( FILE = TRIM(clpath)//TRIM(cn_trdrst_trc_in)//'.nc', EXIST = llok ) 147 154 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF 148 155 ENDIF 149 156 150 CALL iom_open( cn_trdrst_trc_in, inum, kiolib = jlibalt )157 CALL iom_open( TRIM(clpath)//TRIM(cn_trdrst_trc_in), inum, kiolib = jlibalt ) 151 158 152 159 IF( ln_trdmxl_trc_instant ) THEN -
trunk/NEMOGCM/NEMO/TOP_SRC/trc.F90
r4990 r5341 54 54 INTEGER , PUBLIC :: nn_rsttr !: control of the time step ( 0 or 1 ) for pass. tr. 55 55 CHARACTER(len = 80) , PUBLIC :: cn_trcrst_in !: suffix of pass. tracer restart name (input) 56 CHARACTER(len = 256), PUBLIC :: cn_trcrst_indir !: restart input directory 56 57 CHARACTER(len = 80) , PUBLIC :: cn_trcrst_out !: suffix of pass. tracer restart name (output) 58 CHARACTER(len = 256), PUBLIC :: cn_trcrst_outdir !: restart output directory 57 59 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: rdttrc !: vertical profile of passive tracer time step 58 60 LOGICAL , PUBLIC :: ln_top_euler !: boolean term for euler integration … … 172 174 !!---------------------------------------------------------------------- 173 175 !! NEMO/TOP 3.3.1 , NEMO Consortium (2010) 174 !! $Id$ 176 !! $Id$ 175 177 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 176 178 !!---------------------------------------------------------------------- -
trunk/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
r4990 r5341 39 39 !!---------------------------------------------------------------------- 40 40 !! NEMO/TOP 3.3 , NEMO Consortium (2010) 41 !! $Id$ 41 !! $Id$ 42 42 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 43 43 !!---------------------------------------------------------------------- … … 175 175 !!--------------------------------------------------------------------- 176 176 NAMELIST/namtrc_run/ nn_dttrc, nn_writetrc, ln_rsttr, nn_rsttr, ln_top_euler, & 177 & cn_trcrst_in, cn_trcrst_out 177 & cn_trcrst_indir, cn_trcrst_outdir, cn_trcrst_in, cn_trcrst_out 178 178 179 179 180 INTEGER :: ios ! Local integer output status for namelist read … … 339 340 !!---------------------------------------------------------------------- 340 341 !! NEMO/TOP 3.3 , NEMO Consortium (2010) 341 !! $Id$ 342 !! $Id$ 342 343 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 343 344 !!====================================================================== -
trunk/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
r4990 r5341 51 51 CHARACTER(LEN=20) :: clkt ! ocean time-step define as a character 52 52 CHARACTER(LEN=50) :: clname ! trc output restart file name 53 CHARACTER(LEN=256) :: clpath ! full path to ocean output restart file 53 54 !!---------------------------------------------------------------------- 54 55 ! … … 56 57 IF( kt == nittrc000 ) THEN 57 58 lrst_trc = .FALSE. 58 nitrst = nitend 59 ENDIF 60 61 IF( MOD( kt - 1, nstock ) == 0 ) THEN 59 IF( ln_rst_list ) THEN 60 nrst_lst = 1 61 nitrst = nstocklist( nrst_lst ) 62 ELSE 63 nitrst = nitend 64 ENDIF 65 ENDIF 66 67 IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nstock ) == 0 ) THEN 62 68 ! we use kt - 1 and not kt - nittrc000 to keep the same periodicity from the beginning of the experiment 63 69 nitrst = kt + nstock - 1 ! define the next value of nitrst for restart writing … … 79 85 IF(lwp) WRITE(numout,*) 80 86 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_trcrst_out) 81 IF(lwp) WRITE(numout,*) ' open trc restart.output NetCDF file: '//clname 82 CALL iom_open( clname, numrtw, ldwrt = .TRUE., kiolib = jprstlib ) 87 clpath = TRIM(cn_trcrst_outdir) 88 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 89 IF(lwp) WRITE(numout,*) & 90 ' open trc restart.output NetCDF file: ',TRIM(clpath)//clname 91 CALL iom_open( TRIM(clpath)//TRIM(clname), numrtw, ldwrt = .TRUE., kiolib = jprstlib ) 83 92 lrst_trc = .TRUE. 84 93 ENDIF … … 140 149 lrst_trc = .FALSE. 141 150 #endif 151 IF( lk_offline .AND. ln_rst_list ) THEN 152 nrst_lst = nrst_lst + 1 153 nitrst = nstocklist( nrst_lst ) 154 ENDIF 142 155 ENDIF 143 156 ! … … 190 203 ! eventually read netcdf file (monobloc) for restarting on different number of processors 191 204 ! if {cn_trcrst_in}.nc exists, then set jlibalt to jpnf90 192 INQUIRE( FILE = TRIM(cn_trcrst_in )//'.nc', EXIST = llok )205 INQUIRE( FILE = TRIM(cn_trcrst_indir)//'/'//TRIM(cn_trcrst_in)//'.nc', EXIST = llok ) 193 206 IF ( llok ) THEN ; jlibalt = jpnf90 ; ELSE ; jlibalt = jprstlib ; ENDIF 194 207 ENDIF 195 208 196 CALL iom_open( cn_trcrst_in, numrtr, kiolib = jlibalt )209 CALL iom_open( TRIM(cn_trcrst_indir)//'/'//cn_trcrst_in, numrtr, kiolib = jlibalt ) 197 210 198 211 CALL iom_get ( numrtr, 'kt', zkt ) ! last time-step of previous run … … 306 319 !!---------------------------------------------------------------------- 307 320 !! NEMO/TOP 3.3 , NEMO Consortium (2010) 308 !! $Id$ 321 !! $Id$ 309 322 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 310 323 !!======================================================================
Note: See TracChangeset
for help on using the changeset viewer.