Ignore:
Timestamp:
Oct 22, 2024, 12:31:08 PM (5 weeks ago)
Author:
abarral
Message:

Wrap uses of cpp key INCA
Add INCA wrapper

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3d_common/infotrac.F90

    r5237 r5251  
    121121   USE CHEM_REP, ONLY: Init_chem_rep_trac
    122122#endif
     123   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA
    123124   IMPLICIT NONE
    124125!==============================================================================================================================
     
    147148! Local variables
    148149   INTEGER, ALLOCATABLE :: hadv(:), vadv(:)                          !--- Horizontal/vertical transport scheme number
    149 #ifdef INCA
    150150   INTEGER, ALLOCATABLE :: had (:), hadv_inca(:), conv_flg_inca(:), &!--- Variables specific to INCA
    151151                           vad (:), vadv_inca(:),  pbl_flg_inca(:)
    152152   CHARACTER(LEN=8), ALLOCATABLE :: solsym_inca(:)                   !--- Tracers names for INCA
    153153   INTEGER :: nqINCA
    154 #endif
    155154   CHARACTER(LEN=2)      ::   suff(9)                                !--- Suffixes for schemes of order 3 or 4 (Prather)
    156155   CHARACTER(LEN=3)      :: descrq(30)                               !--- Advection scheme description tags
     
    199198   SELECT CASE(type_trac)
    200199      CASE('inca', 'inco')
    201 #ifndef INCA
     200IF (.NOT. CPPKEY_INCA) THEN
    202201         CALL abort_gcm(modname, 'You must add cpp key INCA and compile with INCA code', 1)
    203 #endif
     202END IF
    204203      CASE('repr')
    205204#ifndef REPROBUS
     
    232231   IF(fType == 1 .AND. ANY(['inca', 'inco'] == type_trac)) THEN      !=== FOUND OLD STYLE INCA "traceur.def"
    233232   !---------------------------------------------------------------------------------------------------------------------------
    234 #ifdef INCA
     233IF (CPPKEY_INCA) THEN
    235234      nqo = SIZE(tracers) - nqCO2
    236235      CALL Init_chem_inca_trac(nqINCA)                               !--- Get nqINCA from INCA
     
    263262      IF(setGeneration(tracers)) CALL abort_gcm(modname,'See above',1) !- SET FIELDS %iGeneration, %gen0Name
    264263      DEALLOCATE(had, hadv_inca, vad, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)
    265 #endif
     264END IF
    266265   !---------------------------------------------------------------------------------------------------------------------------
    267266   ELSE                                                              !=== OTHER CASES (OLD OR NEW FORMAT, NO INCA MODULE)
     
    271270   nbtr = nqtrue-COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%gen0Name) == 'H2O')     !--- Passed to phytrac
    272271   nqCO2  =      COUNT( [type_trac == 'inco', type_trac == 'co2i'] )
    273 #ifdef INCA
     272IF (CPPKEY_INCA) THEN
    274273   nqINCA =      COUNT(tracers(:)%component == 'inca')
    275 #endif
     274END IF
    276275   IF(getKey('hadv', hadv, ky=tracers(:)%keys)) CALL abort_gcm(modname, 'missing key "hadv"', 1)
    277276   IF(getKey('vadv', vadv, ky=tracers(:)%keys)) CALL abort_gcm(modname, 'missing key "vadv"', 1)
     
    401400   CALL msg('niso   = '//TRIM(int2str(niso)),   modname)
    402401   CALL msg('ntiso  = '//TRIM(int2str(ntiso)),  modname)
    403 #ifdef INCA
     402IF (CPPKEY_INCA) THEN
    404403   CALL msg('nqCO2  = '//TRIM(int2str(nqCO2)),  modname)
    405404   CALL msg('nqINCA = '//TRIM(int2str(nqINCA)), modname)
    406 #endif
     405END IF
    407406   t => tracers
    408407   CALL msg('Information stored in '//TRIM(modname)//': ', modname)
Note: See TracChangeset for help on using the changeset viewer.