Ignore:
Timestamp:
Jul 20, 2024, 11:17:09 PM (4 months ago)
Author:
abarral
Message:

Move lmdz_netcdf_format.F90 -> lmdz_cppkeys_wrapper.F90 to handle other CPP keys
Replace all (except wrapper) use of CPP_PHYS by fortran logical
Refactor makelmdz_fcm (put blocks into functions, use modern bash)

Location:
LMDZ6/branches/Amaury_dev/libf/dyn3d_common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/dyn3d_common/infotrac.F90

    r5082 r5091  
    117117   USE CHEM_REP,    ONLY: Init_chem_rep_trac
    118118#endif
     119   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA
    119120   IMPLICIT NONE
    120121!==============================================================================================================================
     
    143144! Local variables
    144145   INTEGER, ALLOCATABLE :: hadv(:), vadv(:)                          !--- Horizontal/vertical transport scheme number
    145 #ifdef INCA
    146146   INTEGER, ALLOCATABLE :: had (:), hadv_inca(:), conv_flg_inca(:), &!--- Variables specific to INCA
    147147                           vad (:), vadv_inca(:),  pbl_flg_inca(:)
    148148   CHARACTER(LEN=8), ALLOCATABLE :: solsym_inca(:)                   !--- Tracers names for INCA
    149149   INTEGER :: nqINCA
    150 #endif
    151150   CHARACTER(LEN=2)      ::   suff(9)                                !--- Suffixes for schemes of order 3 or 4 (Prather)
    152151   CHARACTER(LEN=3)      :: descrq(30)                               !--- Advection scheme description tags
     
    197196   SELECT CASE(type_trac)
    198197      CASE('inca', 'inco')
    199 #ifndef INCA
     198      IF (CPPKEY_INCA) THEN
    200199         CALL abort_gcm(modname, 'You must add cpp key INCA and compile with INCA code', 1)
    201 #endif
     200      END IF
    202201      CASE('repr')
    203202#ifndef REPROBUS
     
    229228   IF(fType == 1 .AND. ANY(['inca','inco']==type_trac)) THEN         !=== FOUND OLD STYLE INCA "traceur.def"
    230229   !---------------------------------------------------------------------------------------------------------------------------
    231 #ifdef INCA
     230   IF (CPPKEY_INCA) THEN
    232231      nqo = SIZE(tracers) - nqCO2
    233232      CALL Init_chem_inca_trac(nqINCA)                               !--- Get nqINCA from INCA
     
    260259      IF(setGeneration(tracers)) CALL abort_gcm(modname,'See above',1) !- SET FIELDS %iGeneration, %gen0Name
    261260      DEALLOCATE(had, hadv_inca, vad, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)
    262 #endif
     261   END IF
    263262   !---------------------------------------------------------------------------------------------------------------------------
    264263   ELSE                                                              !=== OTHER CASES (OLD OR NEW FORMAT, NO INCA MODULE)
     
    269268      nbtr   = nqtrue-COUNT(delPhase(tracers(:)%gen0Name) == 'H2O' &
    270269                               .AND. tracers(:)%component == 'lmdz') !--- Number of tracers passed to phytrac
    271 #ifdef INCA
     270   IF (CPPKEY_INCA) THEN
    272271      nqINCA = COUNT(tracers(:)%component == 'inca')
    273 #endif
     272   END IF
    274273      lerr = getKey('hadv', hadv, ky=tracers(:)%keys)
    275274      lerr = getKey('vadv', vadv, ky=tracers(:)%keys)
     
    400399   CALL msg('niso   = '//TRIM(int2str(niso)),   modname)
    401400   CALL msg('ntiso  = '//TRIM(int2str(ntiso)),  modname)
    402 #ifdef INCA
    403    CALL msg('nqCO2  = '//TRIM(int2str(nqCO2)),  modname)
    404    CALL msg('nqINCA = '//TRIM(int2str(nqINCA)), modname)
    405 #endif
     401   IF (CPPKEY_INCA) THEN
     402      CALL msg('nqCO2  = '//TRIM(int2str(nqCO2)),  modname)
     403      CALL msg('nqINCA = '//TRIM(int2str(nqINCA)), modname)
     404   END IF
    406405   t => tracers
    407406   CALL msg('Information stored in infotrac :', modname)
  • LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inigeom.F

    r5086 r5091  
    348348      DO j = 1, jjp1
    349349c
    350       IF ( j. eq. 1 )  THEN
     350      IF ( j == 1 )  THEN
    351351c
    352352      yprm           = yprimu1(j)
     
    378378      END IF
    379379c
    380       IF ( j. eq. jjp1 )  THEN
     380      IF ( j == jjp1 )  THEN
    381381       yprp               = yprimu2(j-1)
    382382       rlatp              = rlatu2 (j-1)
Note: See TracChangeset for help on using the changeset viewer.