- Timestamp:
- 2020-11-25T12:51:29+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_12905_xios_restart/src/TOP/trcrst.F90
r13750 r13871 96 96 ELSE 97 97 #if defined key_iomput 98 cw txios_context = "rstwt_"//TRIM(ADJUSTL(clkt))98 cw_toprst_cxt = "rstwt_"//TRIM(ADJUSTL(clkt)) 99 99 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 100 100 clpname = clname … … 102 102 clpname = TRIM(Agrif_CFixed())//"_"//clname 103 103 ENDIF 104 CALL iom_init( cw txios_context, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .FALSE. )104 CALL iom_init( cw_toprst_cxt, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .FALSE. ) 105 105 CALL iom_swap( cxios_context ) 106 106 #else … … 130 130 131 131 ! READ prognostic variables and computes diagnostic variable 132 IF(lr txios) CALL iom_swap(crtxios_context)132 IF(lrxios) CALL iom_swap(cr_toprst_cxt) 133 133 DO jn = 1, jptra 134 CALL iom_get( numrtr, jpdom_auto, 'TRN'//ctrcnm(jn), tr(:,:,:,jn,Kmm), ldxios = lr txios )134 CALL iom_get( numrtr, jpdom_auto, 'TRN'//ctrcnm(jn), tr(:,:,:,jn,Kmm), ldxios = lrxios ) 135 135 END DO 136 136 137 137 DO jn = 1, jptra 138 CALL iom_get( numrtr, jpdom_auto, 'TRB'//ctrcnm(jn), tr(:,:,:,jn,Kbb), ldxios = lr txios )138 CALL iom_get( numrtr, jpdom_auto, 'TRB'//ctrcnm(jn), tr(:,:,:,jn,Kbb), ldxios = lrxios ) 139 139 END DO 140 140 ! 141 141 CALL iom_delay_rst( 'READ', 'TOP', numrtr ) ! read only TOP delayed global communication variables 142 IF(lr txios) CALL iom_swap(cxios_context)142 IF(lrxios) CALL iom_swap(cxios_context) 143 143 END SUBROUTINE trc_rst_read 144 144 … … 155 155 !!---------------------------------------------------------------------- 156 156 ! 157 IF( lwxios ) CALL iom_swap( cw txios_context )157 IF( lwxios ) CALL iom_swap( cw_toprst_cxt ) 158 158 CALL iom_rstput( kt, nitrst, numrtw, 'rdttrc1', rn_Dt, ldxios = lwxios ) ! passive tracer time step (= ocean time step) 159 159 ! prognostic variables … … 173 173 CALL trc_rst_stat( Kmm, Krhs ) ! statistics 174 174 IF(lwxios) THEN 175 CALL iom_context_finalize( cw txios_context )175 CALL iom_context_finalize( cw_toprst_cxt ) 176 176 ELSE 177 177 CALL iom_close( numrtw ) ! close the restart file (only at last time step) … … 234 234 lxios_sini = .FALSE. 235 235 CALL iom_open( TRIM(cn_trcrst_indir)//'/'//cn_trcrst_in, numrtr ) 236 lrtxios = lrxios.AND.lxios_sini 237 IF( lrtxios) THEN 238 crtxios_context = 'top_rst' 236 IF( lrxios) THEN 237 cr_toprst_cxt = 'top_rst' 239 238 IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS for TOP' 240 239 IF( TRIM(Agrif_CFixed()) == '0' ) THEN … … 243 242 clpname = TRIM(Agrif_CFixed())//"_"//cn_trcrst_in 244 243 ENDIF 245 CALL iom_init( cr txios_context, fname = TRIM(cn_trcrst_indir)//'/'//TRIM(clpname), &244 CALL iom_init( cr_toprst_cxt, fname = TRIM(cn_trcrst_indir)//'/'//TRIM(clpname), & 246 245 idfp = iom_file(numrtr)%nfid, ld_closedef = .TRUE. ) 247 246 ENDIF 248 247 249 IF(lr txios) CALL iom_swap(crtxios_context)250 CALL iom_get ( numrtr, 'kt', zkt, ldxios = lr txios ) ! last time-step of previous run251 IF(lr txios) CALL iom_swap(cxios_context)248 IF(lrxios) CALL iom_swap(cr_toprst_cxt) 249 CALL iom_get ( numrtr, 'kt', zkt, ldxios = lrxios ) ! last time-step of previous run 250 IF(lrxios) CALL iom_swap(cxios_context) 252 251 253 252 IF(lwp) THEN … … 271 270 ! ! set the date in offline mode 272 271 IF( ln_rsttr .AND. nn_rsttr == 2 ) THEN 273 IF(lr txios) CALL iom_swap(crtxios_context)274 CALL iom_get( numrtr, 'ndastp', zndastp, ldxios = lr txios )272 IF(lrxios) CALL iom_swap(cr_toprst_cxt) 273 CALL iom_get( numrtr, 'ndastp', zndastp, ldxios = lrxios ) 275 274 ndastp = NINT( zndastp ) 276 CALL iom_get( numrtr, 'adatrj', adatrj, ldxios = lr txios )277 CALL iom_get( numrtr, 'ntime' , ktime, ldxios = lr txios )278 IF(lr txios) CALL iom_swap(cxios_context)275 CALL iom_get( numrtr, 'adatrj', adatrj, ldxios = lrxios ) 276 CALL iom_get( numrtr, 'ntime' , ktime, ldxios = lrxios ) 277 IF(lrxios) CALL iom_swap(cxios_context) 279 278 nn_time0=INT(ktime) 280 279 ! calculate start time in hours and minutes … … 336 335 IF(lwp) WRITE(numout,*) '~~~~~~~' 337 336 ENDIF 338 IF( lwxios ) CALL iom_swap( cw txios_context )337 IF( lwxios ) CALL iom_swap( cw_toprst_cxt ) 339 338 CALL iom_rstput( kt, nitrst, numrtw, 'kt' , REAL( kt , wp) , ldxios = lwxios ) ! time-step 340 339 CALL iom_rstput( kt, nitrst, numrtw, 'ndastp' , REAL( ndastp, wp) , ldxios = lwxios ) ! date
Note: See TracChangeset
for help on using the changeset viewer.