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 8836 for branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90 – NEMO

Ignore:
Timestamp:
2017-11-28T15:45:20+01:00 (6 years ago)
Author:
andmirek
Message:

#1953 and #1962 Techinal corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90

    r8812 r8836  
    4141   USE dianam          ! build name of file 
    4242   USE xios 
    43    USE iom_def, ONLY : max_rst_fields, rst_rfields, rst_wfields, RST_FIELD 
    4443# endif 
    4544   USE ioipsl, ONLY :  ju2ymds    ! for calendar 
     
    211210      IF( TRIM(cdname) == TRIM(crxios_context) ) THEN 
    212211!set names of the fields in restart file IF using XIOS to read data 
    213        CALL iom_set_rst_context() 
    214        CALL iom_set_rst_vars(rst_rfields) 
     212          CALL iom_set_rst_context() 
     213          CALL iom_set_rst_vars(rst_rfields) 
    215214!set which fields are to be read from restart file 
    216        CALL iom_set_rstr_active() 
     215          CALL iom_set_rstr_active() 
    217216      ELSE IF( TRIM(cdname) == TRIM(cwxios_context) ) THEN 
    218217!set names of the fields in restart file IF using XIOS to write data 
    219        CALL iom_set_rst_context() 
    220        CALL iom_set_rst_vars(rst_wfields) 
     218          CALL iom_set_rst_context() 
     219          CALL iom_set_rst_vars(rst_wfields) 
    221220!set which fields are to be read from restart file 
    222        CALL iom_set_rstw_active(fname) 
     221          CALL iom_set_rstw_active(fname) 
    223222      ELSE 
    224        CALL set_xmlatt 
     223          CALL set_xmlatt 
    225224      ENDIF 
    226225 
     
    239238 
    240239   SUBROUTINE iom_set_rstw_var_active(field) 
     240      !!--------------------------------------------------------------------- 
     241      !!                   ***  SUBROUTINE  iom_set_rstw_var_active  *** 
     242      !! 
     243      !! ** Purpose :  enable variable in restart file when writing with XIOS  
     244      !!--------------------------------------------------------------------- 
    241245   CHARACTER(len = *), INTENT(IN) :: field 
    242246   INTEGER :: i 
     
    264268 
    265269   SUBROUTINE iom_set_rstr_active() 
     270      !!--------------------------------------------------------------------- 
     271      !!                   ***  SUBROUTINE  iom_set_rstr_active  *** 
     272      !! 
     273      !! ** Purpose :  define file name in XIOS context for reading restart file, 
     274      !!               enable variables present in restart file for reading with XIOS  
     275      !!--------------------------------------------------------------------- 
     276 
    266277!sets enabled = .TRUE. for each field in restart file 
    267278   CHARACTER(len=256) :: rst_file 
     
    286297             par_access="collective", enabled=.TRUE., mode="read",                 & 
    287298             output_freq=xios_timestep) 
    288 !defin files for restart context 
     299!define variables for restart context 
    289300        DO i = 1, max_rst_fields 
    290301         IF( TRIM(rst_rfields(i)%vname) /= "NO_NAME") THEN 
     
    312323 
    313324   SUBROUTINE iom_set_rstw_core(cdmdl) 
    314    CHARACTER (len=*), INTENT (IN) :: cdmdl 
     325      !!--------------------------------------------------------------------- 
     326      !!                   ***  SUBROUTINE  iom_set_rstw_core  *** 
     327      !! 
     328      !! ** Purpose :  set variables which are always in restart file  
     329      !!--------------------------------------------------------------------- 
     330   CHARACTER (len=*), INTENT (IN) :: cdmdl ! model OPA or SAS 
    315331    
    316332   IF(cdmdl == "OPA") THEN 
     
    350366 
    351367   SUBROUTINE iom_set_rst_vars(fields) 
    352 !set names for variables in restart file 
     368      !!--------------------------------------------------------------------- 
     369      !!                   ***  SUBROUTINE  iom_set_rstr_active  *** 
     370      !! 
     371      !! ** Purpose :  Fill array fields with the information about all  
     372      !!               possible variables and corresponding grids definition  
     373      !!               for reading/writing restart with XIOS 
     374      !!--------------------------------------------------------------------- 
    353375   TYPE(RST_FIELD), INTENT(INOUT) :: fields(max_rst_fields) 
     376 
    354377   INTEGER :: i 
    355378        i = 0 
     
    460483 
    461484   SUBROUTINE iom_set_rstw_active(cdrst_file) 
     485      !!--------------------------------------------------------------------- 
     486      !!                   ***  SUBROUTINE  iom_set_rstr_active  *** 
     487      !! 
     488      !! ** Purpose :  define file name in XIOS context for writing restart 
     489      !!               enable variables present in restart file for writing 
     490      !!--------------------------------------------------------------------- 
    462491!sets enabled = .TRUE. for each field in restart file 
    463492   CHARACTER(len=*) :: cdrst_file 
     
    507536 
    508537   SUBROUTINE iom_set_rst_context( )  
     538     !!--------------------------------------------------------------------- 
     539      !!                   ***  SUBROUTINE  iom_set_rstr_active  *** 
     540      !! 
     541      !! ** Purpose : Define domain, axis and grid for restart (read/write)  
     542      !!              context  
     543      !!                
     544      !!--------------------------------------------------------------------- 
    509545#if defined key_iomput 
    510546   TYPE(xios_domaingroup)            :: domaingroup_hdl  
Note: See TracChangeset for help on using the changeset viewer.