Changeset 14072 for NEMO/trunk/src/ICE/icerst.F90
- Timestamp:
- 2020-12-04T08:48:38+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/ICE/icerst.F90
r14039 r14072 11 11 !!---------------------------------------------------------------------- 12 12 !! ice_rst_opn : open restart file 13 !! ice_rst_write : write restart file 14 !! ice_rst_read : read restart file 13 !! ice_rst_write : write restart file 14 !! ice_rst_read : read restart file 15 15 !!---------------------------------------------------------------------- 16 16 USE ice ! sea-ice: variables … … 54 54 CHARACTER(len=20) :: clkt ! ocean time-step define as a character 55 55 CHARACTER(len=50) :: clname ! ice output restart file name 56 CHARACTER(len=256) :: clpath ! full path to ice output restart file 56 CHARACTER(len=256) :: clpath ! full path to ice output restart file 57 57 CHARACTER(LEN=52) :: clpname ! ocean output restart file name including prefix for AGRIF 58 58 !!---------------------------------------------------------------------- … … 61 61 62 62 IF( ln_rst_list .OR. nn_stock /= -1 ) THEN 63 ! in order to get better performances with NetCDF format, we open and define the ice restart file 64 ! one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1), except if we write ice 63 ! in order to get better performances with NetCDF format, we open and define the ice restart file 64 ! one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1), except if we write ice 65 65 ! restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1 66 66 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nn_stock == nn_fsbc & … … 73 73 ! create the file 74 74 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out) 75 clpath = TRIM(cn_icerst_outdir) 75 clpath = TRIM(cn_icerst_outdir) 76 76 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath)//'/' 77 77 IF(lwp) THEN … … 132 132 IF(lwp) WRITE(numout,*) 133 133 IF(lwp) WRITE(numout,*) 'ice_rst_write : write ice restart file kt =', kt 134 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~' 135 ENDIF 136 134 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~' 135 ENDIF 136 137 137 ! Write in numriw (if iter == nitrst) 138 ! ------------------ 138 ! ------------------ 139 139 ! ! calendar control 140 CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ) ) ! time-step 140 CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ) ) ! time-step 141 141 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp ) ) ! date 142 142 143 143 IF(.NOT.lwxios) CALL iom_delay_rst( 'WRITE', 'ICE', numriw ) ! save only ice delayed global communication variables 144 144 … … 156 156 CALL iom_rstput( iter, nitrst, numriw, 'v_il' , v_il ) 157 157 ! Snow enthalpy 158 DO jk = 1, nlay_s 158 DO jk = 1, nlay_s 159 159 WRITE(zchar1,'(I2.2)') jk 160 160 znam = 'e_s'//'_l'//zchar1 … … 163 163 END DO 164 164 ! Ice enthalpy 165 DO jk = 1, nlay_i 165 DO jk = 1, nlay_i 166 166 WRITE(zchar1,'(I2.2)') jk 167 167 znam = 'e_i'//'_l'//zchar1 … … 224 224 ! clpname = cn_icerst_in 225 225 ! ELSE 226 ! clpname = TRIM(Agrif_CFixed())//"_"//cn_icerst_in 226 ! clpname = TRIM(Agrif_CFixed())//"_"//cn_icerst_in 227 227 ! ENDIF 228 228 CALL iom_init( cr_icerst_cxt, kdid = numrir, ld_closedef = .TRUE. ) 229 229 ENDIF 230 230 231 ! test if v_i exists 231 ! test if v_i exists 232 232 id0 = iom_varid( numrir, 'v_i' , ldstop = .FALSE. ) 233 233 … … 237 237 ! Time info 238 238 CALL iom_get( numrir, 'nn_fsbc', zfice ) 239 CALL iom_get( numrir, 'kt_ice' , ziter ) 239 CALL iom_get( numrir, 'kt_ice' , ziter ) 240 240 IF(lwp) WRITE(numout,*) ' read ice restart file at time step : ', ziter 241 241 IF(lwp) WRITE(numout,*) ' in any case we force it to nit000 - 1 : ', nit000 - 1 … … 251 251 & ' control of time parameter nrstdt' ) 252 252 253 ! --- mandatory fields --- ! 253 ! --- mandatory fields --- ! 254 254 CALL iom_get( numrir, jpdom_auto, 'v_i' , v_i ) 255 255 CALL iom_get( numrir, jpdom_auto, 'v_s' , v_s )
Note: See TracChangeset
for help on using the changeset viewer.