New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 13871 for NEMO/branches/2020/dev_12905_xios_restart/src/TOP/trcrst.F90 – NEMO

Ignore:
Timestamp:
2020-11-25T12:51:29+01:00 (4 years ago)
Author:
andmirek
Message:

Ticket #2462: Addressing reviewr comments stage 1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_12905_xios_restart/src/TOP/trcrst.F90

    r13750 r13871  
    9696         ELSE 
    9797#if defined key_iomput 
    98             cwtxios_context = "rstwt_"//TRIM(ADJUSTL(clkt)) 
     98            cw_toprst_cxt = "rstwt_"//TRIM(ADJUSTL(clkt)) 
    9999            IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
    100100               clpname = clname 
     
    102102               clpname = TRIM(Agrif_CFixed())//"_"//clname 
    103103            ENDIF 
    104             CALL iom_init( cwtxios_context, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .FALSE. ) 
     104            CALL iom_init( cw_toprst_cxt, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .FALSE. ) 
    105105            CALL iom_swap(      cxios_context          ) 
    106106#else 
     
    130130 
    131131      ! READ prognostic variables and computes diagnostic variable 
    132       IF(lrtxios) CALL iom_swap(crtxios_context) 
     132      IF(lrxios) CALL iom_swap(cr_toprst_cxt) 
    133133      DO jn = 1, jptra 
    134          CALL iom_get( numrtr, jpdom_auto, 'TRN'//ctrcnm(jn), tr(:,:,:,jn,Kmm), ldxios = lrtxios ) 
     134         CALL iom_get( numrtr, jpdom_auto, 'TRN'//ctrcnm(jn), tr(:,:,:,jn,Kmm), ldxios = lrxios ) 
    135135      END DO 
    136136 
    137137      DO jn = 1, jptra 
    138          CALL iom_get( numrtr, jpdom_auto, 'TRB'//ctrcnm(jn), tr(:,:,:,jn,Kbb), ldxios = lrtxios ) 
     138         CALL iom_get( numrtr, jpdom_auto, 'TRB'//ctrcnm(jn), tr(:,:,:,jn,Kbb), ldxios = lrxios ) 
    139139      END DO 
    140140      ! 
    141141      CALL iom_delay_rst( 'READ', 'TOP', numrtr )   ! read only TOP delayed global communication variables 
    142       IF(lrtxios) CALL iom_swap(cxios_context)  
     142      IF(lrxios) CALL iom_swap(cxios_context)  
    143143   END SUBROUTINE trc_rst_read 
    144144 
     
    155155      !!---------------------------------------------------------------------- 
    156156      ! 
    157       IF( lwxios ) CALL iom_swap(      cwtxios_context         ) 
     157      IF( lwxios ) CALL iom_swap(      cw_toprst_cxt         ) 
    158158      CALL iom_rstput( kt, nitrst, numrtw, 'rdttrc1', rn_Dt, ldxios = lwxios )   ! passive tracer time step (= ocean time step) 
    159159      ! prognostic variables  
     
    173173          CALL trc_rst_stat( Kmm, Krhs )             ! statistics 
    174174          IF(lwxios) THEN 
    175              CALL iom_context_finalize(      cwtxios_context          ) 
     175             CALL iom_context_finalize(      cw_toprst_cxt          ) 
    176176          ELSE 
    177177             CALL iom_close( numrtw )     ! close the restart file (only at last time step) 
     
    234234            lxios_sini = .FALSE. 
    235235            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' 
    239238                IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS for TOP' 
    240239                IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
     
    243242                   clpname = TRIM(Agrif_CFixed())//"_"//cn_trcrst_in    
    244243                ENDIF 
    245                 CALL iom_init( crtxios_context, fname = TRIM(cn_trcrst_indir)//'/'//TRIM(clpname), & 
     244                CALL iom_init( cr_toprst_cxt, fname = TRIM(cn_trcrst_indir)//'/'//TRIM(clpname), & 
    246245                                          idfp = iom_file(numrtr)%nfid, ld_closedef = .TRUE. ) 
    247246            ENDIF 
    248247 
    249             IF(lrtxios) CALL iom_swap(crtxios_context) 
    250             CALL iom_get ( numrtr, 'kt', zkt, ldxios = lrtxios )   ! last time-step of previous run 
    251             IF(lrtxios) 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) 
    252251 
    253252            IF(lwp) THEN 
     
    271270            !                                          ! set the date in offline mode 
    272271            IF( ln_rsttr .AND. nn_rsttr == 2 ) THEN 
    273                IF(lrtxios) CALL iom_swap(crtxios_context) 
    274                CALL iom_get( numrtr, 'ndastp', zndastp, ldxios = lrtxios ) 
     272               IF(lrxios) CALL iom_swap(cr_toprst_cxt) 
     273               CALL iom_get( numrtr, 'ndastp', zndastp, ldxios = lrxios ) 
    275274               ndastp = NINT( zndastp ) 
    276                CALL iom_get( numrtr, 'adatrj', adatrj, ldxios = lrtxios  ) 
    277                CALL iom_get( numrtr, 'ntime' , ktime, ldxios = lrtxios   ) 
    278                IF(lrtxios) 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) 
    279278               nn_time0=INT(ktime) 
    280279               ! calculate start time in hours and minutes 
     
    336335            IF(lwp) WRITE(numout,*) '~~~~~~~' 
    337336         ENDIF 
    338          IF( lwxios ) CALL iom_swap(      cwtxios_context         ) 
     337         IF( lwxios ) CALL iom_swap(      cw_toprst_cxt         ) 
    339338         CALL iom_rstput( kt, nitrst, numrtw, 'kt'     , REAL( kt    , wp)  , ldxios = lwxios )   ! time-step 
    340339         CALL iom_rstput( kt, nitrst, numrtw, 'ndastp' , REAL( ndastp, wp)  , ldxios = lwxios )   ! date 
Note: See TracChangeset for help on using the changeset viewer.