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 9367 for branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC – NEMO

Ignore:
Timestamp:
2018-02-28T17:23:20+01:00 (6 years ago)
Author:
mathiot
Message:

Add restart read/write via XIOS capability (#1953 and #1962 and twiki: 2017WP/Met_Office-1_Mirek_XIOSread). WARNING: need to upgrade XIOS to r1296 to compile

Location:
branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/daymod.F90

    r9124 r9367  
    3030   USE in_out_manager ! I/O manager 
    3131   USE prtctl         ! Print control 
    32    USE iom            ! 
     32   USE iom            ! I/O manager 
    3333   USE timing         ! Timing 
    3434   USE restart        ! restart 
     
    142142      ! call day to set the calendar parameters at the begining of the current simulaton. needed by iom_init 
    143143      CALL day( nit000 ) 
     144      IF( lwxios ) THEN 
     145        CALL iom_set_rstw_var_active('kt') 
     146        CALL iom_set_rstw_var_active('ndastp') 
     147        CALL iom_set_rstw_var_active('adatrj') 
     148        CALL iom_set_rstw_var_active('ntime') 
     149      ENDIF 
    144150      ! 
    145151   END SUBROUTINE day_init 
     
    318324         IF( iom_varid( numror, 'kt', ldstop = .FALSE. ) > 0 ) THEN 
    319325            ! Get Calendar informations 
    320             CALL iom_get( numror, 'kt', zkt )   ! last time-step of previous run 
     326            CALL iom_get( numror, 'kt', zkt, ldxios = lrxios )   ! last time-step of previous run 
    321327            IF(lwp) THEN 
    322328               WRITE(numout,*) ' *** Info read in restart : ' 
     
    337343            IF ( nrstdt == 2 ) THEN 
    338344               ! read the parameters corresponding to nit000 - 1 (last time step of previous run) 
    339                CALL iom_get( numror, 'ndastp', zndastp ) 
     345               CALL iom_get( numror, 'ndastp', zndastp, ldxios = lrxios ) 
    340346               ndastp = NINT( zndastp ) 
    341                CALL iom_get( numror, 'adatrj', adatrj ) 
    342           CALL iom_get( numror, 'ntime', ktime ) 
     347               CALL iom_get( numror, 'adatrj', adatrj , ldxios = lrxios ) 
     348          CALL iom_get( numror, 'ntime' , ktime  , ldxios = lrxios ) 
    343349          nn_time0=INT(ktime) 
    344350               ! calculate start time in hours and minutes 
     
    399405         ENDIF 
    400406         ! calendar control 
    401          CALL iom_rstput( kt, nitrst, numrow, 'kt'     , REAL( kt    , wp) )   ! time-step 
    402          CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) )   ! date 
    403          CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj            )   ! number of elapsed days since 
     407         IF( lwxios ) CALL iom_swap(      cwxios_context          ) 
     408         CALL iom_rstput( kt, nitrst, numrow, 'kt'     , REAL( kt    , wp)  , ldxios = lwxios )   ! time-step 
     409         CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp)  , ldxios = lwxios )   ! date 
     410         CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj             , ldxios = lwxios )   ! number of elapsed days since 
    404411         !                                                                     ! the begining of the run [s] 
    405     CALL iom_rstput( kt, nitrst, numrow, 'ntime'  , REAL( nn_time0, wp) ) ! time 
     412    CALL iom_rstput( kt, nitrst, numrow, 'ntime'  , REAL( nn_time0, wp), ldxios = lwxios ) ! time 
     413         IF( lwxios ) CALL iom_swap(      cxios_context          ) 
    406414      ENDIF 
    407415      ! 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90

    r9267 r9367  
    381381                           CALL phy_cst         ! Physical constants 
    382382                           CALL eos_init        ! Equation of seawater 
    383                            CALL dom_init        ! Domain 
     383                           CALL dom_init('SAS') ! Domain 
    384384      IF( ln_ctl      )    CALL prt_ctl_init    ! Print control 
    385385       
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/step.F90

    r9019 r9367  
    122122 
    123123#if defined key_iomput 
    124       IF( kstp == nitend .OR. indic < 0 ) THEN  
     124      IF( kstp == nitrst ) THEN 
     125         IF(.NOT.lwxios) THEN 
     126            CALL iom_close( numrow )      
     127         ELSE 
     128            CALL iom_context_finalize( cwxios_context ) 
     129         ENDIF 
     130         lrst_oce = .FALSE. 
     131      ENDIF 
     132      IF( kstp == nitend .OR. indic < 0 ) THEN 
    125133                             CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF 
    126134      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.