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 14243 for utils – NEMO

Changeset 14243 for utils


Ignore:
Timestamp:
2020-12-23T09:59:45+01:00 (3 years ago)
Author:
smasson
Message:

trunk: replace key_iomput by key_xios

File:
1 edited

Legend:

Unmodified
Added
Removed
  • utils/tools/DOMAINcfg/src/iom.F90

    r12414 r14243  
    2626   USE in_out_manager  ! I/O manager 
    2727   USE lib_mpp           ! MPP library 
    28 #if defined key_iomput 
     28#if defined key_xios 
    2929   USE sbc_oce  , ONLY :   nn_fsbc         ! ocean space and time domain 
    3030   USE trc_oce  , ONLY :   nn_dttrc        !  !: frequency of step on passive tracers 
     
    4646   PUBLIC   !   must be public to be able to access iom_def through iom 
    4747    
    48 #if defined key_iomput 
     48#if defined key_xios 
    4949   LOGICAL, PUBLIC, PARAMETER ::   lk_iomput = .TRUE.        !: iom_put flag 
    5050#else 
     
    5858   PRIVATE iom_g0d, iom_g1d, iom_g2d, iom_g3d, iom_get_123d 
    5959   PRIVATE iom_p1d, iom_p2d, iom_p3d 
    60 #if defined key_iomput 
     60#if defined key_xios 
    6161   PRIVATE iom_set_domain_attr, iom_set_axis_attr, iom_set_field_attr, iom_set_file_attr, iom_get_file_attr, iom_set_grid_attr 
    6262   PRIVATE set_grid, set_grid_bounds, set_scalar, set_xmlatt, set_mooring, iom_update_file_name, iom_sdate 
     
    9898      CHARACTER(len=*), OPTIONAL, INTENT(in)  :: fname 
    9999      LOGICAL         , OPTIONAL, INTENT(in)  :: ld_tmppatch 
    100 #if defined key_iomput 
     100#if defined key_xios 
    101101      ! 
    102102      TYPE(xios_duration) :: dtime    = xios_duration(0, 0, 0, 0, 0, 0) 
     
    268268   CHARACTER(LEN=256) :: clinfo    ! info character 
    269269 
    270 #if defined key_iomput 
     270#if defined key_xios 
    271271   llis_set = .FALSE. 
    272272 
     
    284284   ENDIF 
    285285#else 
    286         clinfo = 'iom_set_rstw_var_active: key_iomput is needed to use XIOS restart read/write functionality' 
     286        clinfo = 'iom_set_rstw_var_active: key_xios is needed to use XIOS restart read/write functionality' 
    287287        CALL ctl_stop('STOP', TRIM(clinfo)) 
    288288#endif 
     
    301301   CHARACTER(len=256) :: rst_file 
    302302 
    303 #if defined key_iomput 
     303#if defined key_xios 
    304304   TYPE(xios_field) :: field_hdl 
    305305   TYPE(xios_file) :: file_hdl 
     
    476476!sets enabled = .TRUE. for each field in restart file 
    477477   CHARACTER(len=*) :: cdrst_file 
    478 #if defined key_iomput 
     478#if defined key_xios 
    479479   TYPE(xios_field) :: field_hdl 
    480480   TYPE(xios_file) :: file_hdl 
     
    531531!ld_rstr is true for restart context. There is no need to define grid for  
    532532!restart read, because it's read from file 
    533 #if defined key_iomput 
     533#if defined key_xios 
    534534   TYPE(xios_domaingroup)            :: domaingroup_hdl  
    535535   TYPE(xios_domain)                 :: domain_hdl  
     
    562562      !!--------------------------------------------------------------------- 
    563563      CHARACTER(len=*), INTENT(in) :: cdname 
    564 #if defined key_iomput 
     564#if defined key_xios 
    565565      TYPE(xios_context) :: nemo_hdl 
    566566 
     
    913913         ENDIF 
    914914      ELSE 
    915 #if defined key_iomput 
     915#if defined key_xios 
    916916         IF(lwp) WRITE(numout,*) 'XIOS RST READ (0D): ', trim(cdvar) 
    917917         CALL iom_swap( TRIM(crxios_context) ) 
     
    12671267         ! 
    12681268      ELSE        ! read using XIOS. Only if KEY_IOMPUT is defined 
    1269 #if defined key_iomput 
     1269#if defined key_xios 
    12701270!would be good to be able to check which context is active and swap only if current is not restart 
    12711271         CALL iom_swap( TRIM(crxios_context) )  
     
    14841484      IF(PRESENT(ldxios)) llx = ldxios 
    14851485      IF( llx ) THEN 
    1486 #ifdef key_iomput 
     1486#ifdef key_xios 
    14871487      IF( kt == kwrite ) THEN 
    14881488          IF(lwp) write(numout,*) 'RESTART: write (XIOS 0D) ',trim(cdvar) 
     
    15141514      IF(PRESENT(ldxios)) llx = ldxios 
    15151515      IF( llx ) THEN 
    1516 #ifdef key_iomput 
     1516#ifdef key_xios 
    15171517      IF( kt == kwrite ) THEN 
    15181518         IF(lwp) write(numout,*) 'RESTART: write (XIOS 1D) ',trim(cdvar) 
     
    15441544      IF(PRESENT(ldxios)) llx = ldxios 
    15451545      IF( llx ) THEN 
    1546 #ifdef key_iomput 
     1546#ifdef key_xios 
    15471547      IF( kt == kwrite ) THEN 
    15481548         IF(lwp) write(numout,*) 'RESTART: write (XIOS 2D) ',trim(cdvar) 
     
    15741574      IF(PRESENT(ldxios)) llx = ldxios 
    15751575      IF( llx ) THEN 
    1576 #ifdef key_iomput 
     1576#ifdef key_xios 
    15771577      IF( kt == kwrite ) THEN 
    15781578         IF(lwp) write(numout,*) 'RESTART: write (XIOS 3D) ',trim(cdvar) 
     
    16441644      REAL(wp)        , INTENT(in) ::   pfield0d 
    16451645      REAL(wp)        , DIMENSION(jpi,jpj) ::   zz     ! masson 
    1646 #if defined key_iomput 
     1646#if defined key_xios 
    16471647      zz(:,:)=pfield0d 
    16481648      CALL xios_send_field(cdname, zz) 
     
    16561656      CHARACTER(LEN=*)          , INTENT(in) ::   cdname 
    16571657      REAL(wp),     DIMENSION(:), INTENT(in) ::   pfield1d 
    1658 #if defined key_iomput 
     1658#if defined key_xios 
    16591659      CALL xios_send_field( cdname, RESHAPE( (/pfield1d/), (/1,1,SIZE(pfield1d)/) ) ) 
    16601660#else 
     
    16661666      CHARACTER(LEN=*)            , INTENT(in) ::   cdname 
    16671667      REAL(wp),     DIMENSION(:,:), INTENT(in) ::   pfield2d 
    1668 #if defined key_iomput 
     1668#if defined key_xios 
    16691669      CALL xios_send_field(cdname, pfield2d) 
    16701670#else 
     
    16761676      CHARACTER(LEN=*)                , INTENT(in) ::   cdname 
    16771677      REAL(wp),       DIMENSION(:,:,:), INTENT(in) ::   pfield3d 
    1678 #if defined key_iomput 
     1678#if defined key_xios 
    16791679      CALL xios_send_field( cdname, pfield3d ) 
    16801680#else 
     
    16831683   END SUBROUTINE iom_p3d 
    16841684 
    1685 #if defined key_iomput 
     1685#if defined key_xios 
    16861686   !!---------------------------------------------------------------------- 
    1687    !!   'key_iomput'                                         XIOS interface 
     1687   !!   'key_xios'                                         XIOS interface 
    16881688   !!---------------------------------------------------------------------- 
    16891689 
     
    23612361#else 
    23622362   !!---------------------------------------------------------------------- 
    2363    !!   NOT 'key_iomput'                               a few dummy routines 
     2363   !!   NOT 'key_xios'                               a few dummy routines 
    23642364   !!---------------------------------------------------------------------- 
    23652365 
     
    23822382      CHARACTER(LEN=*), INTENT(in) ::   cdname 
    23832383      !!---------------------------------------------------------------------- 
    2384 #if defined key_iomput 
     2384#if defined key_xios 
    23852385      iom_use = xios_field_is_active( cdname ) 
    23862386#else 
Note: See TracChangeset for help on using the changeset viewer.