Changeset 5258 for LMDZ6/trunk


Ignore:
Timestamp:
Oct 22, 2024, 4:17:24 PM (2 months ago)
Author:
abarral
Message:

Wrap uses of cpp key DEBUG_IO

Location:
LMDZ6/trunk/libf
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3d/advtrac.F90

    r4143 r5258  
    11! $Id$
    22
    3 #define DEBUG_IO
    4 #undef DEBUG_IO
    53SUBROUTINE advtrac(pbaru, pbarv, p, masse,q,iapptrac,teta, flxw, pk)
    64   !     Auteur :  F. Hourdin
     
    1412   USE control_mod,  ONLY: iapp_tracvl, day_step
    1513   USE comconst_mod, ONLY: dtvr
    16 
     14   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
     15   USE strings_mod, ONLY: int2str
    1716   IMPLICIT NONE
    1817   !
     
    202201   CALL massbar(massem,massebx,masseby)
    203202
    204 #ifdef DEBUG_IO   
     203IF (CPPKEY_DEBUGIO) THEN
    205204   CALL WriteField_u('massem',massem)
    206205   CALL WriteField_u('wg',wg)
     
    213212      CALL WriteField_u('q_adv'//trim(int2str(iq)),q(:,:,iq))
    214213   END DO
    215 #endif
     214END IF
    216215
    217216   IF(isoCheck) WRITE(*,*) 'advtrac 227'
  • LMDZ6/trunk/libf/dyn3dmem/advect_new_loc.F90

    r5246 r5258  
    99  USE comconst_mod, ONLY: daysec
    1010  USE logic_mod, ONLY: conser
    11 
     11  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
    1212  IMPLICIT NONE
    1313  !=======================================================================
     
    250250  if (pole_nord) ijb=ijb+iip1
    251251  if (pole_sud)  ije=ije-iip1
    252 #ifdef DEBUG_IO
     252IF (CPPKEY_DEBUGIO) THEN
    253253   CALL WriteField_u('du_bis',du)
    254 #endif
     254END IF
    255255!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
    256256  DO l=1,llm
     
    264264  ENDDO
    265265!$OMP END DO NOWAIT
    266 #ifdef DEBUG_IO
     266IF (CPPKEY_DEBUGIO) THEN
    267267  CALL WriteField_u('du1',du1)
    268268  CALL WriteField_u('du2',du2)
    269269  CALL WriteField_u('du_bis',du)
    270 #endif
     270END IF
    271271  ijb=ij_begin
    272272  ije=ij_end
  • LMDZ6/trunk/libf/dyn3dmem/advtrac_loc.F90

    r4469 r5258  
    11
    2 #define DEBUG_IO
    3 #undef DEBUG_IO
    42SUBROUTINE advtrac_loc(pbarug, pbarvg, wg, p, massem, q, teta, pk)
    53   !     Auteur :  F. Hourdin
     
    2119   USE times
    2220   USE advtrac_mod, ONLY: finmasse
    23 
     21   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
     22   USE strings_mod, ONLY: int2str
    2423   IMPLICIT NONE
    2524   !
     
    109108!ym   ----> Reverifier lors de la parallelisation des autres schemas
    110109
    111 #ifdef DEBUG_IO   
     110IF (CPPKEY_DEBUGIO) THEN
    112111   CALL WriteField_u('massem',massem)
    113112   CALL WriteField_u('wg',wg)
     
    120119      CALL WriteField_u('q_adv'//trim(int2str(iq)),q(:,:,iq))
    121120   END DO
    122 #endif
     121END IF
    123122
    124123!         
     
    132131   CALL vlspltgen_loc(q, 2., massem, wg, pbarug, pbarvg, dtvr, p, pk, teta )
    133132
    134 #ifdef DEBUG_IO     
     133IF (CPPKEY_DEBUGIO) THEN
    135134   DO iq = 1, nqtot
    136135      CALL WriteField_u('q_adv'//trim(int2str(iq)),q(:,:,iq))
    137136   END DO
    138 #endif
     137END IF
    139138         
    140139   GOTO 1234     
  • LMDZ6/trunk/libf/dyn3dmem/caladvtrac_loc.F90

    r5246 r5258  
    1616  USE Vampir
    1717  USE write_field_loc
    18   !
     18  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
    1919  IMPLICIT NONE
    2020  !
     
    131131!$OMP ENDDO NOWAIT
    132132
    133 #ifdef DEBUG_IO
     133IF (CPPKEY_DEBUGIO) THEN
    134134     CALL WriteField_u('pbarug1',pbarug)
    135135     CALL WriteField_v('pbarvg1',pbarvg)
    136136     CALL WriteField_u('wg1',wg)
    137 #endif
     137END IF
    138138
    139139!$OMP BARRIER
     
    178178
    179179
    180 #ifdef DEBUG_IO
     180IF (CPPKEY_DEBUGIO) THEN
    181181     CALL WriteField_u('pbarug1',pbarug_adv)
    182182     CALL WriteField_v('pbarvg1',pbarvg_adv)
    183183     CALL WriteField_u('wg1',wg_adv)
    184 #endif
     184END IF
    185185  ! !write(*,*) 'caladvtrac 185'
    186186  CALL advtrac_loc( pbarug_adv,pbarvg_adv,wg_adv, &
  • LMDZ6/trunk/libf/dyn3dmem/caldyn_loc.F90

    r5246 r5258  
    1 !
    2 ! $Id: $
    3 !
    4 #undef DEBUG_IO
    5 !#define DEBUG_IO
    6 
    71SUBROUTINE caldyn_loc &
    82        (itau,ucov,vcov,teta,ps,masse,pk,pkf,phis , &
     
    137        vorpot, ecin, bern, massebxy, convm
    148  USE comvert_mod, ONLY: ap, bp
    15 
     9  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
    1610  IMPLICIT NONE
    1711
     
    9084  CALL convmas2_loc  (   convm                      )
    9185!$OMP BARRIER
    92 #ifdef DEBUG_IO
     86IF (CPPKEY_DEBUGIO) THEN
    9387  call WriteField_u('ucont',ucont)
    9488  call WriteField_v('vcont',vcont)
     
    10296  call WriteField_u('dteta',dteta)
    10397  call WriteField_u('convm',convm)
    104 #endif
     98END IF
    10599
    106100!$OMP BARRIER
     
    122116  CALL dudv1_loc   ( vorpot , pbaru , pbarv     , du     , dv  )
    123117
    124 #ifdef DEBUG_IO
     118IF (CPPKEY_DEBUGIO) THEN
    125119  call WriteField_u('w',w)
    126120  call WriteField_v('vorpot',vorpot)
    127121  call WriteField_u('du',du)
    128122  call WriteField_v('dv',dv)
    129 #endif
     123END IF
    130124
    131125  ! ! compute kinetic energy ecin()
     
    136130  CALL dudv2_loc   ( teta   , pkf   , bern      , du     , dv  )
    137131
    138 #ifdef DEBUG_IO
     132IF (CPPKEY_DEBUGIO) THEN
    139133  call WriteField_u('ecin',ecin)
    140134  call WriteField_u('bern',bern)
     
    142136  call WriteField_v('dv',dv)
    143137  call WriteField_u('pkf',pkf)
    144 #endif
     138END IF
    145139
    146140  ijb=ij_begin-iip1
  • LMDZ6/trunk/libf/dyn3dmem/call_calfis_mod.F90

    r5250 r5258  
    8888  USE comvert_mod, ONLY: ap, bp, pressure_exner
    8989  USE temps_mod, ONLY: day_ini, day_ref, jd_ref, jh_ref, start_time
    90   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_PHYS
    91 
     90  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_PHYS, CPPKEY_DEBUGIO
     91  USE strings_mod, ONLY: int2str
    9292 
    9393  IMPLICIT NONE
     
    118118   
    119119   
    120 #ifdef DEBUG_IO   
     120IF (CPPKEY_DEBUGIO) THEN
    121121    CALL WriteField_u('ucovfi',ucov)
    122122    CALL WriteField_v('vcovfi',vcov)
     
    127127      CALL WriteField_u('qfi'//trim(int2str(iq)),q(:,:,iq))
    128128    ENDDO
    129 #endif
     129END IF
    130130
    131131!
     
    169169  !$OMP END MASTER
    170170
    171 #ifdef DEBUG_IO   
     171IF (CPPKEY_DEBUGIO) THEN
    172172    CALL WriteField_u('ucovfi',ucov)
    173173    CALL WriteField_v('vcovfi',vcov)
     
    175175    CALL WriteField_u('pfi',p)
    176176    CALL WriteField_u('pkfi',pk)
    177 #endif
     177END IF
    178178   
    179179    CALL SetTag(Request_physic,800)
     
    219219 
    220220 
    221 #ifdef DEBUG_IO   
     221IF (CPPKEY_DEBUGIO) THEN
    222222    CALL WriteField_u('ucovfi',ucov)
    223223    CALL WriteField_v('vcovfi',vcov)
     
    228228      CALL WriteField_u('qfi'//trim(int2str(iq)),q(:,:,iq))
    229229    ENDDO
    230 #endif
     230END IF
    231231
    232232  !$OMP BARRIER
     
    302302       
    303303       
    304 #ifdef DEBUG_IO           
     304IF (CPPKEY_DEBUGIO) THEN
    305305    CALL WriteField_u('dufi',dufi)
    306     CALL WriteField_v('dvfi',dvfi) 
     306    CALL WriteField_v('dvfi',dvfi)
    307307    CALL WriteField_u('dtetafi',dtetafi)
    308308    CALL WriteField_u('dpfi',dpfi)
     
    310310      CALL WriteField_u('dqfi'//trim(int2str(iq)),dqfi(:,:,iq))
    311311    ENDDO
    312 #endif
     312END IF
    313313
    314314  !$OMP BARRIER
     
    316316!      ajout des tendances physiques:
    317317!      ------------------------------
    318 #ifdef DEBUG_IO   
     318IF (CPPKEY_DEBUGIO) THEN
    319319    CALL WriteField_u('ucovfi',ucov)
    320320    CALL WriteField_v('vcovfi',vcov)
     
    324324      CALL WriteField_u('qfi'//trim(int2str(iq)),q(:,:,iq))
    325325    ENDDO
    326 #endif
    327 
    328 #ifdef DEBUG_IO           
     326END IF
     327
     328IF (CPPKEY_DEBUGIO) THEN
    329329    CALL WriteField_u('ucovfi',ucov)
    330330    CALL WriteField_v('vcovfi',vcov)
     
    334334      CALL WriteField_u('qfi'//trim(int2str(iq)),q(:,:,iq))
    335335    ENDDO
    336 #endif
     336END IF
    337337
    338338    CALL addfi_loc( dtphys, leapf, forward   ,              &
     
    351351!$OMP BARRIER
    352352
    353 #ifdef DEBUG_IO   
     353IF (CPPKEY_DEBUGIO) THEN
    354354    CALL WriteField_u('ucovfi',ucov)
    355355    CALL WriteField_v('vcovfi',vcov)
     
    359359      CALL WriteField_u('qfi'//trim(int2str(iq)),q(:,:,iq))
    360360    ENDDO
    361 #endif
     361END IF
    362362
    363363    IF (ok_strato) THEN
     
    398398    ENDIF
    399399
    400 #ifdef DEBUG_IO   
     400IF (CPPKEY_DEBUGIO) THEN
    401401    CALL WriteField_u('ucovfi',ucov_dyn)
    402402    CALL WriteField_v('vcovfi',vcov_dyn)
     
    406406      CALL WriteField_u('qfi'//trim(int2str(iq)),q_dyn(:,:,iq))
    407407    ENDDO
    408 #endif
     408END IF
    409409
    410410
  • LMDZ6/trunk/libf/dyn3dmem/call_dissip_mod.F90

    r3435 r5258  
    8787  USE vampir
    8888  USE write_field_loc
     89  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
    8990  IMPLICIT NONE
    9091    INCLUDE 'comgeom.h'
     
    144145    CALL dissip_loc(vcov,ucov,teta,p,dvdis,dudis,dtetadis)
    145146
    146 #ifdef DEBUG_IO   
     147IF (CPPKEY_DEBUGIO) THEN
    147148    CALL WriteField_u('dudis',dudis)
    148149    CALL WriteField_v('dvdis',dvdis)
    149150    CALL WriteField_u('dtetadis',dtetadis)
    150 #endif
     151END IF
    151152 
    152153!      CALL FTRACE_REGION_END("dissip")
  • LMDZ6/trunk/libf/dyn3dmem/dissip_loc.F90

    r5246 r5258  
    88  USE dissip_mod, ONLY: dissip_allocate
    99  USE comconst_mod, ONLY: dtdiss
     10  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
    1011  IMPLICIT NONE
    1112
     
    116117  ENDIF
    117118
    118 #ifdef DEBUG_IO
     119IF (CPPKEY_DEBUGIO) THEN
    119120  call WriteField_u('gdx',gdx)
    120121  call WriteField_v('gdy',gdy)
    121 #endif
     122END IF
    122123
    123124  ijb=ij_begin
     
    161162  ENDIF
    162163
    163 #ifdef DEBUG_IO
     164IF (CPPKEY_DEBUGIO) THEN
    164165  call WriteField_u('grx',grx)
    165166  call WriteField_v('gry',gry)
    166 #endif
     167END IF
    167168
    168169
     
    215216  ENDIF
    216217
    217 #ifdef DEBUG_IO
     218IF (CPPKEY_DEBUGIO) THEN
    218219  call WriteField_u('gdx',gdx)
    219 #endif
     220END IF
    220221
    221222
  • LMDZ6/trunk/libf/dyn3dmem/exner_hyb_loc_m.F90

    r2600 r5258  
    3737    USE comconst_mod, ONLY: cpp, kappa, r, jmp1
    3838    USE comvert_mod, ONLY: preff
    39    
     39    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
    4040    IMPLICIT NONE
    4141    !
     
    185185       jjb=jj_begin
    186186       jje=jj_end
    187 #ifdef DEBUG_IO   
     187IF (CPPKEY_DEBUGIO) THEN
    188188       call WriteField_u('pkf',pkf)
    189 #endif
     189END IF
    190190       CALL filtreg_p ( pkf,jjb_u,jje_u,jjb,jje, jmp1, llm, &
    191191            2, 1, .TRUE., 1 )
    192 #ifdef DEBUG_IO   
     192IF (CPPKEY_DEBUGIO) THEN
    193193       call WriteField_u('pkf',pkf)
    194 #endif     
     194END IF
    195195    end if
    196196
  • LMDZ6/trunk/libf/dyn3dmem/groupe_loc.F90

    r5246 r5258  
    44  USE groupe_mod
    55  USE comconst_mod, ONLY: ngroup
     6  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
    67  implicit none
    78
     
    7172!$OMP END DO NOWAIT
    7273
    73 #ifdef DEBUG_IO
     74IF (CPPKEY_DEBUGIO) THEN
    7475  CALL WriteField_v('pbarvm',reshape(pbarvm,(/ip1jm,llm/)))
    75 #endif
     76END IF
    7677  call groupeun_loc(jjm,llm,jjb_v,jje_v,jjb,jje,pbarvm)
    77 #ifdef DEBUG_IO
     78IF (CPPKEY_DEBUGIO) THEN
    7879  CALL WriteField_v('pbarvm',reshape(pbarvm,(/ip1jm,llm/)))
    79 #endif
     80END IF
    8081  !   Champs 3D
    8182
  • LMDZ6/trunk/libf/dyn3dmem/integrd_loc.f90

    r5246 r5258  
    1515  USE comvert_mod, ONLY: ap, bp
    1616  USE temps_mod, ONLY: dt
    17 
     17  USE strings_mod, ONLY: int2str
    1818  IMPLICIT NONE
    1919
  • LMDZ6/trunk/libf/dyn3dmem/leapfrog_loc.F90

    r5252 r5258  
    1 !
    2 ! $Id$
    3 !
    4 !
    5 !
    6 #define DEBUG_IO
    7 #undef DEBUG_IO
    8 
    9 
    101SUBROUTINE leapfrog_loc(ucov0,vcov0,teta0,ps0, &
    112        masse0,phis0,q0,time_0)
     
    4637         xios_set_current_context, &
    4738         using_xios
    48    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS
     39   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS, CPPKEY_DEBUGIO
     40   USE strings_mod, ONLY: int2str
    4941
    5042  IMPLICIT NONE
     
    696688!$OMP END MASTER
    697689
    698 #ifdef DEBUG_IO
     690IF (CPPKEY_DEBUGIO) THEN
    699691  call WriteField_u('du',du)
    700692  call WriteField_v('dv',dv)
     
    707699  call WriteField_u('masse',masse)
    708700  call WriteField_u('pk',pk)
    709 #endif
     701END IF
    710702  !-----------------------------------------------------------------------
    711703  !   calcul des tendances advection des traceurs (dont l'humidite)
     
    747739   call VTb(VTintegre)
    748740!$OMP END MASTER
    749 #ifdef DEBUG_IO
     741IF (CPPKEY_DEBUGIO) THEN
    750742  if (true_itau>20) then
    751743  call WriteField_u('ucovm1',ucovm1)
     
    758750  call WriteField_u('ps_int',ps)
    759751  endif
    760 #endif
     752END IF
    761753!$OMP BARRIER
    762754    ! CALL FTRACE_REGION_BEGIN("integrd")
     
    775767    ! CALL FTRACE_REGION_END("integrd")
    776768!$OMP BARRIER
    777 #ifdef DEBUG_IO
     769IF (CPPKEY_DEBUGIO) THEN
    778770  call WriteField_u('ucovm1',ucovm1)
    779771  call WriteField_v('vcovm1',vcovm1)
     
    784776  call WriteField_u('teta_int',teta)
    785777  call WriteField_u('ps_int',ps)
    786 #endif
     778END IF
    787779
    788780  call check_isotopes(q,ijb_u,ije_u,'leapfrog 775')
  • LMDZ6/trunk/libf/dyn3dmem/vlspltgen_loc.F90

    r5246 r5258  
    3333  USE comconst_mod, ONLY: cpp
    3434  USE logic_mod, ONLY: adv_qsat_liq
     35  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
    3536  IMPLICIT NONE
    3637
     
    187188  ENDDO
    188189
    189 #ifdef DEBUG_IO
    190    CALL WriteField_u('mu',mu)
    191    CALL WriteField_v('mv',mv)
    192    CALL WriteField_u('mw',mw)
    193    CALL WriteField_u('qsat',qsat)
    194 #endif
    195 
    196190  ! ! verif temporaire
    197191  ijb=ij_begin
     
    204198    IF(tracers(iq)%parent /= 'air') CYCLE
    205199    ! !write(*,*) 'vlspltgen 192: iq,iadv=',iq,tracers(iq)%iadv
    206 #ifdef DEBUG_IO
    207     CALL WriteField_u('zq',zq(:,:,iq))
    208     CALL WriteField_u('zm',zm(:,:,iq))
    209 #endif
    210200    SELECT CASE(tracers(iq)%iadv)
    211201      CASE(0); CYCLE
     
    340330   IF(tracers(iq)%parent /= 'air') CYCLE
    341331   ! !write(*,*) 'vlspltgen 321: iq=',iq
    342 #ifdef DEBUG_IO
    343    CALL WriteField_u('zq',zq(:,:,iq))
    344    CALL WriteField_u('zm',zm(:,:,iq))
    345 #endif
    346332
    347333    SELECT CASE(tracers(iq)%iadv)
     
    360346   IF(tracers(iq)%parent /= 'air') CYCLE
    361347  ! !write(*,*) 'vlspltgen 349: iq=',iq
    362 #ifdef DEBUG_IO
    363    CALL WriteField_u('zq',zq(:,:,iq))
    364    CALL WriteField_u('zm',zm(:,:,iq))
    365 #endif
    366348    SELECT CASE(tracers(iq)%iadv)
    367349      CASE(0); CYCLE
     
    462444    IF(tracers(iq)%parent /= 'air') CYCLE
    463445  ! !write(*,*) 'vlspltgen 449: iq=',iq
    464 #ifdef DEBUG_IO
    465    CALL WriteField_u('zq',zq(:,:,iq))
    466    CALL WriteField_u('zm',zm(:,:,iq))
    467 #endif
    468446    SELECT CASE(tracers(iq)%iadv)
    469447      CASE(0); CYCLE
     
    481459    IF(tracers(iq)%parent /= 'air') CYCLE
    482460  ! !write(*,*) 'vlspltgen 477: iq=',iq
    483 #ifdef DEBUG_IO
    484    CALL WriteField_u('zq',zq(:,:,iq))
    485    CALL WriteField_u('zm',zm(:,:,iq))
    486 #endif
    487461    SELECT CASE(tracers(iq)%iadv)
    488462      CASE(0); CYCLE
     
    508482  DO iq=1,nqtot
    509483   ! !write(*,*) 'vlspltgen_loc 561, iq=',iq
    510 #ifdef DEBUG_IO
    511    CALL WriteField_u('zq',zq(:,:,iq))
    512    CALL WriteField_u('zm',zm(:,:,iq))
    513 #endif
    514484!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
    515485    DO l=1,llm
Note: See TracChangeset for help on using the changeset viewer.