Ignore:
Timestamp:
Jul 20, 2024, 11:17:09 PM (5 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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmdiso/physiq_mod.F90

    r5088 r5091  
    9393    USE phys_output_var_mod, ONLY :      cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv
    9494    USE phys_output_var_mod, ONLY : cloud_cover_sw, cloud_cover_sw_s2
     95    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA
    9596
    9697
     
    111112
    112113
    113 #ifdef INCA
    114114    USE geometry_mod,      ONLY: longitude, latitude, boundslon, boundslat, ind_cell_glo
    115115    USE time_phylmdz_mod,  ONLY: ndays
    116116    USE infotrac_phy,      ONLY: nqCO2
    117 #endif
    118117#ifdef REPROBUS
    119118    USE chem_rep, ONLY: Init_chem_rep_xjour, d_q_rep, d_ql_rep, d_qi_rep, &
     
    122121    USE strataer_emiss_mod, ONLY: strataer_emiss_init
    123122#endif
    124 #if defined INCA || defined REPROBUS
    125123    USE time_phylmdz_mod,    ONLY: annee_ref, day_ini, day_ref, start_time
    126124    USE vertical_layers_mod, ONLY: aps, bps, ap, bp
    127 #endif
    128125
    129126
     
    13431340    REAL, dimension(klon, klev) :: cldfrarad   ! fraction nuageuse
    13441341
    1345 #ifdef INCA
    13461342    REAL :: calday, zxsnow_dummy(klon)
    13471343    ! set de variables utilisees pour l'initialisation des valeurs provenant de INCA
     
    13501346    REAL, DIMENSION(klon,klev,naero_grp,nbands) :: init_cginca
    13511347    REAL, DIMENSION(klon,klev,nbands) :: init_ccminca
    1352 #endif
    13531348    REAL, DIMENSION(klon,nbtr) :: init_source
    13541349
     
    23412336       !
    23422337       IF (ANY(type_trac == ['inca','inco'])) THEN ! ModThL
    2343 #ifdef INCA
     2338IF (CPPKEY_INCA) THEN
    23442339          CALL VTe(VTphysiq)
    23452340          CALL VTb(VTinca)
     
    24192414          CALL VTe(VTinca)
    24202415          CALL VTb(VTphysiq)
    2421 #endif
     2416END IF
    24222417       ENDIF
    24232418       !
     
    29952990             B=Z2-fac*alog(pplay(i,itroprep(i)))
    29962991             ttrop(i)= fac*alog(ptrop(i))+B
    2997 !       
     2992!
    29982993             Z1= 1.e-3 * ( pphi(i,itroprep(i)+1)+pphis(i) ) / gravit
    29992994             Z2= 1.e-3 * ( pphi(i,itroprep(i))  +pphis(i) ) / gravit
     
    56115606
    56125607    IF (ANY(type_trac == ['inca','inco'])) THEN ! ModThL
    5613 #ifdef INCA
     5608IF (CPPKEY_INCA) THEN
    56145609       CALL VTe(VTphysiq)
    56155610       CALL VTb(VTinca)
     
    56645659       CALL VTe(VTinca)
    56655660       CALL VTb(VTphysiq)
    5666 #endif
     5661END IF
    56675662    ENDIF !type_trac = inca or inco
    56685663    IF (type_trac == 'repr') THEN
     
    59545949
    59555950       IF (aerosol_couple.AND.config_inca=='aero') THEN
    5956 #ifdef INCA
     5951IF (CPPKEY_INCA) THEN
    59575952          CALL radlwsw_inca  &
    59585953               (chemistry_couple, kdlon,kflev,dist, rmu0, fract, solaire, &
     
    59745969               cldtaupirad, &
    59755970               topswai_aero, solswai_aero)
    5976 #endif
     5971END IF
    59775972       ELSE
    59785973          !
     
    70857080    !
    70867081    IF (ANY(type_trac == ['inca','inco'])) THEN
    7087 #ifdef INCA
     7082IF (CPPKEY_INCA) THEN
    70887083       CALL VTe(VTphysiq)
    70897084       CALL VTb(VTinca)
     
    71057100       CALL VTe(VTinca)
    71067101       CALL VTb(VTphysiq)
    7107 #endif
     7102END IF
    71087103    ENDIF
    71097104
     
    74127407       IF (using_xios) THEN
    74137408
    7414 #ifdef INCA
     7409IF (CPPKEY_INCA) THEN
    74157410          IF (type_trac == 'inca') THEN
    74167411             IF (is_omp_master .AND. grid_type==unstructured) THEN
     
    74187413             ENDIF
    74197414          ENDIF
    7420 #endif
     7415END IF
    74217416
    74227417          IF (is_omp_master .and. grid_type==unstructured) CALL xios_context_finalize
Note: See TracChangeset for help on using the changeset viewer.