Changeset 9987 for branches/UKMO/dev_r5518_obs_oper_update_icethick/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
- Timestamp:
- 2018-07-23T11:33:03+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_obs_oper_update_icethick/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r7960 r9987 21 21 USE in_out_manager ! I/O manager 22 22 USE iom ! I/O module 23 USE ioipsl, ONLY : ju2ymds ! for calendar 23 24 USE eosbn2 ! equation of state (eos bn2 routine) 24 25 USE trdmxl_oce ! ocean active mixed layer tracers trends variables 25 26 USE divcur ! hor. divergence and curl (div & cur routines) 27 USE sbc_oce ! for icesheet freshwater input variables 26 28 27 29 IMPLICIT NONE … … 54 56 !!---------------------------------------------------------------------- 55 57 INTEGER, INTENT(in) :: kt ! ocean time-step 58 INTEGER :: iyear, imonth, iday 59 REAL (wp) :: zsec 60 REAL (wp) :: zfjulday 56 61 !! 57 62 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 58 63 CHARACTER(LEN=50) :: clname ! ocean output restart file name 59 CHARACTER( lc):: clpath ! full path to ocean output restart file64 CHARACTER(LEN=150) :: clpath ! full path to ocean output restart file 60 65 !!---------------------------------------------------------------------- 61 66 ! … … 81 86 IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 82 87 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 83 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 84 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 85 ELSE ; WRITE(clkt, '(i8.8)') nitrst 88 IF ( ln_rstdate ) THEN 89 zfjulday = fjulday + rdttra(1) / rday 90 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 91 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 92 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 93 ELSE 94 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 95 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 96 ELSE ; WRITE(clkt, '(i8.8)') nitrst 97 ENDIF 86 98 ENDIF 87 99 ! create the file … … 145 157 CALL iom_rstput( kt, nitrst, numrow, 'rhd' , rhd ) 146 158 #endif 159 IF( lk_oasis) THEN 160 ! nn_coupled_iceshelf_fluxes uninitialised unless lk_oasis=true 161 IF( nn_coupled_iceshelf_fluxes .eq. 1 ) THEN 162 CALL iom_rstput( kt, nitrst, numrow, 'greenland_icesheet_mass', greenland_icesheet_mass ) 163 CALL iom_rstput( kt, nitrst, numrow, 'greenland_icesheet_timelapsed', greenland_icesheet_timelapsed ) 164 CALL iom_rstput( kt, nitrst, numrow, 'greenland_icesheet_mass_roc', greenland_icesheet_mass_rate_of_change ) 165 CALL iom_rstput( kt, nitrst, numrow, 'antarctica_icesheet_mass', antarctica_icesheet_mass ) 166 CALL iom_rstput( kt, nitrst, numrow, 'antarctica_icesheet_timelapsed', antarctica_icesheet_timelapsed ) 167 CALL iom_rstput( kt, nitrst, numrow, 'antarctica_icesheet_mass_roc', antarctica_icesheet_mass_rate_of_change ) 168 ENDIF 169 ENDIF 170 147 171 IF( kt == nitrst ) THEN 148 172 CALL iom_close( numrow ) ! close the restart file (only at last time step) … … 258 282 #endif 259 283 ! 284 IF( iom_varid( numror, 'greenland_icesheet_mass', ldstop = .FALSE. ) > 0 ) THEN 285 CALL iom_get( numror, 'greenland_icesheet_mass', greenland_icesheet_mass ) 286 CALL iom_get( numror, 'greenland_icesheet_timelapsed', greenland_icesheet_timelapsed ) 287 CALL iom_get( numror, 'greenland_icesheet_mass_roc', greenland_icesheet_mass_rate_of_change ) 288 ELSE 289 greenland_icesheet_mass = 0.0 290 greenland_icesheet_mass_rate_of_change = 0.0 291 greenland_icesheet_timelapsed = 0.0 292 ENDIF 293 IF( iom_varid( numror, 'antarctica_icesheet_mass', ldstop = .FALSE. ) > 0 ) THEN 294 CALL iom_get( numror, 'antarctica_icesheet_mass', antarctica_icesheet_mass ) 295 CALL iom_get( numror, 'antarctica_icesheet_timelapsed', antarctica_icesheet_timelapsed ) 296 CALL iom_get( numror, 'antarctica_icesheet_mass_roc', antarctica_icesheet_mass_rate_of_change ) 297 ELSE 298 antarctica_icesheet_mass = 0.0 299 antarctica_icesheet_mass_rate_of_change = 0.0 300 antarctica_icesheet_timelapsed = 0.0 301 ENDIF 302 260 303 IF( neuler == 0 ) THEN ! Euler restart (neuler=0) 261 304 tsb (:,:,:,:) = tsn (:,:,:,:) ! all before fields set to now values
Note: See TracChangeset
for help on using the changeset viewer.