Ignore:
Timestamp:
Jul 10, 2023, 1:40:39 AM (15 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

Location:
LMDZ6/trunk/libf/dynphy_lonlat/phylmd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dynphy_lonlat/phylmd/callphysiq_mod.F90

    r4146 r4619  
    2222  USE control_mod, ONLY: planet_type, ok_dyn_xios
    2323  USE physiq_mod, ONLY: physiq
    24 #ifdef CPP_XIOS
    25   USE mod_xios_dyn3dmem, ONLY : dyn3d_ctx_handle
    26   USE xios, ONLY : xios_set_current_context
    27 #endif
     24  USE lmdz_xios, ONLY : xios_set_current_context, xios_get_current_context, xios_context
    2825  IMPLICIT NONE
    2926
     
    5653  REAL,INTENT(OUT) :: zdqfi_omp(klon,llm,nqtot) ! tendency on tracers
    5754  REAL,INTENT(OUT) :: zdpsrf_omp(klon) ! tendency on surface pressure
    58  
     55  TYPE(xios_context) :: dyn3d_ctx_handle
     56
    5957  ! Local variables
    6058  CHARACTER(len=11) :: modname="call_physiq"
     
    7068  ENDIF
    7169
     70  !$OMP MASTER
     71  if (ok_dyn_xios) then
     72     CALL xios_get_current_context(dyn3d_ctx_handle)
     73  endif
     74  !$OMP END MASTER
    7275
    7376! Call physics package with required inputs/outputs
     
    9598
    9699! switching back to LMDZDYN context
    97 #ifdef CPP_XIOS
    98100!$OMP MASTER
    99101  if (ok_dyn_xios) then
     
    101103  endif
    102104!$OMP END MASTER
    103 #endif 
    104105
    105106
  • LMDZ6/trunk/libf/dynphy_lonlat/phylmd/ce0l.F90

    r4600 r4619  
    3636  USE mod_hallo,      ONLY: init_mod_hallo
    3737  USE mod_interface_dyn_phys, ONLY: init_interface_dyn_phys
    38 #ifdef CPP_XIOS
    39   USE xios, only: xios_finalize
    40 #endif
     38  USE lmdz_xios, only: xios_finalize
    4139#endif
    4240
     
    250248#ifdef CPP_PARA
    251249  END IF
    252 #ifdef CPP_XIOS
    253   CALL xios_finalize
    254 #endif
     250  IF (using_xios) CALL xios_finalize
    255251  IF (using_mpi) call MPI_FINALIZE(ierr)
    256252#endif
Note: See TracChangeset for help on using the changeset viewer.