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 8801 for branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90 – NEMO

Ignore:
Timestamp:
2017-11-23T16:52:17+01:00 (6 years ago)
Author:
andmirek
Message:

#1953 and #1962 merge dev_r8600_xios_read_write r8793

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90

    r8800 r8801  
    3333   USE timing         ! Timing 
    3434   USE restart        ! restart 
    35    USE iom_def, ONLY : lxios_read 
     35   USE iom_def, ONLY : lwxios 
     36   USE iom_def, ONLY : lrxios 
    3637 
    3738   IMPLICIT NONE 
     
    144145      CALL day( nit000 ) 
    145146      ! 
     147      IF( lwxios ) THEN 
     148! define variables in restart file when writing with XIOS 
     149          CALL iom_set_rstw_var_active('kt') 
     150          CALL iom_set_rstw_var_active('ndastp') 
     151          CALL iom_set_rstw_var_active('adatrj') 
     152          CALL iom_set_rstw_var_active('ntime') 
     153      ENDIF 
     154 
    146155   END SUBROUTINE day_init 
    147156 
     
    319328         IF( iom_varid( numror, 'kt', ldstop = .FALSE. ) > 0 ) THEN 
    320329            ! Get Calendar informations 
    321             CALL iom_get( numror, 'kt', zkt, ldxios = lxios_read )   ! last time-step of previous run 
     330            CALL iom_get( numror, 'kt', zkt, ldxios = lrxios )   ! last time-step of previous run 
    322331            IF(lwp) THEN 
    323332               WRITE(numout,*) ' *** Info read in restart : ' 
     
    338347            IF ( nrstdt == 2 ) THEN 
    339348               ! read the parameters corresponding to nit000 - 1 (last time step of previous run) 
    340                CALL iom_get( numror, 'ndastp', zndastp, ldxios = lxios_read ) 
     349               CALL iom_get( numror, 'ndastp', zndastp, ldxios = lrxios ) 
    341350               ndastp = NINT( zndastp ) 
    342                CALL iom_get( numror, 'adatrj', adatrj, ldxios = lxios_read ) 
    343           CALL iom_get( numror, 'ntime', ktime, ldxios = lxios_read ) 
     351               CALL iom_get( numror, 'adatrj', adatrj, ldxios = lrxios ) 
     352          CALL iom_get( numror, 'ntime', ktime, ldxios = lrxios ) 
    344353          nn_time0=INT(ktime) 
    345354               ! calculate start time in hours and minutes 
     
    400409         ENDIF 
    401410         ! calendar control 
    402          CALL iom_rstput( kt, nitrst, numrow, 'kt'     , REAL( kt    , wp) )   ! time-step 
    403          CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) )   ! date 
    404          CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj            )   ! number of elapsed days since 
     411         IF( lwxios ) CALL iom_swap(      cwxios_context          ) 
     412         CALL iom_rstput( kt, nitrst, numrow, 'kt'     , REAL( kt    , wp), ldxios = lwxios )   ! time-step 
     413         CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp), ldxios = lwxios )   ! date 
     414         CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj, ldxios = lwxios            )   ! number of elapsed days since 
    405415         !                                                                     ! the begining of the run [s] 
    406     CALL iom_rstput( kt, nitrst, numrow, 'ntime'  , REAL( nn_time0, wp) ) ! time 
     416    CALL iom_rstput( kt, nitrst, numrow, 'ntime'  , REAL( nn_time0, wp), ldxios = lwxios ) ! time 
     417         IF( lwxios ) CALL iom_swap(      cxios_context          ) 
    407418      ENDIF 
    408419      ! 
Note: See TracChangeset for help on using the changeset viewer.