Ignore:
Timestamp:
Jul 15, 2024, 10:42:14 PM (4 months ago)
Author:
evignon
Message:

coherence entre phylmdiso et phylmd

Location:
LMDZ6/branches/cirrus/libf/phylmdiso
Files:
1 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/cirrus/libf/phylmdiso/phyetat0_mod.F90

    r4619 r5055  
    2525       du_gwd_rando, du_gwd_front, entr_therm, f0, fm_therm, &
    2626       falb_dir, falb_dif, prw_ancien, prlw_ancien, prsw_ancien, prbsw_ancien, &
    27        ftsol, pbl_tke, pctsrf, q_ancien, ql_ancien, qs_ancien, qbs_ancien, rneb_ancien, radpas, radsol, rain_fall, ratqs, &
     27       ftsol, pbl_tke, pctsrf, q_ancien, ql_ancien, qs_ancien, qbs_ancien, &
     28       cf_ancien, rvc_ancien, radpas, radsol, rain_fall, ratqs, &
    2829       rnebcon, rugoro, sig1, snow_fall, bs_fall, solaire_etat0, sollw, sollwdown, &
    2930       solsw, solswfdiff, t_ancien, u_ancien, v_ancien, w01, wake_cstar, wake_deltaq, &
     
    412413  ancien_ok=ancien_ok.AND.phyetat0_get(ql_ancien,"QLANCIEN","QLANCIEN",0.)
    413414  ancien_ok=ancien_ok.AND.phyetat0_get(qs_ancien,"QSANCIEN","QSANCIEN",0.)
    414   ancien_ok=ancien_ok.AND.phyetat0_get(rneb_ancien,"RNEBANCIEN","RNEBANCIEN",0.)
    415415  ancien_ok=ancien_ok.AND.phyetat0_get(u_ancien,"UANCIEN","UANCIEN",0.)
    416416  ancien_ok=ancien_ok.AND.phyetat0_get(v_ancien,"VANCIEN","VANCIEN",0.)
     
    427427     prbsw_ancien(:)=0.
    428428  ENDIF
    429 
     429 
     430  ! cas specifique des variables de la sursaturation par rapport a la glace
     431  IF ( ok_ice_supersat ) THEN
     432    ancien_ok=ancien_ok.AND.phyetat0_get(cf_ancien,"CFANCIEN","CFANCIEN",0.)
     433    ancien_ok=ancien_ok.AND.phyetat0_get(rvc_ancien,"RVCANCIEN","RVCANCIEN",0.)
     434  ELSE
     435    cf_ancien(:,:)=0.
     436    rvc_ancien(:,:)=0.
     437  ENDIF
    430438
    431439  ! Ehouarn: addtional tests to check if t_ancien, q_ancien contain
     
    435443       (maxval(ql_ancien).EQ.minval(ql_ancien))     .OR. &
    436444       (maxval(qs_ancien).EQ.minval(qs_ancien))     .OR. &
    437        (maxval(rneb_ancien).EQ.minval(rneb_ancien)) .OR. &
    438445       (maxval(prw_ancien).EQ.minval(prw_ancien))   .OR. &
    439446       (maxval(prlw_ancien).EQ.minval(prlw_ancien)) .OR. &
     
    450457  ENDIF
    451458
     459  IF ( ok_ice_supersat ) THEN
     460    IF ( (maxval(cf_ancien).EQ.minval(cf_ancien))     .OR. &
     461         (maxval(rvc_ancien).EQ.minval(rvc_ancien)) ) THEN
     462       ancien_ok=.false.
     463     ENDIF
     464  ENDIF
    452465
    453466  found=phyetat0_get(clwcon,"CLWCON","CLWCON",0.)
  • LMDZ6/branches/cirrus/libf/phylmdiso/phyredem.F90

    r4613 r5055  
    1919                                zval, rugoro, t_ancien, q_ancien,            &
    2020                                prw_ancien, prlw_ancien, prsw_ancien, prbsw_ancien,      &
    21                                 ql_ancien, qs_ancien, qbs_ancien,  u_ancien, &
    22                                 v_ancien, clwcon, rnebcon, ratqs, pbl_tke,   &
     21                                ql_ancien, qs_ancien, qbs_ancien, cf_ancien, &
     22                                rvc_ancien, u_ancien, v_ancien,              &
     23                                clwcon, rnebcon, ratqs, pbl_tke,             &
    2324                                wake_delta_pbl_tke, zmax0, f0, sig1, w01,    &
    2425                                wake_deltat, wake_deltaq, wake_s, wake_dens, &
     
    265266       CALL put_field(pass,"QBSANCIEN", "QBSANCIEN", qbs_ancien)
    266267       CALL put_field(pass,"PRBSWANCIEN", "PRBSWANCIEN", prbsw_ancien)
     268    ENDIF
     269
     270    IF ( ok_ice_supersat ) THEN
     271      CALL put_field(pass,"CFANCIEN", "CFANCIEN", cf_ancien)
     272      CALL put_field(pass,"RVCANCIEN", "RVCANCIEN", rvc_ancien)
    267273    ENDIF
    268274
  • LMDZ6/branches/cirrus/libf/phylmdiso/phys_local_var_mod.F90

    r4920 r5055  
    1818      REAL, SAVE, ALLOCATABLE :: u_seri(:,:), v_seri(:,:)
    1919      !$OMP THREADPRIVATE(u_seri, v_seri)
    20       REAL, SAVE, ALLOCATABLE :: rneb_seri(:,:)
    21       !$OMP THREADPRIVATE(rneb_seri)
    22       REAL, SAVE, ALLOCATABLE :: d_rneb_dyn(:,:)
    23       !$OMP THREADPRIVATE(d_rneb_dyn)
     20      REAL, SAVE, ALLOCATABLE :: cf_seri(:,:), rvc_seri(:,:)
     21      !$OMP THREADPRIVATE(cf_seri, rvc_seri)
    2422      REAL, SAVE, ALLOCATABLE :: l_mixmin(:,:,:),l_mix(:,:,:),wprime(:,:,:)
    2523      !$OMP THREADPRIVATE(l_mixmin, l_mix, wprime)
     
    3836      REAL, SAVE, ALLOCATABLE :: d_u_dyn(:,:), d_v_dyn(:,:)
    3937      !$OMP THREADPRIVATE(d_u_dyn, d_v_dyn)
     38      REAL, SAVE, ALLOCATABLE :: d_cf_dyn(:,:), d_rvc_dyn(:,:)
     39      !$OMP THREADPRIVATE(d_cf_dyn, d_rvc_dyn)
    4040      REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:,:,:)
    4141      !$OMP THREADPRIVATE(d_tr_dyn)
     
    348348!$OMP THREADPRIVATE(cdragm, cdragh)
    349349      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cldh, cldl, cldm, cldq, cldt, qsat2m
    350 !$OMP THREADPRIVATE(cldh, cldl, cldm, cldq, cldt, qsat2m )
     350!$OMP THREADPRIVATE(cldh, cldl, cldm, cldq, cldt, qsat2m)
    351351!AS: cldhjn, cldljn, cldmjn,cldtjn pas utilisés en tant que variables, juste noms de diagnostics
    352352      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: JrNt
     
    573573!$OMP THREADPRIVATE(phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD)
    574574
     575
    575576! ug et d'autres encore:
    576577      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: beta_prec
     
    580581      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: pfraclr,pfracld
    581582!$OMP THREADPRIVATE(pfraclr,pfracld)
    582       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: distcltop
    583 !$OMP THREADPRIVATE(distcltop)
    584       REAL, SAVE, ALLOCATABLE :: temp_cltop(:,:)
    585 !$OMP THREADPRIVATE(temp_cltop)
    586583
    587584! variables de sorties MM
     
    605602!$OMP THREADPRIVATE(zn2mout)
    606603
    607       REAL, SAVE, ALLOCATABLE :: qclr(:,:)
    608       !$OMP THREADPRIVATE(qclr)
    609       REAL, SAVE, ALLOCATABLE :: qcld(:,:)
    610       !$OMP THREADPRIVATE(qcld)
    611       REAL, SAVE, ALLOCATABLE :: qss(:,:)
    612       !$OMP THREADPRIVATE(qss)
    613       REAL, SAVE, ALLOCATABLE :: qvc(:,:)
    614       !$OMP THREADPRIVATE(qvc)
    615       REAL, SAVE, ALLOCATABLE :: rnebclr(:,:)
    616       !$OMP THREADPRIVATE(rnebclr)
    617       REAL, SAVE, ALLOCATABLE :: rnebss(:,:)
    618       !$OMP THREADPRIVATE(rnebss)
    619       REAL, SAVE, ALLOCATABLE :: gamma_ss(:,:)
    620       !$OMP THREADPRIVATE(gamma_ss)
    621       REAL, SAVE, ALLOCATABLE :: N1_ss(:,:)
    622       !$OMP THREADPRIVATE(N1_ss)
    623       REAL, SAVE, ALLOCATABLE :: N2_ss(:,:)
    624       !$OMP THREADPRIVATE(N2_ss)
    625       REAL, SAVE, ALLOCATABLE :: drneb_sub(:,:)
    626       !$OMP THREADPRIVATE(drneb_sub)
    627       REAL, SAVE, ALLOCATABLE :: drneb_con(:,:)
    628       !$OMP THREADPRIVATE(drneb_con)
    629       REAL, SAVE, ALLOCATABLE :: drneb_tur(:,:)
    630       !$OMP THREADPRIVATE(drneb_tur)
    631       REAL, SAVE, ALLOCATABLE :: drneb_avi(:,:)
    632       !$OMP THREADPRIVATE(drneb_avi)
    633       REAL, SAVE, ALLOCATABLE :: zqsatl(:,:)
    634       !$OMP THREADPRIVATE(zqsatl)
    635       REAL, SAVE, ALLOCATABLE :: zqsats(:,:)
    636       !$OMP THREADPRIVATE(zqsats)
    637       REAL, SAVE, ALLOCATABLE :: Tcontr(:,:)
    638       !$OMP THREADPRIVATE(Tcontr)
    639       REAL, SAVE, ALLOCATABLE :: qcontr(:,:)
    640       !$OMP THREADPRIVATE(qcontr)
    641       REAL, SAVE, ALLOCATABLE :: qcontr2(:,:)
    642       !$OMP THREADPRIVATE(qcontr2)
    643       REAL, SAVE, ALLOCATABLE :: fcontrN(:,:)
    644       !$OMP THREADPRIVATE(fcontrN)
    645       REAL, SAVE, ALLOCATABLE :: fcontrP(:,:)
    646       !$OMP THREADPRIVATE(fcontrP)
    647 
    648 !--POPRECIP variables
     604!-- LSCP - condensation and ice supersaturation variables
     605      REAL, SAVE, ALLOCATABLE :: qsub(:,:), qissr(:,:), qcld(:,:)
     606      !$OMP THREADPRIVATE(qsub, qissr, qcld)
     607      REAL, SAVE, ALLOCATABLE :: subfra(:,:), issrfra(:,:)
     608      !$OMP THREADPRIVATE(subfra, issrfra)
     609      REAL, SAVE, ALLOCATABLE :: gamma_cond(:,:)
     610      !$OMP THREADPRIVATE(gamma_cond)
     611      REAL, SAVE, ALLOCATABLE :: ratio_qi_qtot(:,:)
     612      !$OMP THREADPRIVATE(ratio_qi_qtot)
     613      REAL, SAVE, ALLOCATABLE :: dcf_sub(:,:), dcf_con(:,:), dcf_mix(:,:)
     614      !$OMP THREADPRIVATE(dcf_sub, dcf_con, dcf_mix)
     615      REAL, SAVE, ALLOCATABLE :: dqi_adj(:,:), dqi_sub(:,:), dqi_con(:,:), dqi_mix(:,:)
     616      !$OMP THREADPRIVATE(dqi_adj, dqi_sub, dqi_con, dqi_mix)
     617      REAL, SAVE, ALLOCATABLE :: dqvc_adj(:,:), dqvc_sub(:,:), dqvc_con(:,:), dqvc_mix(:,:)
     618      !$OMP THREADPRIVATE(dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix)
     619      REAL, SAVE, ALLOCATABLE :: qsatliq(:,:), qsatice(:,:)
     620      !$OMP THREADPRIVATE(qsatliq, qsatice)
     621
     622!-- LSCP - aviation and contrails variables
     623      REAL, SAVE, ALLOCATABLE :: Tcontr(:,:), qcontr(:,:), qcontr2(:,:)
     624      !$OMP THREADPRIVATE(Tcontr, qcontr, qcontr2)
     625      REAL, SAVE, ALLOCATABLE :: fcontrN(:,:), fcontrP(:,:)
     626      !$OMP THREADPRIVATE(fcontrN, fcontrP)
     627      REAL, SAVE, ALLOCATABLE :: dcf_avi(:,:), dqi_avi(:,:), dqvc_avi(:,:)
     628      !$OMP THREADPRIVATE(dcf_avi, dqi_avi, dqvc_avi)
     629      REAL, SAVE, ALLOCATABLE :: flight_dist(:,:), flight_h2o(:,:)
     630      !$OMP THREADPRIVATE(flight_dist, flight_h2o)
     631
     632!-- LSCP - mixed phase clouds variables
     633      REAL, SAVE, ALLOCATABLE :: distcltop(:,:)
     634      !$OMP THREADPRIVATE(distcltop)
     635      REAL, SAVE, ALLOCATABLE :: temp_cltop(:,:)
     636      !$OMP THREADPRIVATE(temp_cltop)
     637
     638!-- LSCP - POPRECIP variables
    649639      REAL, SAVE, ALLOCATABLE :: qraindiag(:,:)
    650640      !$OMP THREADPRIVATE(qraindiag)
     
    675665
    676666
    677 
     667     
    678668
    679669
     
    771761      ALLOCATE(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev), qbs_seri(klon,klev))
    772762      ALLOCATE(u_seri(klon,klev),v_seri(klon,klev))
     763      ALLOCATE(cf_seri(klon,klev),rvc_seri(klon,klev))
    773764      ALLOCATE(l_mixmin(klon,klev+1,nbsrf),l_mix(klon,klev+1,nbsrf),wprime(klon,klev+1,nbsrf))
     765      ALLOCATE(pbl_eps(klon,klev+1,nbsrf+1))
     766      pbl_eps(:,:,:)=0.
    774767      l_mix(:,:,:)=0.;l_mixmin(:,:,:)=0.;wprime(:,:,:)=0. ! doit etre initialse car pas toujours remplis
    775       ALLOCATE(pbl_eps(klon,klev+1,nbsrf+1))     
     768      ALLOCATE(rhcl(klon,klev))
    776769      ALLOCATE(tr_seri(klon,klev,nbtr))
    777770      ALLOCATE(d_t_dyn(klon,klev),d_q_dyn(klon,klev))
     
    779772      ALLOCATE(d_q_dyn2d(klon),d_ql_dyn2d(klon),d_qs_dyn2d(klon), d_qbs_dyn2d(klon))
    780773      ALLOCATE(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
     774      ALLOCATE(d_cf_dyn(klon,klev),d_rvc_dyn(klon,klev))
    781775      ALLOCATE(d_tr_dyn(klon,klev,nbtr))                   !RomP
    782776      ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev),d_q_con_zmasse(klon,klev))
     
    11031097      ALLOCATE(temp_cltop(klon,klev))
    11041098
     1099
    11051100      ALLOCATE (zxsnow(klon),snowhgt(klon),qsnow(klon),to_ice(klon))
    11061101      ALLOCATE (sissnow(klon),runoff(klon),albsol3_lic(klon))
     
    11171112      ALLOCATE(zn2mout(klon,6))
    11181113
    1119 ! Supersaturation
    1120       ALLOCATE(rneb_seri(klon,klev))
    1121       ALLOCATE(d_rneb_dyn(klon,klev))
    1122       ALLOCATE(qclr(klon,klev), qcld(klon,klev), qss(klon,klev), qvc(klon,klev))
    1123       ALLOCATE(rnebclr(klon,klev), rnebss(klon,klev), gamma_ss(klon,klev))
    1124       ALLOCATE(N1_ss(klon,klev), N2_ss(klon,klev))
    1125       ALLOCATE(drneb_sub(klon,klev), drneb_con(klon,klev), drneb_tur(klon,klev), drneb_avi(klon,klev))
    1126       ALLOCATE(zqsatl(klon,klev), zqsats(klon,klev))
    1127       ALLOCATE(Tcontr(klon,klev), qcontr(klon,klev), qcontr2(klon,klev), fcontrN(klon,klev), fcontrP(klon,klev))
    1128 
    1129 !--POPRECIP variables
    1130       ALLOCATE(dqreva(klon,klev),dqssub(klon,klev))
    1131       ALLOCATE(qraindiag(klon,klev), qsnowdiag(klon,klev))
     1114!-- LSCP - condensation and ice supersaturation variables
     1115      ALLOCATE(qsub(klon,klev), qissr(klon,klev), qcld(klon,klev))
     1116      ALLOCATE(subfra(klon,klev), issrfra(klon,klev))
     1117      ALLOCATE(gamma_cond(klon,klev), ratio_qi_qtot(klon,klev))
     1118      ALLOCATE(dcf_sub(klon,klev), dcf_con(klon,klev), dcf_mix(klon,klev))
     1119      ALLOCATE(dqi_adj(klon,klev), dqi_sub(klon,klev), dqi_con(klon,klev), dqi_mix(klon,klev))
     1120      ALLOCATE(dqvc_adj(klon,klev), dqvc_sub(klon,klev), dqvc_con(klon,klev), dqvc_mix(klon,klev))
     1121      ALLOCATE(qsatliq(klon,klev), qsatice(klon,klev))
     1122
     1123!-- LSCP - aviation and contrails variables
     1124      ALLOCATE(Tcontr(klon,klev), qcontr(klon,klev), qcontr2(klon,klev))
     1125      ALLOCATE(fcontrN(klon,klev), fcontrP(klon,klev))
     1126      ALLOCATE(dcf_avi(klon,klev), dqi_avi(klon,klev), dqvc_avi(klon,klev))
     1127      ALLOCATE(flight_dist(klon,klev), flight_h2o(klon,klev))
     1128
     1129!-- LSCP - POPRECIP variables
     1130      ALLOCATE(qraindiag(klon,klev), qsnowdiag(klon,klev))
     1131      ALLOCATE(dqreva(klon,klev), dqssub(klon,klev))
    11321132      ALLOCATE(dqrauto(klon,klev), dqrcol(klon,klev), dqrmelt(klon,klev), dqrfreez(klon,klev))
    11331133      ALLOCATE(dqsauto(klon,klev), dqsagg(klon,klev), dqsrim(klon,klev), dqsmelt(klon,klev), dqsfreez(klon,klev))
     
    11821182      DEALLOCATE(t_seri,q_seri,ql_seri,qs_seri, qbs_seri)
    11831183      DEALLOCATE(u_seri,v_seri)
     1184      DEALLOCATE(cf_seri,rvc_seri)
    11841185      DEALLOCATE(l_mixmin,l_mix,wprime)
    11851186      DEALLOCATE(pbl_eps)
    1186 
     1187      DEALLOCATE(rhcl)
    11871188      DEALLOCATE(tr_seri)
    11881189      DEALLOCATE(d_t_dyn,d_q_dyn)
     
    11901191      DEALLOCATE(d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d, d_qbs_dyn2d)
    11911192      DEALLOCATE(d_u_dyn,d_v_dyn)
     1193      DEALLOCATE(d_cf_dyn,d_rvc_dyn)
    11921194      DEALLOCATE(d_tr_dyn)                      !RomP
    11931195      DEALLOCATE(d_t_con,d_q_con,d_q_con_zmasse)
     
    13521354      DEALLOCATE(zxfqcalving, zxfluxlat)
    13531355      DEALLOCATE(zxrunofflic)
    1354       DEALLOCATE(zxustartlic, zxrhoslic)
     1356      DEALLOCATE(zxustartlic, zxrhoslic, zxqsaltlic)
    13551357      DEALLOCATE(zxtsol, snow_lsc, zxfqfonte, zxqsurf)
    13561358      DEALLOCATE(rain_lsc)
     
    14821484      DEALLOCATE(zn2mout)
    14831485
    1484 ! Supersaturation
    1485       DEALLOCATE(rneb_seri)
    1486       DEALLOCATE(d_rneb_dyn)
    1487       DEALLOCATE(qclr, qcld, qss, qvc)
    1488       DEALLOCATE(rnebclr, rnebss, gamma_ss)
    1489       DEALLOCATE(N1_ss, N2_ss)
    1490       DEALLOCATE(drneb_sub, drneb_con, drneb_tur, drneb_avi)
    1491       DEALLOCATE(zqsatl, zqsats)
    1492       DEALLOCATE(Tcontr, qcontr, qcontr2, fcontrN, fcontrP)
    1493 
    1494 !--POPRECIP variables
    1495       DEALLOCATE(qraindiag, qsnowdiag)
    1496       DEALLOCATE(dqreva,dqssub)
    1497       DEALLOCATE(dqrauto,dqrcol,dqrmelt,dqrfreez)
    1498       DEALLOCATE(dqsauto,dqsagg,dqsrim,dqsmelt,dqsfreez)
     1486!-- LSCP - condensation and ice supersaturation variables
     1487      DEALLOCATE(qsub, qissr, qcld)
     1488      DEALLOCATE(subfra, issrfra)
     1489      DEALLOCATE(gamma_cond, ratio_qi_qtot)
     1490      DEALLOCATE(dcf_sub, dcf_con, dcf_mix)
     1491      DEALLOCATE(dqi_adj, dqi_sub, dqi_con, dqi_mix)
     1492      DEALLOCATE(dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix)
     1493      DEALLOCATE(qsatliq, qsatice)
     1494
     1495!-- LSCP - aviation and contrails variables
     1496      DEALLOCATE(Tcontr, qcontr, qcontr2)
     1497      DEALLOCATE(fcontrN, fcontrP)
     1498      DEALLOCATE(dcf_avi, dqi_avi, dqvc_avi)
     1499      DEALLOCATE(flight_dist, flight_h2o)
     1500
     1501!-- LSCP - POPRECIP variables
     1502      DEALLOCATE(qraindiag, qsnowdiag)
     1503      DEALLOCATE(dqreva, dqssub)
     1504      DEALLOCATE(dqrauto, dqrcol, dqrmelt, dqrfreez)
     1505      DEALLOCATE(dqsauto, dqsagg, dqsrim, dqsmelt, dqsfreez)
    14991506
    15001507#ifdef CPP_StratAer
  • LMDZ6/branches/cirrus/libf/phylmdiso/phys_output_ctrlout_mod.F90

    r4889 r5055  
    450450  TYPE(ctrl_out), SAVE :: o_SWdn200clr = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
    451451    'SWdn200clr', 'SWdn clear sky at 200mb', 'W/m2', (/ ('', i=1, 10) /))
    452 
    453   ! arajouter
    454   !  type(ctrl_out),save :: o_LWupTOA     = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'LWupTOA', &
    455   !    (/ ('', i=1, 10) /))
    456   !  type(ctrl_out),save :: o_LWupTOAclr  = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'LWupTOAclr', &
    457   !    (/ ('', i=1, 10) /))
     452  TYPE(ctrl_out), SAVE :: o_LWupTOA = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/), &
     453    'LWupTOA', 'LWup at TOA', 'W/m2', (/ ('', i=1, 10) /))
     454  TYPE(ctrl_out), SAVE :: o_LWupTOAclr = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/), &
     455    'LWupTOAclr', 'LWup clear sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
    458456  !  type(ctrl_out),save :: o_LWdnTOA     = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'LWdnTOA', &
    459457  !    (/ ('', i=1, 10) /))
     
    20932091    'albslw3', 'Surface albedo LW3', '-', (/ ('', i=1, 10) /))
    20942092
    2095 !--aviation & supersaturation
    2096   TYPE(ctrl_out), SAVE :: o_oclr = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2097     'oclr', 'Clear sky total water', 'kg/kg', (/ ('', i=1, 10) /))
    2098   TYPE(ctrl_out), SAVE :: o_ocld = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2099     'ocld', 'Cloudy sky total water', 'kg/kg', (/ ('', i=1, 10) /))
    2100   TYPE(ctrl_out), SAVE :: o_oss = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2101     'oss', 'ISSR total water', 'kg/kg', (/ ('', i=1, 10) /))
    2102   TYPE(ctrl_out), SAVE :: o_ovc = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2103     'ovc', 'In-cloup vapor', 'kg/kg', (/ ('', i=1, 10) /))
    2104   TYPE(ctrl_out), SAVE :: o_rnebclr = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2105     'rnebclr', 'Clear sky fraction', '-', (/ ('', i=1, 10) /))
    2106   TYPE(ctrl_out), SAVE :: o_rnebss = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2107     'rnebss', 'ISSR fraction', '-', (/ ('', i=1, 10) /))
    2108   TYPE(ctrl_out), SAVE :: o_rnebseri = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2109     'rnebseri', 'Cloud fraction', '-', (/ ('', i=1, 10) /))
    2110   TYPE(ctrl_out), SAVE :: o_gammass = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2111     'gammass', 'Gamma supersaturation', '', (/ ('', i=1, 10) /))
    2112   TYPE(ctrl_out), SAVE :: o_N1_ss = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2113     'N1ss', 'N1', '', (/ ('', i=1, 10) /))
    2114   TYPE(ctrl_out), SAVE :: o_N2_ss = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2115     'N2ss', 'N2', '', (/ ('', i=1, 10) /))
    2116   TYPE(ctrl_out), SAVE :: o_drnebsub = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2117     'drnebsub', 'Cloud fraction change because of sublimation', 's-1', (/ ('', i=1, 10) /))
    2118   TYPE(ctrl_out), SAVE :: o_drnebcon = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2119     'drnebcon', 'Cloud fraction change because of condensation', 's-1', (/ ('', i=1, 10) /))
    2120   TYPE(ctrl_out), SAVE :: o_drnebtur = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2121     'drnebtur', 'Cloud fraction change because of turbulence', 's-1', (/ ('', i=1, 10) /))
    2122   TYPE(ctrl_out), SAVE :: o_drnebavi = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2123     'drnebavi', 'Cloud fraction change because of aviation', 's-1', (/ ('', i=1, 10) /))
    2124   TYPE(ctrl_out), SAVE :: o_qsatl = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2125     'qsatl', 'Saturation with respect to liquid water', '', (/ ('', i=1, 10) /))
    2126   TYPE(ctrl_out), SAVE :: o_qsats = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2127     'qsats', 'Saturation with respect to solid water', '', (/ ('', i=1, 10) /))
    2128   TYPE(ctrl_out), SAVE :: o_flight_m = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2129     'flightm', 'Flown meters', 'm/s/mesh', (/ ('', i=1, 10) /))
    2130   TYPE(ctrl_out), SAVE :: o_flight_h2o = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    2131     'flighth2o', 'H2O flight emission', 'kg H2O/s/mesh', (/ ('', i=1, 10) /))
    2132   TYPE(ctrl_out), SAVE :: o_Tcontr = ctrl_out((/ 1, 1, 1, 1, 11, 11, 11, 11, 11, 11/),&
     2093!-- LSCP - condensation and ice supersaturation variables
     2094  TYPE(ctrl_out), SAVE :: o_cfseri = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2095    'cfseri', 'Cloud fraction', '-', (/ ('', i=1, 10) /))
     2096  TYPE(ctrl_out), SAVE :: o_dcfdyn = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2097    'dcfdyn', 'Dynamics cloud fraction tendency', 's-1', (/ ('', i=1, 10) /))
     2098  TYPE(ctrl_out), SAVE :: o_rvcseri = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2099    'rvcseri', 'Cloudy water vapor to total water vapor ratio', '-', (/ ('', i=1, 10) /))
     2100  TYPE(ctrl_out), SAVE :: o_drvcdyn = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2101    'drvcdyn', 'Dynamics cloudy water vapor to total water vapor ratio tendency', 's-1', (/ ('', i=1, 10) /))
     2102  TYPE(ctrl_out), SAVE :: o_qsub = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2103    'qsub', 'Subsaturated clear sky total water', 'kg/kg', (/ ('', i=1, 10) /))
     2104  TYPE(ctrl_out), SAVE :: o_qissr = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2105    'qissr', 'Supersaturated clear sky total water', 'kg/kg', (/ ('', i=1, 10) /))
     2106  TYPE(ctrl_out), SAVE :: o_qcld = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2107    'qcld', 'Cloudy sky total water', 'kg/kg', (/ ('', i=1, 10) /))
     2108  TYPE(ctrl_out), SAVE :: o_subfra = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2109    'subfra', 'Subsaturated clear sky fraction', '-', (/ ('', i=1, 10) /))
     2110  TYPE(ctrl_out), SAVE :: o_issrfra = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2111    'issrfra', 'Supersaturated clear sky fraction', '-', (/ ('', i=1, 10) /))
     2112  TYPE(ctrl_out), SAVE :: o_gammacond = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2113    'gammacond', 'Condensation threshold w.r.t. saturation', '-', (/ ('', i=1, 10) /))
     2114  TYPE(ctrl_out), SAVE :: o_dcfsub = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2115    'dcfsub', 'Sublimation cloud fraction tendency', 's-1', (/ ('', i=1, 10) /))
     2116  TYPE(ctrl_out), SAVE :: o_dcfcon = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2117    'dcfcon', 'Condensation cloud fraction tendency', 's-1', (/ ('', i=1, 10) /))
     2118  TYPE(ctrl_out), SAVE :: o_dcfmix = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2119    'dcfmix', 'Cloud mixing cloud fraction tendency', 's-1', (/ ('', i=1, 10) /))
     2120  TYPE(ctrl_out), SAVE :: o_dqiadj = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2121    'dqiadj', 'Temperature adjustment ice tendency', 'kg/kg/s', (/ ('', i=1, 10) /))
     2122  TYPE(ctrl_out), SAVE :: o_dqisub = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2123    'dqisub', 'Sublimation ice tendency', 'kg/kg/s', (/ ('', i=1, 10) /))
     2124  TYPE(ctrl_out), SAVE :: o_dqicon = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2125    'dqicon', 'Condensation ice tendency', 'kg/kg/s', (/ ('', i=1, 10) /))
     2126  TYPE(ctrl_out), SAVE :: o_dqimix = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2127    'dqimix', 'Cloud mixing ice tendency', 'kg/kg/s', (/ ('', i=1, 10) /))
     2128  TYPE(ctrl_out), SAVE :: o_dqvcadj = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2129    'dqvcadj', 'Temperature adjustment cloudy water vapor tendency', 'kg/kg/s', (/ ('', i=1, 10) /))
     2130  TYPE(ctrl_out), SAVE :: o_dqvcsub = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2131    'dqvcsub', 'Sublimation cloudy water vapor tendency', 'kg/kg/s', (/ ('', i=1, 10) /))
     2132  TYPE(ctrl_out), SAVE :: o_dqvccon = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2133    'dqvccon', 'Condensation cloudy water vapor tendency', 'kg/kg/s', (/ ('', i=1, 10) /))
     2134  TYPE(ctrl_out), SAVE :: o_dqvcmix = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2135    'dqvcmix', 'Cloud mixing cloudy water vapor tendency', 'kg/kg/s', (/ ('', i=1, 10) /))
     2136  TYPE(ctrl_out), SAVE :: o_qsatl = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2137    'qsatl', 'Saturation with respect to liquid', 'kg/kg', (/ ('', i=1, 10) /))
     2138  TYPE(ctrl_out), SAVE :: o_qsati = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2139    'qsati', 'Saturation with respect to ice', 'kg/kg', (/ ('', i=1, 10) /))
     2140
     2141!-- LSCP - aviation variables
     2142  TYPE(ctrl_out), SAVE :: o_Tcontr = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),&
    21332143    'Tcontr', 'Temperature threshold for contrail formation', 'K', (/ ('',i=1,10) /))
    2134   TYPE(ctrl_out), SAVE :: o_qcontr = ctrl_out((/ 1, 1, 1, 1, 11, 11, 11, 11, 11, 11/),&
    2135     'qcontr', 'Specific humidity threshold for contrail formation','Pa', (/ ('', i=1, 10) /))
    2136   TYPE(ctrl_out), SAVE :: o_qcontr2 = ctrl_out((/ 1, 1, 1, 1, 11, 11, 11, 11, 11, 11/),&
    2137     'qcontr2', 'Specific humidity threshold for contrail formation','kg/kg', (/ ('', i=1, 10) /))
    2138   TYPE(ctrl_out), SAVE :: o_fcontrN = ctrl_out((/ 2, 2, 2, 2, 2, 2, 11, 11, 11, 11/),&
     2144  TYPE(ctrl_out), SAVE :: o_qcontr = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),&
     2145    'qcontr', 'Specific humidity threshold for contrail formation', 'Pa', (/ ('', i=1, 10) /))
     2146  TYPE(ctrl_out), SAVE :: o_qcontr2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),&
     2147    'qcontr2', 'Specific humidity threshold for contrail formation', 'kg/kg', (/ ('', i=1, 10) /))
     2148  TYPE(ctrl_out), SAVE :: o_fcontrN = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),&
    21392149    'fcontrN', 'Fraction with non-persistent contrail in clear-sky', '-', (/ ('', i=1,10)/))
    2140   TYPE(ctrl_out), SAVE :: o_fcontrP = ctrl_out((/ 2, 2, 2, 2, 2, 2, 11, 11, 11, 11/),&
     2150  TYPE(ctrl_out), SAVE :: o_fcontrP = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),&
    21412151    'fcontrP', 'Fraction with persistent contrail in ISSR', '-', (/ ('', i=1,10)/))
     2152  TYPE(ctrl_out), SAVE :: o_dcfavi = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2153    'dcfavi', 'Aviation cloud fraction tendency', 's-1', (/ ('', i=1, 10) /))
     2154  TYPE(ctrl_out), SAVE :: o_dqiavi = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2155    'dqiavi', 'Aviation ice tendency', 'kg/kg/s', (/ ('', i=1, 10) /))
     2156  TYPE(ctrl_out), SAVE :: o_dqvcavi = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2157    'dqvcavi', 'Aviation cloudy water vapor tendency', 'kg/kg/s', (/ ('', i=1, 10) /))
     2158  TYPE(ctrl_out), SAVE :: o_flight_dist = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2159    'flightdist', 'Aviation flown distance', 'm/s/mesh', (/ ('', i=1, 10) /))
     2160  TYPE(ctrl_out), SAVE :: o_flight_h2o = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2161    'flighth2o', 'Aviation H2O flight emission', 'kg H2O/s/mesh', (/ ('', i=1, 10) /))
    21422162
    21432163!!!!!!!!!!!!! Sorties niveaux standards de pression NMC
  • LMDZ6/branches/cirrus/libf/phylmdiso/physiq_mod.F90

    r4881 r5055  
    7373    USE tracinca_mod, ONLY: config_inca
    7474    USE tropopause_m,     ONLY: dyn_tropopause
    75     USE ice_sursat_mod,  ONLY: flight_init, airplane
    7675    USE vampir
    7776    USE write_field_phy
     
    192191       ! [Variables internes non sauvegardees de la physique]
    193192       ! Variables locales pour effectuer les appels en serie
    194        t_seri,q_seri,ql_seri,qs_seri,qbs_seri,u_seri,v_seri,tr_seri,rneb_seri, &
     193       t_seri,q_seri,ql_seri,qs_seri,qbs_seri, &
     194       u_seri,v_seri,cf_seri,rvc_seri,tr_seri, &
     195       rhcl, &       
    195196       ! Dynamic tendencies (diagnostics)
    196        d_t_dyn,d_q_dyn,d_ql_dyn,d_qs_dyn,d_qbs_dyn,d_u_dyn,d_v_dyn,d_tr_dyn,d_rneb_dyn, &
     197       d_t_dyn,d_q_dyn,d_ql_dyn,d_qs_dyn,d_qbs_dyn, &
     198       d_u_dyn,d_v_dyn,d_cf_dyn,d_rvc_dyn,d_tr_dyn, &
    197199       d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d,d_qbs_dyn2d, &
    198200       ! Physic tendencies
     
    271273       JrNt,                             &
    272274       dthmin, evap, snowerosion,fder, plcl, plfc,   &
    273        prw, prlw, prsw, prbsw,                  &
     275       prw, prlw, prsw, prbsw, water_budget,         &
    274276       s_lcl, s_pblh, s_pblt, s_therm,   &
    275277       cdragm, cdragh,                   &
     
    346348       pfraclr,pfracld, &
    347349       distcltop,temp_cltop, &
    348        zqsatl, zqsats, &
    349        qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, &
     350       !-- LSCP - condensation and ice supersaturation variables
     351       qsub, qissr, qcld, subfra, issrfra, gamma_cond, ratio_qi_qtot, &
     352       dcf_sub, dcf_con, dcf_mix, dqi_adj, dqi_sub, dqi_con, dqi_mix, &
     353       dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix, qsatliq, qsatice, &
     354       !-- LSCP - aviation and contrails variables
    350355       Tcontr, qcontr, qcontr2, fcontrN, fcontrP, &
     356       dcf_avi, dqi_avi, dqvc_avi, flight_dist, flight_h2o, &
     357       !
    351358       cldemi,  &
    352359       cldfra, cldtau, fiwc,  &
     
    359366       t2m, fluxlat,  &
    360367       fsollw, evap_pot,  &
    361        fsolsw, wfbils, wfevap,  &
     368       fsolsw, wfbils, wfevap,
    362369       prfl, psfl,bsfl, fraca, Vprecip,  &
    363370       zw2,  &
     
    373380       rneb,  &
    374381       zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic, &
    375        zxfluxt,zxfluxq
     382       zxfluxt,zxfluxq 
    376383
    377384
     
    549556    !
    550557    ! indices de traceurs eau vapeur, liquide, glace, fraction nuageuse LS (optional), blowing snow (optional)
    551     INTEGER,SAVE :: ivap, iliq, isol, irneb, ibs
    552 !$OMP THREADPRIVATE(ivap, iliq, isol, irneb, ibs)
     558    INTEGER,SAVE :: ivap, iliq, isol, ibs, icf, irvc
     559!$OMP THREADPRIVATE(ivap, iliq, isol, ibs, icf, irvc)
    553560    !
    554561    !
     
    921928    ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    922929    !
    923     REAL rhcl(klon,klev)    ! humiditi relative ciel clair
     930!    REAL rhcl(klon,klev)    ! humiditi relative ciel clair
    924931    REAL dialiq(klon,klev)  ! eau liquide nuageuse
    925932    REAL diafra(klon,klev)  ! fraction nuageuse
     
    14071414       iliq = strIdx(tracers(:)%name, addPhase('H2O', 'l'))
    14081415       isol = strIdx(tracers(:)%name, addPhase('H2O', 's'))
    1409        irneb= strIdx(tracers(:)%name, addPhase('H2O', 'r'))
    14101416       ibs  = strIdx(tracers(:)%name, addPhase('H2O', 'b'))
    1411        CALL init_etat0_limit_unstruct
     1417       icf  = strIdx(tracers(:)%name, addPhase('H2O', 'f'))
     1418       irvc = strIdx(tracers(:)%name, addPhase('H2O', 'c'))
     1419!       CALL init_etat0_limit_unstruct
    14121420       IF (.NOT. create_etat0_limit) CALL init_limit_read(days_elapsed)
    14131421       !CR:nvelles variables convection/poches froides
     
    14541462       ENDIF
    14551463
    1456        IF (ok_ice_sursat.AND.(iflag_ice_thermo.EQ.0)) THEN
    1457           WRITE (lunout, *) ' ok_ice_sursat=y requires iflag_ice_thermo=1 as well'
     1464       IF (ok_ice_supersat.AND.(iflag_ice_thermo.EQ.0)) THEN
     1465          WRITE (lunout, *) ' ok_ice_supersat=y requires iflag_ice_thermo=1 as well'
    14581466          abort_message='see above'
    14591467          CALL abort_physic(modname,abort_message,1)
    14601468       ENDIF
    14611469
    1462        IF (ok_ice_sursat.AND.(nqo.LT.4)) THEN
    1463           WRITE (lunout, *) ' ok_ice_sursat=y requires 4 H2O tracers ', &
    1464                '(H2O_g, H2O_l, H2O_s, H2O_r) but nqo=', nqo, '. Might as well stop here.'
     1470       IF (ok_ice_supersat.AND.(nqo.LT.5)) THEN
     1471          WRITE (lunout, *) ' ok_ice_supersat=y requires 5 H2O tracers ', &
     1472               '(H2O_g, H2O_l, H2O_s, H2O_f, H2O_c) but nqo=', nqo, '. Might as well stop here.'
    14651473          abort_message='see above'
    14661474          CALL abort_physic(modname,abort_message,1)
    14671475       ENDIF
    14681476
    1469        IF (ok_plane_h2o.AND..NOT.ok_ice_sursat) THEN
    1470           WRITE (lunout, *) ' ok_plane_h2o=y requires ok_ice_sursat=y '
     1477       IF (ok_plane_h2o.AND..NOT.ok_ice_supersat) THEN
     1478          WRITE (lunout, *) ' ok_plane_h2o=y requires ok_ice_supersat=y '
    14711479          abort_message='see above'
    14721480          CALL abort_physic(modname,abort_message,1)
    14731481       ENDIF
    14741482
    1475        IF (ok_plane_contrail.AND..NOT.ok_ice_sursat) THEN
    1476           WRITE (lunout, *) ' ok_plane_contrail=y requires ok_ice_sursat=y '
     1483       IF (ok_plane_contrail.AND..NOT.ok_ice_supersat) THEN
     1484          WRITE (lunout, *) ' ok_plane_contrail=y requires ok_ice_supersat=y '
    14771485          abort_message='see above'
    14781486          CALL abort_physic(modname,abort_message,1)
     
    14821490          abort_message='blowing snow cannot be activated with water isotopes yet'
    14831491          CALL abort_physic(modname,abort_message, 1)
    1484          IF ((ok_ice_sursat.AND.nqo .LT.5).OR.(.NOT.ok_ice_sursat.AND.nqo.LT.4)) THEN
     1492         IF ((ok_ice_supersat.AND.nqo .LT.6).OR.(.NOT.ok_ice_supersat.AND.nqo.LT.4)) THEN
    14851493             WRITE (lunout, *) 'activation of blowing snow needs a specific H2O tracer', &
    14861494                               'but nqo=', nqo
     
    19501958   &    RG,RD,RCPD,RKAPPA,RLVTT,RETV)
    19511959       CALL ratqs_ini(klon,klev,iflag_thermals,lunout,nbsrf,is_lic,is_ter,RG,RV,RD,RCPD,RLSTT,RLVTT,RTT)
    1952        CALL lscp_ini(pdtphys,lunout,prt_level,ok_ice_sursat,iflag_ratqs,fl_cor_ebil,RCPD,RLSTT,RLVTT,RLMLT,RVTMP2,RTT,RD,RG,RPI)
     1960       CALL lscp_ini(pdtphys,lunout,prt_level,ok_ice_supersat,iflag_ratqs,fl_cor_ebil, &
     1961                     RCPD,RLSTT,RLVTT,RLMLT,RVTMP2,RTT,RD,RV,RG,RPI,EPS_W)
    19531962       CALL blowing_snow_ini(RCPD, RLSTT, RLVTT, RLMLT, &
    19541963                             RVTMP2, RTT,RD,RG, RV, RPI)
     
    20012010                              ptconv, read_climoz, clevSTD,                   &
    20022011                              ptconvth, d_u, d_t, qx, d_qx, zmasse,           &
    2003                               flag_aerosol, flag_aerosol_strat, ok_cdnc,t,u1,v1)
     2012                              flag_aerosol, flag_aerosol_strat, ok_cdnc, t, u1, v1)
    20042013#endif
    20052014
     
    24342443                    sollwdown(:))
    24352444
     2445      !--Init for LSCP - condensation
     2446      ratio_qi_qtot(:,:) = 0.
    24362447
    24372448
     
    25402551          q_seri(i,k)  = qx(i,k,ivap)
    25412552          ql_seri(i,k) = qx(i,k,iliq)
    2542           qbs_seri(i,k) = 0.
     2553          qbs_seri(i,k)= 0.
     2554          cf_seri(i,k) = 0.
     2555          rvc_seri(i,k)= 0.
    25432556          !CR: ATTENTION, on rajoute la variable glace
    25442557          IF (nqo.EQ.2) THEN             !--vapour and liquid only
    25452558             qs_seri(i,k) = 0.
    2546              rneb_seri(i,k) = 0.
    25472559          ELSE IF (nqo.EQ.3) THEN        !--vapour, liquid and ice
    25482560             qs_seri(i,k) = qx(i,k,isol)
    2549              rneb_seri(i,k) = 0.
    2550           ELSE IF (nqo.GE.4) THEN        !--vapour, liquid, ice and rneb and blowing snow
     2561          ELSE IF (nqo.GE.4) THEN        !--vapour, liquid, ice, blowing snow, cloud fraction and cloudy water vapor to total water vapor ratio
    25512562             qs_seri(i,k) = qx(i,k,isol)
    2552              IF (ok_ice_sursat) THEN
    2553              rneb_seri(i,k) = qx(i,k,irneb)
     2563             IF (ok_ice_supersat) THEN
     2564               cf_seri(i,k) = qx(i,k,icf)
     2565               rvc_seri(i,k) = qx(i,k,irvc)
    25542566             ENDIF
    25552567             IF (ok_bs) THEN
    2556              qbs_seri(i,k)= qx(i,k,ibs)
     2568               qbs_seri(i,k)= qx(i,k,ibs)
    25572569             ENDIF
    2558 
    25592570          ENDIF
    2560 
    2561 
    25622571       ENDDO
    25632572    ENDDO
     
    27172726       d_ql_dyn(:,:) = (ql_seri(:,:)-ql_ancien(:,:))/phys_tstep
    27182727       d_qs_dyn(:,:) = (qs_seri(:,:)-qs_ancien(:,:))/phys_tstep
    2719        d_qbs_dyn(:,:) = (qbs_seri(:,:)-qbs_ancien(:,:))/phys_tstep
     2728       d_qbs_dyn(:,:)= (qbs_seri(:,:)-qbs_ancien(:,:))/phys_tstep
     2729       d_cf_dyn(:,:) = (cf_seri(:,:)-cf_ancien(:,:))/phys_tstep
     2730       d_rvc_dyn(:,:)= (rvc_seri(:,:)-rvc_ancien(:,:))/phys_tstep
    27202731       CALL water_int(klon,klev,q_seri,zmasse,zx_tmp_fi2d)
    27212732       d_q_dyn2d(:)=(zx_tmp_fi2d(:)-prw_ancien(:))/phys_tstep
     
    27292740       IF (nqtot > nqo) d_tr_dyn(:,:,:)=(tr_seri(:,:,:)-tr_ancien(:,:,:))/phys_tstep
    27302741       ! !! RomP <<<
    2731        !!d_rneb_dyn(:,:)=(rneb_seri(:,:)-rneb_ancien(:,:))/phys_tstep
    2732        d_rneb_dyn(:,:)=0.0
    27332742
    27342743#ifdef ISO
     
    28092818       d_ql_dyn(:,:) = 0.0
    28102819       d_qs_dyn(:,:) = 0.0
     2820       d_qbs_dyn(:,:)= 0.0
     2821       d_cf_dyn(:,:) = 0.0
     2822       d_rvc_dyn(:,:)= 0.0
    28112823       d_q_dyn2d(:)  = 0.0
    28122824       d_ql_dyn2d(:) = 0.0
     
    28352847       IF (nqtot > nqo) d_tr_dyn(:,:,:)= 0.0
    28362848       ! !! RomP <<<
    2837        d_rneb_dyn(:,:)=0.0
    2838        d_qbs_dyn(:,:)=0.0
    28392849       ancien_ok = .TRUE.
    28402850    ENDIF
     
    29442954          ! "zmasse" changes a little.)
    29452955       ENDIF
     2956    ENDIF
     2957
     2958    !-- Needed for LSCP - condensation and ice supersaturation
     2959    IF (ok_ice_supersat) THEN
     2960      DO k = 1, klev
     2961        DO i = 1, klon
     2962          IF ( ( q_seri(i,k) + ql_seri(i,k) + qs_seri(i,k) ) .GT. 0. ) THEN
     2963            ratio_qi_qtot(i,k) = qs_seri(i,k) / ( q_seri(i,k) + ql_seri(i,k) + qs_seri(i,k) )
     2964            rvc_seri(i,k) = rvc_seri(i,k) * q_seri(i,k) / ( q_seri(i,k) + ql_seri(i,k) + qs_seri(i,k) )
     2965          ELSE
     2966            ratio_qi_qtot(i,k) = 0.
     2967            rvc_seri(i,k) = 0.
     2968          ENDIF
     2969        ENDDO
     2970      ENDDO
    29462971    ENDIF
    29472972
     
    48724897
    48734898    !--mise à jour de flight_m et flight_h2o dans leur module
    4874     IF (ok_plane_h2o .OR. ok_plane_contrail) THEN
    4875       CALL airplane(debut,pphis,pplay,paprs,t_seri)
    4876     ENDIF
     4899    !IF (ok_plane_h2o .OR. ok_plane_contrail) THEN
     4900    !  CALL airplane(debut,pphis,pplay,paprs,t_seri)
     4901    !ENDIF
    48774902
    48784903    CALL lscp(klon,klev,phys_tstep,missing_val,paprs,pplay, &
    48794904         t_seri, q_seri,ptconv,ratqs, &
    4880          d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneblsvol, rneb_seri, &
     4905         d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneblsvol, &
    48814906         pfraclr,pfracld, &
    48824907         radocond, picefra, rain_lsc, snow_lsc, &
     
    48844909         prfl, psfl, rhcl,  &
    48854910         zqasc, fraca,ztv,zpspsk,ztla,zthl,iflag_cld_th, &
    4886          iflag_ice_thermo, ok_ice_sursat, zqsatl, zqsats, distcltop, temp_cltop, &
    4887          qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, &
    4888          Tcontr, qcontr, qcontr2, fcontrN, fcontrP , &
     4911         iflag_ice_thermo, distcltop, temp_cltop, cell_area, &
     4912         cf_seri, rvc_seri, u_seri, v_seri, pbl_eps(:,:,is_ave), &
     4913         qsub, qissr, qcld, subfra, issrfra, gamma_cond, ratio_qi_qtot, &
     4914         dcf_sub, dcf_con, dcf_mix, dqi_adj, dqi_sub, dqi_con, dqi_mix, &
     4915         dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix, qsatliq, qsatice, &
     4916         Tcontr, qcontr, qcontr2, fcontrN, fcontrP, &
     4917         dcf_avi, dqi_avi, dqvc_avi, flight_dist, flight_h2o, &
    48894918         cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv, &
    48904919         qraindiag, qsnowdiag, dqreva, dqssub, dqrauto, dqrcol, dqrmelt, &
     
    68236852             d_qx(i,k,isol) = ( qs_seri(i,k) - qx(i,k,isol) ) / phys_tstep
    68246853          ENDIF
    6825           !--ice_sursat: nqo=4, on ajoute rneb
    6826           IF (nqo.ge.4 .and. ok_ice_sursat) THEN
    6827              d_qx(i,k,irneb) = ( rneb_seri(i,k) - qx(i,k,irneb) ) / phys_tstep
     6854          !--ice_supersat: nqo=5, we add cloud fraction and cloudy water vapor to total water vapor ratio
     6855          IF (nqo.ge.5 .and. ok_ice_supersat) THEN
     6856             d_qx(i,k,icf) = ( cf_seri(i,k) - qx(i,k,icf) ) / phys_tstep
     6857             d_qx(i,k,irvc) = ( rvc_seri(i,k) - qx(i,k,irvc) ) / phys_tstep
    68286858          ENDIF
    68296859
     
    68316861             d_qx(i,k,ibs) = ( qbs_seri(i,k) - qx(i,k,ibs) ) / phys_tstep
    68326862          ENDIF
    6833 
    68346863
    68356864       ENDDO
     
    69266955    ql_ancien(:,:) = ql_seri(:,:)
    69276956    qs_ancien(:,:) = qs_seri(:,:)
    6928     qbs_ancien(:,:) = qbs_seri(:,:)
    6929     rneb_ancien(:,:) = rneb_seri(:,:)
     6957    qbs_ancien(:,:)= qbs_seri(:,:)
     6958    cf_ancien(:,:) = cf_seri(:,:)
     6959    rvc_ancien(:,:)= rvc_seri(:,:)
    69306960#ifdef ISO
    69316961    xt_ancien(:,:,:)=xt_seri(:,:,:)
Note: See TracChangeset for help on using the changeset viewer.