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/OPA_SRC/SBC/sbcapr.F90 – 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90

    r9168 r9367  
    6565      CHARACTER(len=100) ::  cn_dir   ! Root directory for location of ssr files 
    6666      TYPE(FLD_N)        ::  sn_apr   ! informations about the fields to be read 
     67      LOGICAL            ::  lrxios   ! read restart using XIOS? 
    6768      !! 
    6869      NAMELIST/namsbc_apr/ cn_dir, sn_apr, ln_ref_apr, rn_pref, ln_apr_obc 
     
    109110            CALL ctl_warn( 'sbc_apr: use inverse barometer ssh at open boundary ONLY requires ln_apr_dyn=T' ) 
    110111      ! 
     112      IF( lwxios ) THEN 
     113         CALL iom_set_rstw_var_active('ssh_ibb') 
     114      ENDIF 
    111115   END SUBROUTINE sbc_apr_init 
    112116 
     
    152156         IF( ln_rstart .AND. iom_varid( numror, 'ssh_ibb', ldstop = .FALSE. ) > 0 ) THEN  
    153157            IF(lwp) WRITE(numout,*) 'sbc_apr:   ssh_ibb read in the restart file' 
    154             CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb )   ! before inv. barometer ssh 
     158            CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb, ldxios = lrxios )   ! before inv. barometer ssh 
    155159            ! 
    156160         ELSE                                         !* no restart: set from nit000 values 
     
    165169         IF(lwp) WRITE(numout,*) 'sbc_apr : ssh_ib written in ocean restart file at it= ', kt,' date= ', ndastp 
    166170         IF(lwp) WRITE(numout,*) '~~~~' 
    167          CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib ) 
     171         IF( lwxios ) CALL iom_swap(      cwxios_context          ) 
     172         CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib, ldxios = lwxios ) 
     173         IF( lwxios ) CALL iom_swap(      cxios_context          ) 
    168174      ENDIF 
    169175      ! 
Note: See TracChangeset for help on using the changeset viewer.