Changeset 14012 for NEMO/branches/2020/tickets_icb_1900/src/ICE/icerst.F90
- Timestamp:
- 2020-12-02T16:13:45+01:00 (4 years ago)
- Location:
- NEMO/branches/2020/tickets_icb_1900
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/tickets_icb_1900
- Property svn:externals
-
old new 8 8 9 9 # SETTE 10 ^/utils/CI/sette @13559sette10 ^/utils/CI/sette_MPI3_LoopFusion@13943 sette
-
- Property svn:externals
-
NEMO/branches/2020/tickets_icb_1900/src/ICE/icerst.F90
r13899 r14012 55 55 CHARACTER(len=50) :: clname ! ice output restart file name 56 56 CHARACTER(len=256) :: clpath ! full path to ice output restart file 57 CHARACTER(LEN=52) :: clpname ! ocean output restart file name including prefix for AGRIF 57 58 !!---------------------------------------------------------------------- 58 59 ! … … 84 85 ENDIF 85 86 ! 86 CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kdlev = jpl, cdcomp = 'ICE' ) 87 IF(.NOT.lwxios) THEN 88 CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kdlev = jpl, cdcomp = 'ICE' ) 89 ELSE 90 #if defined key_iomput 91 cw_icerst_cxt = "rstwi_"//TRIM(ADJUSTL(clkt)) 92 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 93 clpname = clname 94 ELSE 95 clpname = TRIM(Agrif_CFixed())//"_"//clname 96 ENDIF 97 numriw = iom_xios_setid(TRIM(clpath)//TRIM(clpname)) 98 CALL iom_init( cw_icerst_cxt, kdid = numriw, ld_closedef = .FALSE. ) 99 CALL iom_swap( cxios_context ) 100 #else 101 clinfo = 'Can not use XIOS in rst_opn' 102 CALL ctl_stop(TRIM(clinfo)) 103 #endif 104 ENDIF 87 105 lrst_ice = .TRUE. 88 106 ENDIF … … 117 135 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~' 118 136 ENDIF 119 137 120 138 ! Write in numriw (if iter == nitrst) 121 139 ! ------------------ … … 123 141 CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ) ) ! time-step 124 142 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp ) ) ! date 125 CALL iom_delay_rst( 'WRITE', 'ICE', numriw ) ! save only ice delayed global communication variables 143 144 IF(.NOT.lwxios) CALL iom_delay_rst( 'WRITE', 'ICE', numriw ) ! save only ice delayed global communication variables 126 145 127 146 ! Prognostic variables … … 154 173 IF( ln_cpl ) THEN 155 174 CALL iom_rstput( iter, nitrst, numriw, 'cnd_ice', cnd_ice ) 156 CALL iom_rstput( iter, nitrst, numriw, 't1_ice' , t1_ice 175 CALL iom_rstput( iter, nitrst, numriw, 't1_ice' , t1_ice ) 157 176 ENDIF 158 177 ! … … 161 180 ! ------------------ 162 181 IF( iter == nitrst ) THEN 163 CALL iom_close( numriw ) 182 IF(.NOT.lwxios) THEN 183 CALL iom_close( numriw ) 184 ELSE 185 CALL iom_context_finalize( cw_icerst_cxt ) 186 iom_file(numriw)%nfid = 0 187 numriw = 0 188 ENDIF 164 189 lrst_ice = .FALSE. 165 190 ENDIF … … 181 206 CHARACTER(len=2) :: zchar, zchar1 182 207 REAL(wp) :: zfice, ziter 208 CHARACTER(lc) :: clpname 183 209 REAL(wp), DIMENSION(jpi,jpj,jpl) :: z3d ! 3D workspace 184 210 !!---------------------------------------------------------------------- … … 190 216 ENDIF 191 217 218 lxios_sini = .FALSE. 192 219 CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir ) 220 221 IF( lrxios) THEN 222 cr_icerst_cxt = 'si3_rst' 223 IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS for SI3' 224 ! IF( TRIM(Agrif_CFixed()) == '0' ) THEN 225 ! clpname = cn_icerst_in 226 ! ELSE 227 ! clpname = TRIM(Agrif_CFixed())//"_"//cn_icerst_in 228 ! ENDIF 229 CALL iom_init( cr_icerst_cxt, kdid = numrir, ld_closedef = .TRUE. ) 230 ENDIF 193 231 194 232 ! test if v_i exists … … 198 236 IF( id0 > 0 ) THEN ! == case of a normal restart == ! 199 237 ! ! ------------------------------ ! 200 201 238 ! Time info 202 239 CALL iom_get( numrir, 'nn_fsbc', zfice ) … … 278 315 ENDIF 279 316 280 CALL iom_delay_rst( 'READ', 'ICE', numrir ) ! read only ice delayed global communication variables 281 317 IF(.NOT.lrxios) CALL iom_delay_rst( 'READ', 'ICE', numrir ) ! read only ice delayed global communication variables 282 318 ! ! ---------------------------------- ! 283 319 ELSE ! == case of a simplified restart == !
Note: See TracChangeset
for help on using the changeset viewer.