Ignore:
Timestamp:
Jul 10, 2023, 1:40:39 AM (12 months ago)
Author:
yann meurdesoif
Message:

Suppress usage of preprocessing key CPP_XIOS.
Wrapper file is used to suppress XIOS symbol when xios is not linked and not used (-io ioipsl)
The CPP_XIOS key is replaced in model by "using_xios" boolean variable to switch between IOIPSL or XIOS output.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3dmem/mod_const_mpi.F90

    r4604 r4619  
    2323    USE mod_prism
    2424#endif
    25 #ifdef CPP_XIOS
    2625    USE wxios, only: wxios_init
    27 #endif
    2826    IMPLICIT NONE
    2927
     
    4442#ifdef CPP_COUPLE
    4543!$OMP MASTER
    46 #ifdef CPP_XIOS
    47         CALL wxios_init("LMDZ", outcom=COMM_LMDZ, type_ocean=type_ocean)
    48 #else
    49         CALL prism_init_comp_proto (comp_id, 'LMDZ', ierr)
    50         CALL prism_get_localcomm_proto(COMM_LMDZ,ierr)
    51 #endif
     44        IF (using_xios) THEN
     45          CALL wxios_init("LMDZ", outcom=COMM_LMDZ, type_ocean=type_ocean)
     46        ELSE
     47          CALL prism_init_comp_proto (comp_id, 'LMDZ', ierr)
     48          CALL prism_get_localcomm_proto(COMM_LMDZ,ierr)
     49        ENDIF
    5250!$OMP END MASTER
    5351#endif
     
    6159  SUBROUTINE Init_mpi
    6260    USE lmdz_mpi
     61    USE wxios, only: wxios_init, using_xios
    6362
    64 #ifdef CPP_XIOS
    65     USE wxios, only: wxios_init
    66 #endif
    6763  IMPLICIT NONE
    6864    INTEGER             :: ierr
     
    8379! Initialisation de XIOS
    8480!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    85 #ifdef CPP_XIOS
    86       WRITE(*,*)'IN Init_mpi call wxios_init'
    87       CALL wxios_init("LMDZ", outcom=COMM_LMDZ)
    88 #endif
     81      IF (using_xios) THEN
     82        WRITE(*,*)'IN Init_mpi call wxios_init'
     83        CALL wxios_init("LMDZ", outcom=COMM_LMDZ)
     84      ENDIF
    8985!$OMP END MASTER
    9086
Note: See TracChangeset for help on using the changeset viewer.