Ignore:
Timestamp:
Feb 28, 2022, 9:37:41 AM (3 years ago)
Author:
Ehouarn Millour
Message:

Bug fix in infotrac (introduced in r4063), nbtr and related arrays were not properly initialized.
Tests notheless show there is still an issue between serial and parallel handling of (non-water) tracers that needs be fixed.
EM

File:
1 edited

Legend:

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

    r4078 r4082  
    308308      CALL init_transport(hadv_inca, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)
    309309      ! DC passive CO2 tracer is at position 1: H2O was removed ; nqCO2/=0 in "inco" case only
     310      ALLOCATE(conv_flg(nbtr),pbl_flg(nbtr),solsym(nbtr))
    310311      conv_flg = [(  1,        ic=1, nqCO2),conv_flg_inca]
    311312       pbl_flg = [(  1,        ic=1, nqCO2), pbl_flg_inca]
     
    363364
    364365#ifndef INCA
    365    conv_flg = [(1, ic=1, nbtr)]                                      !--- Convection activated for all tracers
    366     pbl_flg = [(1, ic=1, nbtr)]                                      !--- Boundary layer activated for all tracers
    367    ALLOCATE(solsym(nbtr))
    368366   CALL msg('Valeur de traceur.def :', modname)
    369367   CALL msg('nombre total de traceurs '//TRIM(int2str(nqtrue)), modname)
     
    374372   IF(planet_type == 'earth') nqo = COUNT(delPhase(tnom_0) == 'H2O') !--- for all planets except for Earth
    375373   nbtr = nqtrue - nqo               
     374   ALLOCATE(conv_flg(nbtr),pbl_flg(nbtr),solsym(nbtr))
     375   conv_flg(1:nbtr) = 1                                     !--- Convection activated for all tracers
     376   pbl_flg(1:nbtr) = 1                                     !--- Boundary layer activated for all tracers
    376377#endif
    377378
     
    417418      CALL init_transport(hadv_inca, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)
    418419      ! DC passive CO2 tracer is at position 1: H2O was removed ; nqCO2/=0 in "inco" case only
     420     
    419421      conv_flg = [(  1       , k=1, nqCO2), conv_flg_inca]
    420422      pbl_flg  = [(  1       , k=1, nqCO2), pbl_flg_inca]
     
    440442      lerr = getKey('hadv', hadv, ky=tracers(:)%keys)
    441443      lerr = getKey('vadv', vadv, ky=tracers(:)%keys)
     444      ALLOCATE(solsym(nbtr))
     445      conv_flg(1:nbtr)=1  !--- Convection activated for all tracers
     446      pbl_flg(1:nbtr)=1   !--- Boundary layer activated for all tracers
    442447#endif
    443448   !---------------------------------------------------------------------------------------------------------------------------
     
    450455      lerr = getKey('vadv', vadv, ky=tracers(:)%keys)
    451456      ALLOCATE(solsym(nbtr))
    452       conv_flg = [(1, it=1, nbtr)]
    453        pbl_flg = [(1, it=1, nbtr)]
     457      conv_flg(1:nbtr)=1  !--- Convection activated for all tracers
     458       pbl_flg(1:nbtr)=1  !--- Boundary layer activated for all tracers
    454459   !---------------------------------------------------------------------------------------------------------------------------
    455460   END IF
Note: See TracChangeset for help on using the changeset viewer.