Ignore:
Timestamp:
Jul 10, 2023, 1:40:39 AM (19 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/phylmdiso
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmdiso/limit_read_mod.F90

    r4143 r4619  
    4040  USE surface_data
    4141  USE mod_phys_lmdz_para
    42 #ifdef CPP_XIOS
    43   USE XIOS
    44 #endif
     42  USE lmdz_xios
    4543  IMPLICIT NONE
    4644    INTEGER, INTENT(IN) :: first_day
     
    4947    IF ( type_ocean /= 'couple') THEN
    5048      IF (grid_type==unstructured) THEN
    51 #ifdef CPP_XIOS
    52         IF (is_omp_master) CALL xios_set_file_attr("limit_read",enabled=.TRUE.,record_offset=first_day)
    53 #endif
     49          IF (is_omp_master) CALL xios_set_file_attr("limit_read",enabled=.TRUE.,record_offset=first_day)
    5450      ENDIF 
    5551    ENDIF
     
    288284    USE phys_cal_mod, ONLY : calend, year_len
    289285    USE print_control_mod, ONLY: lunout, prt_level
    290 #ifdef CPP_XIOS
    291     USE XIOS, ONLY: xios_recv_field
    292 #endif
     286    USE lmdz_XIOS, ONLY: xios_recv_field
    293287   
    294288    IMPLICIT NONE
     
    416410      IF (grid_type==unstructured) THEN
    417411
    418 #ifdef CPP_XIOS
    419412        IF ( type_ocean /= 'couple') THEN
    420413
     
    450443          CALL Scatter_omp(rug_mpi, rugos)
    451444       END IF
    452 #endif
    453 
    454  
     445
    455446     ELSE      ! grid_type==regular
    456447
  • LMDZ6/trunk/libf/phylmdiso/pbl_surface_mod.F90

    r4531 r4619  
    412412    use phys_output_var_mod, only: tkt, tks, taur, sss
    413413    use blowing_snow_ini_mod, only : zeta_bs
    414 #ifdef CPP_XIOS
    415     USE wxios, ONLY: missing_val
    416 #else
    417     use netcdf, only: missing_val => nf90_fill_real
    418 #endif
    419 
    420      
    421 
     414    USE wxios, ONLY: missing_val_xios => missing_val, using_xios
     415    use netcdf, only: nf90_fill_real
    422416
    423417    IMPLICIT NONE
     
    944938    REAL, DIMENSION(klon)       :: uzon_w, vmer_w, speed_w, zri1_w, pref_w !speed_w, zri1_w, pref_w, added by Fuxing WANG, 04/03/2015
    945939    REAL, DIMENSION(klon)       :: zgeo1_w, tair1_w, qair1_w, tairsol_w
    946 
     940   
    947941!!! jyg le 25/03/2013
    948942!!    Variables intermediaires pour le raccord des deux colonnes \`a la surface
     
    10511045    ! compression of delta_sst, delta_sal, ds_ns, dt_ns, dter, dser,
    10521046    ! dt_ds, tkt, tks, taur, sss on ocean points
    1053 
     1047    REAL :: missing_val
    10541048#ifdef ISO
    10551049    REAL, DIMENSION(klon)       :: h1
     
    10631057! End of declarations
    10641058!****************************************************************************************
    1065 
     1059   
    10661060      IF (prt_level >=10) print *,' -> pbl_surface, itap ',itap
     1061     
     1062      IF (using_xios) THEN
     1063        missing_val = missing_val_xios
     1064      ELSE
     1065        missing_val = nf90_fill_real
     1066      ENDIF
    10671067!
    10681068!!jyg      iflag_split = mod(iflag_pbl_split,2)
  • LMDZ6/trunk/libf/phylmdiso/phyaqua_mod.F90

    r3927 r4619  
    536536    USE mod_phys_lmdz_para, ONLY: is_omp_master, klon_mpi
    537537    USE mod_phys_lmdz_transfert_para, ONLY: gather_omp
    538 #ifdef CPP_XIOS
    539     USE xios
    540 #endif
     538    USE lmdz_xios
    541539    IMPLICIT NONE
    542540
     
    558556      ! on the whole physics grid
    559557 
    560 #ifdef CPP_XIOS
    561558    PRINT *, 'writelim: Ecriture du fichier limit'
    562559
     
    584581    CALL gather_omp(phy_rug, phy_mpi)
    585582    IF (is_omp_master) CALL xios_send_field('rug_limout',phy_mpi)
    586 #endif
     583
    587584  END SUBROUTINE writelim_unstruct
    588585
  • LMDZ6/trunk/libf/phylmdiso/phyetat0_mod.F90

    r4613 r4619  
    4747  USE ocean_slab_mod,   ONLY: nslay, tslab, seaice, tice, ocean_slab_init
    4848  USE time_phylmdz_mod, ONLY: init_iteration, pdtphys, itau_phy
    49 #ifdef CPP_XIOS
    50   USE wxios, ONLY: missing_val
    51 #else
    52   use netcdf, only: missing_val => nf90_fill_real
    53 #endif
     49  USE wxios, ONLY: missing_val_xios => missing_val, using_xios
     50  use netcdf, only:  nf90_fill_real
    5451  use config_ocean_skin_m, only: activate_ocean_skin
    5552#ifdef ISO
     
    108105  REAL :: lon_startphy(klon), lat_startphy(klon)
    109106  CHARACTER(LEN=maxlen) :: tname, t(2)
    110 
     107  REAL :: missing_val
    111108#ifdef ISO
    112109  REAL xtsnow(niso,klon, nbsrf)
     
    119116
    120117  ! Ouvrir le fichier contenant l'etat initial:
     118  IF (using_xios) THEN
     119    missing_val = missing_val_xios
     120  ELSE
     121    missing_val =  nf90_fill_real
     122  ENDIF
    121123
    122124  CALL open_startphy(fichnom)
  • LMDZ6/trunk/libf/phylmdiso/phys_output_mod.F90

    r4524 r4619  
    4747    USE vertical_layers_mod, ONLY: ap,bp,preff,presnivs, aps, bps, pseudoalt
    4848    USE time_phylmdz_mod, ONLY: day_ini, itau_phy, start_time, annee_ref, day_ref
    49 #ifdef CPP_XIOS
    5049    ! ug Pour les sorties XIOS
    5150    USE wxios
    52 #endif
    5351#ifdef ISO
    5452    USE isotopes_mod, ONLY: isoName,iso_HTO
     
    140138    REAL, DIMENSION(klev+1)   :: lev_index
    141139               
    142 #ifdef CPP_XIOS
    143140    ! ug Variables utilis\'ees pour r\'ecup\'erer le calendrier pour xios
    144141    INTEGER :: x_an, x_mois, x_jour
     
    146143    INTEGER :: ini_an, ini_mois, ini_jour
    147144    REAL :: ini_heure
    148 #endif
    149145    INTEGER                         :: ISW
    150146    REAL, DIMENSION(NSW)            :: wl1_sun, wl2_sun !wavelength bounds (in um) for SW
     
    326322     ENDIF
    327323
    328 #ifdef CPP_XIOS
    329     ! ug R\'eglage du calendrier xios
    330     !Temps julian => an, mois, jour, heure
    331     CALL ju2ymds(zjulian, x_an, x_mois, x_jour, x_heure)
    332     CALL ju2ymds(zjulian_start, ini_an, ini_mois, ini_jour, ini_heure)
    333     CALL wxios_set_cal(dtime, calend, x_an, x_mois, x_jour, x_heure, ini_an, &
    334                        ini_mois, ini_jour, ini_heure )
    335 #endif
     324    IF (using_xios) THEN
     325      ! ug R\'eglage du calendrier xios
     326      !Temps julian => an, mois, jour, heure
     327      CALL ju2ymds(zjulian, x_an, x_mois, x_jour, x_heure)
     328      CALL ju2ymds(zjulian_start, ini_an, ini_mois, ini_jour, ini_heure)
     329      CALL wxios_set_cal(dtime, calend, x_an, x_mois, x_jour, x_heure, ini_an, &
     330                         ini_mois, ini_jour, ini_heure )
     331    ENDIF
    336332
    337333!!!!!!!!!!!!!!!!!!!!!!! Boucle sur les fichiers !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    366362
    367363
    368 #ifdef CPP_XIOS
     364    IF (using_xios) THEN
    369365!!! Ouverture de chaque fichier XIOS !!!!!!!!!!!
    370     IF (.not. ok_all_xml) THEN
     366      IF (.not. ok_all_xml) THEN
     367        IF (prt_level >= 10) THEN
     368         print*,'phys_output_open: call wxios_add_file with phys_out_filenames(iff)=',trim(phys_out_filenames(iff))   
     369        ENDIF
     370        CALL wxios_add_file(phys_out_filenames(iff),chtimestep(iff),lev_files(iff)) 
     371      ENDIF
     372
     373!!! Declaration des axes verticaux de chaque fichier:
    371374      IF (prt_level >= 10) THEN
    372         print*,'phys_output_open: call wxios_add_file with phys_out_filenames(iff)=',trim(phys_out_filenames(iff))   
     375        print*,'phys_output_open: Declare vertical axes for each file'
    373376      ENDIF
    374       CALL wxios_add_file(phys_out_filenames(iff),chtimestep(iff),lev_files(iff)) 
    375     ENDIF
    376 
    377 !!! Declaration des axes verticaux de chaque fichier:
    378     IF (prt_level >= 10) THEN
    379       print*,'phys_output_open: Declare vertical axes for each file'
    380     ENDIF
    381 
    382    IF (iff.LE.6.OR.iff.EQ.10) THEN
    383     CALL wxios_add_vaxis("presnivs", &
    384             levmax(iff) - levmin(iff) + 1, presnivs(levmin(iff):levmax(iff)))
    385     CALL wxios_add_vaxis("Ahyb", &
     377
     378      IF (iff.LE.6.OR.iff.EQ.10) THEN
     379        CALL wxios_add_vaxis("presnivs", &
     380             levmax(iff) - levmin(iff) + 1, presnivs(levmin(iff):levmax(iff)))
     381        CALL wxios_add_vaxis("Ahyb", &
    386382            levmax(iff) - levmin(iff) + 1, aps(levmin(iff):levmax(iff)), positif='down', &
    387383            bnds=Ahyb_bounds(levmin(iff):levmax(iff),:))
    388     CALL wxios_add_vaxis("Bhyb", &
     384        CALL wxios_add_vaxis("Bhyb", &
    389385            levmax(iff) - levmin(iff) + 1, bps(levmin(iff):levmax(iff)), positif='down', &
    390386            bnds=Bhyb_bounds(levmin(iff):levmax(iff),:))
    391     CALL wxios_add_vaxis("klev", levmax(iff) - levmin(iff) + 1, &
     387        CALL wxios_add_vaxis("klev", levmax(iff) - levmin(iff) + 1, &
    392388                          lev_index(levmin(iff):levmax(iff)))
    393     CALL wxios_add_vaxis("klevp1", klev+1, &
     389        CALL wxios_add_vaxis("klevp1", klev+1, &
    394390                          lev_index(1:klev+1))
    395     CALL wxios_add_vaxis("bnds", 2, (/1.,2./))
    396 
    397     CALL wxios_add_vaxis("Alt", &
     391        CALL wxios_add_vaxis("bnds", 2, (/1.,2./))
     392
     393        CALL wxios_add_vaxis("Alt", &
    398394            levmax(iff) - levmin(iff) + 1, pseudoalt)
    399 
    400     ! wl1_sun/wl2_sun: minimum/maximum bound of wavelength (in um)
    401     SELECT CASE(NSW)
    402       CASE(6)
    403         wl1_sun(1:6) = [0.180, 0.250, 0.440, 0.690, 1.190, 2.380]
    404         wl2_sun(1:6) = [0.250, 0.440, 0.690, 1.190, 2.380, 4.000]
    405       CASE(2)
    406         wl1_sun(1:2) = [0.250, 0.690]
    407         wl2_sun(1:2) = [0.690, 4.000]
    408     END SELECT
    409 
    410     DO ISW=1, NSW
    411      wn1_sun(ISW)=1.e+6/wl1_sun(ISW)
    412      wn2_sun(ISW)=1.e+6/wl2_sun(ISW)
    413      spbnds_sun(ISW,1)=wn2_sun(ISW)
    414      spbnds_sun(ISW,2)=wn1_sun(ISW)
    415      spectband(ISW)=(wn1_sun(ISW)+wn2_sun(ISW))/2
    416     ENDDO
     395 
     396        ! wl1_sun/wl2_sun: minimum/maximum bound of wavelength (in um)
     397        SELECT CASE(NSW)
     398          CASE(6)
     399          wl1_sun(1:6) = [0.180, 0.250, 0.440, 0.690, 1.190, 2.380]
     400          wl2_sun(1:6) = [0.250, 0.440, 0.690, 1.190, 2.380, 4.000]
     401        CASE(2)
     402          wl1_sun(1:2) = [0.250, 0.690]
     403          wl2_sun(1:2) = [0.690, 4.000]
     404        END SELECT
     405
     406        DO ISW=1, NSW
     407          wn1_sun(ISW)=1.e+6/wl1_sun(ISW)
     408          wn2_sun(ISW)=1.e+6/wl2_sun(ISW)
     409          spbnds_sun(ISW,1)=wn2_sun(ISW)
     410          spbnds_sun(ISW,2)=wn1_sun(ISW)
     411          spectband(ISW)=(wn1_sun(ISW)+wn2_sun(ISW))/2
     412        ENDDO
    417413!
    418414!!! ajout axe vertical spectband : solar band number
    419     CALL wxios_add_vaxis("spectband", NSW, spectband, positif='down')
    420    ELSE
     415        CALL wxios_add_vaxis("spectband", NSW, spectband, positif='down')
     416      ELSE
    421417    ! NMC files
    422     CALL wxios_add_vaxis("plev", &
     418        CALL wxios_add_vaxis("plev", &
    423419            levmax(iff) - levmin(iff) + 1, rlevSTD(levmin(iff):levmax(iff)))
    424    ENDIF
    425 #endif
     420      ENDIF
     421    ENDIF
    426422
    427423        IF (clef_files(iff)) THEN
  • LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90

    r4613 r4619  
    7676    USE vampir
    7777    USE write_field_phy
    78 #ifdef CPP_XIOS
    79     USE wxios, ONLY: g_ctx, wxios_set_context
    80 #endif
     78    USE wxios, ONLY: g_ctx, wxios_set_context, using_xios
    8179    USE lscp_mod, ONLY : lscp
    8280    USE lmdz_wake_ini, ONLY : wake_ini
     
    134132
    135133
    136 #ifdef CPP_XIOS
    137     USE xios, ONLY: xios_update_calendar, xios_context_finalize
    138     USE xios, ONLY: xios_get_field_attr, xios_field_is_active, xios_context
    139     USE xios, ONLY: xios_set_current_context
    140     USE wxios, ONLY: missing_val, missing_val_omp
    141 #endif
     134    USE lmdz_xios, ONLY: xios_update_calendar, xios_context_finalize
     135    USE lmdz_xios, ONLY: xios_get_field_attr, xios_field_is_active, xios_context
     136    USE lmdz_xios, ONLY: xios_set_current_context
     137    USE wxios, ONLY: missing_val_xios => missing_val
     138
    142139#ifndef CPP_XIOS
    143140    USE paramLMDZ_phy_mod
     
    13261323    real xtql1(ntraciso,klon),xtql2(ntraciso,klon),corrxtql(ntraciso)
    13271324#endif
    1328 
     1325   
    13291326    REAL pi
    13301327
     
    13431340    CALL update_time(pdtphys)
    13441341    phys_tstep=NINT(pdtphys)
     1342    IF (.NOT. using_xios) missing_val=nf90_fill_real
    13451343#ifdef CPP_XIOS
    13461344! switch to XIOS LMDZ physics context
     
    21502148       !=============================================================
    21512149
    2152 #ifdef CPP_XIOS
    2153        ! Get "missing_val" value from XML files (from temperature variable)
    2154        !$OMP MASTER
    2155        CALL xios_get_field_attr("temp",default_value=missing_val_omp)
    2156        !$OMP END MASTER
    2157        !$OMP BARRIER
    2158        missing_val=missing_val_omp
    2159 #endif
    2160 
    2161 #ifdef CPP_XIOS
     2150       IF (using_xios) THEN   
     2151         ! Get "missing_val" value from XML files (from temperature variable)
     2152         IF (is_omp_master) CALL xios_get_field_attr("temp",default_value=missing_val)
     2153         CALL bcast_omp(missing_val)
     2154       ENDIF
     2155
     2156      IF (using_xios) THEN
    21622157! Need to put this initialisation after phyetat0 as in the coupled model the XIOS context is only
    21632158! initialised at that moment
    21642159       ! Get "missing_val" value from XML files (from temperature variable)
    2165        !$OMP MASTER
    2166        CALL xios_get_field_attr("temp",default_value=missing_val_omp)
    2167        !$OMP END MASTER
    2168        !$OMP BARRIER
    2169        missing_val=missing_val_omp
     2160        IF (is_omp_master) CALL xios_get_field_attr("temp",default_value=missing_val)
     2161        CALL bcast_omp(missing_val)
     2162       
    21702163       !
    21712164       ! Now we activate some double radiation call flags only if some
     
    22082201       CALL bcast(dryaod_diag)
    22092202       CALL bcast(ok_4xCO2atm)
    2210 #endif
     2203
     2204     ENDIF !using_xios
     2205
    22112206       !
    22122207       CALL printflag( tabcntr0,radpas,ok_journe, &
     
    57735768          cool = cool + betalwoff * (cool0 - cool)
    57745769 
    5775 #ifndef CPP_XIOS
    5776           !
    5777           !IM 2eme calcul radiatif pour le cas perturbe ou au moins un
    5778           !IM des taux doit etre different du taux actuel
    5779           !IM Par defaut on a les taux perturbes egaux aux taux actuels
    5780           !
    5781           IF (RCO2_per.NE.RCO2_act.OR. &
    5782               RCH4_per.NE.RCH4_act.OR. &
    5783               RN2O_per.NE.RN2O_act.OR. &
    5784               RCFC11_per.NE.RCFC11_act.OR. &
    5785               RCFC12_per.NE.RCFC12_act) ok_4xCO2atm =.TRUE.
    5786 #endif
     5770          IF (.NOT. using_xios) THEN
     5771            !
     5772            !IM 2eme calcul radiatif pour le cas perturbe ou au moins un
     5773            !IM des taux doit etre different du taux actuel
     5774            !IM Par defaut on a les taux perturbes egaux aux taux actuels
     5775            !
     5776            IF (RCO2_per.NE.RCO2_act.OR. &
     5777                RCH4_per.NE.RCH4_act.OR. &
     5778                RN2O_per.NE.RN2O_act.OR. &
     5779                RCFC11_per.NE.RCFC11_act.OR. &
     5780                RCFC12_per.NE.RCFC12_act) ok_4xCO2atm =.TRUE.
     5781          ENDIF
    57875782   !
    57885783          IF (ok_4xCO2atm) THEN
     
    70057000! Pour XIOS : On remet des variables a .false. apres un premier appel
    70067001    IF (debut) THEN
    7007 #ifdef CPP_XIOS
    7008       swaero_diag=.FALSE.
    7009       swaerofree_diag=.FALSE.
    7010       dryaod_diag=.FALSE.
    7011       ok_4xCO2atm= .FALSE.
    7012 !      write (lunout,*)'ok_4xCO2atm= ',swaero_diag, swaerofree_diag, dryaod_diag, ok_4xCO2atm
    7013 
    7014       IF (is_master) THEN
    7015         !--setting up swaero_diag to TRUE in XIOS case
    7016         IF (xios_field_is_active("topswad").OR.xios_field_is_active("topswad0").OR. &
    7017            xios_field_is_active("solswad").OR.xios_field_is_active("solswad0").OR. &
    7018            xios_field_is_active("topswai").OR.xios_field_is_active("solswai").OR.  &
    7019              (iflag_rrtm==1.AND.(xios_field_is_active("toplwad").OR.xios_field_is_active("toplwad0").OR. &
    7020                                  xios_field_is_active("sollwad").OR.xios_field_is_active("sollwad0"))))  &
    7021            !!!--for now these fields are not in the XML files so they are omitted
    7022            !!!  xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) &
    7023            swaero_diag=.TRUE.
    7024 
    7025         !--setting up swaerofree_diag to TRUE in XIOS case
    7026         IF (xios_field_is_active("SWdnSFCcleanclr").OR.xios_field_is_active("SWupSFCcleanclr").OR. &
    7027            xios_field_is_active("SWupTOAcleanclr").OR.xios_field_is_active("rsucsaf").OR.   &
    7028            xios_field_is_active("rsdcsaf") .OR. xios_field_is_active("LWdnSFCcleanclr").OR. &
    7029            xios_field_is_active("LWupTOAcleanclr")) &
    7030            swaerofree_diag=.TRUE.
    7031 
    7032         !--setting up dryaod_diag to TRUE in XIOS case
    7033         DO naero = 1, naero_tot-1
    7034          IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE.
    7035         ENDDO
    7036         !
    7037         !--setting up ok_4xCO2atm to TRUE in XIOS case
    7038         IF (xios_field_is_active("rsut4co2").OR.xios_field_is_active("rlut4co2").OR. &
    7039            xios_field_is_active("rsutcs4co2").OR.xios_field_is_active("rlutcs4co2").OR. &
    7040            xios_field_is_active("rsu4co2").OR.xios_field_is_active("rsucs4co2").OR. &
    7041            xios_field_is_active("rsd4co2").OR.xios_field_is_active("rsdcs4co2").OR. &
    7042            xios_field_is_active("rlu4co2").OR.xios_field_is_active("rlucs4co2").OR. &
    7043            xios_field_is_active("rld4co2").OR.xios_field_is_active("rldcs4co2")) &
    7044            ok_4xCO2atm=.TRUE.
    7045       ENDIF
    7046       !$OMP BARRIER
    7047       CALL bcast(swaero_diag)
    7048       CALL bcast(swaerofree_diag)
    7049       CALL bcast(dryaod_diag)
    7050       CALL bcast(ok_4xCO2atm)
    7051 !      write (lunout,*)'ok_4xCO2atm= ',swaero_diag, swaerofree_diag, dryaod_diag, ok_4xCO2atm
    7052 #endif
     7002
     7003      IF (using_xios) THEN
     7004        swaero_diag=.FALSE.
     7005        swaerofree_diag=.FALSE.
     7006        dryaod_diag=.FALSE.
     7007        ok_4xCO2atm= .FALSE.
     7008!       write (lunout,*)'ok_4xCO2atm= ',swaero_diag, swaerofree_diag, dryaod_diag, ok_4xCO2atm
     7009
     7010        IF (is_master) THEN
     7011          !--setting up swaero_diag to TRUE in XIOS case
     7012          IF (xios_field_is_active("topswad").OR.xios_field_is_active("topswad0").OR. &
     7013             xios_field_is_active("solswad").OR.xios_field_is_active("solswad0").OR. &
     7014             xios_field_is_active("topswai").OR.xios_field_is_active("solswai").OR.  &
     7015               (iflag_rrtm==1.AND.(xios_field_is_active("toplwad").OR.xios_field_is_active("toplwad0").OR. &
     7016                                   xios_field_is_active("sollwad").OR.xios_field_is_active("sollwad0"))))  &
     7017             !!!--for now these fields are not in the XML files so they are omitted
     7018             !!!  xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) &
     7019             swaero_diag=.TRUE.
     7020
     7021          !--setting up swaerofree_diag to TRUE in XIOS case
     7022          IF (xios_field_is_active("SWdnSFCcleanclr").OR.xios_field_is_active("SWupSFCcleanclr").OR. &
     7023             xios_field_is_active("SWupTOAcleanclr").OR.xios_field_is_active("rsucsaf").OR.   &
     7024             xios_field_is_active("rsdcsaf") .OR. xios_field_is_active("LWdnSFCcleanclr").OR. &
     7025             xios_field_is_active("LWupTOAcleanclr")) &
     7026             swaerofree_diag=.TRUE.
     7027
     7028          !--setting up dryaod_diag to TRUE in XIOS case
     7029          DO naero = 1, naero_tot-1
     7030           IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE.
     7031          ENDDO
     7032          !
     7033          !--setting up ok_4xCO2atm to TRUE in XIOS case
     7034          IF (xios_field_is_active("rsut4co2").OR.xios_field_is_active("rlut4co2").OR. &
     7035             xios_field_is_active("rsutcs4co2").OR.xios_field_is_active("rlutcs4co2").OR. &
     7036             xios_field_is_active("rsu4co2").OR.xios_field_is_active("rsucs4co2").OR. &
     7037             xios_field_is_active("rsd4co2").OR.xios_field_is_active("rsdcs4co2").OR. &
     7038             xios_field_is_active("rlu4co2").OR.xios_field_is_active("rlucs4co2").OR. &
     7039             xios_field_is_active("rld4co2").OR.xios_field_is_active("rldcs4co2")) &
     7040             ok_4xCO2atm=.TRUE.
     7041        ENDIF
     7042        !$OMP BARRIER
     7043        CALL bcast(swaero_diag)
     7044        CALL bcast(swaerofree_diag)
     7045        CALL bcast(dryaod_diag)
     7046        CALL bcast(ok_4xCO2atm)
     7047!        write (lunout,*)'ok_4xCO2atm= ',swaero_diag, swaerofree_diag, dryaod_diag, ok_4xCO2atm
     7048      ENDIF !using_xios
    70537049    ENDIF
    70547050
     
    71127108       
    71137109       ENDIF
    7114 #ifdef CPP_XIOS
    7115        IF (is_omp_master) CALL xios_context_finalize
     7110       
     7111       IF (using_xios) THEN
     7112         IF (is_omp_master) CALL xios_context_finalize
    71167113
    71177114#ifdef INCA
    7118        if (type_trac == 'inca') then
    7119           IF (is_omp_master .and. grid_type==unstructured) THEN
    7120              CALL finalize_inca
    7121           ENDIF
    7122        endif
    7123 #endif
    7124 
    7125 #endif
     7115         if (type_trac == 'inca') then
     7116            IF (is_omp_master .and. grid_type==unstructured) THEN
     7117               CALL finalize_inca
     7118            ENDIF
     7119         endif
     7120#endif
     7121       ENDIF !using_xios
    71267122       WRITE(lunout,*) ' physiq fin, nombre de steps ou cvpas = 1 : ', Ncvpaseq1
    71277123    ENDIF
Note: See TracChangeset for help on using the changeset viewer.