Changeset 8650


Ignore:
Timestamp:
2017-10-20T17:46:49+02:00 (3 years ago)
Author:
andmirek
Message:

fix writing restart in domvvl.F90

Location:
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC
Files:
3 edited

Legend:

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

    r8644 r8650  
    129129      CALL dom_glo                     ! global domain versus local domain 
    130130      CALL dom_nam                     ! read namelist ( namrun, namdom ) 
     131      ! 
     132      IF( lwxios ) THEN 
     133!define names for restart write and set core output (restart.F90) 
     134         CALL set_rst_vars(rst_wfields) 
     135         CALL set_rstw_core() 
     136      ENDIF 
     137      ! 
    131138      CALL dom_clo( cn_cfg, nn_cfg )   ! Closed seas and lake 
    132139      CALL dom_hgr                     ! Horizontal mesh 
     
    202209      IF( nn_timing == 1 )   CALL timing_stop('dom_init') 
    203210      ! 
    204       IF( lwxios ) THEN 
    205 !define names for restart write 
    206          CALL set_rst_vars(rst_wfields) 
    207          CALL set_rstw_core() 
    208       ENDIF 
    209211   END SUBROUTINE dom_init 
    210212 
  • branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90

    r8644 r8650  
    3333   USE wrk_nemo        ! Memory allocation 
    3434   USE timing          ! Timing 
     35   USE iom_def, ONLY : lwxios 
    3536 
    3637   IMPLICIT NONE 
     
    946947         !                                   ! =================== 
    947948         IF(lwp) WRITE(numout,*) '---- dom_vvl_rst ----' 
     949         IF( lwxios ) CALL iom_swap(      wxios_context          ) 
    948950         !                                           ! --------- ! 
    949951         !                                           ! all cases ! 
  • branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90

    r8644 r8650  
    209209      ENDIF    
    210210      ! automatic definitions of some of the xml attributs 
    211       if(lwp) write(numout,*) TRIM(cdname),' ',TRIM(wxios_context),' TEST1' 
    212211      IF( TRIM(cdname) == TRIM(wxios_context) ) THEN 
    213212!set names of the fields in restart file IF using XIOS to read/write data 
     
    249248!Warn if variable is not in defined in rst_wfields 
    250249   IF(.NOT.is_set) THEN 
    251       IF(lwp) write(numout,*) 'variable ', field ,' is available for writing but not defined'  
     250      IF(lwp) write(numout,*) 'E R R O R in set_rstw_var_active: variable ', field ,' is available for writing but not defined'  
     251        nstop = nstop + 1 
    252252   ENDIF 
    253253 
     
    389389        i = i + 1; fields(i)%vname="surf_ini";       fields(i)%grid="grid_N" 
    390390        i = i + 1; fields(i)%vname="e3t_b";          fields(i)%grid="grid_N_3D" 
    391         i = i + 1; fields(i)%vname="e3t_n";          fields(i)%grid="grid_N_3D" 
    392391        i = i + 1; fields(i)%vname="mxln";           fields(i)%grid="grid_N_3D" 
    393         i = i + 1; fields(i)%vname="e3t_m";          fields(i)%grid="grid_N_3D" 
     392 
     393        IF( i-1 > max_rst_fields) THEN 
     394        IF(lwp) write(numout,*) 'E R R O R : set_rst_vars SIZE of RST_FIELD array is too small' 
     395        nstop = nstop + 1 
     396        ENDIF 
     397 
    394398   END SUBROUTINE set_rst_vars 
    395399 
Note: See TracChangeset for help on using the changeset viewer.