Ignore:
Timestamp:
Jul 8, 2010, 1:46:29 PM (14 years ago)
Author:
jghattas
Message:
  • Added tracer "Age of stratospheric air", activated by putting Aga in tracer.def.
  • The logical rnpb is now controled during execution. rnpb is true only if both tracers RN and PB existe in tracer.def. RN and PB can now be removed from tracer.def
  • In tracer.def, the 2 water traceurs (H2Ov and H2Ol) must still be the first 2 tracers. The following tracers have no specific order(RN and PB can now change places). Still a minimum of 3 tracers are required.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/trunk/libf/phylmd/traclmdz_mod.F90

    r1403 r1409  
    3434!$OMP THREADPRIVATE(trs)
    3535
     36  INTEGER,SAVE :: id_aga      ! Identification number for tracer : Age of stratospheric air
     37!$OMP THREADPRIVATE(id_aga)
     38  INTEGER,SAVE :: lev_1p5km   ! Approximative vertical layer number at 1.5km above surface, used for calculation of the age of air. The result shouldn't be that sensible to the exactness of this value as long as it is in the lower troposphere.
     39!$OMP THREADPRIVATE(lev_1p5km)
     40
     41  INTEGER,SAVE :: id_rn, id_pb ! Identification number for tracer : radon (Rn222), lead (Pb210)
     42!$OMP THREADPRIVATE(id_rn, id_pb)
     43
    3644  INTEGER,SAVE :: id_be       ! Activation et position du traceur Be7 [ id_be=0 -> desactive ]
    3745!$OMP THREADPRIVATE(id_be)
     
    5159  ! 0 means no ozone tracer
    5260
    53   LOGICAL,SAVE :: rnpb=.TRUE. ! Presence du couple Rn222, Pb210
     61  LOGICAL,SAVE :: rnpb=.FALSE. ! Presence du couple Rn222, Pb210
    5462!$OMP THREADPRIVATE(rnpb)
    5563
     
    143151! Recherche des traceurs connus : Be7, O3, CO2,...
    144152! --------------------------------------------
    145     id_be=0
    146     id_o3=0
    147     DO it=1,nbtr
    148        iiq=niadv(it+2)
    149        IF ( tname(iiq) == "BE" .OR. tname(iiq) == "Be" .OR.  &
     153    id_rn=0; id_pb=0; id_aga=0; id_be=0; id_o3=0
     154    DO it=1,nbtr
     155       iiq=niadv(it+2)
     156       IF ( tname(iiq) == "RN" ) THEN
     157          id_rn=it ! radon
     158       ELSE IF ( tname(iiq) == "PB") THEN
     159          id_pb=it ! plomb
     160       ELSE IF ( tname(iiq) == "Aga" .OR. tname(iiq) == "AGA" ) THEN
     161          ! Age of stratospheric air
     162          id_aga=it
     163          radio(id_aga) = .FALSE.
     164          aerosol(id_aga) = .FALSE.
     165          pbl_flg(id_aga) = 0
     166         
     167          ! Find the first model layer above 1.5km from the surface
     168          IF (klev>=30) THEN
     169             lev_1p5km=6   ! NB! This value is for klev=39
     170          ELSE IF (klev>=10) THEN
     171             lev_1p5km=5   ! NB! This value is for klev=19
     172          ELSE
     173             lev_1p5km=klev/2
     174          END IF
     175       ELSE IF ( tname(iiq) == "BE" .OR. tname(iiq) == "Be" .OR.  &
    150176            tname(iiq) == "BE7" .OR. tname(iiq) == "Be7" ) THEN 
    151177          ! Recherche du Beryllium 7
     
    165191
    166192    id_dry=0
    167 
    168193    DO it=1,nbtr
    169194       iiq=niadv(it+2)
     
    224249! Valeurs specifiques pour les traceurs Rn222 et Pb210
    225250! ----------------------------------------------
    226     IF (rnpb) THEN
    227         
    228        radio(1)= .TRUE.
    229        radio(2)= .TRUE.
    230        pbl_flg(1) = 0 ! au lieu de clsol=true ! CL au sol calcule
    231        pbl_flg(2) = 0 ! au lieu de clsol=true
    232        
    233        aerosol(2) = .TRUE. ! le Pb est un aerosol
     251    IF ( id_rn/=0 .AND. id_pb/=0 ) THEN
     252       rnpb = .TRUE.
     253       radio(id_rn)= .TRUE.
     254       radio(id_pb)= .TRUE.
     255       pbl_flg(id_rn) = 0 ! au lieu de clsol=true ! CL au sol calcule
     256       pbl_flg(id_pb) = 0 ! au lieu de clsol=true
     257       aerosol(id_rn) = .FALSE.
     258       aerosol(id_pb) = .TRUE. ! le Pb est un aerosol
    234259       
    235260       CALL initrrnpb (ftsol,pctsrf,masktr,fshtr,hsoltr,tautr,vdeptr,scavtr)
     
    480505       WRITE(solsym(it),'(i2)') it
    481506    END DO
     507
     508!=================================================================
     509! Update tracer : Age of stratospheric air
     510!=================================================================
     511    IF (id_aga/=0) THEN
     512       
     513       ! Bottom layers
     514       DO k = 1, lev_1p5km
     515          tr_seri(:,k,id_aga) = 0.0
     516       END DO
     517       
     518       ! Layers above 1.5km
     519       DO k = lev_1p5km+1,klev-1
     520          tr_seri(:,k,id_aga) = tr_seri(:,k,id_aga) + pdtphys
     521       END DO
     522       
     523       ! Top layer
     524       tr_seri(:,klev,id_aga) = tr_seri(:,klev-1,id_aga)
     525       
     526    END IF
     527
    482528!======================================================================
    483529!     -- Calcul de l'effet de la couche limite --
     
    497543   
    498544    DO it=1, nbtr
    499        IF (couchelimite .AND. pbl_flg(it) == 0 ) THEN ! couche limite avec quantite dans le sol calculee
     545       IF (couchelimite .AND. pbl_flg(it) == 0 .AND. (it==id_rn .OR. it==id_pb)) THEN
     546          ! couche limite avec quantite dans le sol calculee
    500547          CALL cltracrn(it, pdtphys, yu1, yv1,     &
    501548               cdragh, coefh,t_seri,ftsol,pctsrf,  &
Note: See TracChangeset for help on using the changeset viewer.