Changeset 5796 for LMDZ6


Ignore:
Timestamp:
Aug 4, 2025, 3:03:07 PM (11 days ago)
Author:
aborella
Message:

Additional diags for contrails + simplified coupling between deep conv and cirrus clouds + small modifsin RRTM for RF of contrails alone

Location:
LMDZ6/branches/contrails
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/contrails/DefLists/field_def_lmdz.xml

    r5791 r5796  
    612612        <field id="cldh_nocont"   long_name="High-level cloudiness w/o contrails"    unit="-" />
    613613        <field id="contcov"       long_name="Total contrails cover"    unit="-" />
    614         <field id="iwp_nocont"    long_name="Cloud ice water path w/o contrails"    unit="kg/m2" />
     614        <field id="iwp_cont"      long_name="Cloud ice water path of contrails"    unit="kg/m2" />
    615615        <field id="tops_nocont"   long_name="Solar rad. at TOA w/o contrails"    unit="W/m2" />
    616616        <field id="topl_nocont"   long_name="IR rad. at TOA w/o contrails"    unit="W/m2" />
     
    766766        <field id="dltpbltke_oce"    long_name="TKE difference (w - x)"    unit="m2/s2" />
    767767        <field id="dltpbltke_sic"    long_name="TKE difference (w - x)"    unit="m2/s2" />
    768         <field id="cldtau"    long_name="Cloud optical thickness"    unit="1" />
    769         <field id="cldemi"    long_name="Cloud optical emissivity"    unit="1" />
     768        <field id="cldtau"    long_name="Cloud optical thickness"    unit="1" detect_missing_value=".true." />
     769        <field id="cldemi"    long_name="Cloud optical emissivity"    unit="1" detect_missing_value=".true." />
    770770        <field id="tke_max"    long_name="TKE max"    unit="m2/s2" operation="maximum"/>
    771771        <field id="concso4"    long_name="Concentration of Sulfate "    unit="kg/m3" />
     
    953953        <field id="dmc"    long_name="Deep COnvective Mass Flux"    unit="kg/(m2*s)" />
    954954        <field id="ref_liq"    long_name="Effective radius of convective cloud liquid water particle"    unit="m" />
    955         <field id="ref_ice"    long_name="Effective radius of startiform cloud ice particle"    unit="m" />
     955        <field id="ref_ice"    long_name="Effective radius of startiform cloud ice particle"    unit="m" detect_missing_value=".true." />
    956956        <field id="stratomask"    long_name="Stratospheric fraction"    unit="-" />
    957957        <field id="heat_volc"    long_name="SW heating rate from volcano"    unit="K/s" />
     
    995995        <field id="nicseri"    long_name="Contrail ice crystals concentration" unit="#/kg" />
    996996        <field id="dnicdyn"    long_name="Dynamics contrail ice crystals concentration tendency" unit="#/kg/s" />
    997         <field id="Tcritcont"  long_name="Temperature threshold for contrail formation"    unit="K" />
    998         <field id="qcritcont"  long_name="Specific humidity threshold for contrail formation"    unit="kg/kg" />
    999         <field id="potcontfraP"  long_name="Fraction with pontential persistent contrail"    unit="-" />
    1000         <field id="potcontfraNP" long_name="Fraction with potential non-persistent contrail"    unit="-" />
     997        <field id="Tcritcont"  long_name="Temperature threshold for contrail formation"    unit="K" detect_missing_value=".true." />
     998        <field id="qcritcont"  long_name="Specific humidity threshold for contrail formation"    unit="kg/kg" detect_missing_value=".true." />
     999        <field id="potcontfraP"  long_name="Fraction with pontential persistent contrail"    unit="-" detect_missing_value=".true." />
     1000        <field id="potcontfraNP" long_name="Fraction with potential non-persistent contrail"    unit="-" detect_missing_value=".true." />
    10011001        <field id="qice_cont"  long_name="Contrails ice specific humidity"    unit="kg/kg" />
    10021002        <field id="dcfcini"    long_name="Initial formation contrail fraction tendency"    unit="s-1" />
     
    10231023        <field id="flightdist" long_name="Aviation flown distance concentration"    unit="m/s/m3" />
    10241024        <field id="flightfuel" long_name="Aviation fuel consumption concentration"    unit="kg/s/m3" />
    1025         <field id="AEI_cont"   long_name="Apparent emission index contrails"    unit="#/kg" />
    1026         <field id="AEI_surv_cont" long_name="Apparent emission index contrails after vortex loss"    unit="#/kg" />
    1027         <field id="fsurv_cont"    long_name="Survival fraction after vortex loss"    unit="-" />
    1028         <field id="section_cont"  long_name="Cross section of newly formed contrails"    unit="m2" />
     1025        <field id="AEI_cont"   long_name="Apparent emission index contrails"    unit="#/kg" detect_missing_value=".true." />
     1026        <field id="AEI_surv_cont" long_name="Apparent emission index contrails after vortex loss"    unit="#/kg" detect_missing_value=".true." />
     1027        <field id="fsurv_cont"    long_name="Survival fraction after vortex loss"    unit="-" detect_missing_value=".true." />
     1028        <field id="section_cont"  long_name="Cross section of newly formed contrails"    unit="m2" detect_missing_value=".true." />
     1029        <field id="nice_ygcont"   long_name="Ice particle number concentration in young contrails"    unit="#/cm3" detect_missing_value=".true." />
     1030        <field id="iwc_ygcont"    long_name="Ice water content in young contrails"    unit="g/m3" detect_missing_value=".true." />
     1031        <field id="rvol_ygcont"   long_name="Ice crystals volumic radius in young contrails"    unit="microns" detect_missing_value=".true." />
     1032        <field id="tau_ygcont"    long_name="Young contrails optical depth"    unit="-" detect_missing_value=".true." />
     1033        <field id="nice_cont"     long_name="Ice particle number concentration in contrails"    unit="#/cm3" detect_missing_value=".true." />
     1034        <field id="iwc_cont"      long_name="Ice water content in contrails"    unit="g/m3" detect_missing_value=".true." />
     1035        <field id="rvol_cont"     long_name="Ice crystals volumic radius in contrails"    unit="microns" detect_missing_value=".true." />
     1036        <field id="tau_cont"      long_name="Contrails optical depth"    unit="-" detect_missing_value=".true." />
    10291037        <field id="dqavi"         long_name="Water vapor emissions from aviation tendency"    unit="kg/kg/s" />
    1030         <field id="cldfra_nocont" long_name="Cloud fraction w/o contrails"    unit="-" />
    1031         <field id="cldtau_nocont" long_name="Cloud optical thickness w/o contrails"    unit="1" />
    1032         <field id="conttau" long_name="Contrails optical thickness"    unit="1" />
    1033         <field id="contemi" long_name="Contrails optical emissivity"    unit="1" />
    1034         <field id="cldemi_nocont" long_name="Cloud optical emissivity w/o contrails"    unit="1" />
    1035         <field id="iwc_nocont"    long_name="Cloud ice water content seen by radiation w/o contrails"    unit="kg/m3" />
    1036         <field id="ref_ice_nocont" long_name="Effective radius of ice crystals w/o contrails"    unit="microns" />
     1038        <field id="cldfra_cont"   long_name="Cloud fraction of contrails"    unit="-" />
     1039        <field id="conttau"       long_name="Contrails optical thickness"    unit="1" detect_missing_value=".true." />
     1040        <field id="contemi"       long_name="Contrails optical emissivity"    unit="1" detect_missing_value=".true." />
     1041        <field id="cldtau_nocont" long_name="Cloud optical thickness w/o contrails"    unit="1" detect_missing_value=".true." />
     1042        <field id="cldemi_nocont" long_name="Cloud optical emissivity w/o contrails"    unit="1" detect_missing_value=".true." />
     1043        <field id="iwcon_cont"    long_name="Cloud ice water content seen by radiation of contrails"    unit="kg/m3" />
     1044        <field id="ref_ice_cont"  long_name="Effective radius of ice crystals of contrails"    unit="microns" detect_missing_value=".true." />
    10371045
    10381046        <field id="fluxt"     long_name="flux h"     unit="W/m2" />
  • LMDZ6/branches/contrails/libf/phylmd/lmdz_aviation.f90

    r5790 r5796  
    225225    !--Add a source of contrails from aviation
    226226    IF ( ( potcontfraP(i) .GT. eps ) .AND. ( flight_dist(i) .GT. 1e-20 ) ) THEN
    227       !section_contrails(i) = CONTRAIL_CROSS_SECTION_ONERA()
    228       section_contrails(i) = CONTRAIL_CROSS_SECTION_SCHUMANN( &
     227      section_contrails(i) = CONTRAIL_CROSS_SECTION( &
    229228              dtime, rho(i), flight_dist(i), flight_fuel(i))
    230229      icesat_ratio = qpotcontP / potcontfraP(i) / qsat(i)
    231       !--If Nice init is fixed in the plume
    232       !Nice_per_m_init_contrails = Nice_init_contrails * 1e6 * section_contrails(i)
    233       !--Else if it is parameterized
    234230      CALL CONTRAIL_ICE_NUMBER_CONCENTRATION(temp(i), icesat_ratio, rho(i), &
    235               flight_dist(i), flight_fuel(i), Nice_per_m_init_contrails, &
     231              flight_dist(i), flight_fuel(i), section_contrails(i), &
     232              Nice_per_m_init_contrails, &
    236233              AEI_contrails(i), AEI_surv_contrails(i), fsurv_contrails(i))
    237234
     
    254251
    255252!**********************************************************************************
    256 FUNCTION CONTRAIL_CROSS_SECTION_ONERA()
    257 
    258 USE lmdz_lscp_ini, ONLY: initial_width_contrails, initial_height_contrails
    259 
    260 IMPLICIT NONE
    261 
    262 !
    263 ! Output
    264 !
    265 REAL :: contrail_cross_section_onera ! [m2]
    266 !
    267 ! Local
    268 !
    269 
    270 contrail_cross_section_onera = initial_width_contrails * initial_height_contrails
    271 
    272 END FUNCTION CONTRAIL_CROSS_SECTION_ONERA
    273 
    274 
    275 !**********************************************************************************
    276 !--Based on Schumann (1998)
    277 FUNCTION CONTRAIL_CROSS_SECTION_SCHUMANN(dtime, rho_air, flight_dist, flight_fuel)
    278 
     253FUNCTION CONTRAIL_CROSS_SECTION(dtime, rho_air, flight_dist, flight_fuel)
     254
     255USE lmdz_lscp_ini, ONLY: iflag_cross_sec_contrail
    279256USE lmdz_lscp_ini, ONLY: initial_width_contrails, initial_height_contrails
    280257
     
    291268! Output
    292269!
    293 REAL :: contrail_cross_section_schumann ! [m2]
     270REAL :: contrail_cross_section ! [m2]
    294271!
    295272! Local
     
    297274REAL :: dilution_factor
    298275
    299 !--The contrail is formed on average in the middle of the timestep
    300 dilution_factor = 7000. * (dtime / 2.)**0.8
    301 contrail_cross_section_schumann = flight_fuel / flight_dist * dilution_factor / rho_air
    302 
    303 END FUNCTION CONTRAIL_CROSS_SECTION_SCHUMANN
     276IF ( iflag_cross_sec_contrail .EQ. 0 ) THEN
     277  contrail_cross_section = initial_width_contrails * initial_height_contrails
     278ELSEIF ( iflag_cross_sec_contrail .EQ. 1 ) THEN
     279  !--Based on Schumann (1998)
     280  !--The contrail is formed on average in the middle of the timestep
     281  dilution_factor = 7000. * (dtime / 2.)**0.8
     282  contrail_cross_section = flight_fuel / flight_dist * dilution_factor / rho_air
     283ENDIF
     284
     285END FUNCTION CONTRAIL_CROSS_SECTION
    304286
    305287
    306288!**********************************************************************************
    307289SUBROUTINE CONTRAIL_ICE_NUMBER_CONCENTRATION(temp, icesat_ratio, rho_air, &
    308         flight_dist, flight_fuel, Nice_per_m_init_contrails, &
     290        flight_dist, flight_fuel, cross_section, Nice_per_m_init_contrails, &
    309291        AEI_contrails, AEI_surv_contrails, fsurv_contrails)
    310292
    311 USE lmdz_lscp_ini, ONLY: RPI
     293USE lmdz_lscp_ini, ONLY: RPI, iflag_AEI_contrail, iflag_vortex_loss
     294USE lmdz_lscp_ini, ONLY: Nice_init_contrails, fraction_survival_contrails
    312295USE lmdz_lscp_ini, ONLY: EI_soot_aviation, air_to_fuel_ratio_engine, wingspan
    313296USE lmdz_lscp_ini, ONLY: Naer_amb, raer_amb_mean, raer_amb_std, r_soot_mean, r_soot_std
     
    325308REAL, INTENT(IN)  :: flight_dist  ! flown distance [m/s/m3]
    326309REAL, INTENT(IN)  :: flight_fuel  ! fuel consumed [kg/s/m3]
     310REAL, INTENT(IN)  :: cross_section  ! contrail cross section [m2]
    327311!
    328312! Output
     
    344328REAL :: Nice_per_m, fuel_per_m, frac_surv
    345329
     330! fuel consumption in kg/m flown
     331fuel_per_m = flight_fuel / flight_dist
     332
    346333!------------------------------
    347334!--  INITIAL ICE NUCLEATION  --
    348335!------------------------------
    349336!
    350 !--Karcher et al. (2015), Bier and Burkhardt (2019, 2022)
    351 !log_liqsat_ratio = LOG(liq_satratio)
    352 
    353 !! dry core radius in nm
    354 !! HERE SHOULD IT BE liqsat_ratio OR liqsat_ratio - 1. ?
    355 !rd_act_amb = (4. / 27. / LOG(liqsat_ratio)**2 / 0.5)**(1./3.)
    356 !! Integrate lognormal distribution between rd_act_amb and +inf
    357 !coef_expo = 4. / SQRT(2. * RPI) / LOG(raer_amb_std)
    358 !phi_amb = 1. / (1. + (rd_act_amb / raer_amb_mean)**coef_expo)
    359 !
    360 !! BU22, Eq. A1, dry core radius in nm
    361 !rd_act_soot = 0.96453426 + 1.21152973 / log_liqsat_ratio - 0.00520358 / log_liqsat_ratio**2 &
    362 !        + 2.32286432e-5 / log_liqsat_ratio**3 - 4.36979055e-8 / log_liqsat_ratio**4
    363 !rd_act_soot = MIN(150., MAX(1., rd_act_soot))
    364 !! Integrate lognormal distribution between rd_act_amb and +inf
    365 !coef_expo = 4. / SQRT(2. * RPI) / LOG(r_soot_std)
    366 !phi_amb = 1. / (1. + (rd_act_soot / r_soot_mean)**coef_expo)
    367 !
    368 !dil_coef = (0.01 / t0)**0.9
    369 !
    370 !! BU22, Eq. 5b
    371 !AEI_soot = phi_soot * EI_soot_aviation
    372 !AEI_amb = phi_amb * air_to_fuel_ratio_engine * (1. - dil_coef) / dil_coef &
    373 !        / rho_air * Naer_amb * 1e6
    374 !AEI_contrails = AEI_soot + AEI_amb
    375 AEI_contrails = EI_soot_aviation
    376 
     337IF ( iflag_AEI_contrail .EQ. 0 ) THEN
     338  !--If Nice init is fixed in the plume, in #/cm3
     339  AEI_contrails = Nice_init_contrails * 1e6 * cross_section / fuel_per_m
     340ELSEIF ( iflag_AEI_contrail .EQ. 1 ) THEN
     341  AEI_contrails = EI_soot_aviation
     342!ELSEIF ( iflag_AEI_contrail .EQ. 2 ) THEN
     343!  !--Karcher et al. (2015), Bier and Burkhardt (2019, 2022)
     344!  log_liqsat_ratio = LOG(liq_satratio)
     345
     346!  ! dry core radius in nm
     347!  ! HERE SHOULD IT BE liqsat_ratio OR liqsat_ratio - 1. ?
     348!  rd_act_amb = (4. / 27. / LOG(liqsat_ratio)**2 / 0.5)**(1./3.)
     349!  ! Integrate lognormal distribution between rd_act_amb and +inf
     350!  coef_expo = 4. / SQRT(2. * RPI) / LOG(raer_amb_std)
     351!  phi_amb = 1. / (1. + (rd_act_amb / raer_amb_mean)**coef_expo)
     352
     353!  ! BU22, Eq. A1, dry core radius in nm
     354!  rd_act_soot = 0.96453426 + 1.21152973 / log_liqsat_ratio - 0.00520358 / log_liqsat_ratio**2 &
     355!          + 2.32286432e-5 / log_liqsat_ratio**3 - 4.36979055e-8 / log_liqsat_ratio**4
     356!  rd_act_soot = MIN(150., MAX(1., rd_act_soot))
     357!  ! Integrate lognormal distribution between rd_act_amb and +inf
     358!  coef_expo = 4. / SQRT(2. * RPI) / LOG(r_soot_std)
     359!  phi_amb = 1. / (1. + (rd_act_soot / r_soot_mean)**coef_expo)
     360
     361!  dil_coef = (0.01 / t0)**0.9
     362
     363!  ! BU22, Eq. 5b
     364!  AEI_soot = phi_soot * EI_soot_aviation
     365!  AEI_amb = phi_amb * air_to_fuel_ratio_engine * (1. - dil_coef) / dil_coef &
     366!          / rho_air * Naer_amb * 1e6
     367!  AEI_contrails = AEI_soot + AEI_amb
     368ENDIF
    377369
    378370!----------------------------
     
    383375!--which is an update of Unterstrasser (2016, U16 hereinafter)
    384376
    385 ! fuel consumption in kg/m flown
    386 fuel_per_m = flight_fuel / flight_dist
    387 
    388 ! LU25, Eq. A2
    389 z_atm = 607.46 * (icesat_ratio - 1.)**0.897 * (temp / 205.)**2.225
    390 
    391 ! water vapor emissions [kg/m flown], LU25, Eq. 2
    392 ! U16, Eq. 6
    393 rho_emit = fuel_per_m * EI_H2O_aviation / plume_area_loss
    394 ! LU25, Eq. A3
    395 temp_205 = temp - 205.
    396 z_emit = 1106.6 * (rho_emit * 1e5)**(0.678 + 0.0116 * temp_205) &
    397         * EXP(- (0.0807 + 0.000428 * temp_205) * temp_205)
    398 
    399 ! U16, Eq. 4
    400 z_desc = SQRT(8. * circ_0_loss / RPI / N_Brunt_Vaisala_aviation )
    401 
    402377! initial number of ice crystals [#/m flown], LU25, Eq. 1
    403378Nice_per_m = fuel_per_m * AEI_contrails
    404 ! ice crystals number concentration [#/m3], LU25, Eq. A1
    405 nice_init = Nice_per_m / plume_area_loss
    406 ! LU25, Eq. 9, 13d, 13e, 13f and 13g
    407 z_delta = (nice_init / nice_init_ref_loss)**(-0.16) * (1.27 * z_atm + 0.42 * z_emit) - 0.49 * z_desc
    408 
    409 ! LU25, Eq. 11, 12, 13a, 13b and 13c
    410 fsurv_contrails = 0.42 + 1.31 / RPI * ATAN(-1. + z_delta / 100.)
    411 fsurv_contrails = MIN(1., MAX(0., fsurv_contrails))
     379
     380IF ( iflag_vortex_loss .EQ. 0 ) THEN
     381  fsurv_contrails = fraction_survival_contrails
     382ELSEIF ( iflag_vortex_loss .EQ. 1 ) THEN
     383  ! LU25, Eq. A2
     384  z_atm = 607.46 * (icesat_ratio - 1.)**0.897 * (temp / 205.)**2.225
     385 
     386  ! water vapor emissions [kg/m flown], LU25, Eq. 2
     387  ! U16, Eq. 6
     388  rho_emit = fuel_per_m * EI_H2O_aviation / plume_area_loss
     389  ! LU25, Eq. A3
     390  temp_205 = temp - 205.
     391  z_emit = 1106.6 * (rho_emit * 1e5)**(0.678 + 0.0116 * temp_205) &
     392          * EXP(- (0.0807 + 0.000428 * temp_205) * temp_205)
     393 
     394  ! U16, Eq. 4
     395  z_desc = SQRT(8. * circ_0_loss / RPI / N_Brunt_Vaisala_aviation )
     396 
     397  ! U16, Eq. 3, 10d, 10e, 10f, 10g and 10h
     398  z_delta = (AEI_contrails / 2.8e14)**(-0.18) * (1.7 * z_atm + 1.15 * z_emit) - 0.6 * z_desc
     399 
     400  ! U16, Eq. 9, 10a, 10b and 10c
     401  fsurv_contrails = 0.4 + 1.19 / RPI * ATAN(-1.35 + z_delta / 100.)
     402  fsurv_contrails = MIN(1., MAX(0., fsurv_contrails))
     403ELSEIF ( iflag_vortex_loss .EQ. 2 ) THEN
     404  ! LU25, Eq. A2
     405  z_atm = 607.46 * (icesat_ratio - 1.)**0.897 * (temp / 205.)**2.225
     406 
     407  ! water vapor emissions [kg/m flown], LU25, Eq. 2
     408  ! U16, Eq. 6
     409  rho_emit = fuel_per_m * EI_H2O_aviation / plume_area_loss
     410  ! LU25, Eq. A3
     411  temp_205 = temp - 205.
     412  z_emit = 1106.6 * (rho_emit * 1e5)**(0.678 + 0.0116 * temp_205) &
     413          * EXP(- (0.0807 + 0.000428 * temp_205) * temp_205)
     414 
     415  ! U16, Eq. 4
     416  z_desc = SQRT(8. * circ_0_loss / RPI / N_Brunt_Vaisala_aviation )
     417 
     418  ! ice crystals number concentration [#/m3], LU25, Eq. A1
     419  nice_init = Nice_per_m / plume_area_loss
     420  ! LU25, Eq. 9, 13d, 13e, 13f and 13g
     421  z_delta = (nice_init / nice_init_ref_loss)**(-0.16) * (1.27 * z_atm + 0.42 * z_emit) - 0.49 * z_desc
     422 
     423  ! LU25, Eq. 11, 12, 13a, 13b and 13c
     424  fsurv_contrails = 0.42 + 1.31 / RPI * ATAN(-1. + z_delta / 100.)
     425  fsurv_contrails = MIN(1., MAX(0., fsurv_contrails))
     426ENDIF
    412427
    413428Nice_per_m_init_contrails = Nice_per_m * fsurv_contrails
  • LMDZ6/branches/contrails/libf/phylmd/lmdz_call_cloud_optics_prop.f90

    r5790 r5796  
    55
    66  SUBROUTINE call_cloud_optics_prop(klon, klev, ok_newmicro,&
    7        paprs, pplay, temp, radocond, picefra, pclc, &
     7       paprs, pplay, temp, radocond, picefra, pclf, pclc, &
    88    pcltau, pclemi, pch, pcl, pcm, pct, radocondwp, xflwp, xfiwp, xflwc, xfiwc, ok_aie, &
    99    mass_solu_aero, mass_solu_aero_pi, pcldtaupi, distcltop, temp_cltop, re, fl, reliq, reice, &
     
    1212    icefrac_optics, dNovrN, ptconv,rnebcon, ccwcon, &
    1313    !--AB contrails
    14     contfra, qice_cont, Nice_cont, pclc_nocont, &
     14    contfravol, contfra, qice_cont, Nice_cont, pclc_cont, &
    1515    pcltau_nocont, pclemi_nocont, pcltau_cont, pclemi_cont, pch_nocont, pct_cont, &
    16     xfiwp_nocont, xfiwc_nocont, reice_nocont)
     16    xfiwp_cont, xfiwc_cont, reice_cont, &
     17    missing_val)
    1718
    1819  ! Interface between the LMDZ physics monitor and the cloud properties calculation routines
     
    3435  ! input:
    3536  INTEGER, INTENT(IN) :: klon, klev      ! number of horizontal and vertical grid points
     37  REAL, INTENT(IN) :: missing_val
    3638  REAL, INTENT(IN) :: paprs(klon, klev+1)! pressure at bottom interfaces [Pa]
    3739  REAL, INTENT(IN) :: pplay(klon, klev)  ! pressure at the middle of layers [Pa]
     
    4850  REAL, INTENT(OUT) :: distcltop(klon,klev) ! distance from large scale cloud top [m]
    4951  REAL, INTENT(OUT) :: temp_cltop(klon,klev)!temperature at large scale cloud top [K]
     52  REAL, INTENT(IN) :: pclf(klon, klev)      ! cloud fraction for radiation [-]
    5053
    5154  LOGICAL, INTENT(IN) :: ptconv(klon, klev) ! flag for grid points affected by deep convection
     
    5356
    5457  ! inout:
    55   REAL, INTENT(INOUT) :: pclc(klon, klev) ! cloud fraction for radiation [-]
     58  REAL, INTENT(INOUT) :: pclc(klon, klev) ! cloud cover for radiation [-]
    5659
    5760  ! out:
     
    9598
    9699  !--AB for contrails. All these are used / outputed only if ok_plane_contrail=y
     100  REAL, INTENT(IN)  :: contfravol(klon, klev)    ! contrails volumic fraction [-]
    97101  REAL, INTENT(IN)  :: contfra(klon, klev)       ! contrails fraction [-]
    98102  REAL, INTENT(IN)  :: qice_cont(klon, klev)     ! contrails condensed water [kg/kg]
     
    100104  REAL, INTENT(OUT) :: pch_nocont(klon)          ! 2D high cloud cover without contrails[-]
    101105  REAL, INTENT(OUT) :: pct_cont(klon)            ! 2D total contrails cover[-]
    102   REAL, INTENT(OUT) :: xfiwp_nocont(klon)        ! ice water path (seen by radiation) without contrails [kg/m2]
    103   REAL, INTENT(OUT) :: xfiwc_nocont(klon, klev)  ! ice water content seen by radiation without contrails [kg/kg]
    104   REAL, INTENT(OUT) :: pclc_nocont(klon, klev)   ! cloud fraction for radiation without contrails [-]
     106  REAL, INTENT(OUT) :: xfiwp_cont(klon)          ! ice water path (seen by radiation) of contrails [kg/m2]
     107  REAL, INTENT(OUT) :: xfiwc_cont(klon, klev)    ! ice water content seen by radiation of contrails [kg/kg]
     108  REAL, INTENT(OUT) :: pclc_cont(klon, klev)     ! cloud fraction for radiation of contrails [-]
    105109  REAL, INTENT(OUT) :: pcltau_nocont(klon, klev) ! cloud optical depth without contrails [-]
    106110  REAL, INTENT(OUT) :: pclemi_nocont(klon, klev) ! cloud emissivity without contrails [-]
    107111  REAL, INTENT(OUT) :: pcltau_cont(klon, klev)   ! contrails optical depth [-]
    108112  REAL, INTENT(OUT) :: pclemi_cont(klon, klev)   ! contrails emissivity [-]
    109   REAL, INTENT(OUT) :: reice_nocont(klon, klev)  ! ice effective radius without contrails [micronts]
     113  REAL, INTENT(OUT) :: reice_cont(klon, klev)    ! ice effective radius of contrails [micronts]
    110114  !--AB
    111115
     
    131135
    132136  IF (ok_newmicro) THEN       
    133     CALL cloud_optics_prop(klon, klev, paprs, pplay, temp, radocond, picefra, pclc, &
     137    CALL cloud_optics_prop(klon, klev, paprs, pplay, temp, radocond, picefra, pclf, pclc, &
    134138    pcltau, pclemi, pch, pcl, pcm, pct, radocondwp, xflwp, xfiwp, xflwc, xfiwc, &
    135139    mass_solu_aero, mass_solu_aero_pi, pcldtaupi, distcltop, temp_cltop, re, fl, reliq, reice, &
     
    138142    icefrac_optics, dNovrN, ptconv,rnebcon, ccwcon, &
    139143    !--AB for contrails
    140     contfra, qice_cont, Nice_cont, pclc_nocont, pcltau_nocont, &
     144    contfravol, contfra, qice_cont, Nice_cont, pclc_cont, pcltau_nocont, &
    141145    pclemi_nocont, pcltau_cont, pclemi_cont, pch_nocont, pct_cont, &
    142     xfiwp_nocont, xfiwc_nocont, reice_nocont)
     146    xfiwp_cont, xfiwc_cont, reice_cont, &
     147    missing_val)
    143148  ELSE
    144149    CALL nuage (paprs, pplay, &
  • LMDZ6/branches/contrails/libf/phylmd/lmdz_cloud_optics_prop.f90

    r5790 r5796  
    44CONTAINS
    55
    6 SUBROUTINE cloud_optics_prop(klon, klev, paprs, pplay, temp, radocond, picefra, pclc, &
     6SUBROUTINE cloud_optics_prop(klon, klev, paprs, pplay, temp, radocond, picefra, pclf, pclc, &
    77    pcltau, pclemi, pch, pcl, pcm, pct, radocondwp, xflwp, xfiwp, xflwc, xfiwc, &
    88    mass_solu_aero, mass_solu_aero_pi, pcldtaupi, distcltop, temp_cltop, re, fl, reliq, reice, &
     
    1111    icefrac_optics, dNovrN, ptconv, rnebcon, ccwcon, &
    1212    !--AB contrails
    13     contfra, qice_cont, Nice_cont, pclc_nocont, pcltau_nocont, &
     13    contfravol, contfra, qice_cont, Nice_cont, pclc_cont, pcltau_nocont, &
    1414    pclemi_nocont, pcltau_cont, pclemi_cont, pch_nocont, pct_cont, &
    15     xfiwp_nocont, xfiwc_nocont, reice_nocont)
     15    xfiwp_cont, xfiwc_cont, reice_cont, &
     16    missing_val)
    1617
    1718  USE lmdz_cloud_optics_prop_ini , ONLY : flag_aerosol, ok_cdnc
     
    3334  USE lmdz_cloud_optics_prop_ini , ONLY : rei_coef, rei_min_temp
    3435  USE lmdz_cloud_optics_prop_ini , ONLY : zepsec, novlp, iflag_ice_thermo, ok_new_lscp
    35   USE lmdz_cloud_optics_prop_ini , ONLY : ok_plane_contrail, eff2vol_radius_contrails, rho_ice
     36  USE lmdz_cloud_optics_prop_ini , ONLY : ok_plane_contrail, rho_ice
     37  USE lmdz_cloud_optics_prop_ini , ONLY : eff2vol_radius_contrails, rei_min_contrails
    3638 
    3739
     
    5961  ! input:
    6062  INTEGER, INTENT(IN) :: klon, klev      ! number of horizontal and vertical grid points
     63  REAL, INTENT(IN) :: missing_val
    6164  REAL, INTENT(IN) :: paprs(klon, klev+1)! pressure at bottom interfaces [Pa]
    6265  REAL, INTENT(IN) :: pplay(klon, klev)  ! pressure at the middle of layers [Pa]
     
    7376  REAL, INTENT(OUT) :: distcltop(klon,klev) ! distance from large scale cloud top [m]
    7477  REAL, INTENT(OUT) :: temp_cltop(klon,klev)!temperature at large scale cloud top [K]
     78  REAL, INTENT(IN) :: pclf(klon, klev)      ! cloud fraction for radiation [-]
    7579
    7680  LOGICAL, INTENT(IN) :: ptconv(klon, klev) ! flag for grid points affected by deep convection
    7781
    7882  ! inout:
    79   REAL, INTENT(INOUT) :: pclc(klon, klev) ! cloud fraction for radiation [-]
     83  REAL, INTENT(INOUT) :: pclc(klon, klev) ! cloud cover for radiation [-]
    8084
    8185  ! out:
     
    119123
    120124  !--AB for contrails. All these are used / outputed only if ok_plane_contrail=y
    121   REAL, INTENT(IN)  :: contfra(klon, klev)       ! contrails fraction [-]
     125  REAL, INTENT(IN)  :: contfravol(klon, klev)    ! contrails volumic fraction [-]
     126  REAL, INTENT(IN)  :: contfra(klon, klev)       ! contrails fraction for radiation [-]
    122127  REAL, INTENT(IN)  :: qice_cont(klon, klev)     ! contrails condensed water [kg/kg]
    123128  REAL, INTENT(IN)  :: Nice_cont(klon, klev)     ! contrails ice crystals concentration [#/kg]
    124129  REAL, INTENT(OUT) :: pch_nocont(klon)          ! 2D high cloud cover without contrails[-]
    125130  REAL, INTENT(OUT) :: pct_cont(klon)            ! 2D total contrails cover[-]
    126   REAL, INTENT(OUT) :: xfiwp_nocont(klon)        ! ice water path (seen by radiation) without contrails [kg/m2]
    127   REAL, INTENT(OUT) :: xfiwc_nocont(klon, klev)  ! ice water content seen by radiation without contrails [kg/kg]
    128   REAL, INTENT(OUT) :: pclc_nocont(klon, klev)   ! cloud fraction for radiation without contrails [-]
     131  REAL, INTENT(OUT) :: xfiwp_cont(klon)          ! ice water path (seen by radiation) of contrails [kg/m2]
     132  REAL, INTENT(OUT) :: xfiwc_cont(klon, klev)    ! ice water content seen by radiation of contrails [kg/kg]
     133  REAL, INTENT(OUT) :: pclc_cont(klon, klev)     ! cloud fraction for radiation of contrails [-]
    129134  REAL, INTENT(OUT) :: pcltau_nocont(klon, klev) ! cloud optical depth without contrails [-]
    130135  REAL, INTENT(OUT) :: pclemi_nocont(klon, klev) ! cloud emissivity without contrails [-]
    131136  REAL, INTENT(OUT) :: pcltau_cont(klon, klev)   ! contrails optical depth [-]
    132137  REAL, INTENT(OUT) :: pclemi_cont(klon, klev)   ! contrails emissivity [-]
    133   REAL, INTENT(OUT) :: reice_nocont(klon, klev)  ! ice effective radius without contrails [microns]
     138  REAL, INTENT(OUT) :: reice_cont(klon, klev)    ! ice effective radius of contrails [microns]
    134139  !--AB
    135140
     
    172177  REAL zflwp_var, zfiwp_var
    173178  REAL d_rei_dt
    174   REAL pclc_cont(klon,klev)
     179  REAL pclc_nocont(klon,klev)
     180  REAL pclf_nocont(klon,klev)
     181  REAL xfiwc_nocont(klon,klev)
    175182  REAL mice_cont, rei_cont
    176183
     
    194201  xfiwc = 0.D0
    195202  !--AB
    196   IF ( ok_plane_contrail ) THEN
    197     xfiwp_nocont = 0.D0
    198     xfiwc_nocont = 0.D0
    199     reice_nocont = 0.
    200   ENDIF
     203  xfiwp_cont = 0.D0
     204  xfiwc_cont = 0.D0
     205  reice_cont = 1.
    201206
    202207  reliq = 0.
     
    254259      DO k = 1, klev
    255260        DO i = 1, klon
     261          pclf_nocont(i,k) = MAX(0., pclf(i, k) - contfravol(i, k))
    256262          pclc_nocont(i,k) = MAX(0., pclc(i, k) - contfra(i, k))
    257263          xfiwc_nocont(i, k) = MAX(0., xfiwc(i, k) - qice_cont(i, k))
     264          xfiwc_cont(i,k) = qice_cont(i,k)
    258265        ENDDO
    259266      ENDDO
     
    343350          IF (iflag_rei .EQ. 2) THEN
    344351            ! in-cloud ice water content in g/m3
    345             iwc = icefrac_optics(i,k) * radocond(i,k) / pclc(i,k) * zrho(i,k) * 1000.
     352            IF ( ptconv(i,k) ) THEN
     353              !--Needed because pclf does not contain convective clouds (should be fixed...)
     354              iwc = icefrac_optics(i,k) * radocond(i,k) / pclc(i,k) * zrho(i,k) * 1000.
     355            ELSE
     356              iwc = icefrac_optics(i,k) * radocond(i,k) / pclf(i,k) * zrho(i,k) * 1000.
     357            ENDIF
    346358            ! this formula is a simplified version of the Sun 2001 one (as in the IFS model,
    347359            ! and which is activated for iflag_rei = 1).
     
    355367            dei = rei_coef * (iwc**0.2445) * ( temp(i,k) - rei_min_temp )
    356368            ! we clip the results
    357             deimin = 20.
     369            deimin = 20. + 40. * COS(ABS(latitude_deg(i)) / 180. * RPI)
    358370            deimax = 155.
    359371            dei = MIN(MAX(dei, deimin), deimax)
     
    364376            ! It is recommended to use the rei formula from Sun and Rikkus 1999 with a revision
    365377            ! from Sun 2001 (as in the IFS model)
    366             iwc=icefrac_optics(i, k)*radocond(i, k)/pclc(i,k)*zrho(i,k)*1000. !in cloud ice water content in g/m3
     378            ! in cloud ice water content in g/m3
     379            IF ( ptconv(i,k) ) THEN
     380              !--Needed because pclf does not contain convective clouds (should be fixed...)
     381              iwc = icefrac_optics(i,k) * radocond(i,k) / pclc(i,k) * zrho(i,k) * 1000.
     382            ELSE
     383              iwc = icefrac_optics(i,k) * radocond(i,k) / pclf(i,k) * zrho(i,k) * 1000.
     384            ENDIF
    367385            dei=(1.2351+0.0105*(temp(i,k)-273.15))*(45.8966*(iwc**0.2214) + &
    368386               & 0.7957*(iwc**0.2535)*(temp(i,k)-83.15))
     
    371389            !Etienne: deimax and deimin controled by rei_max and rei_min in physiq.def
    372390            deimax=rei_max*2.0
    373             deimin=2.0*rei_min+40*cos(abs(latitude_deg(i))/180.*RPI)
     391            deimin=2.0*rei_min+40.*cos(abs(latitude_deg(i))/180.*RPI)
    374392            dei=min(dei,deimax)
    375393            dei=max(dei,deimin)
     
    472490        IF (iflag_rei .EQ. 2) THEN
    473491            ! in-cloud ice water content in g/m3
    474             iwc = icefrac_optics(i,k) * radocond(i,k) / pclc(i,k) * zrho(i,k) * 1000.
     492            IF ( ptconv(i,k) ) THEN
     493              !--Needed because pclf does not contain convective clouds (should be fixed...)
     494              iwc = icefrac_optics(i,k) * radocond(i,k) / pclc(i,k) * zrho(i,k) * 1000.
     495            ELSE
     496              iwc = icefrac_optics(i,k) * radocond(i,k) / pclf(i,k) * zrho(i,k) * 1000.
     497            ENDIF
    475498            ! this formula is a simplified version of the Sun 2001 one (as in the IFS model,
    476499            ! and which is activated for iflag_rei = 1).
     
    484507            dei = rei_coef * (iwc**0.2445) * ( temp(i,k) - rei_min_temp )
    485508            ! we clip the results
    486             deimin = 20.
     509            deimin = 20. + 40. * COS(ABS(latitude_deg(i)) / 180. * RPI)
    487510            deimax = 155.
    488511            dei = MIN(MAX(dei, deimin), deimax)
     
    494517            ! we use the rei formula from Sun and Rikkus 1999 with a revision
    495518            ! from Sun 2001 (as in the IFS model)
    496             iwc=icefrac_optics(i, k)*radocond(i, k)/pclc(i,k)*zrho(i,k)*1000. !in cloud ice water content in g/m3
     519            ! in cloud ice water content in g/m3
     520            IF ( ptconv(i,k) ) THEN
     521              !--Needed because pclf does not contain convective clouds (should be fixed...)
     522              iwc = icefrac_optics(i,k) * radocond(i,k) / pclc(i,k) * zrho(i,k) * 1000.
     523            ELSE
     524              iwc = icefrac_optics(i,k) * radocond(i,k) / pclf(i,k) * zrho(i,k) * 1000.
     525            ENDIF
    497526            dei=(1.2351+0.0105*(temp(i,k)-273.15))*(45.8966*(iwc**0.2214) + &
    498527               &0.7957*(iwc**0.2535)*(temp(i,k)-83.15))
     
    501530            !Etienne: deimax and deimin controled by rei_max and rei_min in physiq.def
    502531            deimax=rei_max*2.0
    503             deimin=2.0*rei_min+40*cos(abs(latitude_deg(i))/180.*RPI)
     532            deimin=2.0*rei_min+40.*cos(abs(latitude_deg(i))/180.*RPI)
    504533            dei=min(dei,deimax)
    505534            dei=max(dei,deimin)
     
    565594        re(i, k) = rad_chaud(i, k)*fl(i, k)
    566595        rel = 0.
    567         rei = 0.
     596        rei = 1.
    568597        pclc(i, k) = 0.0
    569598        pcltau(i, k) = 0.0
     
    571600
    572601        !--AB contrails
    573         reice_nocont(i,k) = 0.
     602        rei_cont = 1.
    574603        pclc_nocont(i,k) = 0.
    575604        pclc_cont(i,k) = 0.
    576         pcltau_cont(i,k) = 0.
    577         pclemi_cont(i,k) = 0.
    578         pcltau_nocont(i,k) = 0.
    579         pclemi_nocont(i,k) = 0.
     605        pcltau_cont(i,k) = missing_val
     606        pclemi_cont(i,k) = missing_val
     607        pcltau_nocont(i,k) = missing_val
     608        pclemi_nocont(i,k) = missing_val
    580609
    581610      ELSE
     
    604633          IF (iflag_rei .EQ. 2) THEN
    605634              ! in-cloud ice water content in g/m3
    606               iwc = xfiwc_nocont(i, k) / pclc_nocont(i,k) * zrho(i,k) * 1000.
     635              IF ( ptconv(i,k) ) THEN
     636              !--Needed because pclf does not contain convective clouds (should be fixed...)
     637                iwc = xfiwc_nocont(i, k) / pclc_nocont(i,k) * zrho(i,k) * 1000.
     638              ELSE
     639                iwc = xfiwc_nocont(i, k) / pclf_nocont(i,k) * zrho(i,k) * 1000.
     640              ENDIF
    607641              ! this formula is a simplified version of the Sun 2001 one (as in the IFS model,
    608642              ! and which is activated for iflag_rei = 1).
     
    616650              dei = rei_coef * (iwc**0.2445) * ( temp(i,k) - rei_min_temp )
    617651              ! we clip the results
    618               !deimin = 20.
     652              deimin = 20. + 40. * COS(ABS(latitude_deg(i)) / 180. * RPI)
    619653              deimax = 155.
    620               !dei = MIN(MAX(dei, deimin), deimax)
    621               dei = MIN(dei, deimax)
     654              dei = MIN(MAX(dei, deimin), deimax)
    622655              ! formula to convert effective diameter to effective radius
    623656              rei = 3. * SQRT(3.) / 8. * dei
     
    628661              ! we use the rei formula from Sun and Rikkus 1999 with a revision
    629662              ! from Sun 2001 (as in the IFS model)
    630               iwc = xfiwc_nocont(i, k) / pclc_nocont(i,k) * zrho(i,k) * 1000. !in cloud ice water content in g/m3
     663              ! in cloud ice water content in g/m3
     664              IF ( ptconv(i,k) ) THEN
     665              !--Needed because pclf does not contain convective clouds (should be fixed...)
     666                iwc = xfiwc_nocont(i, k) / pclc_nocont(i,k) * zrho(i,k) * 1000.
     667              ELSE
     668                iwc = xfiwc_nocont(i, k) / pclf_nocont(i,k) * zrho(i,k) * 1000.
     669              ENDIF
    631670              dei=(1.2351+0.0105*(temp(i,k)-273.15))*(45.8966*(iwc**0.2214) + &
    632671                 &0.7957*(iwc**0.2535)*(temp(i,k)-83.15))
     
    635674              !Etienne: deimax and deimin controled by rei_max and rei_min in physiq.def
    636675              deimax=rei_max*2.0
    637               deimin=2.0*rei_min+40*cos(abs(latitude_deg(i))/180.*RPI)
     676              deimin=2.0*rei_min+40.*cos(abs(latitude_deg(i))/180.*RPI)
    638677              dei=min(dei,deimax)
    639678              dei=max(dei,deimin)
     
    662701          !--Diagnostics of clouds emissivity, optical depth and ice crystal radius
    663702          !--without contrails
    664           reice_nocont(i,k) = rei
    665703          pcltau_nocont(i,k) = 3.0/2.0*(zflwp_var/rel) + zfiwp_var*(3.448E-03+2.431/rei)
    666704          ! -- cloud infrared emissivity:
     
    678716          !--Diagnostics of clouds emissivity, optical depth and ice crystal radius
    679717          !--without contrails
    680           reice_nocont(i,k) = 1.
    681718          pclc_nocont(i,k) = 0.
    682719          pclc(i,k) = contfra(i,k)
     
    693730          rei_cont = (mice_cont / rho_ice * 3. / 4. / RPI)**(1./3.)
    694731          !--Effective radius (in microns)
    695           rei_cont = MIN(100., MAX(1., rei_cont / eff2vol_radius_contrails * 1e6))
    696           zfiwp_var = 1000.*(xfiwc(i, k)-xfiwc_nocont(i, k))&
    697                     / (pclc(i, k)-pclc_nocont(i, k))*rhodz(i, k)
     732          rei_cont = MIN(100., MAX(rei_min_contrails, rei_cont / eff2vol_radius_contrails * 1e6))
     733          zfiwp_var = 1000.*xfiwc_cont(i, k)/pclc_cont(i, k)*rhodz(i, k)
    698734
    699735          pcltau_cont(i, k) = zfiwp_var*(3.448E-03+2.431/rei_cont)
     
    711747        ENDIF
    712748
    713         rei = ( rei_cont * pclc_cont(i,k) + reice_nocont(i, k) * pclc_nocont(i, k) ) &
    714             / ( pclc_cont(i,k) + pclc_nocont(i,k) )
    715 
    716         zflwp_var = 1000.*xflwc(i, k)/pclc(i, k)*rhodz(i, k)
    717         zfiwp_var = 1000.*xfiwc(i, k)/pclc(i, k)*rhodz(i, k)
    718 
    719         pcltau(i,k) = 3.0/2.0*(zflwp_var/rel) + zfiwp_var*(3.448E-03+2.431/rei)
    720         ! -- cloud infrared emissivity:
    721         ! [the broadband infrared absorption coefficient is PARAMETERized
    722         ! as a function of the effective cld droplet radius]
    723         ! Ebert and Curry (1992) formula as used by Kiehl & Zender (1995):
    724         k_ice = k_ice0 + 1.0/rei
    725         pclemi(i, k) = 1.0 - exp(-coef_chau*zflwp_var-df*k_ice*zfiwp_var)
     749        pcltau(i,k) = (pclc_nocont(i,k)*pcltau_nocont(i,k) &
     750            & + pclc_cont(i,k)*pcltau_cont(i,k)) &
     751            & / pclc(i,k)
     752        pclemi(i,k) = (pclc_nocont(i,k)*pclemi_nocont(i,k) &
     753            & + pclc_cont(i,k)*pclemi_cont(i,k)) &
     754            & / pclc(i,k)
     755
     756        IF ( pclc_nocont(i,k) .EQ. 0. ) THEN
     757          pcltau_nocont(i,k) = missing_val
     758          pclemi_nocont(i,k) = missing_val
     759        ENDIF
     760
     761        IF ( pclc_cont(i,k) .EQ. 0. ) THEN
     762          pcltau_cont(i,k) = missing_val
     763          pclemi_cont(i,k) = missing_val
     764        ENDIF
    726765
    727766      ENDIF
    728767
    729768      reice(i, k) = rei
     769      reice_cont(i,k) = rei_cont
    730770
    731771      xflwp(i) = xflwp(i) + xflwc(i, k)*rhodz(i, k)
    732772      xfiwp(i) = xfiwp(i) + xfiwc(i, k)*rhodz(i, k)
    733       xfiwp_nocont(i) = xfiwp_nocont(i) + xfiwc_nocont(i, k)*rhodz(i, k)
    734 
    735       !--We weight the optical properties with the cloud fractions
    736       !--This is only used for the diagnostics
    737       pcltau_nocont(i, k) = pcltau_nocont(i, k) * pclc_nocont(i,k)
    738       pclemi_nocont(i, k) = pclemi_nocont(i, k) * pclc_nocont(i,k)
    739       pcltau_cont(i, k) = pcltau_cont(i, k) * pclc_cont(i,k)
    740       pclemi_cont(i, k) = pclemi_cont(i, k) * pclc_cont(i,k)
    741       pcltau(i, k) = pcltau(i, k) * pclc(i,k)
    742       pclemi(i, k) = pclemi(i, k) * pclc(i,k)
     773      xfiwp_cont(i) = xfiwp_cont(i) + xfiwc_cont(i, k)*rhodz(i, k)
    743774
    744775    ENDDO
  • LMDZ6/branches/contrails/libf/phylmd/lmdz_cloud_optics_prop_ini.f90

    r5794 r5796  
    1212  LOGICAL, PROTECTED :: ok_icefra_lscp, ok_new_lscp
    1313  LOGICAL, PROTECTED :: ok_plane_contrail
    14   LOGICAL, PROTECTED :: ok_higher_cirrus_cover
    1514  REAL, PROTECTED :: bl95_b0, bl95_b1 ! Parameter in B&L 95-Formula
    1615  REAL, ALLOCATABLE :: latitude_deg(:)
     
    2625  REAL, PROTECTED :: zepsec
    2726  REAL, PROTECTED :: eff2vol_radius_contrails=0.7
     27  REAL, PROTECTED :: rei_min_contrails=10.
    2828  REAL, PROTECTED :: rho_ice=920. ! Ice crystal density (assuming spherical geometry) [kg/m3]
    2929  REAL, PARAMETER :: thres_tau=0.3, thres_neb=0.001
     
    4545!$OMP THREADPRIVATE(rei_coef, rei_min_temp)
    4646!$OMP THREADPRIVATE(zepsec)
    47 !$OMP THREADPRIVATE(eff2vol_radius_contrails, rho_ice)
    48 !$OMP THREADPRIVATE(ok_plane_contrail, ok_higher_cirrus_cover)
     47!$OMP THREADPRIVATE(eff2vol_radius_contrails, rei_min_contrails, rho_ice)
     48!$OMP THREADPRIVATE(ok_plane_contrail)
    4949
    5050 
     
    117117    CALL getin_p('eff2vol_radius_contrails', eff2vol_radius_contrails)
    118118    write(lunout,*)'eff2vol_radius_contrails=',eff2vol_radius_contrails
    119     CALL getin_p('ok_higher_cirrus_cover', ok_higher_cirrus_cover)
    120     write(lunout,*)'ok_higher_cirrus_cover=',ok_higher_cirrus_cover
    121 
    122     IF ( ok_higher_cirrus_cover .AND. iflag_rei .GT. 0 ) THEN
    123       abort_message = 'in cloud_optics, ok_higher_cirrus_cover is not implemented for iflag_rei > 0'
    124       CALL abort_physic (modname,abort_message,1)
    125     ENDIF
     119    CALL getin_p('rei_min_contrails', rei_min_contrails)
     120    write(lunout,*)'rei_min_contrails=',rei_min_contrails
    126121   
    127122  END SUBROUTINE cloud_optics_prop_ini
  • LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_condensation.f90

    r5790 r5796  
    134134USE lmdz_lscp_ini,   ONLY: coef_mixing_lscp, coef_shear_lscp, chi_mixing
    135135USE lmdz_lscp_ini,   ONLY: aspect_ratio_cirrus, cooling_rate_ice_thresh
    136 USE lmdz_lscp_ini,   ONLY: ok_ice_sedim, fallice_sedim, cice_velo, dice_velo
     136USE lmdz_lscp_ini,   ONLY: ok_ice_sedim, ffallv_sed, cice_velo, dice_velo
    137137USE lmdz_lscp_ini,   ONLY: chi_sedim
    138138
     
    12471247          mice = qcont(i) / MAX(eps, Ncont(i))
    12481248          icefall_velo = ICECRYSTAL_VELO(mice, temp(i), pplay(i))
    1249           !--Volumic radius (in meters)
    1250           dei = (mice / rho_ice * 3. / 4. / RPI)**(1./3.)
    12511249          !--Effective radius (in meters)
    1252           dei = MIN(1e-4, MAX(1e-6, dei / eff2vol_radius_contrails))
     1250          dei = (mice / rho_ice * 3. / 4. / RPI)**(1./3.) / eff2vol_radius_contrails
     1251          dei = MIN(1e-4, MAX(1e-6, dei))
    12531252          !--Effective radius to effective diameter
    12541253          dei = 8. / 3. / SQRT(3.) * dei
     
    12981297        IF ( cldfra(i) .GT. eps ) THEN
    12991298          iwc = rho(i) * ( qcld(i) - qvc(i) ) / cldfra(i)
    1300           icefall_velo = fallice_sedim * cice_velo * MAX(0., iwc)**dice_velo
     1299          icefall_velo = ffallv_sed * cice_velo * MAX(0., iwc)**dice_velo
    13011300
    13021301          !--Sedimentation
     
    17161715      !-------------------------------------------
    17171716
    1718       IF ( (contfra(i) .LT. eps) .OR. (qcont(i) .LT. (qsat(i) * contfra(i))) ) THEN
     1717      IF ( (contfra(i) .LT. eps) .OR. (qcont(i) .LT. (qsat(i) * contfra(i))) &
     1718              & .OR. (Ncont(i) .LT. eps) ) THEN
    17191719        cldfra(i) = cldfra(i) - contfra(i)
    17201720        qcld(i) = qcld(i) - qcont(i)
  • LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_ini.f90

    r5794 r5796  
    166166  !$OMP THREADPRIVATE(ok_nodeep_lscp)
    167167
    168   LOGICAL, SAVE, PROTECTED :: ok_nodeep_lscp_rad=.FALSE.     ! if True, the deep convection clouds are not accounted two times in radiative transfer
    169   !$OMP THREADPRIVATE(ok_nodeep_lscp_rad)
    170 
    171168  LOGICAL, SAVE, PROTECTED :: ok_higher_cirrus_cover=.FALSE. ! if True, the cirrus cover is increased for radiative transfer, following Brooks et al. (2005)
    172169  !$OMP THREADPRIVATE(ok_higher_cirrus_cover)
     
    235232  !$OMP THREADPRIVATE(ok_plane_contrail)
    236233
     234  INTEGER, SAVE, PROTECTED :: iflag_cross_sec_contrail=0      ! choice of the initial cross section parameterization
     235  !$OMP THREADPRIVATE(iflag_cross_sec_contrail)
     236
     237  INTEGER, SAVE, PROTECTED :: iflag_AEI_contrail=0           ! choice of the emission index parameterization
     238  !$OMP THREADPRIVATE(iflag_AEI_contrail)
     239
     240  INTEGER, SAVE, PROTECTED :: iflag_vortex_loss=0            ! choice of the vortex loss parameterization
     241  !$OMP THREADPRIVATE(iflag_vortex_loss)
     242
    237243  REAL, SAVE, PROTECTED :: aspect_ratio_contrails            ! [-] aspect ratio of contrails
    238244  !$OMP THREADPRIVATE(aspect_ratio_contrails)
     
    249255  REAL, SAVE, PROTECTED :: Nice_init_contrails=100.          ! [#/cm3] initial ice crystals concentration in contrails
    250256  !$OMP THREADPRIVATE(Nice_init_contrails)
     257
     258  REAL, SAVE, PROTECTED :: fraction_survival_contrails=1.    ! [-] fraction of ice crystals that survive the vortex downwash phase, for contrails
     259  !$OMP THREADPRIVATE(fraction_survival_contrails)
    251260
    252261  REAL, SAVE, PROTECTED :: N_Brunt_Vaisala_aviation=0.01     ! [s-1] average Brunt Vaisala frequency, for contrail formation
     
    420429  !$OMP THREADPRIVATE(ok_ice_sedim)
    421430
    422   REAL, SAVE, PROTECTED :: fallice_sedim=1.                 ! Tuning factor for ice fallspeed velocity for sedimentation [-]
    423   !$OMP THREADPRIVATE(fallice_sedim)
     431  REAL, SAVE, PROTECTED :: ffallv_sed=1.                    ! Tuning factor for ice fallspeed velocity for sedimentation [-]
     432  !$OMP THREADPRIVATE(ffallv_sed)
    424433 
    425434  REAL, SAVE, PROTECTED :: chi_sedim=1E5                    ! [-] factor for increasing the chance that sedimented ice falls into moist air
     
    580589    CALL getin_p('snow_fallspeed_cld',snow_fallspeed_cld)
    581590    CALL getin_p('ok_ice_sedim',ok_ice_sedim)
    582     CALL getin_p('fallice_sedim',fallice_sedim)
     591    CALL getin_p('ffallv_sed',ffallv_sed)
    583592    CALL getin_p('chi_sedim',chi_sedim)
    584593    ! for condensation and ice supersaturation
     
    586595    CALL getin_p('ok_weibull_warm_clouds',ok_weibull_warm_clouds)
    587596    CALL getin_p('ok_nodeep_lscp',ok_nodeep_lscp)
    588     CALL getin_p('ok_nodeep_lscp_rad',ok_nodeep_lscp_rad)
    589597    CALL getin_p('ok_higher_cirrus_cover',ok_higher_cirrus_cover)
    590598    ffallv_issr=ffallv_lsc
     
    608616    CALL getin_p('chi_mixing',chi_mixing)
    609617    ! for aviation
     618    CALL getin_p('iflag_cross_sec_contrail',iflag_cross_sec_contrail)
     619    CALL getin_p('iflag_AEI_contrail',iflag_AEI_contrail)
     620    CALL getin_p('iflag_vortex_loss',iflag_vortex_loss)
    610621    aspect_ratio_contrails=aspect_ratio_cirrus
    611622    CALL getin_p('aspect_ratio_contrails',aspect_ratio_contrails)
     
    617628    CALL getin_p('chi_mixing_contrails',chi_mixing_contrails)
    618629    CALL getin_p('Nice_init_contrails',Nice_init_contrails)
     630    CALL getin_p('fraction_survival_contrails',fraction_survival_contrails)
    619631    CALL getin_p('EI_H2O_aviation',EI_H2O_aviation)
    620632    CALL getin_p('EI_soot_aviation',EI_soot_aviation)
     
    713725    WRITE(lunout,*) 'lscp_ini, snow_fallspeed_cld:', snow_fallspeed_cld
    714726    WRITE(lunout,*) 'lscp_ini, ok_ice_sedim:', ok_ice_sedim
    715     WRITE(lunout,*) 'lscp_ini, fallice_sedim:', fallice_sedim
     727    WRITE(lunout,*) 'lscp_ini, ffallv_sed:', ffallv_sed
    716728    WRITE(lunout,*) 'lscp_ini, chi_sedim:', chi_sedim
    717729    ! for condensation and ice supersaturation
     
    720732    WRITE(lunout,*) 'lscp_ini, ok_weibull_warm_clouds:', ok_weibull_warm_clouds
    721733    WRITE(lunout,*) 'lscp_ini, ok_nodeep_lscp:', ok_nodeep_lscp
    722     WRITE(lunout,*) 'lscp_ini, ok_nodeep_lscp_rad:', ok_nodeep_lscp_rad
    723734    WRITE(lunout,*) 'lscp_ini, ok_higher_cirrus_cover:', ok_higher_cirrus_cover
    724735    WRITE(lunout,*) 'lscp_ini, ffallv_issr', ffallv_issr
     
    741752    WRITE(lunout,*) 'lscp_ini, chi_mixing:', chi_mixing
    742753    ! for aviation
     754    WRITE(lunout,*) 'lscp_ini, iflag_cross_sec_contrail:', iflag_cross_sec_contrail
     755    WRITE(lunout,*) 'lscp_ini, iflag_AEI_contrail:', iflag_AEI_contrail
     756    WRITE(lunout,*) 'lscp_ini, iflag_vortex_loss:', iflag_vortex_loss
    743757    WRITE(lunout,*) 'lscp_ini, aspect_ratio_contrails:', aspect_ratio_contrails
    744758    WRITE(lunout,*) 'lscp_ini, coef_mixing_contrails:', coef_mixing_contrails
     
    746760    WRITE(lunout,*) 'lscp_ini, chi_mixing_contrails:', chi_mixing_contrails
    747761    WRITE(lunout,*) 'lscp_ini, Nice_init_contrails:', Nice_init_contrails
     762    WRITE(lunout,*) 'lscp_ini, fraction_survival_contrails:', fraction_survival_contrails
    748763    WRITE(lunout,*) 'lscp_ini, EI_H2O_aviation:', EI_H2O_aviation
    749764    WRITE(lunout,*) 'lscp_ini, EI_soot_aviation:', EI_soot_aviation
     
    812827    ENDIF
    813828
    814     IF ( ok_ice_sedim .AND. ffallv_issr .NE. 0. ) THEN
    815       abort_message = 'in lscp, ok_ice_sedim=y needs ffallv_issr=0.'
    816       CALL abort_physic (modname,abort_message,1)
    817     ENDIF
    818 
    819829    IF ( (iflag_icefrac .GE. 1) .AND. (.NOT. ok_poprecip .AND. (iflag_evap_prec .LT. 4)) ) THEN
    820830      abort_message = 'in lscp, icefracturb works with poprecip or with precip evap option >=4'
  • LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_main.f90

    r5794 r5796  
    124124USE lmdz_lscp_ini, ONLY : ok_radocond_snow, a_tr_sca
    125125USE lmdz_lscp_ini, ONLY : iflag_cloudth_vert, iflag_t_glace, iflag_fisrtilp_qsat
    126 USE lmdz_lscp_ini, ONLY : min_frac_th_cld, temp_nowater
    127 USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RVTMP2, RTT, RD, RG
     126USE lmdz_lscp_ini, ONLY : min_frac_th_cld, temp_nowater, rho_ice
     127USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RVTMP2, RTT, RD, RG, RPI
    128128USE lmdz_lscp_ini, ONLY : ok_poprecip, ok_bug_phase_lscp
    129129USE lmdz_lscp_ini, ONLY : ok_ice_supersat, ok_unadjusted_clouds, iflag_icefrac
    130130USE lmdz_lscp_ini, ONLY : ok_weibull_warm_clouds, ok_no_issr_strato, ok_ice_sedim
    131131USE lmdz_lscp_ini, ONLY : ok_plane_contrail
    132 USE lmdz_lscp_ini, ONLY : ok_nodeep_lscp, ok_nodeep_lscp_rad, ok_higher_cirrus_cover
     132USE lmdz_lscp_ini, ONLY : ok_nodeep_lscp, ok_higher_cirrus_cover
    133133USE lmdz_lscp_ini, ONLY : ok_lscp_mergecond, gamma_mixth
     134USE lmdz_lscp_ini, ONLY : eff2vol_radius_contrails
    134135
    135136! Temporary call for Lamquin et al (2012) diagnostics
     
    144145USE phys_local_var_mod, ONLY : dcfc_auto, dqic_auto, dqtc_auto, dnic_auto
    145146USE phys_local_var_mod, ONLY : dcf_auto, dqi_auto, dqvc_auto
    146 USE geometry_mod, ONLY: longitude_deg, latitude_deg
     147USE phys_local_var_mod, ONLY : nice_ygcont, iwc_ygcont, rvol_ygcont, tau_ygcont
     148USE phys_local_var_mod, ONLY : nice_cont, iwc_cont, rvol_cont, tau_cont
    147149
    148150IMPLICIT NONE
     
    362364  ! for condensation and ice supersaturation
    363365  REAL, DIMENSION(klon) :: qvc, qvcl, shear
     366  REAL, DIMENSION(klon) :: zrneb_deep, zcond_deep
    364367  REAL :: delta_z, deepconv_coef
    365368  ! for contrails
     
    369372  REAL, DIMENSION(klon) :: dzsed_cont, flsed_cont, Nflsed_cont, cfsed_cont
    370373  REAL, DIMENSION(klon) :: dzsed_cont_abv, flsed_cont_abv, Nflsed_cont_abv, cfsed_cont_abv
     374  REAL :: rho, rhodz, iwp_cont, rei_cont
    371375  !--for Lamquin et al 2012 diagnostics
    372376  REAL, DIMENSION(klon) :: issrfra100to150UP, issrfra150to200UP, issrfra200to250UP
     
    805809
    806810          DO i = 1, klon
    807             pt_pron_clds(i) = ( cfcon(i,k) .LT. ( 1. - eps ) )
     811            pt_pron_clds(i) = .TRUE.
    808812          ENDDO
    809813          IF ( .NOT. ok_weibull_warm_clouds ) THEN
     
    982986                        dcfc_sed(:,k), dqic_sed(:,k), dqtc_sed(:,k), dnic_sed(:,k), &
    983987                        dcfc_auto(:,k), dqic_auto(:,k), dqtc_auto(:,k), dnic_auto(:,k))
    984 
    985                     IF ( ok_nodeep_lscp ) THEN
    986                       DO i = 1, klon
    987                         !--If prognostic clouds are activated, deep convection vapor is
    988                         !--re-added to the total water vapor
    989                         IF ( keepgoing(i) .AND. ptconv(i,k) .AND. pt_pron_clds(i) ) THEN
    990                           IF ( ( rneb(i,k) + cfcon(i,k) ) .GT. eps ) THEN
    991                             zqn(i) = ( zqn(i) * rneb(i,k) &
    992                                 + ( qccon(i,k) + qvcon(i,k) ) * cfcon(i,k) ) &
    993                                 / ( rneb(i,k) + cfcon(i,k) )
    994                           ELSE
    995                             zqn(i) = 0.
    996                           ENDIF
    997                           rneb(i,k) = rneb(i,k) + cfcon(i,k)
    998                           qvc(i) = qvc(i) + qvcon(i,k) * cfcon(i,k)
    999                         ENDIF
    1000                       ENDDO
    1001                     ENDIF
    1002988
    1003989                  ELSE
     
    12531239    ENDDO
    12541240
    1255     IF (ok_plane_contrail) THEN
    1256 
    1257       !--Ice water content of contrails
    1258       qice_cont(:,k) = qcont(:) - zqs(:) * contfra(:)
    1259 
    1260       !--If contrails do not precipitate
    1261       DO i = 1, klon
    1262         rneb(i,k) = rneb(i,k) - contfra(i)
    1263         zoliq(i) = zoliq(i) - qice_cont(i,k)
    1264         zoliqi(i) = zoliqi(i) - qice_cont(i,k)
    1265       ENDDO
    1266     ENDIF
    1267 
    12681241    !================================================================
    12691242    ! Flag for the new and more microphysical treatment of precipitation from Atelier Nuage (R)
     
    13021275      zifl(:) = zifl(:) + flauto(:)
    13031276      ziflcld(:) = ziflcld(:) + flauto(:)
    1304     ENDIF
    1305 
    1306     IF ( ok_plane_contrail ) THEN
    1307       !--Contrails do not precipitate
    1308       DO i = 1, klon
    1309         rneb(i,k) = rneb(i,k) + contfra(i)
    1310         zoliq(i) = zoliq(i) + qice_cont(i,k)
    1311         zoliqi(i) = zoliqi(i) + qice_cont(i,k)
    1312         zradocond(i) = zradocond(i) + qice_cont(i,k)
    1313         zradoice(i) = zradoice(i) + qice_cont(i,k)
    1314         qradice_cont(i,k) = qice_cont(i,k)
    1315       ENDDO
    13161277    ENDIF
    13171278
     
    14201381      qtc_seri(:,k) = qcont(:)
    14211382      nic_seri(:,k) = Ncont(:)
     1383      !--Ice water content of contrails
     1384      qice_cont(:,k) = qcont(:) - zqs(:) * contfra(:)
     1385      !--Radiative properties
    14221386      contfrarad(:,k) = contfra(:)
     1387      qradice_cont(:,k) = qice_cont(:,k)
    14231388    ENDIF
    14241389
     
    14331398        !--the sink of condensed water from precipitation
    14341399        IF ( ptconv(i,k) ) THEN
    1435           IF ( zcond(i) .GT. 0. ) THEN
    1436             qvcon_old(i,k) = qvcon(i,k)
    1437             qccon_old(i,k) = qccon(i,k) * zoliq(i) / zcond(i)
    1438           ELSE
    1439             qvcon_old(i,k) = 0.
    1440             qccon_old(i,k) = 0.
    1441           ENDIF
     1400          qvcon_old(i,k) = qvcon(i,k)
     1401          qccon_old(i,k) = qccon(i,k)
    14421402        ELSE
    14431403          qvcon_old(i,k) = 0.
    14441404          qccon_old(i,k) = 0.
    1445         ENDIF
    1446 
    1447         !--Deep convection clouds properties are not advected
    1448         IF ( ptconv(i,k) .AND. pt_pron_clds(i) .AND. ok_nodeep_lscp ) THEN
    1449           cf_seri(i,k) = MAX(0., cf_seri(i,k) - cfcon(i,k))
    1450           qvc_seri(i,k) = MAX(0., qvc_seri(i,k) - qvcon_old(i,k) * cfcon(i,k))
    1451           zoliq(i) = MAX(0., zoliq(i) - qccon_old(i,k) * cfcon(i,k))
    1452           zoliqi(i) = MAX(0., zoliqi(i) - qccon_old(i,k) * cfcon(i,k))
    1453         ENDIF
    1454         !--Deep convection clouds properties are removed from radiative properties
    1455         !--outputed from lscp (NB. rneb and radocond are only used for the radiative
    1456         !--properties and are NOT prognostics)
    1457         !--We must have iflag_coupl == 5 for this coupling to work
    1458         IF ( ptconv(i,k) .AND. pt_pron_clds(i) .AND. ok_nodeep_lscp_rad ) THEN
    1459           rneb(i,k) = MAX(0., rneb(i,k) - cfcon(i,k))
    1460           radocond(i,k) = MAX(0., radocond(i,k) - qccon_old(i,k) * cfcon(i,k))
    14611405        ENDIF
    14621406
     
    14671411          cf_seri(i,k) = 0.
    14681412          qvc_seri(i,k) = 0.
    1469           qvc(i) = 0.
    14701413        ENDIF
    14711414
    14721415        !--Diagnostics
    14731416        gamma_cond(i,k) = gammasat(i)
    1474         subfra(i,k) = 1. - cf_seri(i,k) - issrfra(i,k)
    1475         qsub(i,k) = zq(i) - qvc(i) - qissr(i,k)
    1476         qcld(i,k) = qvc(i) + zoliq(i)
     1417        subfra(i,k) = totfra_in(i) - cf_seri(i,k) - issrfra(i,k)
     1418        qsub(i,k) = qtot_in(i) - qvc_seri(i,k) - qissr(i,k)
     1419        qcld(i,k) = qvc_seri(i,k) + zoliq(i)
    14771420
    14781421        IF ( ok_higher_cirrus_cover .AND. pt_pron_clds(i) .AND. .NOT. ptconv(i,k) ) THEN
     
    15531496    ENDIF
    15541497
     1498    IF ( ok_plane_contrail ) THEN
     1499      !--Other useful diagnostics
     1500      DO i = 1, klon
     1501        !--Very young countrails
     1502        IF ( dcfc_ini(i,k) .GT. eps ) THEN
     1503          rho = pplay(i,k) / zt(i) / RD
     1504          nice_ygcont(i,k) = dnic_ini(i,k) / dcfc_ini(i,k) / 1e6 * rho
     1505          iwc_ygcont(i,k) = dqic_ini(i,k) / dcfc_ini(i,k) * 1e3 * rho
     1506          rvol_ygcont(i,k) = (dqic_ini(i,k) / MAX(eps, dnic_ini(i,k)) / rho_ice * 3. / 4. / RPI)**(1./3.) * 1e6
     1507
     1508          rhodz = ( paprs(i,k) - paprs(i,k+1) ) / RG
     1509          iwp_cont = 1e3 * dqic_ini(i,k) / dcfc_ini(i,k) * rhodz
     1510          rei_cont = MIN(100., MAX(10., rvol_ygcont(i,k) / eff2vol_radius_contrails))
     1511          tau_ygcont(i,k) = iwp_cont*(3.448e-3+2.431/rei_cont)
     1512        ELSE
     1513          nice_ygcont(i,k) = missing_val
     1514          iwc_ygcont(i,k) = missing_val
     1515          rvol_ygcont(i,k) = missing_val
     1516          tau_ygcont(i,k) = missing_val
     1517        ENDIF
     1518        !--All contrails
     1519        IF ( cfc_seri(i,k) .GT. 1e-3 ) THEN
     1520          rho = pplay(i,k) / zt(i) / RD
     1521          nice_cont(i,k) = nic_seri(i,k) / cfc_seri(i,k) / 1e6 * rho
     1522          iwc_cont(i,k) = qice_cont(i,k) / cfc_seri(i,k) * 1e3 * rho
     1523          rvol_cont(i,k) = (qice_cont(i,k) / MAX(eps, nic_seri(i,k)) / rho_ice * 3. / 4. / RPI)**(1./3.) * 1e6
     1524
     1525          rhodz = ( paprs(i,k) - paprs(i,k+1) ) / RG
     1526          iwp_cont = 1e3 * qice_cont(i,k) / contfrarad(i,k) * rhodz
     1527          rei_cont = MIN(100., MAX(10., rvol_cont(i,k) / eff2vol_radius_contrails))
     1528          tau_cont(i,k) = iwp_cont*(3.448e-3+2.431/rei_cont)
     1529        ELSE
     1530          nice_cont(i,k) = missing_val
     1531          iwc_cont(i,k) = missing_val
     1532          rvol_cont(i,k) = missing_val
     1533          tau_cont(i,k) = missing_val
     1534        ENDIF
     1535      ENDDO
     1536    ENDIF
     1537
    15551538    ! Outputs:
    15561539    !-------------------------------
  • LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_precip.f90

    r5790 r5796  
    354354                          iflag_autoconversion, ok_radocond_snow, ok_bug_phase_lscp, &
    355355                          niter_lscp
    356 USE lmdz_lscp_ini, ONLY : ok_ice_sedim, fallice_sedim, eps
    357356USE lmdz_lscp_tools, ONLY : fallice_velocity
    358357
     
    13901389                          cld_lc_lsc_snow, cld_lc_con_snow, gamma_freez,       &
    13911390                          rain_fallspeed_clr, rain_fallspeed_cld,              &
    1392                           snow_fallspeed_clr, snow_fallspeed_cld,              &
    1393                           ok_ice_sedim, fallice_sedim
     1391                          snow_fallspeed_clr, snow_fallspeed_cld
    13941392
    13951393
  • LMDZ6/branches/contrails/libf/phylmd/phys_local_var_mod.F90

    r5794 r5796  
    722722      REAL, SAVE, ALLOCATABLE :: fsurv_contrails(:,:), section_contrails(:,:)
    723723      !$OMP THREADPRIVATE(fsurv_contrails, section_contrails)
     724      REAL, SAVE, ALLOCATABLE :: nice_ygcont(:,:), iwc_ygcont(:,:)
     725      !$OMP THREADPRIVATE(nice_ygcont, iwc_ygcont)
     726      REAL, SAVE, ALLOCATABLE :: rvol_ygcont(:,:), tau_ygcont(:,:)
     727      !$OMP THREADPRIVATE(rvol_ygcont, tau_ygcont)
     728      REAL, SAVE, ALLOCATABLE :: nice_cont(:,:), iwc_cont(:,:)
     729      !$OMP THREADPRIVATE(nice_cont, iwc_cont)
     730      REAL, SAVE, ALLOCATABLE :: rvol_cont(:,:), tau_cont(:,:)
     731      !$OMP THREADPRIVATE(rvol_cont, tau_cont)
    724732      REAL, SAVE, ALLOCATABLE :: qice_cont(:,:)
    725733      !$OMP THREADPRIVATE(qice_cont)
     
    738746      REAL, SAVE, ALLOCATABLE :: dnic_agg(:,:)
    739747      !$OMP THREADPRIVATE(dnic_agg)
    740       REAL, SAVE, ALLOCATABLE :: cldfra_nocont(:,:), cldtau_nocont(:,:), cldemi_nocont(:,:)
    741       !$OMP THREADPRIVATE(cldfra_nocont, cldtau_nocont, cldemi_nocont)
     748      REAL, SAVE, ALLOCATABLE :: cldfra_cont(:,:), cldtau_nocont(:,:), cldemi_nocont(:,:)
     749      !$OMP THREADPRIVATE(cldfra_cont, cldtau_nocont, cldemi_nocont)
    742750      REAL, SAVE, ALLOCATABLE :: cldh_nocont(:), contcov(:), conttau(:,:), contemi(:,:)
    743751      !$OMP THREADPRIVATE(cldh_nocont, contcov, conttau, contemi)
    744       REAL, SAVE, ALLOCATABLE :: fiwp_nocont(:), fiwc_nocont(:,:), ref_ice_nocont(:,:)
    745       !$OMP THREADPRIVATE(fiwp_nocont, fiwc_nocont, ref_ice_nocont)
     752      REAL, SAVE, ALLOCATABLE :: fiwp_cont(:), fiwc_cont(:,:), ref_ice_cont(:,:)
     753      !$OMP THREADPRIVATE(fiwp_cont, fiwc_cont, ref_ice_cont)
    746754      REAL, SAVE, ALLOCATABLE :: topsw_nocont(:), toplw_nocont(:)
    747755      !$OMP THREADPRIVATE(topsw_nocont, toplw_nocont)
     
    13331341      ALLOCATE(AEI_contrails(klon,klev), AEI_surv_contrails(klon,klev))
    13341342      ALLOCATE(fsurv_contrails(klon,klev), section_contrails(klon,klev))
     1343      ALLOCATE(nice_ygcont(klon,klev), iwc_ygcont(klon,klev))
     1344      ALLOCATE(rvol_ygcont(klon,klev), tau_ygcont(klon,klev))
     1345      ALLOCATE(nice_cont(klon,klev), iwc_cont(klon,klev))
     1346      ALLOCATE(rvol_cont(klon,klev), tau_cont(klon,klev))
    13351347      ALLOCATE(qice_cont(klon,klev))
    13361348      ALLOCATE(contfra(klon,klev), qradice_cont(klon,klev))
     
    13411353      ALLOCATE(dcfc_sed(klon,klev), dqic_sed(klon,klev), dqtc_sed(klon,klev), dnic_sed(klon,klev))
    13421354      ALLOCATE(dcfc_auto(klon,klev), dqic_auto(klon,klev), dqtc_auto(klon,klev), dnic_auto(klon,klev))
    1343       ALLOCATE(cldfra_nocont(klon,klev), cldtau_nocont(klon,klev), cldemi_nocont(klon,klev))
     1355      ALLOCATE(cldfra_cont(klon,klev), cldtau_nocont(klon,klev), cldemi_nocont(klon,klev))
    13441356      ALLOCATE(cldh_nocont(klon), contcov(klon), conttau(klon,klev), contemi(klon,klev))
    1345       ALLOCATE(fiwp_nocont(klon), fiwc_nocont(klon,klev), ref_ice_nocont(klon,klev))
     1357      ALLOCATE(fiwp_cont(klon), fiwc_cont(klon,klev), ref_ice_cont(klon,klev))
    13461358      ALLOCATE(topsw_nocont(klon), toplw_nocont(klon))
    13471359      ALLOCATE(solsw_nocont(klon), sollw_nocont(klon))
     
    17791791      DEALLOCATE(Tcritcont, qcritcont, potcontfraP, potcontfraNP)
    17801792      DEALLOCATE(AEI_contrails, AEI_surv_contrails, fsurv_contrails, section_contrails)
     1793      DEALLOCATE(nice_ygcont, iwc_ygcont, rvol_ygcont, tau_ygcont)
     1794      DEALLOCATE(nice_cont, iwc_cont, rvol_cont, tau_cont)
    17811795      DEALLOCATE(qice_cont, contfra, qradice_cont)
    17821796      DEALLOCATE(dcfc_ini, dqic_ini, dqtc_ini, dnic_ini)
     
    17861800      DEALLOCATE(dcfc_sed, dqic_sed, dqtc_sed, dnic_sed)
    17871801      DEALLOCATE(dcfc_auto, dqic_auto, dqtc_auto, dnic_auto)
    1788       DEALLOCATE(cldfra_nocont, cldtau_nocont, cldemi_nocont, conttau, contemi)
    1789       DEALLOCATE(cldh_nocont, contcov, fiwp_nocont, fiwc_nocont, ref_ice_nocont)
     1802      DEALLOCATE(cldfra_cont, cldtau_nocont, cldemi_nocont, conttau, contemi)
     1803      DEALLOCATE(cldh_nocont, contcov, fiwp_cont, fiwc_cont, ref_ice_cont)
    17901804      DEALLOCATE(topsw_nocont, toplw_nocont)
    17911805      DEALLOCATE(solsw_nocont, sollw_nocont)
  • LMDZ6/branches/contrails/libf/phylmd/phys_output_ctrlout_mod.F90

    r5791 r5796  
    27142714  TYPE(ctrl_out), SAVE :: o_section_contrails = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    27152715    'section_cont', 'Cross section of newly formed contrails', 'm2', (/ ('', i=1, 10) /))
    2716   TYPE(ctrl_out), SAVE :: o_cldfra_nocont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    2717     'cldfra_nocont', 'Cloud fraction w/o contrails', '-', (/ ('', i=1, 10) /))
     2716  TYPE(ctrl_out), SAVE :: o_nice_ygcont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2717    'nice_ygcont', 'Ice particle number concentration in young contrails', '#/cm3', (/ ('', i=1, 10) /))
     2718  TYPE(ctrl_out), SAVE :: o_iwc_ygcont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2719    'iwc_ygcont', 'Ice water content in young contrails', 'g/m3', (/ ('', i=1, 10) /))
     2720  TYPE(ctrl_out), SAVE :: o_rvol_ygcont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2721    'rvol_ygcont', 'Ice crystals volumic radius in young contrails', 'microns', (/ ('', i=1, 10) /))
     2722  TYPE(ctrl_out), SAVE :: o_tau_ygcont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2723    'tau_ygcont', 'Young contrails optical depth', '-', (/ ('', i=1, 10) /))
     2724  TYPE(ctrl_out), SAVE :: o_nice_cont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2725    'nice_cont', 'Ice particle number concentration in contrails', '#/cm3', (/ ('', i=1, 10) /))
     2726  TYPE(ctrl_out), SAVE :: o_iwc_cont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2727    'iwc_cont', 'Ice water content in contrails', 'g/m3', (/ ('', i=1, 10) /))
     2728  TYPE(ctrl_out), SAVE :: o_rvol_cont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2729    'rvol_cont', 'Ice crystals volumic radius in contrails', 'microns', (/ ('', i=1, 10) /))
     2730  TYPE(ctrl_out), SAVE :: o_tau_cont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2731    'tau_cont', 'Contrails optical depth', '-', (/ ('', i=1, 10) /))
     2732  TYPE(ctrl_out), SAVE :: o_cldfra_cont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2733    'cldfra_cont', 'Cloud fraction of contrails', '-', (/ ('', i=1, 10) /))
    27182734  TYPE(ctrl_out), SAVE :: o_cldtau_nocont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    27192735    'cldtau_nocont', 'Cloud optical thickness w/o contrails', '1', (/ ('', i=1, 10) /))
     
    27282744  TYPE(ctrl_out), SAVE :: o_contemi = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    27292745    'contemi', 'Contrails optical emissivity', '1', (/ ('', i=1, 10) /))
    2730   TYPE(ctrl_out), SAVE :: o_iwp_nocont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    2731     'iwp_nocont', 'Cloud ice water path w/o contrails', 'kg/m2', (/ ('', i=1, 10) /))
    2732   TYPE(ctrl_out), SAVE :: o_iwc_nocont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    2733     'iwc_nocont', 'Cloud ice water content seen by radiation w/o contrails', 'kg/kg', (/ ('', i=1, 10) /))
    2734   TYPE(ctrl_out), SAVE :: o_ref_ice_nocont = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    2735     'ref_ice_nocont', 'Effective radius of ice crystals w/o contrails', 'microns', (/ ('', i=1, 10) /))
     2746  TYPE(ctrl_out), SAVE :: o_iwp_cont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2747    'iwp_cont', 'Cloud ice water path of contrails', 'kg/m2', (/ ('', i=1, 10) /))
     2748  TYPE(ctrl_out), SAVE :: o_iwcon_cont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     2749    'iwcon_cont', 'Cloud ice water content seen by radiation of contrails', 'kg/kg', (/ ('', i=1, 10) /))
     2750  TYPE(ctrl_out), SAVE :: o_ref_ice_cont = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
     2751    'ref_ice_cont', 'Effective radius of ice crystals of contrails', 'microns', (/ ('', i=1, 10) /))
    27362752  TYPE(ctrl_out), SAVE :: o_tops_nocont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    27372753    'tops_nocont', 'Solar rad. at TOA w/o contrails', 'W/m2', (/ ('', i=1, 10) /))
  • LMDZ6/branches/contrails/libf/phylmd/phys_output_write_mod.F90

    r5791 r5796  
    245245         o_Tcritcont, o_qcritcont, o_potcontfraP, o_potcontfraNP, &
    246246         o_AEI_contrails, o_AEI_surv_contrails, o_fsurv_contrails, o_section_contrails, &
     247         o_nice_ygcont, o_iwc_ygcont, o_rvol_ygcont, o_tau_ygcont, &
     248         o_nice_cont, o_iwc_cont, o_rvol_cont, o_tau_cont, &
    247249         o_flight_dist, o_flight_fuel, o_qice_cont, &
    248250         o_dcfcini, o_dqicini, o_dqtcini, o_dnicini, &
     
    251253         o_dcfcsed, o_dqicsed, o_dqtcsed, o_dnicsed, &
    252254         o_dcfcauto, o_dqicauto, o_dqtcauto, o_dnicauto, &
    253          o_cldfra_nocont, o_cldtau_nocont, o_cldemi_nocont, o_cldh_nocont, &
    254          o_contcov, o_conttau, o_contemi, o_iwp_nocont, o_iwc_nocont, o_ref_ice_nocont, &
     255         o_cldfra_cont, o_cldtau_nocont, o_cldemi_nocont, o_cldh_nocont, &
     256         o_contcov, o_conttau, o_contemi, o_iwp_cont, o_iwcon_cont, o_ref_ice_cont, &
    255257         o_tops_nocont, o_topl_nocont, o_sols_nocont, o_soll_nocont, o_nettop_nocont, &
    256258!--interactive CO2
     
    411413         Tcritcont, qcritcont, potcontfraP, potcontfraNP, &
    412414         AEI_contrails, AEI_surv_contrails, fsurv_contrails, section_contrails, &
     415         nice_ygcont, iwc_ygcont, rvol_ygcont, tau_ygcont, &
     416         nice_cont, iwc_cont, rvol_cont, tau_cont, &
    413417         flight_dist, flight_fuel, qice_cont, &
    414418         dcfc_ini, dqic_ini, dqtc_ini, dnic_ini, &
     
    417421         dcfc_sed, dqic_sed, dqtc_sed, dnic_sed, &
    418422         dcfc_auto, dqic_auto, dqtc_auto, dnic_auto, &
    419          cldfra_nocont, cldtau_nocont, cldemi_nocont, cldh_nocont, &
    420          contcov, conttau, contemi, fiwp_nocont, fiwc_nocont, ref_ice_nocont, &
     423         cldfra_cont, cldtau_nocont, cldemi_nocont, cldh_nocont, &
     424         contcov, conttau, contemi, fiwp_cont, fiwc_cont, ref_ice_cont, &
    421425         topsw_nocont, toplw_nocont, solsw_nocont, sollw_nocont, &
    422426         alp_bl_det, alp_bl_fluct_m, alp_bl_conv, &
     
    24632467         CALL histwrite_phy(o_fsurv_contrails, fsurv_contrails)
    24642468         CALL histwrite_phy(o_section_contrails, section_contrails)
     2469         CALL histwrite_phy(o_nice_ygcont, nice_ygcont)
     2470         CALL histwrite_phy(o_iwc_ygcont, iwc_ygcont)
     2471         CALL histwrite_phy(o_rvol_ygcont, rvol_ygcont)
     2472         CALL histwrite_phy(o_tau_ygcont, tau_ygcont)
     2473         CALL histwrite_phy(o_nice_cont, nice_cont)
     2474         CALL histwrite_phy(o_iwc_cont, iwc_cont)
     2475         CALL histwrite_phy(o_rvol_cont, rvol_cont)
     2476         CALL histwrite_phy(o_tau_cont, tau_cont)
    24652477         CALL histwrite_phy(o_qice_cont, qice_cont)
    24662478         CALL histwrite_phy(o_dcfcini, dcfc_ini)
     
    24852497         CALL histwrite_phy(o_dqtcauto, dqtc_auto)
    24862498         CALL histwrite_phy(o_dnicauto, dnic_auto)
    2487          CALL histwrite_phy(o_cldfra_nocont, cldfra_nocont)
     2499         CALL histwrite_phy(o_cldfra_cont, cldfra_cont)
    24882500         CALL histwrite_phy(o_cldtau_nocont, cldtau_nocont)
    24892501         CALL histwrite_phy(o_cldemi_nocont, cldemi_nocont)
     
    24922504         CALL histwrite_phy(o_conttau, conttau)
    24932505         CALL histwrite_phy(o_contemi, contemi)
    2494          CALL histwrite_phy(o_iwp_nocont, fiwp_nocont)
    2495          CALL histwrite_phy(o_iwc_nocont, fiwc_nocont)
    2496          CALL histwrite_phy(o_ref_ice_nocont, ref_ice_nocont)
     2506         CALL histwrite_phy(o_iwp_cont, fiwp_cont)
     2507         CALL histwrite_phy(o_iwcon_cont, fiwc_cont)
     2508         CALL histwrite_phy(o_ref_ice_cont, ref_ice_cont)
    24972509         IF (ok_rad_contrail) THEN
    24982510           IF (vars_defined) zx_tmp_fi2d = topsw_nocont * swradcorr
  • LMDZ6/branches/contrails/libf/phylmd/physiq_mod.F90

    r5794 r5796  
    345345       qice_cont, contfra, qradice_cont, &
    346346       Tcritcont, qcritcont, potcontfraP, potcontfraNP, &
    347        cldfra_nocont, cldtau_nocont, cldemi_nocont, cldh_nocont, &
    348        conttau, contemi, contcov, fiwp_nocont, fiwc_nocont, ref_ice_nocont, &
     347       cldfra_cont, cldtau_nocont, cldemi_nocont, cldh_nocont, &
     348       conttau, contemi, contcov, fiwp_cont, fiwc_cont, ref_ice_cont, &
    349349       topsw_nocont, toplw_nocont, solsw_nocont, sollw_nocont, &
    350350       topsw_nocontp, toplw_nocontp, solsw_nocontp, sollw_nocontp, &
     
    12381238    ! "CRF off"
    12391239    REAL, dimension(klon, klev) :: cldfrarad   ! fraction nuageuse
     1240    REAL, dimension(klon, klev) :: cldfravol   ! volumic cloud fraction
    12401241    !--AB contrails
    1241     REAL, dimension(klon, klev) :: cldfrarad_nocont   ! fraction nuageuse without contrails
     1242    REAL, dimension(klon, klev) :: cldfrarad_cont   ! fraction nuageuse without contrails
    12421243
    12431244    REAL :: calday, zxsnow_dummy(klon)
     
    46024603       ENDIF
    46034604
     4605       IF ( ok_ice_supersat ) THEN
     4606          cldfravol(:,:) = cf_seri(:,:)
     4607       ELSE
     4608          cldfravol(:,:) = cldfra(:,:)
     4609       ENDIF
     4610
    46044611       !Rajout appel a interface calcul proprietes optiques des nuages
    46054612       CALL call_cloud_optics_prop(klon, klev, ok_newmicro, &
    4606                paprs, pplay, t_seri, radocond, picefra, cldfra, &
     4613               paprs, pplay, t_seri, radocond, picefra, cldfravol, cldfra, &
    46074614               cldtau, cldemi, cldh, cldl, cldm, cldt, cldq, &
    46084615               flwp, fiwp, flwc, fiwc, ok_aie, &
     
    46134620               zfice, dNovrN, ptconv, rnebcon, clwcon, &
    46144621               !--AB contrails
    4615                contfra, qradice_cont, nic_seri, cldfra_nocont, &
     4622               cfc_seri, contfra, qradice_cont, nic_seri, cldfra_cont, &
    46164623               cldtau_nocont, cldemi_nocont, conttau, contemi, cldh_nocont, contcov, &
    4617                fiwp_nocont, fiwc_nocont, ref_ice_nocont)
     4624               fiwp_cont, fiwc_cont, ref_ice_cont, &
     4625               missing_val)
    46184626
    46194627       !
     
    46254633       cldfrarad   = cldfra
    46264634       !--AB contrails
    4627        IF (ok_rad_contrail) cldfrarad_nocont = cldfra_nocont
     4635       IF (ok_rad_contrail) cldfrarad_cont = cldfra_cont
    46284636
    46294637       !
     
    46574665            DO k=1, klev
    46584666              DO i=1, klon
    4659                 cldfrarad_nocont(i,k) = cldfra_nocont(i,k) * beta(i,k)
     4667                cldfrarad_cont(i,k) = cldfra_cont(i,k) * beta(i,k)
    46604668              ENDDO
    46614669            ENDDO
     
    46944702            DO k=1, klev
    46954703              DO i=1, klon
    4696                 cldfrarad_nocont(i,k) = cldfra_nocont(i,k) * beta(i,k)
     4704                cldfrarad_cont(i,k) = cldfra_cont(i,k) * beta(i,k)
    46974705              ENDDO
    46984706            ENDDO
     
    48184826               cloud_cover_sw, &
    48194827               !--AB contrails radiative effects
    4820                cldfrarad_nocont, fiwc_nocont, ref_ice_nocont, &
     4828               cldfrarad_cont, fiwc_cont, ref_ice_cont, &
    48214829               topsw_nocont, solsw_nocont, toplw_nocont, sollw_nocont)
    48224830
     
    49064914                     cloud_cover_sw, &
    49074915                     !--AB contrails radiative effects
    4908                      cldfrarad_nocont, fiwc_nocont, ref_ice_nocont, &
     4916                     cldfrarad_cont, fiwc_cont, ref_ice_cont, &
    49094917                     topsw_nocontp, solsw_nocontp, toplw_nocontp, sollw_nocontp)
    49104918          ENDIF !ok_4xCO2atm
  • LMDZ6/branches/contrails/libf/phylmd/radlwsw_m.F90

    r5791 r5796  
    4949       cloud_cover_sw, &
    5050       !--AB contrails radiative effects
    51        cldfra_nocont, fiwc_nocont, ref_ice_nocont, &
     51       cldfra_cont, fiwc_cont, ref_ice_cont, &
    5252       topsw_nocont, solsw_nocont, toplw_nocont, sollw_nocont)
    5353
     
    289289    REAL, DIMENSION(kdlon,kflev+1), INTENT(out) :: ZLWFT0_i
    290290    !--AB contrails radiative effects
    291     REAL, DIMENSION(klon,klev), INTENT(in)  :: cldfra_nocont
    292     REAL, DIMENSION(klon,klev), INTENT(in)  :: fiwc_nocont
    293     REAL, DIMENSION(klon,klev), INTENT(in)  :: ref_ice_nocont
     291    REAL, DIMENSION(klon,klev), INTENT(in)  :: cldfra_cont
     292    REAL, DIMENSION(klon,klev), INTENT(in)  :: fiwc_cont
     293    REAL, DIMENSION(klon,klev), INTENT(in)  :: ref_ice_cont
    294294    REAL, DIMENSION(klon),      INTENT(out) :: topsw_nocont
    295295    REAL, DIMENSION(klon),      INTENT(out) :: solsw_nocont
     
    494494    REAL(KIND=8) ZFLCCUP_i (klon,klev+1)
    495495    !--AB contrails radiative effects
    496     REAL(KIND=8) cldfra_nocont_i(klon,klev)
    497     REAL(KIND=8) fiwc_nocont_i(klon,klev)
    498     REAL(KIND=8) ref_ice_nocont_i(klon,klev)
     496    REAL(KIND=8) cldfra_cont_i(klon,klev)
     497    REAL(KIND=8) fiwc_cont_i(klon,klev)
     498    REAL(KIND=8) ref_ice_cont_i(klon,klev)
    499499    REAL(KIND=8) ZTOPSWNOCONT(klon)
    500500    REAL(KIND=8) ZSOLSWNOCONT(klon)
     
    934934             ref_liq_pi_i(1:klon,k) =ref_liq_pi(1:klon,klev+1-k)
    935935             ref_ice_pi_i(1:klon,k) =ref_ice_pi(1:klon,klev+1-k)
    936              IF (ok_rad_contrail) THEN
     936             !IF (ok_rad_contrail) THEN
    937937               !--AB contrails radiative effects
    938                cldfra_nocont_i(1:klon,k)  = cldfra_nocont(1:klon,klev+1-k)
    939                fiwc_nocont_i(1:klon,k)    = fiwc_nocont(1:klon,klev+1-k)
    940                ref_ice_nocont_i(1:klon,k) = ref_ice_nocont(1:klon,klev+1-k)
    941              ENDIF
     938               cldfra_cont_i(1:klon,k)  = cldfra_cont(1:klon,klev+1-k)
     939               fiwc_cont_i(1:klon,k)    = fiwc_cont(1:klon,klev+1-k)
     940               ref_ice_cont_i(1:klon,k) = ref_ice_cont(1:klon,klev+1-k)
     941             !ENDIF
    942942          ENDDO
    943943          DO k=1,kflev
     
    10231023               ok_ade, ok_aie, ok_volcan, flag_aerosol,flag_aerosol_strat, flag_aer_feedback, & ! flags aerosols
    10241024               !--AB contrails radiative effect
    1025                ok_rad_contrail, cldfra_nocont_i, fiwc_nocont_i, ref_ice_nocont_i, &
     1025               ok_rad_contrail, cldfra_cont_i, fiwc_cont_i, ref_ice_cont_i, &
    10261026               ZTOPSWNOCONT, ZSOLSWNOCONT, ZTOPLWNOCONT, ZSOLLWNOCONT)
    10271027
  • LMDZ6/branches/contrails/libf/phylmd/rrtm/radlsw.F90

    r5791 r5796  
    88 & PTH  , PT    , PTS  , PNBAS, PNTOP,&
    99 & PREF_LIQ, PREF_ICE,&
     10 & PCLFR_CONT, PQIWP_CONT, PREF_ICE_CONT,& ! AB FOR CONTRAILS
    1011 & PEMIT, PFCT  , PFLT , PFCS , PFLS,&
    1112 & PFRSOD,PSUDU , PUVDF, PPARF, PPARCF, PTINCF,&
     
    182183REAL(KIND=JPRB)   ,INTENT(IN)    :: PCCO2
    183184REAL(KIND=JPRB)   ,INTENT(IN)    :: PCLFR(KLON,KLEV)
     185REAL(KIND=JPRB)   ,INTENT(IN)    :: PCLFR_CONT(KLON,KLEV) ! AB FOR CONTRAILS
    184186REAL(KIND=JPRB)   ,INTENT(IN)    :: PDP(KLON,KLEV)
    185187REAL(KIND=JPRB)   ,INTENT(IN)    :: PEMIS(KLON)
     
    190192REAL(KIND=JPRB)   ,INTENT(IN)    :: PQ(KLON,KLEV)
    191193REAL(KIND=JPRB)   ,INTENT(IN)    :: PQIWP(KLON,KLEV)
     194REAL(KIND=JPRB)   ,INTENT(IN)    :: PQIWP_CONT(KLON,KLEV) ! AB FOR CONTRAILS
    192195REAL(KIND=JPRB)   ,INTENT(IN)    :: PQLWP(KLON,KLEV)
    193196REAL(KIND=JPRB)   ,INTENT(IN)    :: PQS(KLON,KLEV)
     
    208211REAL(KIND=JPRB)   ,INTENT(IN)    :: PREF_LIQ(KLON,KLEV)
    209212REAL(KIND=JPRB)   ,INTENT(IN)    :: PREF_ICE(KLON,KLEV)
     213REAL(KIND=JPRB)   ,INTENT(IN)    :: PREF_ICE_CONT(KLON,KLEV) ! AB FOR CONTRAILS
    210214REAL(KIND=JPRB)   ,INTENT(OUT)   :: PEMIT(KLON)
    211215REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFCT(KLON,KLEV+1)
     
    259263 & , ZFIWP(KLON)        , ZFLWP(KLON)      , ZFRWP(KLON)&
    260264 & , ZIWC(KLON)         , ZLWC(KLON)&
     265 & , ZFIWP_CONT(KLON)   , ZIWC_CONT(KLON)& ! AB FOR CONTRAILS
    261266 !cc            , ZRWC(KLON)
    262267 & , ZMU0(KLON)         , ZOZ(KLON,KLEV)   , ZOZN(KLON,KLEV)&
     
    275280 & ZALFICE(KLON)      , ZGAMICE(KLON)     , ZBICE(KLON)   , ZDESR(KLON)&
    276281 & , ZRADIP(KLON)       , ZRADLP(KLON)     &
     282 & , ZRADIP_CONT(KLON)& ! AB FOR CONTRAILS
    277283 !cc           , ZRADRD(KLON)
    278284 & , ZRAINT(KLON)       , ZRES(KLON)&
     
    292298 & ZMULTI, ZMULTL, ZOI   , ZOL, &
    293299 & ZOMGMX, ZOR, ZRMUZ, ZRWGKG, ZTAUD, ZTAUMX, ZTEMPC, &
    294  & ZTOI, ZTOL, ZTOR, ZZFIWP, ZZFLWP, ZDPOG, ZPODT 
     300 & ZTOI, ZTOL, ZTOR, ZZFIWP, ZZFLWP, ZDPOG, ZPODT, &
     301 & ZIWGKG_CONT, ZTOI_CONT, ZOI_CONT, ZGI_CONT, ZRSAID_CONT ! AB FOR CONTRAILS
    295302
    296303REAL(KIND=JPRB) :: ZALND, ZASEA, ZD, ZDEN, ZNTOT, ZNUM, ZRATIO, Z1RADI, &
     
    454461      ZIWGKG=0.0_JPRB
    455462    ENDIF
     463    ! AB FOR CONTRAILS
     464    IF (PCLFR_CONT(JL,IKL) > REPSC ) THEN
     465      ZIWGKG_CONT=MAX(PQIWP_CONT(JL,IKL)*1000.0_JPRB,0.0_JPRB)
     466      ZIWGKG_CONT=ZIWGKG_CONT/PCLFR_CONT(JL,IKL)
     467    ELSE
     468      ZIWGKG_CONT=0.0_JPRB
     469    ENDIF
     470    ! AB
    456471    ZRWGKG=0.0_JPRB
    457472    ZRAINT(JL)=0.0_JPRB
     
    472487    ZFLWP(JL)= ZLWGKG*ZDPOG
    473488    ZFIWP(JL)= ZIWGKG*ZDPOG
     489    ZFIWP_CONT(JL)= ZIWGKG_CONT*ZDPOG ! AB FOR CONTRAILS
    474490    ZFRWP(JL)= ZRWGKG*ZDPOG
    475491    ZPODT=PAP(JL,IKL)/(RD*PT(JL,IKL))
    476492    ZLWC(JL)=ZLWGKG*ZPODT
    477493    ZIWC(JL)=ZIWGKG*ZPODT
     494    ZIWC_CONT(JL)=ZIWGKG_CONT*ZPODT ! AB FOR CONTRAILS
    478495!    ZRWC(JL)=ZRWGKG*ZPODT
    479496
     
    601618! IKL or JK ?? - I think IKL but needs to be verified
    602619        ZRADIP(JL)=PREF_ICE(JL,IKL)
     620        ZRADIP_CONT(JL)=PREF_ICE_CONT(JL,IKL) ! AB FOR CONTRAILS
    603621    ENDIF 
    604622   
     
    623641      ZGR =0.0_JPRB
    624642      ZOR =0.0_JPRB
    625       IF (ZFLWP(JL)+ZFIWP(JL)+ZFRWP(JL) > 2.0_JPRB * REPSCW ) THEN
     643      ! AB FOR CONTRAILS
     644      ZTOI_CONT=0.0_JPRB
     645      ZGI_CONT =0.0_JPRB
     646      ZOI_CONT =0.0_JPRB
     647      IF (ZFLWP(JL)+ZFIWP(JL)+ZFIWP_CONT(JL)+ZFRWP(JL) > 2.0_JPRB * REPSCW ) THEN
     648      ! AB
     649      !IF (ZFLWP(JL)+ZFIWP(JL)+ZFRWP(JL) > 2.0_JPRB * REPSCW ) THEN
    626650        IF (ZFLWP(JL) >= REPSCW ) THEN
    627651          IF (NLIQOPT /= 0 ) THEN
     
    641665        ENDIF
    642666
    643         IF (ZFIWP(JL) >= REPSCW ) THEN
     667        IF (ZFIWP(JL)+ZFIWP_CONT(JL) >= REPSCW ) THEN ! AB FOR CONTRAILS
     668        !IF (ZFIWP(JL) >= REPSCW ) THEN
    644669          IF (NICEOPT <= 1) THEN
    645670!-- SW: Ebert-Curry         
     
    647672            ZGI  = REBCUE(JSW)+REBCUF(JSW)*ZRADIP(JL)
    648673            ZOI  = 1.0_JPRB - REBCUC(JSW)-REBCUD(JSW)*ZRADIP(JL)
     674            ! AB FOR CONTRAILS
     675            ZTOI_CONT = ZFIWP_CONT(JL)*(REBCUA(JSW)+REBCUB(JSW)/ZRADIP_CONT(JL))
     676            ZGI_CONT  = REBCUE(JSW)+REBCUF(JSW)*ZRADIP_CONT(JL)
     677            ZOI_CONT  = 1.0_JPRB - REBCUC(JSW)-REBCUD(JSW)*ZRADIP_CONT(JL)
     678            ! AB
    649679           
    650680          ELSEIF (NICEOPT == 2) THEN 
     
    683713!        ENDIF   
    684714
     715        ZCLDSW(JL,JK)  = PCLFR(JL,IKL)+PCLFR_CONT(JL,IKL) ! AB FOR CONTRAILS
     716
    685717!  - MIX of WATER and ICE CLOUDS
    686         ZTAUMX= ZTOL + ZTOI + ZTOR
    687         ZOMGMX= ZTOL*ZOL + ZTOI*ZOI + ZTOR*ZOR
    688         ZASYMX= ZTOL*ZOL*ZGL + ZTOI*ZOI*ZGI + ZTOR*ZOR*ZGR
     718        ! AB FOR CONTRAILS
     719        ZTAUMX= (PCLFR(JL,IKL) * (ZTOL + ZTOI + ZTOR) &
     720            & + PCLFR_CONT(JL,IKL) * ZTOI_CONT) &
     721            & / ZCLDSW(JL,JK)
     722        ZOMGMX= (PCLFR(JL,IKL) * (ZTOL*ZOL + ZTOI*ZOI + ZTOR*ZOR) &
     723            & + PCLFR_CONT(JL,IKL) * ZTOI_CONT*ZOI_CONT) &
     724            & / ZCLDSW(JL,JK)
     725        ZASYMX= (PCLFR(JL,IKL) * (ZTOL*ZOL*ZGL + ZTOI*ZOI*ZGI + ZTOR*ZOR*ZGR) &
     726            & + PCLFR_CONT(JL,IKL) * ZTOI_CONT*ZOI_CONT*ZGI_CONT) &
     727            & / ZCLDSW(JL,JK)
     728        !ZTAUMX= ZTOL + ZTOI + ZTOR
     729        !ZOMGMX= ZTOL*ZOL + ZTOI*ZOI + ZTOR*ZOR
     730        !ZASYMX= ZTOL*ZOL*ZGL + ZTOI*ZOI*ZGI + ZTOR*ZOR*ZGR
     731        ! AB
    689732
    690733        ZASYMX= ZASYMX/ZOMGMX
     
    693736! --- SW FINAL CLOUD OPTICAL PARAMETERS
    694737
    695         ZCLDSW(JL,JK)  = PCLFR(JL,IKL)
     738        !ZCLDSW(JL,JK)  = PCLFR(JL,IKL) ! AB FOR CONTRAILS
    696739        ZTAU(JL,JSW,JK)  = ZTAUMX
    697740        ZOMEGA(JL,JSW,JK)= ZOMGMX
     
    849892        ZMSAID = 0.0_JPRB
    850893       
    851         IF (ZFLWP(JL)+ZFIWP(JL) > REPSCW) THEN
     894        IF (ZFLWP(JL)+ZFIWP(JL)+ZFIWP_CONT(JL) > REPSCW) THEN ! AB FOR CONTRAILS
     895        !IF (ZFLWP(JL)+ZFIWP(JL) > REPSCW) THEN
    852896   
    853897          IF (NLIQOPT == 0 .OR. NLIQOPT >= 3 ) THEN
     
    880924! ice cloud spectral emissivity a la Ebert-Curry (1992)
    881925            ZRSAID= REBCUH(JRTM)+REBCUG(JRTM)/ZRADIP(JL)
     926            ZRSAID_CONT= REBCUH(JRTM)+REBCUG(JRTM)/ZRADIP_CONT(JL) ! AB FOR CONTRAILS
    882927           
    883928          ELSEIF (NICEOPT == 2) THEN
     
    899944          ENDIF   
    900945         
    901           ZTAUD = ZRSALD*ZFLWP(JL)+ZRSAID*ZFIWP(JL)
     946          ! AB FOR CONTRAILS
     947          ZTAUD = (PCLFR(JL,IKL) * (ZRSALD*ZFLWP(JL)+ZRSAID*ZFIWP(JL)) &
     948              & + PCLFR_CONT(JL,IKL) * ZRSAID_CONT*ZFIWP_CONT(JL)) &
     949              & / ZCLDSW(JL,JK)
     950          !ZTAUD = ZRSALD*ZFLWP(JL)+ZRSAID*ZFIWP(JL)
     951          ! AB
    902952
    903953! Diffusivity correction within clouds a la Savijarvi
  • LMDZ6/branches/contrails/libf/phylmd/rrtm/radlsw.intfb.h

    r5791 r5796  
    99 & PTH  , PT    , PTS  , PNBAS, PNTOP,&
    1010 & PREF_LIQ, PREF_ICE,&
     11 & PCLFR_CONT, PQIWP_CONT, PREF_ICE_CONT,&
    1112 & PEMIT, PFCT  , PFLT , PFCS , PFLS,&
    1213 & PFRSOD,PSUDU , PUVDF, PPARF, PPARCF, PTINCF,&
     
    4142REAL(KIND=JPRB) ,INTENT(IN) :: PCCO2
    4243REAL(KIND=JPRB) ,INTENT(IN) :: PCLFR(KLON,KLEV)
     44REAL(KIND=JPRB) ,INTENT(IN) :: PCLFR_CONT(KLON,KLEV)
    4345REAL(KIND=JPRB) ,INTENT(IN) :: PDP(KLON,KLEV)
    4446REAL(KIND=JPRB) ,INTENT(IN) :: PEMIS(KLON)
     
    4951REAL(KIND=JPRB) ,INTENT(IN) :: PQ(KLON,KLEV)
    5052REAL(KIND=JPRB) ,INTENT(IN) :: PQIWP(KLON,KLEV)
     53REAL(KIND=JPRB) ,INTENT(IN) :: PQIWP_CONT(KLON,KLEV)
    5154REAL(KIND=JPRB) ,INTENT(IN) :: PQLWP(KLON,KLEV)
    5255REAL(KIND=JPRB) ,INTENT(IN) :: PQS(KLON,KLEV)
     
    6063REAL(KIND=JPRB) ,INTENT(IN) :: PREF_LIQ(KLON,KLEV)
    6164REAL(KIND=JPRB) ,INTENT(IN) :: PREF_ICE(KLON,KLEV)
     65REAL(KIND=JPRB) ,INTENT(IN) :: PREF_ICE_CONT(KLON,KLEV)
    6266LOGICAL ,INTENT(IN) :: LRDUST
    6367REAL(KIND=JPRB) ,INTENT(IN) :: PPIZA_DST(KLON,KLEV,NSW)
  • LMDZ6/branches/contrails/libf/phylmd/rrtm/recmwf_aero.F90

    r5791 r5796  
    4343     & flag_aer_feedback, &
    4444     !--AB contrails radiative effect
    45      & ok_rad_contrail, PCLFR_NOCONT, PQIWP_NOCONT, PREF_ICE_NOCONT, &
     45     & ok_rad_contrail, PCLFR_CONT, PQIWP_CONT, PREF_ICE_CONT, &
    4646     & PTOPSWNOCONT, PSOLSWNOCONT, PTOPLWNOCONT, PSOLLWNOCONT)
    4747  !--fin
     
    274274  !--AB contrails radiative effect
    275275  LOGICAL           ,INTENT(IN)    :: ok_rad_contrail
    276   REAL(KIND=JPRB)   ,INTENT(IN)    :: PCLFR_NOCONT(KPROMA,KLEV)
    277   REAL(KIND=JPRB)   ,INTENT(IN)    :: PQIWP_NOCONT(KPROMA,KLEV)
    278   REAL(KIND=JPRB)   ,INTENT(IN)    :: PREF_ICE_NOCONT(KPROMA,KLEV)
     276  REAL(KIND=JPRB)   ,INTENT(IN)    :: PCLFR_CONT(KPROMA,KLEV)
     277  REAL(KIND=JPRB)   ,INTENT(IN)    :: PQIWP_CONT(KPROMA,KLEV)
     278  REAL(KIND=JPRB)   ,INTENT(IN)    :: PREF_ICE_CONT(KPROMA,KLEV)
    279279  REAL(KIND=JPRB)   ,INTENT(OUT)   :: PTOPSWNOCONT(KPROMA), PSOLSWNOCONT(KPROMA) ! No contrails experiment forcing at TOA and surface (SW)
    280280  REAL(KIND=JPRB)   ,INTENT(OUT)   :: PTOPLWNOCONT(KPROMA), PSOLLWNOCONT(KPROMA) ! No contrails experiment forcing at TOA and surface (LW)
     
    360360  REAL(KIND=JPRB) ::  LWDN0_AERO(KPROMA,KLEV+1,5)
    361361  !--AB contrails radiative effect
    362   REAL(KIND=JPRB) :: ZRCLC_NOCONT(KPROMA,KLEV), ZQIWP_NOCONT(KPROMA,KLEV)
     362  REAL(KIND=JPRB) :: ZRCLC_CONT(KPROMA,KLEV), ZQIWP_CONT(KPROMA,KLEV)
     363  REAL(KIND=JPRB) :: ZRCLC_ZERO(KPROMA,KLEV), ZQIWP_ZERO(KPROMA,KLEV)
     364  REAL(KIND=JPRB) :: PREF_ICE_ZERO(KPROMA,KLEV)
    363365  REAL(KIND=JPRB) :: PREF_LIQ_NOCONT(KPROMA,KLEV)
     366  REAL(KIND=JPRB) :: PREF_ICE_NOCONT(KPROMA,KLEV)
    364367  REAL(KIND=JPRB) :: PPIZA_NOCONT(KPROMA,KLEV,NSW)
    365368  REAL(KIND=JPRB) :: PCGA_NOCONT(KPROMA,KLEV,NSW)
     
    413416        !   ZPQO3(JL,JK)=PQO3(JL,JK)*PDP(JL,JK)*RMD/RMO3
    414417        ZPQO3(JL,JK)=PQO3(JL,JK)*PDP(JL,JK)
    415         ZRCLC(JL,JK)=MAX( 0.0_JPRB ,MIN( 1.0_JPRB ,PCLFR(JL,JK)))
    416         IF (ZRCLC(JL,JK) > REPCLC) THEN
    417            ZQLWP(JL,JK)=PQLWP(JL,JK)
    418            ZQIWP(JL,JK)=PQIWP(JL,JK)
    419         ELSE
    420            ZQLWP(JL,JK)=REPH2O*ZRCLC(JL,JK)
    421            ZQIWP(JL,JK)=REPH2O*ZRCLC(JL,JK)
    422         ENDIF
    423418        ZQRAIN(JL,JK)=0.
    424419        ZQRAINT(JL,JK)=0.
     
    429424     ENDDO
    430425  ENDDO
     426
     427  IF ( ok_rad_contrail ) THEN
     428    DO JK=1,KLEV
     429       DO JL=IBEG,IEND
     430          ZRCLC(JL,JK)=MAX( 0.0_JPRB ,MIN( 1.0_JPRB ,PCLFR(JL,JK)-PCLFR_CONT(JL,JK)))
     431          IF (ZRCLC(JL,JK) > REPCLC) THEN
     432             ZQLWP(JL,JK)=PQLWP(JL,JK)
     433             ZQIWP(JL,JK)=PQIWP(JL,JK)-PQIWP_CONT(JL,JK)
     434          ELSE
     435             ZQLWP(JL,JK)=REPH2O*ZRCLC(JL,JK)
     436             ZQIWP(JL,JK)=REPH2O*ZRCLC(JL,JK)
     437          ENDIF
     438          ZRCLC_CONT(JL,JK)=MAX( 0.0_JPRB ,MIN( 1.0_JPRB ,PCLFR_CONT(JL,JK)))
     439          IF (ZRCLC_CONT(JL,JK) > REPCLC) THEN
     440             ZQIWP_CONT(JL,JK)=PQIWP_CONT(JL,JK)
     441          ELSE
     442             ZQIWP_CONT(JL,JK)=REPH2O*ZRCLC_CONT(JL,JK)
     443          ENDIF
     444       ENDDO
     445    ENDDO
     446  ELSE
     447    DO JK=1,KLEV
     448       DO JL=IBEG,IEND
     449          ZRCLC(JL,JK)=MAX( 0.0_JPRB ,MIN( 1.0_JPRB ,PCLFR(JL,JK)))
     450          IF (ZRCLC(JL,JK) > REPCLC) THEN
     451             ZQLWP(JL,JK)=PQLWP(JL,JK)
     452             ZQIWP(JL,JK)=PQIWP(JL,JK)
     453          ELSE
     454             ZQLWP(JL,JK)=REPH2O*ZRCLC(JL,JK)
     455             ZQIWP(JL,JK)=REPH2O*ZRCLC(JL,JK)
     456          ENDIF
     457          ZRCLC_CONT(JL,JK)=0.0_JPRB
     458          ZQIWP_CONT(JL,JK)=0.0_JPRB
     459       ENDDO
     460    ENDDO
     461  ENDIF
    431462
    432463  IF (NAER == 0) THEN
     
    512543             & PTH   , ZRTI   , PTS     , ZNBAS , ZNTOP ,&
    513544             & PREF_LIQ_PI, PREF_ICE_PI,&
     545             & ZRCLC_CONT, ZQIWP_CONT, PREF_ICE_CONT,& ! AB FOR CONTRAILS
    514546             & ZEMIT , ZFCT   , ZFLT    , ZFCS    , ZFLS  ,&
    515547             & ZFRSOD, ZSUDU  , ZUVDF   , ZPARF   , ZPARCF, ZTINCF, PSFSWDIR,&
     
    553585             & PTH   , ZRTI   , PTS     , ZNBAS , ZNTOP ,&
    554586             & PREF_LIQ, PREF_ICE,&
     587             & ZRCLC_CONT, ZQIWP_CONT, PREF_ICE_CONT,& ! AB FOR CONTRAILS
    555588             & ZEMIT , ZFCT   , ZFLT    , ZFCS    , ZFLS  ,&
    556589             & ZFRSOD, ZSUDU  , ZUVDF   , ZPARF   , ZPARCF, ZTINCF, PSFSWDIR,&
     
    594627             & PTH   , ZRTI   , PTS     , ZNBAS , ZNTOP ,&
    595628             & PREF_LIQ_PI, PREF_ICE_PI,&
     629             & ZRCLC_CONT, ZQIWP_CONT, PREF_ICE_CONT,& ! AB FOR CONTRAILS
    596630             & ZEMIT , ZFCT   , ZFLT    , ZFCS    , ZFLS  ,&
    597631             & ZFRSOD, ZSUDU  , ZUVDF   , ZPARF   , ZPARCF, ZTINCF, PSFSWDIR,&
     
    634668             & PTH   , ZRTI   , PTS     , ZNBAS , ZNTOP ,&
    635669             & PREF_LIQ, PREF_ICE,&
     670             & ZRCLC_CONT, ZQIWP_CONT, PREF_ICE_CONT,& ! AB FOR CONTRAILS
    636671             & ZEMIT , ZFCT   , ZFLT    , ZFCS    , ZFLS  ,&
    637672             & ZFRSOD, ZSUDU  , ZUVDF   , ZPARF   , ZPARCF, ZTINCF, PSFSWDIR,&
     
    676711          !--this needs to be changed to fixed cloud optical properties
    677712          & PREF_LIQ_PI, PREF_ICE_PI,&
     713          & ZRCLC_CONT, ZQIWP_CONT, PREF_ICE_CONT,& ! AB FOR CONTRAILS
    678714          & ZEMIT , ZFCT   , ZFLT    , ZFCS    , ZFLS  ,&
    679715          & ZFRSOD, ZSUDU  , ZUVDF   , ZPARF   , ZPARCF, ZTINCF, PSFSWDIR,&
     
    701737  !--Double call to radiative routine for contrails
    702738  !--The calculation are done again WITHOUT contrails
    703   IF (ok_rad_contrail) THEN
     739  IF ( ok_rad_contrail ) THEN
    704740
    705741     !--The same base case is used
     
    707743     IF ( flag_aerosol .EQ. 0 ) THEN
    708744        PREF_LIQ_NOCONT(:,:) = PREF_LIQ_PI(:,:)
     745        PREF_ICE_NOCONT(:,:) = PREF_ICE_PI(:,:)
    709746        PPIZA_NOCONT(:,:,:) = PPIZA_ZERO(:,:,:)
    710747        PCGA_NOCONT(:,:,:) = PCGA_ZERO(:,:,:)
     
    713750     ELSEIF ( .not. ok_ade .AND. .not. ok_aie ) THEN
    714751        PREF_LIQ_NOCONT(:,:) = PREF_LIQ_PI(:,:)
     752        PREF_ICE_NOCONT(:,:) = PREF_ICE_PI(:,:)
    715753        PPIZA_NOCONT(:,:,:) = PPIZA_NAT(:,:,:)
    716754        PCGA_NOCONT(:,:,:) = PCGA_NAT(:,:,:)
     
    719757     ELSEIF ( .not. ok_ade .AND. ok_aie ) THEN
    720758        PREF_LIQ_NOCONT(:,:) = PREF_LIQ(:,:)
     759        PREF_ICE_NOCONT(:,:) = PREF_ICE(:,:)
    721760        PPIZA_NOCONT(:,:,:) = PPIZA_NAT(:,:,:)
    722761        PCGA_NOCONT(:,:,:) = PCGA_NAT(:,:,:)
     
    725764     ELSEIF ( ok_ade .AND. .not. ok_aie ) THEN
    726765        PREF_LIQ_NOCONT(:,:) = PREF_LIQ_PI(:,:)
     766        PREF_ICE_NOCONT(:,:) = PREF_ICE_PI(:,:)
    727767        PPIZA_NOCONT(:,:,:) = PPIZA_TOT(:,:,:)
    728768        PCGA_NOCONT(:,:,:) = PCGA_TOT(:,:,:)
     
    731771     ELSEIF ( ok_ade .AND. ok_aie ) THEN
    732772        PREF_LIQ_NOCONT(:,:) = PREF_LIQ(:,:)
     773        PREF_ICE_NOCONT(:,:) = PREF_ICE(:,:)
    733774        PPIZA_NOCONT(:,:,:) = PPIZA_TOT(:,:,:)
    734775        PCGA_NOCONT(:,:,:) = PCGA_TOT(:,:,:)
     
    739780     DO JK=1,KLEV
    740781         DO JL=IBEG,IEND
    741              ZRCLC_NOCONT(JL,JK)=MAX( 0.0_JPRB ,MIN( 1.0_JPRB ,PCLFR_NOCONT(JL,JK)))
    742              IF (ZRCLC_NOCONT(JL,JK) > REPCLC) THEN
    743                  ZQIWP_NOCONT(JL,JK)=PQIWP_NOCONT(JL,JK)
    744              ELSE
    745                  ZQIWP_NOCONT(JL,JK)=REPH2O*ZRCLC_NOCONT(JL,JK)
    746              ENDIF
     782             ZRCLC_ZERO(JL,JK)=0.0_JPRB
     783             ZQIWP_ZERO(JL,JK)=0.0_JPRB
     784             PREF_ICE_ZERO(JL,JK)=1.0_JPRB
    747785         ENDDO
    748786     ENDDO
     
    753791          & ZRAER , PALBD  , PALBP   , PAPRS , ZRPR  ,&
    754792          & ZCCNL , ZCCNO  ,&
    755           & PCCO2 , ZRCLC_NOCONT  , PDP     , PEMIS , ZEMIW ,PSLM    , ZRMU0 , ZPQO3,&
    756           & ZQ    , ZQIWP_NOCONT  , ZQLWP   , ZQS   , ZQRAIN,ZQRAINT ,&
     793          & PCCO2 , ZRCLC  , PDP     , PEMIS , ZEMIW ,PSLM    , ZRMU0 , ZPQO3,&
     794          & ZQ    , ZQIWP  , ZQLWP   , ZQS   , ZQRAIN,ZQRAINT ,&
    757795          & PTH   , ZRTI   , PTS     , ZNBAS , ZNTOP ,&
    758796          & PREF_LIQ_NOCONT, PREF_ICE_NOCONT,&
     797          & ZRCLC_ZERO, ZQIWP_ZERO, PREF_ICE_ZERO,& ! AB FOR CONTRAILS
    759798          & ZEMIT , ZFCT   , ZFLT    , ZFCS    , ZFLS  ,&
    760799          & ZFRSOD, ZSUDU  , ZUVDF   , ZPARF   , ZPARCF, ZTINCF, PSFSWDIR,&
Note: See TracChangeset for help on using the changeset viewer.