Changeset 717 for trunk/NEMO/LIM_SRC/limrst.F90
- Timestamp:
- 2007-10-16T13:03:55+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/LIM_SRC/limrst.F90
r699 r717 17 17 !!---------------------------------------------------------------------- 18 18 USE ice 19 USE dom_oce20 USE ice_oce ! ice variables19 USE sbc_oce 20 USE sbc_ice 21 21 USE daymod 22 22 … … 28 28 29 29 PUBLIC lim_rst_opn ! routine called by ??? module 30 PUBLIC lim_rst_write ! routine called by ??? module31 PUBLIC lim_rst_read ! routine called by ??? module30 PUBLIC lim_rst_write ! routine called by lim_step.F90 31 PUBLIC lim_rst_read ! routine called by lim_init.F90 32 32 33 33 LOGICAL, PUBLIC :: lrst_ice !: logical to control the ice restart write … … 56 56 IF( kt == nit000 ) lrst_ice = .FALSE. 57 57 58 IF( kt == nitrst - 2*n fice + 1 .OR. nitend - nit000 + 1 <= nfice) THEN59 ! beware if model runs less than n fice+ 1 time step58 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nitend - nit000 + 1 <= nn_fsbc ) THEN 59 ! beware if model runs less than nn_fsbc + 1 time step 60 60 ! beware of the format used to write kt (default is i8.8, that should be large enough) 61 61 IF( nitrst > 1.0e9 ) THEN … … 74 74 END SUBROUTINE lim_rst_opn 75 75 76 76 77 SUBROUTINE lim_rst_write( kt ) 77 78 !!---------------------------------------------------------------------- … … 80 81 !! ** purpose : output of sea-ice variable in a netcdf file 81 82 !!---------------------------------------------------------------------- 82 INTEGER, INTENT(in) :: kt 83 ! !84 INTEGER :: iter ! kt + nfice-185 !!---------------------------------------------------------------------- 86 87 iter = kt + n fice -183 INTEGER, INTENT(in) :: kt ! number of iteration 84 ! 85 INTEGER :: iter ! kt + nn_fsbc -1 86 !!---------------------------------------------------------------------- 87 88 iter = kt + nn_fsbc - 1 88 89 89 90 IF( iter == nitrst ) THEN 90 91 IF(lwp) WRITE(numout,*) 91 92 IF(lwp) WRITE(numout,*) 'lim_rst_write : write ice restart.output NetCDF file kt =', kt 92 IF(lwp) WRITE(numout,*) '~~~~~~~ '93 ENDIF 94 95 ! Write in numriw (if iter == nitrst)93 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~' 94 ENDIF 95 96 ! Write in numriw (if iter == nitrst) 96 97 ! ------------------ 97 98 ! ! calendar control 98 CALL iom_rstput( iter, nitrst, numriw, 'nfice' , REAL( nfice, wp) ) ! time-step 99 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice', REAL( iter, wp) ) ! date 99 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice', REAL( iter, wp) ) 100 100 101 101 CALL iom_rstput( iter, nitrst, numriw, 'hicif' , hicif (:,:) ) ! prognostic variables … … 109 109 CALL iom_rstput( iter, nitrst, numriw, 'tbif2' , tbif (:,:,2) ) 110 110 CALL iom_rstput( iter, nitrst, numriw, 'tbif3' , tbif (:,:,3) ) 111 CALL iom_rstput( iter, nitrst, numriw, 'u_ice' , u_ice (:,:) ) 112 CALL iom_rstput( iter, nitrst, numriw, 'v_ice' , v_ice (:,:) ) 113 CALL iom_rstput( iter, nitrst, numriw, 'gtaux' , gtaux (:,:) ) 114 CALL iom_rstput( iter, nitrst, numriw, 'gtauy' , gtauy (:,:) ) 111 CALL iom_rstput( iter, nitrst, numriw, 'ui_ice', ui_ice(:,:) ) 112 CALL iom_rstput( iter, nitrst, numriw, 'vi_ice', vi_ice(:,:) ) 115 113 CALL iom_rstput( iter, nitrst, numriw, 'qstoif', qstoif(:,:) ) 116 114 CALL iom_rstput( iter, nitrst, numriw, 'fsbbq' , fsbbq (:,:) ) … … 165 163 !! ** purpose : read of sea-ice variable restart in a netcdf file 166 164 !!---------------------------------------------------------------------- 167 ! 168 REAL(wp) :: zfice, ziter 165 REAL(wp) :: ziter 169 166 !!---------------------------------------------------------------------- 170 167 … … 172 169 WRITE(numout,*) 173 170 WRITE(numout,*) 'lim_rst_read : read ice NetCDF restart file' 174 WRITE(numout,*) '~~~~~~~~ '171 WRITE(numout,*) '~~~~~~~~~~~~' 175 172 ENDIF 176 173 177 174 CALL iom_open ( 'restart_ice_in', numrir, kiolib = jprstlib ) 178 175 179 CALL iom_get( numrir, 'nfice' , zfice ) 180 CALL iom_get( numrir, 'kt_ice', ziter ) 181 IF(lwp) WRITE(numout,*) ' read ice restart file at time step : ', ziter 176 CALL iom_get( numrir, 'kt_ice' , ziter ) 177 IF(lwp) WRITE(numout,*) ' read ice restart file at time step : ', INT( ziter ) 182 178 IF(lwp) WRITE(numout,*) ' in any case we force it to nit000 - 1 : ', nit000 - 1 183 179 … … 186 182 IF( ( nit000 - INT(ziter) ) /= 1 .AND. ABS( nrstdt ) == 1 ) & 187 183 & CALL ctl_stop( 'lim_rst_read ===>>>> : problem with nit000 in ice restart', & 188 & ' verify the file or rerun with the value 0 for the', &189 & ' control of time parameter nrstdt' )190 IF( INT(zfice) /= nfice .AND. ABS( nrstdt ) == 1 ) &191 & CALL ctl_stop( 'lim_rst_read ===>>>> : problem with nfice in ice restart', &192 184 & ' verify the file or rerun with the value 0 for the', & 193 185 & ' control of time parameter nrstdt' ) … … 203 195 CALL iom_get( numrir, jpdom_autoglo, 'tbif2' , tbif(:,:,2) ) 204 196 CALL iom_get( numrir, jpdom_autoglo, 'tbif3' , tbif(:,:,3) ) 205 CALL iom_get( numrir, jpdom_autoglo, 'u_ice' , u_ice ) 206 CALL iom_get( numrir, jpdom_autoglo, 'v_ice' , v_ice ) 207 CALL iom_get( numrir, jpdom_autoglo, 'gtaux' , gtaux ) 208 CALL iom_get( numrir, jpdom_autoglo, 'gtauy' , gtauy ) 197 CALL iom_get( numrir, jpdom_autoglo, 'ui_ice', ui_ice ) 198 CALL iom_get( numrir, jpdom_autoglo, 'vi_ice', vi_ice ) 209 199 CALL iom_get( numrir, jpdom_autoglo, 'qstoif', qstoif ) 210 200 CALL iom_get( numrir, jpdom_autoglo, 'fsbbq' , fsbbq )
Note: See TracChangeset
for help on using the changeset viewer.