Changeset 5181 for LMDZ6/trunk


Ignore:
Timestamp:
Sep 10, 2024, 3:06:08 PM (3 months ago)
Author:
abarral
Message:

Replace IOPHYS_WK CPP key by logical.
jyg & amaury

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

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/lmdz_wake.F90

    r4908 r5181  
    11MODULE lmdz_wake
    22
    3 ! $Id$
     3  USE lmdz_wake_ini, ONLY: CPPKEY_IOPHYS_WK
     4
     5  IMPLICIT NONE; PRIVATE
     6  PUBLIC wake
    47
    58CONTAINS
     
    353356!
    354357IF (first_call) THEN
    355 !!#define IOPHYS_WK
    356 #undef IOPHYS_WK
    357 #ifdef IOPHYS_WK
     358IF (CPPKEY_IOPHYS_WK) THEN
    358359  IF (phys_sub) THEN
    359360    call iophys_ini(dtimesub)
     
    361362    call iophys_ini(dtime)
    362363  ENDIF
    363 #endif
     364END IF
    364365  first_call = .false.
    365366ENDIF   !(first_call)
     
    771772
    772773  END DO
    773 #ifdef IOPHYS_WK
     774IF (CPPKEY_IOPHYS_WK) THEN
    774775  IF (.not.phys_sub) CALL iophys_ecrit('wape_a',1,'wape_a','J/kg',wape)
    775 #endif
     776END IF
    776777
    777778  ! 2.2 Prognostic variable update
     
    10071008!!--------------------------------------------------------
    10081009    ELSEIF (iflag_wk_pop_dyn == 3) THEN
    1009 #ifdef IOPHYS_WK
     1010IF (CPPKEY_IOPHYS_WK) THEN
    10101011    IF (phys_sub) THEN
    10111012     CALL iophys_ecrit('ptop',1,'ptop','Pa',ptop)
     
    10181019     CALL iophys_ecrit('irad_wk',1,'irad_wk','m',irad_wk)
    10191020    ENDIF
    1020 #endif
     1021END IF
    10211022  !
    10221023     CALL wake_popdyn_3 ( klon, klev, phys_sub, wk_adv, dtimesub, wgen, &
     
    10721073!!--------------------------------------------------------
    10731074
    1074 #ifdef IOPHYS_WK
     1075IF (CPPKEY_IOPHYS_WK) THEN
    10751076    IF (phys_sub) THEN
    10761077     CALL iophys_ecrit('wdensa',1,'wdensa','m',wdens)
     
    10791080     CALL iophys_ecrit('asigmawa',1,'asigmawa','m',asigmaw)
    10801081    ENDIF
    1081 #endif
     1082END IF
    10821083    ! calcul de la difference de vitesse verticale poche - zone non perturbee
    10831084    ! IM 060208 differences par rapport au code initial; init. a 0 dp_deltomg
     
    16691670          END DO
    16701671
    1671 #ifdef IOPHYS_WK
     1672IF (CPPKEY_IOPHYS_WK) THEN
    16721673    IF (phys_sub) THEN
    16731674     CALL iophys_ecrit('wdensb',1,'wdensb','m',wdens)
     
    17021703     CALL iophys_ecrit('d_asig_bnd2',1,'d_asig_bnd2','m',d_asig_bnd2)
    17031704    ENDIF
    1704 #endif
     1705END IF
    17051706        ENDIF ! (iflag_wk_pop_dyn == 3)
    17061707      ENDIF ! (iflag_wk_pop_dyn >= 2)
     
    18661867  !
    18671868
    1868 #ifdef IOPHYS_WK
     1869IF (CPPKEY_IOPHYS_WK) THEN
    18691870    IF (.not.phys_sub) CALL iophys_ecrit('wape_b',1,'wape_b','J/kg',wape)
    1870 #endif
     1871END IF
    18711872  IF (prt_level>=10) THEN
    18721873    PRINT *, 'wake-5, sigmaw(igout), cstar(igout), wape(igout), ptop(igout) ', &
     
    20092010    END IF
    20102011  END DO
    2011 #ifdef IOPHYS_WK
     2012IF (CPPKEY_IOPHYS_WK) THEN
    20122013  IF (.not.phys_sub) CALL iophys_ecrit('wape2_a',1,'wape2_a','J/kg',wape2)
    2013 #endif
     2014END IF
    20142015
    20152016
     
    20412042    END DO
    20422043  END IF
    2043 #ifdef IOPHYS_WK
     2044IF (CPPKEY_IOPHYS_WK) THEN
    20442045  IF (.not.phys_sub) CALL iophys_ecrit('wape2_b',1,'wape2_b','J/kg',wape2)
    2045 #endif
     2046END IF
    20462047
    20472048
     
    20872088        gwake(i) = .TRUE.
    20882089      END IF
    2089 #ifdef IOPHYS_WK
     2090IF (CPPKEY_IOPHYS_WK) THEN
    20902091  IF (.not.phys_sub) CALL iophys_ecrit('cstar2',1,'cstar2','J/kg',cstar2)
    2091 #endif
     2092END IF
    20922093    END IF  ! (ok_qx_qw(i))
    20932094  END DO
     
    21232124  END DO
    21242125    IF (iflag_wk_pop_dyn >= 3) THEN
    2125 #ifdef IOPHYS_WK
     2126IF (CPPKEY_IOPHYS_WK) THEN
    21262127      IF (.not.phys_sub) THEN
    21272128       CALL iophys_ecrit('fip',1,'fip','J/kg',fip)
     
    21632164       CALL iophys_ecrit('d_asig_bnd2',1,'d_asig_bnd2','m',d_asig_bnd2)
    21642165      ENDIF  ! (.not.phys_sub)
    2165 #endif
     2166END IF
    21662167    ENDIF  ! (iflag_wk_pop_dyn >= 3)
    21672168  ! Limitation de sigmaw
     
    22682269                      wape(igout),wape2(igout),ktopw(igout),OK_qx_qw(igout)
    22692270  ENDIF
    2270 #ifdef IOPHYS_WK
     2271IF (CPPKEY_IOPHYS_WK) THEN
    22712272  IF (.not.phys_sub) CALL iophys_ecrit('wape_c',1,'wape_c','J/kg',wape)
    2272 #endif
     2273END IF
    22732274
    22742275
     
    32553256          d_sig_spread(i) =  d_sig_spread(i)*dtimesub
    32563257          d_sigmaw(i) =  d_sig_gen(i) + d_sig_death(i) + d_sig_col(i) + d_sig_spread(i)
    3257 #ifdef IOPHYS_WK
     3258IF (CPPKEY_IOPHYS_WK) THEN
    32583259          IF (phys_sub) call iophys_ecrit('d_sigmaw0',1,'d_sigmaw0','',d_sigmaw)
    3259 #endif
     3260END IF
    32603261
    32613262         
     
    32663267          d_sigmaw(i) = d_sigmaw_targ
    32673268!!          d_sigmaw(i) = max(d_sigmaw(i), sigmad-sigmaw(i))
    3268 #ifdef IOPHYS_WK
     3269IF (CPPKEY_IOPHYS_WK) THEN
    32693270          IF (phys_sub) THEN
    32703271             call iophys_ecrit('tauwk_inv',1,'tau_wk_inv_min','',tau_wk_inv_min)
     
    32763277             call iophys_ecrit('d_sig_bnd',1,'d_sig_bnd','',d_sig_bnd)
    32773278          ENDIF
    3278 #endif
     3279END IF
    32793280          d_asig_death(i) = - asigmaw(i)/tau_prime(i)
    32803281          d_asig_aicol(i) = (agfl(i)*iwdens(i) + igfl(i)*awdens(i))*cstar(i)*is_wk(i)
     
    32873288          d_asig_spread(i) =  d_asig_spread(i)*dtimesub
    32883289          d_asigmaw(i) =  d_sig_gen(i) + d_asig_death(i) + d_asig_aicol(i) + d_asig_iicol(i) + d_asig_spread(i)
    3289 #ifdef IOPHYS_WK
     3290IF (CPPKEY_IOPHYS_WK) THEN
    32903291          IF (phys_sub) call iophys_ecrit('d_asigmaw0',1,'d_asigmaw0','',d_asigmaw)
    3291 #endif
     3292END IF
    32923293
    32933294          d_sigmaw_targ = min(max(d_asigmaw(i),-asigmaw(i)), sigmaw(i)-asigmaw(i))
     
    32953296          d_asig_bnd(i) = d_sigmaw_targ - d_asigmaw(i)
    32963297          d_asigmaw(i) = d_sigmaw_targ
    3297 #ifdef IOPHYS_WK
     3298IF (CPPKEY_IOPHYS_WK) THEN
    32983299          IF (phys_sub) THEN
    32993300             call iophys_ecrit('d_asigmaw',1,'d_asigmaw','',d_asigmaw)
     
    33043305             call iophys_ecrit('d_asig_bnd',1,'d_asig_bnd','',d_asig_bnd)
    33053306          ENDIF
    3306 #endif
     3307END IF
    33073308          d_dens_gen(i) = wgen(i)
    33083309          d_dens_death(i) = - iwdens(i)*tau_wk_inv_min
     
    33183319          d_dens_bnd(i) = d_wdens_targ - d_wdens(i)
    33193320          d_wdens(i) = d_wdens_targ
    3320 #ifdef IOPHYS_WK
     3321IF (CPPKEY_IOPHYS_WK) THEN
    33213322    IF (phys_sub) THEN
    33223323        call iophys_ecrit('d_wdens',1,'d_wdens','',d_wdens)
     
    33253326        call iophys_ecrit('d_dens_col',1,'d_dens_col','',d_dens_col)
    33263327    ENDIF
    3327 #endif
     3328END IF
    33283329
    33293330          d_adens_death(i) = -awdens(i)/tau_prime(i)
     
    33353336          d_adens_acol(i)  =   d_adens_acol(i)*dtimesub
    33363337          d_awdens(i) =   d_dens_gen(i) + d_adens_death(i) + d_adens_icol(i) + d_adens_acol(i)     
    3337 #ifdef IOPHYS_WK
     3338IF (CPPKEY_IOPHYS_WK) THEN
    33383339    IF (phys_sub) THEN
    33393340        call iophys_ecrit('d_awdens',1,'d_awdens','',d_awdens)
     
    33423343        call iophys_ecrit('d_adens_acol',1,'d_adens_acol','',d_adens_acol)
    33433344    ENDIF
    3344 #endif
     3345END IF
    33453346          d_wdens_targ = min(max(d_awdens(i),-awdens(i)), wdens(i)-awdens(i))
    33463347!!          d_dens_bnd(i) = d_dens_bnd(i) + d_wdens_targ - d_wdens(i)
  • LMDZ6/trunk/libf/phylmd/lmdz_wake_ini.F90

    r4908 r5181  
    8181  !$OMP THREADPRIVATE(wk_int_delta_t_min)
    8282
     83! CPP key used only in this module for debugging purposes. jyg 09/24
     84!!#define IOPHYS_WK
     85#ifdef IOPHYS_WK
     86  LOGICAL, PARAMETER :: CPPKEY_IOPHYS_WK = .TRUE.
     87#else
     88  LOGICAL, PARAMETER :: CPPKEY_IOPHYS_WK = .FALSE.
     89#endif
     90
    8391
    8492
Note: See TracChangeset for help on using the changeset viewer.