Ignore:
Timestamp:
May 27, 2008, 6:42:49 PM (16 years ago)
Author:
lsce
Message:
  • Ajoute du parametre config_inca dans conf_gcm.F config_inca='none'(sans INCA, par defaut) config_inca='chem'(avec INCA config chemie) config_inca='aero'(avec INCA config aerosol)
  • Menage parmis les cles CPP INCA
  • Enleve le calcul d'omega dans calfis.F et active le calcul correspondant dans advtrac.F(avant uniquement pour INCA).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/trunk/libf/phylmd/physiq.F

    r956 r959  
    99     .            paprs,pplay,pphi,pphis,presnivs,clesphy0,
    1010     .            u,v,t,qx,
    11      .            omega,
    12 #ifdef INCA
    1311     .            flxmass_w,
    14 #endif
    1512     .            d_u, d_v, d_t, d_qx, d_ps
    1613     .            , dudyn
     
    8077c d_t_dyn-input-R-tendance dynamique pour "t" (K/s)
    8178c d_q_dyn-input-R-tendance dynamique pour "q" (kg/kg/s)
    82 c omega---input-R-vitesse verticale en Pa/s
     79c flxmass_w -input-R- flux de masse verticale
    8380c d_u-----output-R-tendance physique de "u" (m/s/s)
    8481c d_v-----output-R-tendance physique de "v" (m/s/s)
     
    119116      PARAMETER (ok_stratus=.FALSE.)
    120117c======================================================================
    121       logical rnpb
    122 #ifdef INCA
    123       parameter(rnpb=.false.)
    124 #else
    125       parameter(rnpb=.true.)
    126 #endif
    127 
     118      LOGICAL :: rnpb=.TRUE.
    128119cIM "slab" ocean
    129120      REAL tslab(klon)    !Temperature du slab-ocean
     
    215206      REAL t(klon,klev),theta(klon,klev)
    216207      REAL qx(klon,klev,nqmax)
    217 
    218       REAL omega(klon,klev)
    219 
    220 #ifdef INCA
    221208      REAL flxmass_w(klon,klev)
    222 #endif
     209      REAL omega(klon,klev) ! vitesse verticale en Pa/s
    223210      REAL d_u(klon,klev)
    224211      REAL d_v(klon,klev)
     
    682669      REAL frac_impa(klon,klev) ! fractions d'aerosols lessivees (impaction)
    683670      REAL frac_nucl(klon,klev) ! idem (nucleation)
    684 #ifdef INCA
    685671      INTEGER       :: iii
    686672      REAL          :: calday
    687 #endif
    688673
    689674cIM cf FH pour Tiedtke 080604
     
    10741059
    10751060      ! Aerosol optical properties
    1076 #ifdef INCA
    1077 ! Aerosol optical properties by INCA model
     1061
     1062      ! Aerosol optical properties by INCA model
    10781063      CHARACTER*4              ::    rfname(9)
    1079 #endif
    10801064      REAL aerindex(klon)       ! POLDER aerosol index
    10811065     
     
    10831067      LOGICAL ok_ade, ok_aie    ! Apply aerosol (in)direct effects or not
    10841068      REAL bl95_b0, bl95_b1   ! Parameter in Boucher and Lohmann (1995)
    1085 cym
    10861069      SAVE ok_ade, ok_aie, bl95_b0, bl95_b1
    10871070c$OMP THREADPRIVATE(ok_ade, ok_aie, bl95_b0, bl95_b1)
     
    12091192         solswai(:)=0.
    12101193         solswad(:)=0.
    1211 #ifdef INCA
    1212          tau_inca(:,:,:,:) = 0.
    1213          piz_inca(:,:,:,:) = 0.
    1214          cg_inca(:,:,:,:) = 0.
    1215          ccm(:,:,:)        = 0.
    1216          topswai_inca(:)   = 0.
    1217          topswad_inca(:)   = 0.
    1218          topswad0_inca(:)  = 0.
    1219          topsw_inca(:,:)   = 0.
    1220          topsw0_inca(:,:)  = 0.
    1221          solswai_inca(:)   = 0.
    1222          solswad_inca(:)   = 0.
    1223          solswad0_inca(:)  = 0.
    1224          solsw_inca(:,:)   = 0.
    1225          solsw0_inca(:,:)  = 0.
    1226 #endif
    1227 !rv
    1228 !ACo
     1194
     1195         IF (config_inca /= 'none') THEN
     1196            tau_inca(:,:,:,:) = 0.
     1197            piz_inca(:,:,:,:) = 0.
     1198            cg_inca(:,:,:,:)  = 0.
     1199            ccm(:,:,:)        = 0.
     1200            topswai_inca(:)   = 0.
     1201            topswad_inca(:)   = 0.
     1202            topswad0_inca(:)  = 0.
     1203            topsw_inca(:,:)   = 0.
     1204            topsw0_inca(:,:)  = 0.
     1205            solswai_inca(:)   = 0.
     1206            solswad_inca(:)   = 0.
     1207            solswad0_inca(:)  = 0.
     1208            solsw_inca(:,:)   = 0.
     1209            solsw0_inca(:,:)  = 0.
     1210         END IF
     1211
    12291212         rnebcon0(:,:) = 0.0
    12301213         clwcon0(:,:) = 0.0
    12311214         rnebcon(:,:) = 0.0
    12321215         clwcon(:,:) = 0.0
    1233 ! fin anne
    12341216
    12351217cIM     
     
    15591541cc         ENDDO
    15601542c
     1543      IF (config_inca /= 'none') THEN
    15611544#ifdef INCA
    1562            call VTe(VTphysiq)
    1563            call VTb(VTinca)
    1564            iii = MOD(NINT(xjour),360)
    1565            calday = FLOAT(iii) + gmtime
    1566            WRITE(lunout,*) 'initial time ', xjour, calday
    1567 #ifdef INCAINFO
    1568            WRITE(lunout,*) 'Appel CHEMINI ...'
    1569 #endif
    1570            CALL chemini(
     1545         CALL VTe(VTphysiq)
     1546         CALL VTb(VTinca)
     1547         iii = MOD(NINT(xjour),360)
     1548         calday = FLOAT(iii) + gmtime
     1549         WRITE(lunout,*) 'initial time ', xjour, calday
     1550
     1551         CALL chemini(
    15711552     $                   rg,
    15721553     $                   ra,
     
    15811562     $                   annee_ref,
    15821563     $                   day_ini)
    1583 #ifdef INCAINFO
    1584            WRITE(lunout,*) 'OK.'
     1564
     1565         CALL VTe(VTinca)
     1566         CALL VTb(VTphysiq)
    15851567#endif
    1586       call VTe(VTinca)
    1587       call VTb(VTphysiq)
    1588 #endif
     1568      END IF
    15891569c
    15901570      ENDIF
     
    19391919         ENDDO
    19401920      ENDIF
     1921
     1922c Calcule de vitesse verticale a partir de flux de masse verticale
     1923      DO k = 1, klev
     1924         DO i = 1, klon
     1925            omega(i,k) = RG*flxmass_w(i,k) / airephy(i)
     1926         END DO
     1927      END DO
     1928
    19411929      IF (iflag_con.EQ.1) THEN
    19421930          stop'reactiver le call conlmd dans physiq.F'
     
    25892577cjq - Johannes Quaas, 27/11/2003 (quaas@lmd.jussieu.fr)
    25902578      IF (ok_ade.OR.ok_aie) THEN
    2591          IF ( .NOT. aerosol_couple ) THEN
    2592             ! Get sulfate aerosol distribution
    2593             CALL readsulfate(rjourvrai, debut, sulfate)
    2594             CALL readsulfate_preind(rjourvrai, debut, sulfate_pi)
    2595 
    2596             ! Calculate aerosol optical properties (Olivier Boucher)
    2597             CALL aeropt(pplay, paprs, t_seri, sulfate, rhcl,
    2598      .           tau_ae, piz_ae, cg_ae, aerindex)
    2599          ENDIF
     2579       IF ( .NOT. aerosol_couple ) THEN
     2580         ! Get sulfate aerosol distribution
     2581         CALL readsulfate(rjourvrai, debut, sulfate)
     2582         CALL readsulfate_preind(rjourvrai, debut, sulfate_pi)
     2583
     2584         ! Calculate aerosol optical properties (Olivier Boucher)
     2585         CALL aeropt(pplay, paprs, t_seri, sulfate, rhcl,
     2586     .        tau_ae, piz_ae, cg_ae, aerindex)
     2587       ENDIF
    26002588      ELSE
    26012589        tau_ae(:,:,:)=0.0
    26022590        piz_ae(:,:,:)=0.0
    2603         cg_ae(:,:,:)=0.0
     2591        cg_ae(:,:,:)=0.0 
    26042592      ENDIF
    26052593
     
    26962684      ENDDO
    26972685
    2698 
     2686      IF (config_inca /= 'none') THEN
    26992687#ifdef INCA
    2700       call VTe(VTphysiq)
    2701       call VTb(VTinca)
    2702            calday = FLOAT(julien) + gmtime
    2703 
    2704 #ifdef INCA_AER
    2705       call AEROSOL_METEO_CALC(calday,pdtphys,pplay,paprs,t,pmflxr,pmflxs
    2706      &   ,prfl,psfl,pctsrf,airephy,xjour,rlat,rlon,u10m,v10m)
    2707 #endif
    2708 
    2709 #ifdef INCAINFO
    2710            WRITE(lunout,*)'Appel CHEMHOOK_BEGIN ...'
    2711 #endif
    2712 
    2713            zxsnow_dummy(:) = 0.0
    2714 
    2715            CALL chemhook_begin (calday,
    2716 #if defined(INCA) && !defined(INCA_CH4) && !defined(INCA_NMHC) && !defined(INCA_AER)
     2688         CALL VTe(VTphysiq)
     2689         CALL VTb(VTinca)
     2690         calday = FLOAT(julien) + gmtime
     2691
     2692         IF (config_inca == 'aero') THEN
     2693            CALL AEROSOL_METEO_CALC(calday,pdtphys,pplay,paprs,t,pmflxr,pmflxs
     2694     &           ,prfl,psfl,pctsrf,airephy,xjour,rlat,rlon,u10m,v10m)
     2695         END IF
     2696
     2697         zxsnow_dummy(:) = 0.0
     2698
     2699         CALL chemhook_begin (calday,
    27172700     $                          julien,
    27182701     $                          gmtime,
    2719 #endif
    27202702     $                          pctsrf(1,1),
    27212703     $                          rlat,
     
    27422724     $                          iim,
    27432725     $                          jjm,
    2744 #ifdef INCA_AER
    27452726     $                          tr_seri,
    27462727     $                          ftsol,
     
    27512732     $                          pdtphys,
    27522733     $                          itap)
    2753 #else
    2754      $                          tr_seri)     
    2755 #endif       
    2756 
    2757 
    2758 #ifdef INCAINFO
    2759            WRITE(lunout,*)'OK.'
    2760 #endif
    2761       call VTe(VTinca)
    2762       call VTb(VTphysiq)
    2763 #endif
     2734
     2735         CALL VTe(VTinca)
     2736         CALL VTb(VTphysiq)
     2737#endif
     2738      END IF !config_inca /= 'none'
    27642739c     
    27652740c Calculer les parametres optiques des nuages et quelques
    27662741c parametres pour diagnostiques:
    27672742c
    2768       IF (aerosol_couple ) THEN
    2769 #ifdef INCA
     2743
     2744      IF (aerosol_couple) THEN
    27702745         sulfate(:,:) = ccm(:,:,1)
    27712746         sulfate_pi(:,:) = ccm(:,:,2)
    2772 #endif
    27732747      ENDIF
    27742748
     
    28162790     
    28172791      IF (aerosol_couple) THEN
    2818 #ifdef INCA_AER
    2819          CALL radlwsw_inca 
     2792#ifdef INCA
     2793      CALL radlwsw_inca
    28202794     e            (kdlon,kflev,dist, rmu0, fract, solaire,
    28212795     e             paprs, pplay,zxtsol,albsol, albsollw, t_seri,q_seri,
     
    28382812#endif
    28392813      ELSE
    2840          CALL radlwsw ! nouveau rayonnement (compatible Arpege-IFS)
     2814      CALL radlwsw ! nouveau rayonnement (compatible Arpege-IFS)
    28412815     e            (dist, rmu0, fract,
    28422816     e             paprs, pplay,zxtsol,albsol1, albsol2, t_seri,q_seri,
     
    28552829     s             topswai, solswai) ! ="=
    28562830      ENDIF
    2857 
    28582831      itaprad = 0
    28592832      ENDIF
     
    30383011c====================================================================
    30393012C
     3013      IF (config_inca /= 'none') rnpb=.FALSE.
     3014
    30403015      call phytrac (     rnpb,
    30413016     I                   itap,
     
    30923067     I                   dnwd,
    30933068     I                   aerosol_couple,
    3094 #ifdef INCA
    30953069     I                   flxmass_w,
    30963070     I                   tau_inca,
     
    30993073     I                   ccm,
    31003074     I                   rfname,
    3101 #endif
    31023075     O                   tr_seri)
    31033076
     
    31903163#include "calcul_divers.h"
    31913164c
     3165      IF (config_inca /= 'none') THEN
    31923166#ifdef INCA
    3193       call VTe(VTphysiq)
    3194       call VTb(VTinca)
    3195 #ifdef INCAINFO
    3196            WRITE(lunout,*)'Appel CHEMHOOK_END ...'
    3197 #endif
    3198            CALL chemhook_end (calday,
     3167         CALL VTe(VTphysiq)
     3168         CALL VTb(VTinca)
     3169
     3170         CALL chemhook_end (calday,
    31993171     $                        dtime,
    32003172     $                        pplay,
     
    32073179     $                        day_ini,
    32083180     $                        airephy,
    3209 #ifdef INCA_AER
    32103181     $                        xjour,
    32113182     $                        pphi,
    32123183     $                        pphis,
    32133184     $                        zx_rh)
    3214 #else
    32153185     $                        xjour)
     3186
     3187         CALL VTe(VTinca)
     3188         CALL VTb(VTphysiq)
    32163189#endif
    3217 #ifdef INCAINFO
    3218            WRITE(lunout,*)'OK.'
    3219 #endif
    3220       call VTe(VTinca)
    3221       call VTb(VTphysiq)
    3222 #endif
     3190      END IF
    32233191
    32243192c=============================================================
Note: See TracChangeset for help on using the changeset viewer.