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 8770 for branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90 – NEMO

Ignore:
Timestamp:
2017-11-21T17:21:22+01:00 (6 years ago)
Author:
andmirek
Message:

#1953 and #1962 merged (and some modifications) with write branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r8614 r8770  
    4747   USE wrk_nemo       ! Memory Allocation 
    4848   USE timing         ! Timing 
     49   USE iom_def, ONLY:lwxios, nxioso, rst_wfields ! write restart flag and output type 
     50   USE iom, ONLY : iom_set_rst_vars, iom_set_rstw_core 
    4951   USE iom_def, ONLY : lxios_read 
    5052 
     
    129131      CALL dom_glo                     ! global domain versus local domain 
    130132      CALL dom_nam                     ! read namelist ( namrun, namdom ) 
     133      ! 
     134      IF( lwxios ) THEN 
     135!define names for restart write and set core output (restart.F90) 
     136         CALL iom_set_rst_vars(rst_wfields) 
     137         CALL iom_set_rstw_core() 
     138      ENDIF 
     139      ! 
    131140      CALL dom_clo( cn_cfg, nn_cfg )   ! Closed seas and lake 
    132141      CALL dom_hgr                     ! Horizontal mesh 
     
    286295         &             nn_it000, nn_itend , nn_date0    , nn_time0     , nn_leapy  , nn_istate ,     & 
    287296         &             nn_stock, nn_write , ln_mskland  , ln_clobber   , nn_chunksz, nn_euler  ,     & 
    288          &             ln_cfmeta, ln_iscpl, ln_xios_read 
     297         &             ln_cfmeta, ln_iscpl, ln_xios_read, nn_wxios 
    289298      NAMELIST/namdom/ ln_linssh, nn_closea, nn_msh, rn_isfhmin, rn_rdt, rn_atfp, ln_crs 
    290299#if defined key_netcdf4 
     
    295304      ! 
    296305      ln_xios_read = .false.            ! set in case ln_xios_read is not in namelist 
     306      nn_wxios = 0 
    297307      REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    298308      READ  ( numnam_ref, namrun, IOSTAT = ios, ERR = 901) 
     
    336346         WRITE(numout,*) '      IS coupling at the restart step ln_iscpl   = ', ln_iscpl 
    337347         WRITE(numout,*) '      READ restart for a single file using XIOS ln_xios_read =', ln_xios_read 
    338       IF( TRIM(Agrif_CFixed()) /= '0') THEN 
    339          WRITE(numout,*) '      READ restart for a single file using XIOS WILL not use AGRIF setting.' 
    340       ENDIF 
     348         IF( TRIM(Agrif_CFixed()) /= '0') & 
     349     &       WRITE(numout,*) '      READ restart for a single file using XIOS WILL not use AGRIF setting.' 
     350         IF( TRIM(Agrif_CFixed()) == '0' ) & 
     351     &      WRITE(numout,*) '      Write restart using XIOS        nn_wxios   = ', nn_wxios 
    341352      ENDIF 
    342353 
     
    422433      rdt       = rn_rdt 
    423434 
     435      IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
     436!set output file type for XIOS based on NEMO namelist  
     437         if (nn_wxios > 0) lwxios = .TRUE.  
     438         nxioso = nn_wxios 
     439      ELSE 
     440         IF(lwp) THEN 
     441            write(numout,*) 
     442            write(numout,*) "AGRIF: nn_wxios will be ingored. See setting for NEMO"  
     443            write(numout,*) 
     444         ENDIF 
     445      ENDIF 
     446 
    424447#if defined key_netcdf4 
    425448      !                             ! NetCDF 4 case   ("key_netcdf4" defined) 
Note: See TracChangeset for help on using the changeset viewer.