Changeset 3408


Ignore:
Timestamp:
Oct 25, 2018, 5:23:18 PM (6 years ago)
Author:
Laurent Fairhead
Message:

Modifications needed for VolMIP diagnostics for IPSLCM6.1.8
NL/LF

Location:
LMDZ6/branches/IPSLCM6.0.15
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/IPSLCM6.0.15/DefLists/CMIP6_ping_atmos.xml

    r3353 r3408  
    155155   <field id="CMIP6_loadss"        field_ref="loadss"           /> <!-- P1 (kg m-2) atmosphere_mass_content_of_seasalt_dry_aerosol : Load of Seasalt -->
    156156   <field id="CMIP6_longitude"     field_ref="dummy_not_provided"         /> <!-- P1 (degrees_east) longitude : Longitude -->
    157    <field id="CMIP6_lwsffluxaero"  field_ref="dummy_not_provided"         /> <!-- P2 (W m-2) longwave__flux__due_to_volcanic_aerosols_at_the_surface : downwelling longwave  flux  due to volcanic aerosols at the surface to be diagnosed through double radiation call -->
     157   <field id="CMIP6_lwsffluxaero"  field_ref="toplwad"         /> <!-- P2 (W m-2) longwave__flux__due_to_volcanic_aerosols_at_the_surface : downwelling longwave  flux  due to volcanic aerosols at the surface to be diagnosed through double radiation call -->
    158158   <field id="CMIP6_lwsrfasdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) surface_instantaneous_longwave_forcing_due_to_dust : All-sky Surface Longwave radiative flux due to Dust -->
    159159   <field id="CMIP6_lwsrfcsdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) surface_instantaneous_longwave_forcing_due_to_dust_in_clearsky : Clear-sky Surface Longwave radiative flux due to Dust -->
     
    161161   <field id="CMIP6_lwtoacsaer"    field_ref="toplwad0"         /> <!-- P1 (W m-2) toa_instantaneous_longwave_forcing : Clear-Sky LW-RF Aerosols at TOA -->
    162162   <field id="CMIP6_lwtoacsdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) toa_instantaneous_longwave_forcing_due_to_dust_in_clearsky : Clear-sky TOA Longwave radiative flux due to Dust -->
    163    <field id="CMIP6_lwtoafluxaerocs" field_ref="dummy_not_provided"       /> <!-- P1 (W m-2) longwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky : downwelling longwave flux due to volcanic aerosols at TOA under clear sky to be diagnosed through double radiation call -->
     163   <field id="CMIP6_lwtoafluxaerocs" field_ref="toplwad0"       /> <!-- P1 (W m-2) longwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky : downwelling longwave flux due to volcanic aerosols at TOA under clear sky to be diagnosed through double radiation call -->
    164164   <field id="CMIP6_mc"            field_ref="mc"               /> <!-- P1 (kg m-2 s-1) atmosphere_net_upward_convective_mass_flux : The net mass flux should represent the difference between the updraft and downdraft components.  The flux is computed as the mass divided by the area of the grid cell. -->
    165165   <field id="CMIP6_mcd"           field_ref="dnwd"              > (dnwd-dnwd0) &gt; 0 ? (dnwd-dnwd0) : 0 </field> <!-- P2 (kg m-2 s-1) atmosphere_downdraft_convective_mass_flux : Calculated as the convective mass flux divided by the area of the whole grid cell (not just the area of the cloud). -->
     
    281281   <field id="CMIP6_snwc"          field_ref="dummy_not_provided"         /> <!-- P1 (kg m-2) canopy_snow_amount : canopy_snow_amount -->
    282282   <field id="CMIP6_solbnd"        field_ref="solbnd"         />  <!-- P1 (W m-2) solar_irradiance : Top-of-Atmosphere Solar Insolation for each band -->
    283    <field id="CMIP6_swsffluxaero"  field_ref="dummy_not_provided"         /> <!-- P2 (W m-2) shortwave__flux_due_to_volcanic_aerosols_at__the_surface : downwelling shortwave  flux due to volcanic aerosols at  the surface to be diagnosed through double radiation call -->
     283   <field id="CMIP6_swsffluxaero"  field_ref="topswad"         /> <!-- P2 (W m-2) shortwave__flux_due_to_volcanic_aerosols_at__the_surface : downwelling shortwave  flux due to volcanic aerosols at  the surface to be diagnosed through double radiation call -->
    284284   <field id="CMIP6_swsrfasdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) tendency_of_all_sky_surface_shortwave_flux_due_to_dust_ambient_aerosol_particles : All-sky Surface Shortwave radiative flux due to Dust -->
    285285   <field id="CMIP6_swsrfcsdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) tendency_of_clear_sky_surface_shortwave_flux_due_to_dust_ambient_aerosol_particles : Clear-sky Surface Shortwave radiative flux due to Dust -->
    286286   <field id="CMIP6_swtoaasdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) toa_instantaneous_shortwave_forcing : all sky sw-rf dust at toa -->
    287287   <field id="CMIP6_swtoacsdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) toa_instantaneous_shortwave_forcing : clear sky sw-rf dust at toa -->
    288    <field id="CMIP6_swtoafluxaerocs" field_ref="dummy_not_provided"       /> <!-- P1 (W m-2) shortwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky : downwelling shortwave flux due to volcanic aerosols at TOA under clear sky to be diagnosed through double radiation call -->
     288   <field id="CMIP6_swtoafluxaerocs" field_ref="topswad0"       /> <!-- P1 (W m-2) shortwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky : downwelling shortwave flux due to volcanic aerosols at TOA under clear sky to be diagnosed through double radiation call -->
    289289   <field id="CMIP6_sza"           field_ref="sza"              /> <!-- P1 (degree) solar_zenith_angle : solar zenith angle -->
    290290   <field id="CMIP6_t2"            field_ref="temp"> temp*temp   </field> <!-- P2 (K2) square_of_air_temperature : square_of_air_temperature -->
     
    363363   <field id="CMIP6_zhalf"         field_ref="zhalf"            /> <!-- P2 (m) height_above_reference_ellipsoid : This is actual height above mean sea level, not geopotential height.  This is actual height above mean sea level, not geopotential height.  Includes both the top of the model atmosphere and surface levels. -->
    364364   <field id="CMIP6_zmla"          field_ref="s_pblh"           /> <!-- P1 (m) atmosphere_boundary_layer_thickness : Height of Boundary Layer -->
    365    <field id="CMIP6_zmlwaero"      field_ref="dummy_not_provided"        /> <!-- P1 (K s-1) longwave_heating_rate_due_to_volcanic_aerosols : longwave heating rate due to volcanic aerosols to be diagnosed through double radiation call, zonal average values required -->
    366    <field id="CMIP6_zmswaero"      field_ref="dummy_not_provided"        /> <!-- P1 (K s-1) shortwave_heating_rate_due_to_volcanic_aerosols : shortwave heating rate due to volcanic aerosols to be diagnosed through double radiation call, zonal average values required -->
     365   <field id="CMIP6_zmlwaero"      field_ref="cool_volc"        /> <!-- P1 (K s-1) longwave_heating_rate_due_to_volcanic_aerosols : longwave heating rate due to volcanic aerosols to be diagnosed through double radiation call, zonal average values required -->
     366   <field id="CMIP6_zmswaero"      field_ref="heat_volc"        /> <!-- P1 (K s-1) shortwave_heating_rate_due_to_volcanic_aerosols : shortwave heating rate due to volcanic aerosols to be diagnosed through double radiation call, zonal average values required -->
    367367   <field id="CMIP6_zmtnt"         field_ref="dtphy"            /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_diabatic_processes : Zonal Mean Diabatic Heating Rates -->
    368368   <field id="CMIP6_ap" field_ref="Ahyb" /><!-- Ap hybrid coordinate array for level interfaces -->
  • LMDZ6/branches/IPSLCM6.0.15/DefLists/field_def_lmdz.xml

    r3313 r3408  
    702702        <field id="rldcs4co2"    long_name="Downwelling CS LW 4xCO2 atmosphere"    unit="W/m2" />
    703703        <field id="stratomask"    long_name="Stratospheric fraction"    unit="-" />
     704        <field id="heat_volc"    long_name="SW heating rate from volcano"    unit="K/s" />
     705        <field id="cool_volc"    long_name="LW cooling rate from volcano"    unit="K/s" />
    704706        <field id="pvap"    long_name="pvap intermediary variable" unit="-">pres*ovap*461.5 / (287.04*(1.+ (10.9491/18.0153)*ovap)) </field>
    705707    </field_group>
  • LMDZ6/branches/IPSLCM6.0.15/DefLists/file_def_histday_lmdz.xml

    r3315 r3408  
    337337                <field field_ref="z0m" level="10" />
    338338                <field field_ref="z0h" level="10" />
    339                 <field field_ref="topswad" level="10" />
    340                 <field field_ref="topswad0" level="10" />
     339                <field field_ref="topswad" level="1" />
     340                <field field_ref="topswad0" level="1" />
    341341                <field field_ref="topswai" level="10" />
    342342                <field field_ref="solswad" level="10" />
    343343                <field field_ref="solswad0" level="10" />
    344344                <field field_ref="solswai" level="10" />
    345                 <field field_ref="toplwad" level="10" />
    346                 <field field_ref="toplwad0" level="10" />
     345                <field field_ref="toplwad" level="1" />
     346                <field field_ref="toplwad0" level="1" />
    347347                <field field_ref="toplwai" level="10" />
    348348                <field field_ref="sollwad" level="10" />
     
    628628                <field field_ref="rsdcs4co2" level="10" />
    629629                <field field_ref="rldcs4co2" level="10" />
     630                <field field_ref="stratomask" level="1" />
     631                <field field_ref="cool_volc" level="1" />
     632                <field field_ref="heat_volc" level="1" />
    630633            </field_group>
    631634        </file>
  • LMDZ6/branches/IPSLCM6.0.15/DefLists/file_def_histmth_lmdz.xml

    r3329 r3408  
    372372                <field field_ref="z0m" level="10" />
    373373                <field field_ref="z0h" level="10" />
    374                 <field field_ref="topswad" level="10" />
    375                 <field field_ref="topswad0" level="10" />
     374                <field field_ref="topswad" level="1" />
     375                <field field_ref="topswad0" level="1" />
    376376                <field field_ref="topswai" level="10" />
    377377                <field field_ref="solswad" level="10" />
    378378                <field field_ref="solswad0" level="10" />
    379379                <field field_ref="solswai" level="10" />
    380                 <field field_ref="toplwad" level="10" />
    381                 <field field_ref="toplwad0" level="10" />
     380                <field field_ref="toplwad" level="1" />
     381                <field field_ref="toplwad0" level="1" />
    382382                <field field_ref="toplwai" level="10" />
    383383                <field field_ref="sollwad" level="10" />
     
    677677                <field field_ref="rsdcs4co2" level="10" />
    678678                <field field_ref="rldcs4co2" level="10" />
     679                <field field_ref="stratomask" level="1" />
     680                <field field_ref="cool_volc" level="1" />
     681                <field field_ref="heat_volc" level="1" />
    679682            </field_group>
    680683
  • LMDZ6/branches/IPSLCM6.0.15/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90

    r3339 r3408  
    110110  INTEGER :: iflag_radia, iflag_cldcon, iflag_ratqs
    111111  REAL    :: ratqsbas, ratqshaut, tau_ratqs
    112   LOGICAL :: ok_ade, ok_aie, ok_alw, ok_cdnc, aerosol_couple, chemistry_couple
     112  LOGICAL :: ok_ade, ok_aie, ok_volcan, ok_alw, ok_cdnc, aerosol_couple, chemistry_couple
    113113  INTEGER :: flag_aerosol
    114114  INTEGER :: flag_aerosol_strat
     
    126126! Physics configuration
    127127!*******************************************************************************
    128   CALL conf_phys(  ok_journe, ok_mensuel, ok_instan, ok_hf, ok_LES,     &
    129                    callstats,                                           &
    130                    solarlong0,seuil_inversion,                          &
    131                    fact_cldcon, facttemps,ok_newmicro,iflag_radia,      &
    132                    iflag_cldcon,                                        &
    133                    iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs,            &
    134                    ok_ade, ok_aie, ok_alw, ok_cdnc, aerosol_couple,     &
    135                    chemistry_couple, flag_aerosol, flag_aerosol_strat,  &
    136                    new_aod, flag_bc_internal_mixture, bl95_b0, bl95_b1, &
    137                    read_climoz, alp_offset)
     128  CALL conf_phys(  ok_journe, ok_mensuel, ok_instan, ok_hf, ok_LES,       &
     129                   callstats,                                             &
     130                   solarlong0,seuil_inversion,                            &
     131                   fact_cldcon, facttemps,ok_newmicro,iflag_radia,        &
     132                   iflag_cldcon,                                          &
     133                   iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs,              &
     134                   ok_ade, ok_aie, ok_volcan, ok_alw, ok_cdnc,            &
     135                   aerosol_couple, chemistry_couple, flag_aerosol,        &
     136                   flag_aerosol_strat, new_aod, flag_bc_internal_mixture, &
     137                   bl95_b0, bl95_b1, read_climoz, alp_offset)
    138138  CALL phys_state_var_init(read_climoz)
    139139
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/conf_phys_m.F90

    r3339 r3408  
    1717       iflag_cld_th, &
    1818       iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &
    19        ok_ade, ok_aie, ok_alw, ok_cdnc, aerosol_couple, chemistry_couple, &
    20        flag_aerosol, flag_aerosol_strat, new_aod, &
     19       ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, aerosol_couple, &
     20       chemistry_couple, flag_aerosol, flag_aerosol_strat, new_aod, &
    2121       flag_bc_internal_mixture, bl95_b0, bl95_b1,&
    2222       read_climoz, &
     
    6666    ! flag_bc_internal_mixture : use BC internal mixture if true
    6767    ! bl95_b*: parameters in the formula to link CDNC to aerosol mass conc
     68    ! ok_volcan: activate volcanic diags (SW heat & LW cool rate, SW & LW flux)
    6869    !
    6970
     
    7576    LOGICAL              :: ok_LES
    7677    LOGICAL              :: callstats
    77     LOGICAL              :: ok_ade, ok_aie, ok_alw, ok_cdnc
     78    LOGICAL              :: ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan
    7879    LOGICAL              :: aerosol_couple, chemistry_couple
    7980    INTEGER              :: flag_aerosol
     
    9697    LOGICAL, SAVE       :: ok_LES_omp   
    9798    LOGICAL, SAVE       :: callstats_omp
    98     LOGICAL, SAVE       :: ok_ade_omp, ok_aie_omp, ok_alw_omp, ok_cdnc_omp
     99    LOGICAL, SAVE       :: ok_ade_omp, ok_aie_omp, ok_alw_omp, ok_cdnc_omp, ok_volcan_omp
    99100    LOGICAL, SAVE       :: aerosol_couple_omp, chemistry_couple_omp
    100101    INTEGER, SAVE       :: flag_aerosol_omp
     
    396397    ok_cdnc_omp = .FALSE.
    397398    CALL getin('ok_cdnc', ok_cdnc_omp)
     399
     400    !
     401    !Config Key  = ok_volcan
     402    !Config Desc = ok to generate volcanic diags
     403    !Config Def  = .FALSE.
     404    !Config Help = Used in radlwsw_m.F
     405    !
     406    ok_volcan_omp = .FALSE.
     407    CALL getin('ok_volcan', ok_volcan_omp)
     408
    398409    !
    399410    !Config Key  = aerosol_couple
     
    22822293    ok_alw = ok_alw_omp
    22832294    ok_cdnc = ok_cdnc_omp
     2295    ok_volcan = ok_volcan_omp
    22842296    aerosol_couple = aerosol_couple_omp
    22852297    chemistry_couple = chemistry_couple_omp
     
    26132625    write(lunout,*)' pmagic = ',pmagic
    26142626    write(lunout,*)' ok_ade = ',ok_ade
     2627    write(lunout,*)' ok_volcan = ',ok_volcan
    26152628    write(lunout,*)' ok_aie = ',ok_aie
    26162629    write(lunout,*)' ok_alw = ',ok_alw
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_ctrlout_mod.F90

    r3284 r3408  
    13751375  TYPE(ctrl_out), SAVE :: o_temp = ctrl_out((/ 2, 3, 4, 10, 10, 10, 11, 11, 11, 11/), &
    13761376    'temp', 'Air temperature', 'K', (/ ('', i=1, 10) /))
     1377  TYPE(ctrl_out), SAVE :: o_heat_volc = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1378    'heat_volc', 'SW heating rate due to volcano', 'K/s', (/ ('', i=1, 10) /))
     1379  TYPE(ctrl_out), SAVE :: o_cool_volc = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1380    'cool_volc', 'LW cooling rate due to volcano', 'K/s', (/ ('', i=1, 10) /))
    13771381  TYPE(ctrl_out), SAVE :: o_theta = ctrl_out((/ 2, 3, 4, 10, 10, 10, 11, 11, 11, 11/), &
    13781382    'theta', 'Potential air temperature', 'K', (/ ('', i=1, 10) /))
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_write_mod.F90

    r3400 r3408  
    1717  SUBROUTINE phys_output_write(itap, pdtphys, paprs, pphis, &
    1818       pplay, lmax_th, aerosol_couple,         &
    19        ok_ade, ok_aie, ivap, iliq, isol, new_aod, ok_sync, &
     19       ok_ade, ok_aie, ok_volcan, ivap, iliq, isol, new_aod, ok_sync, &
    2020       ptconv, read_climoz, clevSTD, ptconvth, &
    2121       d_u, d_t, qx, d_qx, zmasse, flag_aerosol, flag_aerosol_strat, ok_cdnc)
     
    214214         o_vsed_aer, o_tau_strat_1020, o_ext_strat_1020, o_f_r_wet
    215215#endif
     216   
     217    USE phys_output_ctrlout_mod, ONLY: o_heat_volc, o_cool_volc !NL
     218    USE phys_state_var_mod, ONLY: heat_volc, cool_volc !NL
    216219
    217220    USE phys_state_var_mod, ONLY: pctsrf, rain_fall, snow_fall, &
     
    388391    INTEGER, DIMENSION(klon) :: lmax_th
    389392    LOGICAL :: aerosol_couple, ok_sync
    390     LOGICAL :: ok_ade, ok_aie, new_aod
     393    LOGICAL :: ok_ade, ok_aie, ok_volcan, new_aod
    391394    LOGICAL, DIMENSION(klon, klev) :: ptconv, ptconvth
    392395    REAL :: pdtphys
     
    13781381       ENDIF
    13791382#endif
     1383       !NL
     1384       IF (ok_volcan .AND. ok_ade) THEN
     1385          DO k=1, klev
     1386             zx_tmp_fi3d(:,k)=heat_volc(:,k)*swradcorr(:)
     1387          ENDDO
     1388          CALL histwrite_phy(o_heat_volc, zx_tmp_fi3d)
     1389          DO k=1, klev
     1390             zx_tmp_fi3d(:,k)=cool_volc(:,k)*swradcorr(:)
     1391          ENDDO
     1392          CALL histwrite_phy(o_cool_volc, zx_tmp_fi3d)
     1393       ENDIF
    13801394       IF (ok_ade) THEN
    13811395          CALL histwrite_phy(o_topswad, topswad_aero*swradcorr)
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_state_var_mod.F90

    r3150 r3408  
    311311! toplwdown : downward CS LW flux at TOA
    312312! toplwdownclr : downward CS LW flux at TOA
     313! heat_volc : chauffage solaire du au volcanisme
     314! cool_volc : refroidissement infrarouge du au volcanisme
    313315      REAL,ALLOCATABLE,SAVE :: clwcon0(:,:),rnebcon0(:,:)
    314316!$OMP THREADPRIVATE(clwcon0,rnebcon0)
     
    321323      REAL,ALLOCATABLE,SAVE :: cool0(:,:)
    322324!$OMP THREADPRIVATE(cool0)
     325      REAL,ALLOCATABLE,SAVE :: heat_volc(:,:)   
     326!$OMP THREADPRIVATE(heat_volc)
     327      REAL,ALLOCATABLE,SAVE :: cool_volc(:,:)
     328!$OMP THREADPRIVATE(cool_volc)
    323329      REAL,ALLOCATABLE,SAVE :: topsw(:), toplw(:)
    324330!$OMP THREADPRIVATE(topsw,toplw)
     
    563569      ALLOCATE(heat(klon,klev), heat0(klon,klev))
    564570      ALLOCATE(cool(klon,klev), cool0(klon,klev))
     571      ALLOCATE(heat_volc(klon,klev), cool_volc(klon,klev))
    565572      ALLOCATE(topsw(klon), toplw(klon))
    566573      ALLOCATE(sollwdown(klon), sollwdownclr(klon))
     
    698705      deallocate(heat, heat0)
    699706      deallocate(cool, cool0)
     707      deallocate(heat_volc, cool_volc)
    700708      deallocate(topsw, toplw)
    701709      deallocate(sollwdown, sollwdownclr)
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/physiq_mod.F90

    r3400 r3408  
    327327    include "dimpft.h"
    328328    !======================================================================
     329    LOGICAL, SAVE :: ok_volcan ! pour activer les diagnostics volcaniques
    329330    LOGICAL ok_cvl  ! pour activer le nouveau driver pour convection KE
    330331    PARAMETER (ok_cvl=.TRUE.)
     
    12191220            fact_cldcon, facttemps,ok_newmicro,iflag_radia, &
    12201221            iflag_cld_th,iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &
    1221             ok_ade, ok_aie, ok_alw, ok_cdnc, aerosol_couple,  chemistry_couple, &
    1222             flag_aerosol, flag_aerosol_strat, new_aod, &
     1222            ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, aerosol_couple, &
     1223            chemistry_couple, flag_aerosol, flag_aerosol_strat, new_aod, &
    12231224            flag_bc_internal_mixture, bl95_b0, bl95_b1, &
    12241225                                ! nv flags pour la convection et les
     
    38793880               t_seri,q_seri,wo, &
    38803881               cldfrarad, cldemirad, cldtaurad, &
    3881                ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, flag_aerosol, &
    3882                flag_aerosol_strat, &
     3882               ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, ok_volcan, &
     3883               flag_aerosol, flag_aerosol_strat, &
    38833884               tau_aero, piz_aero, cg_aero, &
    38843885               tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm, &
     
    38903891               ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, &
    38913892               heat,heat0,cool,cool0,albpla, &
     3893               heat_volc,cool_volc, &
    38923894               topsw,toplw,solsw,sollw, &
    38933895               sollwdown, &
     
    39643966                     t_seri,q_seri,wo, &
    39653967                     cldfrarad, cldemirad, cldtaurad, &
    3966                      ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, flag_aerosol, &
    3967                      flag_aerosol_strat, &
     3968                     ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, ok_volcan, &
     3969                     flag_aerosol, flag_aerosol_strat, &
    39683970                     tau_aero, piz_aero, cg_aero, &
    39693971                     tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm, &
     
    39753977                     ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, &
    39763978                     heatp,heat0p,coolp,cool0p,albplap, &
     3979                     heat_volc,cool_volc, &
    39773980                     topswp,toplwp,solswp,sollwp, &
    39783981                     sollwdownp, &
     
    48234826    CALL phys_output_write(itap, pdtphys, paprs, pphis,  &
    48244827         pplay, lmax_th, aerosol_couple,                 &
    4825          ok_ade, ok_aie, ivap, iliq, isol, new_aod,      &
     4828         ok_ade, ok_aie, ok_volcan, ivap, iliq, isol, new_aod,      &
    48264829         ok_sync, ptconv, read_climoz, clevSTD,          &
    48274830         ptconvth, d_u, d_t, qx, d_qx, zmasse,           &
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/radlwsw_m.F90

    r3117 r3408  
    1616   t,q,wo,&
    1717   cldfra, cldemi, cldtaupd,&
    18    ok_ade, ok_aie, flag_aerosol,&
     18   ok_ade, ok_aie, ok_volcan, flag_aerosol,&
    1919   flag_aerosol_strat,&
    2020   tau_aero, piz_aero, cg_aero,&
     
    2525   ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, &
    2626   heat,heat0,cool,cool0,albpla,&
     27   heat_volc, cool_volc,&
    2728   topsw,toplw,solsw,sollw,&
    2829   sollwdown,&
     
    100101  ! ok_ade---input-L- apply the Aerosol Direct Effect or not?
    101102  ! ok_aie---input-L- apply the Aerosol Indirect Effect or not?
     103  ! ok_volcan-input-L- activate volcanic diags (SW heat & LW cool rate, SW & LW flux)
    102104  ! flag_aerosol-input-I- aerosol flag from 0 to 6
    103105  ! flag_aerosol_strat-input-I- use stratospheric aerosols flag (0, 1, 2)
     
    119121  ! solswai---output-R- ray. solaire net absorbe a la surface (aerosol ind)
    120122  ! topswai---output-R- ray. solaire absorbe au sommet de l'atm. (aerosol ind)
     123  !
     124  ! heat_volc-----output-R- echauffement atmospherique  du au forcage volcanique (visible) (K/s)
     125  ! cool_volc-----output-R- refroidissement dans l'IR du au forcage volcanique (K/s)
    121126  !
    122127  ! ATTENTION: swai and swad have to be interpreted in the following manner:
     
    192197
    193198  LOGICAL, INTENT(in)  :: ok_ade, ok_aie                                 ! switches whether to use aerosol direct (indirect) effects or not
     199  LOGICAL, INTENT(in)  :: ok_volcan                                      ! produce volcanic diags (SW/LW heat flux and rate)
    194200  LOGICAL              :: lldebug
    195201  INTEGER, INTENT(in)  :: flag_aerosol                                   ! takes value 0 (no aerosol) or 1 to 6 (aerosols)
     
    226232  REAL,    INTENT(out) :: heat(KLON,KLEV), cool(KLON,KLEV)
    227233  REAL,    INTENT(out) :: heat0(KLON,KLEV), cool0(KLON,KLEV)
     234  REAL,    INTENT(out) :: heat_volc(KLON,KLEV), cool_volc(KLON,KLEV) !NL
    228235  REAL,    INTENT(out) :: topsw(KLON), toplw(KLON)
    229236  REAL,    INTENT(out) :: solsw(KLON), sollw(KLON), albpla(KLON)
     
    292299  REAL(KIND=8) zheat(kdlon,kflev), zcool(kdlon,kflev)
    293300  REAL(KIND=8) zheat0(kdlon,kflev), zcool0(kdlon,kflev)
     301  REAL(KIND=8) zheat_volc(kdlon,kflev), zcool_volc(kdlon,kflev) !NL
    294302  REAL(KIND=8) ztopsw(kdlon), ztoplw(kdlon)
    295303  REAL(KIND=8) zsolsw(kdlon), zsollw(kdlon), zalbpla(kdlon)
     
    306314  REAL(KIND=8) ztopswad0aero(kdlon), zsolswad0aero(kdlon)   ! Aerosol direct forcing at TOAand surface
    307315  REAL(KIND=8) ztopswaiaero(kdlon), zsolswaiaero(kdlon)     ! dito, indirect
     316!--NL
     317  REAL(KIND=8) zswadaero(kdlon,kflev+1)                       ! SW Aerosol direct forcing
     318  REAL(KIND=8) zlwadaero(kdlon,kflev+1)                       ! LW Aerosol direct forcing
    308319!-LW by CK
    309320  REAL(KIND=8) ztoplwadaero(kdlon), zsollwadaero(kdlon)     ! LW Aerosol direct forcing at TOAand surface
     
    413424      heat(i,k)=0.
    414425      cool(i,k)=0.
     426      heat_volc(i,k)=0. !NL
     427      cool_volc(i,k)=0. !NL
    415428      heat0(i,k)=0.
    416429      cool0(i,k)=0.
     
    544557!--- Mise a zero des tableaux output du rayonnement LW-AR4 ----------             
    545558      DO k = 1, kflev+1
     559         DO i = 1, kdlon
     560!     print *,'RADLWSW: boucle mise a zero i k',i,k
     561            ZFLUP(i,k)=0.
     562            ZFLDN(i,k)=0.
     563            ZFLUP0(i,k)=0.
     564            ZFLDN0(i,k)=0.
     565            ZLWFT0_i(i,k)=0.
     566            ZFLUCUP_i(i,k)=0.
     567            ZFLUCDWN_i(i,k)=0.
     568         ENDDO
     569      ENDDO
     570      DO k = 1, kflev
     571         DO i = 1, kdlon
     572            zcool(i,k)=0.
     573            zcool_volc(i,k)=0. !NL
     574            zcool0(i,k)=0.
     575         ENDDO
     576      ENDDO
    546577      DO i = 1, kdlon
    547 !     print *,'RADLWSW: boucle mise a zero i k',i,k
    548       ZFLUP(i,k)=0.
    549       ZFLDN(i,k)=0.
    550       ZFLUP0(i,k)=0.
    551       ZFLDN0(i,k)=0.
    552       ZLWFT0_i(i,k)=0.
    553       ZFLUCUP_i(i,k)=0.
    554       ZFLUCDWN_i(i,k)=0.
    555       ENDDO
    556       ENDDO
    557       DO k = 1, kflev
    558       DO i = 1, kdlon
    559       zcool(i,k)=0.
    560       zcool0(i,k)=0.
    561       ENDDO
    562       ENDDO
    563       DO i = 1, kdlon
    564       ztoplw(i)=0.
    565       zsollw(i)=0.
    566       ztoplw0(i)=0.
    567       zsollw0(i)=0.
    568       zsollwdown(i)=0.
     578         ztoplw(i)=0.
     579         zsollw(i)=0.
     580         ztoplw0(i)=0.
     581         zsollw0(i)=0.
     582         zsollwdown(i)=0.
    569583      ENDDO
    570584       ! Old radiation scheme, used for AR4 runs
     
    582596!----- Mise a zero des tableaux output du rayonnement SW-AR4
    583597      DO k = 1, kflev+1
    584       DO i = 1, kdlon
    585       ZFSUP(i,k)=0.
    586       ZFSDN(i,k)=0.
    587       ZFSUP0(i,k)=0.
    588       ZFSDN0(i,k)=0.
    589       ZFSUPC0(i,k)=0.
    590       ZFSDNC0(i,k)=0.
    591       ZFLUPC0(i,k)=0.
    592       ZFLDNC0(i,k)=0.
    593       ZSWFT0_i(i,k)=0.
    594       ZFCUP_i(i,k)=0.
    595       ZFCDWN_i(i,k)=0.
    596       ZFCCUP_i(i,k)=0.
    597       ZFCCDWN_i(i,k)=0.
    598       ZFLCCUP_i(i,k)=0.
    599       ZFLCCDWN_i(i,k)=0.
    600       ENDDO
     598         DO i = 1, kdlon
     599            ZFSUP(i,k)=0.
     600            ZFSDN(i,k)=0.
     601            ZFSUP0(i,k)=0.
     602            ZFSDN0(i,k)=0.
     603            ZFSUPC0(i,k)=0.
     604            ZFSDNC0(i,k)=0.
     605            ZFLUPC0(i,k)=0.
     606            ZFLDNC0(i,k)=0.
     607            ZSWFT0_i(i,k)=0.
     608            ZFCUP_i(i,k)=0.
     609            ZFCDWN_i(i,k)=0.
     610            ZFCCUP_i(i,k)=0.
     611            ZFCCDWN_i(i,k)=0.
     612            ZFLCCUP_i(i,k)=0.
     613            ZFLCCDWN_i(i,k)=0.
     614            zswadaero(i,k)=0. !--NL
     615         ENDDO
    601616      ENDDO
    602617      DO k = 1, kflev
    603       DO i = 1, kdlon
    604       zheat(i,k)=0.
    605       zheat0(i,k)=0.
    606       ENDDO
     618         DO i = 1, kdlon
     619            zheat(i,k)=0.
     620            zheat_volc(i,k)=0.
     621            zheat0(i,k)=0.
     622         ENDDO
    607623      ENDDO
    608624      DO i = 1, kdlon
     
    852868         ZTOPSWAIAERO,ZSOLSWAIAERO, &
    853869         ZTOPSWCF_AERO,ZSOLSWCF_AERO, &
     870         ZSWADAERO, & !--NL
    854871         ZTOPLWADAERO,ZSOLLWADAERO,&  ! rajoute par C. Kleinscmitt pour LW diagnostics
    855872         ZTOPLWAD0AERO,ZSOLLWAD0AERO,&
    856873         ZTOPLWAIAERO,ZSOLLWAIAERO, &
    857          ok_ade, ok_aie, flag_aerosol,flag_aerosol_strat) ! flags aerosols
     874         ZLWADAERO, & !--NL
     875         ok_ade, ok_aie, ok_volcan, flag_aerosol,flag_aerosol_strat) ! flags aerosols
    858876           
    859877!        print *,'RADLWSW: apres RECMWF'
     
    934952         ZFLDNC0(i,k+1)= ZFLCCDWN_i(i,k+1)
    935953         ZFLUPC0(i,k+1)= ZFLCCUP_i(i,k+1)
     954         IF(ok_volcan) THEN
     955            ZSWADAERO(i,k+1)=ZSWADAERO(i,k+1)*fract(i) !--NL
     956         ENDIF
     957         
    936958!   Nouveau calcul car visiblement ZSWFT et ZSWFC sont nuls dans RRTM cy32
    937959!   en sortie de radlsw.F90 - MPL 7.01.09
     
    10141036           zcool(i,k)=(ZLWFT(i,k)-ZLWFT(i,k+1))*RDAY*RG/RCPD/PDP(i,k)
    10151037           zcool0(i,k)=(ZLWFT0_i(i,k)-ZLWFT0_i(i,k+1))*RDAY*RG/RCPD/PDP(i,k)
     1038           IF(ok_volcan) THEN
     1039              zheat_volc(i,k)=(ZSWADAERO(i,k+1)-ZSWADAERO(i,k))*RDAY*RG/RCPD/PDP(i,k) !NL
     1040              zcool_volc(i,k)=(ZLWADAERO(i,k)-ZLWADAERO(i,k+1))*RDAY*RG/RCPD/PDP(i,k) !NL
     1041           ENDIF
    10161042!          print *,'heat cool heat0 cool0 ',zheat(i,k),zcool(i,k),zheat0(i,k),zcool0(i,k)
    10171043!          ZFLUCUP_i(i,k)=ZFLUC_i(i,1,k)
     
    11231149        heat0(iof+i,k) = zheat0(i,k)/zznormcp
    11241150        cool0(iof+i,k) = zcool0(i,k)/zznormcp
     1151        IF(ok_volcan) THEN !NL
     1152           heat_volc(iof+i,k) = zheat_volc(i,k)/zznormcp
     1153           cool_volc(iof+i,k) = zcool_volc(i,k)/zznormcp
     1154        ENDIF
    11251155      ENDDO
    11261156    ENDDO
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/rrtm/aeropt_6bands_rrtm.F90

    r3318 r3408  
    794794         cg_allaer(i,k,2,inu)=MIN(MAX(cg_allaer(i,k,2,inu),0.0),1.0)
    795795
     796! NL VOLC
    796797!--natural aerosol
    797 !--ASBCM aerosols take _pi value because of internal mixture option
    798          tau_allaer(i,k,1,inu)=tau_ae_pi(i,k,id_ASSO4M_phy,inu)+tau_ae_pi(i,k,id_CSSO4M_phy,inu)+ &
    799                                tau_ae_pi(i,k,id_ASBCM_phy,inu)+tau_ae_pi(i,k,id_AIBCM_phy,inu)+   &
    800                                tau_ae_pi(i,k,id_ASPOMM_phy,inu)+tau_ae_pi(i,k,id_AIPOMM_phy,inu)+ &
    801                                tau_ae_pi(i,k,id_ASSSM_phy,inu)+tau_ae_pi(i,k,id_CSSSM_phy,inu)+   &
    802                                tau_ae_pi(i,k,id_SSSSM_phy,inu)+ tau_ae_pi(i,k,id_CIDUSTM_phy,inu)
     798! (same as upper but no volc aer in strat)
     799         tau_allaer(i,k,1,inu)=tau_ae(i,k,id_ASSO4M_phy,inu)+tau_ae(i,k,id_CSSO4M_phy,inu)+ &
     800                               tau_ae(i,k,id_ASBCM_phy,inu)+tau_ae(i,k,id_AIBCM_phy,inu)+   &
     801                               tau_ae(i,k,id_ASPOMM_phy,inu)+tau_ae(i,k,id_AIPOMM_phy,inu)+ &
     802                               tau_ae(i,k,id_ASSSM_phy,inu)+tau_ae(i,k,id_CSSSM_phy,inu)+   &
     803                               tau_ae(i,k,id_SSSSM_phy,inu)+ tau_ae(i,k,id_CIDUSTM_phy,inu)
    803804         tau_allaer(i,k,1,inu)=MAX(tau_allaer(i,k,1,inu),tau_min)
    804805
    805          piz_allaer(i,k,1,inu)=(tau_ae_pi(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)+   &
    806                                 tau_ae_pi(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)+   &
    807                                 tau_ae_pi(i,k,id_ASBCM_phy,inu)*piz_ae_pi(i,k,id_ASBCM_phy,inu)+  &
    808                                 tau_ae_pi(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)+     &
    809                                 tau_ae_pi(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)+   &
    810                                 tau_ae_pi(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)+   &
    811                                 tau_ae_pi(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)+     &
    812                                 tau_ae_pi(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)+     &
    813                                 tau_ae_pi(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)+     &
    814                                 tau_ae_pi(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)) &
     806         piz_allaer(i,k,1,inu)=(tau_ae(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)+   &
     807                                tau_ae(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)+   &
     808                                tau_ae(i,k,id_ASBCM_phy,inu)*piz_ae(i,k,id_ASBCM_phy,inu)+     &
     809                                tau_ae(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)+     &
     810                                tau_ae(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)+   &
     811                                tau_ae(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)+   &
     812                                tau_ae(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)+     &
     813                                tau_ae(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)+     &
     814                                tau_ae(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)+     &
     815                                tau_ae(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)) &
    815816                                /tau_allaer(i,k,1,inu)
    816817         piz_allaer(i,k,1,inu)=MIN(MAX(piz_allaer(i,k,1,inu),0.01),1.0)
    817818         IF (tau_allaer(i,k,1,inu).LE.tau_min) piz_allaer(i,k,1,inu)=1.0
    818819
    819          cg_allaer(i,k,1,inu)=(tau_ae_pi(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)*cg_ae(i,k,id_ASSO4M_phy,inu)+    &
    820                                tau_ae_pi(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)*cg_ae(i,k,id_CSSO4M_phy,inu)+    &
    821                                tau_ae_pi(i,k,id_ASBCM_phy,inu)*piz_ae_pi(i,k,id_ASBCM_phy,inu)*cg_ae_pi(i,k,id_ASBCM_phy,inu)+ &
    822                                tau_ae_pi(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)*cg_ae(i,k,id_AIBCM_phy,inu)+       &
    823                                tau_ae_pi(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)*cg_ae(i,k,id_ASPOMM_phy,inu)+    &
    824                                tau_ae_pi(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)*cg_ae(i,k,id_AIPOMM_phy,inu)+    &
    825                                tau_ae_pi(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)*cg_ae(i,k,id_ASSSM_phy,inu)+       &
    826                                tau_ae_pi(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)*cg_ae(i,k,id_CSSSM_phy,inu)+       &
    827                                tau_ae_pi(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)*cg_ae(i,k,id_SSSSM_phy,inu)+       &
    828                                tau_ae_pi(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)*cg_ae(i,k,id_CIDUSTM_phy,inu))/ &
     820         cg_allaer(i,k,1,inu)=(tau_ae(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)*cg_ae(i,k,id_ASSO4M_phy,inu)+ &
     821                               tau_ae(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)*cg_ae(i,k,id_CSSO4M_phy,inu)+ &
     822                               tau_ae(i,k,id_ASBCM_phy,inu)*piz_ae(i,k,id_ASBCM_phy,inu)*cg_ae(i,k,id_ASBCM_phy,inu)+    &
     823                               tau_ae(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)*cg_ae(i,k,id_AIBCM_phy,inu)+    &
     824                               tau_ae(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)*cg_ae(i,k,id_ASPOMM_phy,inu)+ &
     825                               tau_ae(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)*cg_ae(i,k,id_AIPOMM_phy,inu)+ &
     826                               tau_ae(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)*cg_ae(i,k,id_ASSSM_phy,inu)+    &
     827                               tau_ae(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)*cg_ae(i,k,id_CSSSM_phy,inu)+    &
     828                               tau_ae(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)*cg_ae(i,k,id_SSSSM_phy,inu)+    &
     829                               tau_ae(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)*cg_ae(i,k,id_CIDUSTM_phy,inu))/ &
    829830                               (tau_allaer(i,k,1,inu)*piz_allaer(i,k,1,inu))
    830831         cg_allaer(i,k,1,inu)=MIN(MAX(cg_allaer(i,k,1,inu),0.0),1.0)
    831832
     833!--ASBCM aerosols take _pi value because of internal mixture option
     834!         tau_allaer(i,k,1,inu)=tau_ae_pi(i,k,id_ASSO4M_phy,inu)+tau_ae_pi(i,k,id_CSSO4M_phy,inu)+ &
     835!                               tau_ae_pi(i,k,id_ASBCM_phy,inu)+tau_ae_pi(i,k,id_AIBCM_phy,inu)+   &
     836!                               tau_ae_pi(i,k,id_ASPOMM_phy,inu)+tau_ae_pi(i,k,id_AIPOMM_phy,inu)+ &
     837!                               tau_ae_pi(i,k,id_ASSSM_phy,inu)+tau_ae_pi(i,k,id_CSSSM_phy,inu)+   &
     838!                               tau_ae_pi(i,k,id_SSSSM_phy,inu)+ tau_ae_pi(i,k,id_CIDUSTM_phy,inu)
     839!         tau_allaer(i,k,1,inu)=MAX(tau_allaer(i,k,1,inu),tau_min)
     840!
     841!         piz_allaer(i,k,1,inu)=(tau_ae_pi(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)+   &
     842!                                tau_ae_pi(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)+   &
     843!                                tau_ae_pi(i,k,id_ASBCM_phy,inu)*piz_ae_pi(i,k,id_ASBCM_phy,inu)+  &
     844!                                tau_ae_pi(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)+     &
     845!                                tau_ae_pi(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)+   &
     846!                                tau_ae_pi(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)+   &
     847!                                tau_ae_pi(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)+     &
     848!                                tau_ae_pi(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)+     &
     849!                                tau_ae_pi(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)+     &
     850!                                tau_ae_pi(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)) &
     851!                                /tau_allaer(i,k,1,inu)
     852!         piz_allaer(i,k,1,inu)=MIN(MAX(piz_allaer(i,k,1,inu),0.01),1.0)
     853!         IF (tau_allaer(i,k,1,inu).LE.tau_min) piz_allaer(i,k,1,inu)=1.0
     854!
     855!         cg_allaer(i,k,1,inu)=(tau_ae_pi(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)*cg_ae(i,k,id_ASSO4M_phy,inu)+    &
     856!                               tau_ae_pi(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)*cg_ae(i,k,id_CSSO4M_phy,inu)+    &
     857!                               tau_ae_pi(i,k,id_ASBCM_phy,inu)*piz_ae_pi(i,k,id_ASBCM_phy,inu)*cg_ae_pi(i,k,id_ASBCM_phy,inu)+ &
     858!                               tau_ae_pi(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)*cg_ae(i,k,id_AIBCM_phy,inu)+       &
     859!                               tau_ae_pi(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)*cg_ae(i,k,id_ASPOMM_phy,inu)+    &
     860!                               tau_ae_pi(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)*cg_ae(i,k,id_AIPOMM_phy,inu)+    &
     861!                               tau_ae_pi(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)*cg_ae(i,k,id_ASSSM_phy,inu)+       &
     862!                               tau_ae_pi(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)*cg_ae(i,k,id_CSSSM_phy,inu)+       &
     863!                               tau_ae_pi(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)*cg_ae(i,k,id_SSSSM_phy,inu)+       &
     864!                               tau_ae_pi(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)*cg_ae(i,k,id_CIDUSTM_phy,inu))/ &
     865!                               (tau_allaer(i,k,1,inu)*piz_allaer(i,k,1,inu))
     866!         cg_allaer(i,k,1,inu)=MIN(MAX(cg_allaer(i,k,1,inu),0.0),1.0)
     867! NL VOLC END
    832868        ENDDO
    833869      ENDDO
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/rrtm/readaerosolstrato2_rrtm.F90

    r2744 r3408  
    303303        tau_aero_sw_rrtm(:,:,2,band)  = tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band)
    304304!--natural aerosols bands 1 to NSW
    305         cg_aero_sw_rrtm(:,:,1,band)  = ( cg_aero_sw_rrtm(:,:,1,band)*piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) + &
    306                                          cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
    307                                     MAX( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
    308                                          piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band), 1.e-15 )
    309         piz_aero_sw_rrtm(:,:,1,band) = ( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
    310                                          piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /                                     &
    311                                     MAX( tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band), 1.e-15 )
    312         tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band)
     305!        cg_aero_sw_rrtm(:,:,1,band)  = ( cg_aero_sw_rrtm(:,:,1,band)*piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) + &
     306!                                         cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
     307!                                    MAX( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
     308!                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band), 1.e-15 )
     309!        piz_aero_sw_rrtm(:,:,1,band) = ( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
     310!                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /                                     &
     311!                                    MAX( tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band), 1.e-15 )
     312!        tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band)
    313313!--no stratospheric aerosol in index 1 for these tests
    314 !        cg_aero_sw_rrtm(:,:,1,band)  =  cg_aero_sw_rrtm(:,:,1,band)
    315 !        piz_aero_sw_rrtm(:,:,1,band)  = piz_aero_sw_rrtm(:,:,1,band)
    316 !        tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band)
     314        cg_aero_sw_rrtm(:,:,1,band)  =  cg_aero_sw_rrtm(:,:,1,band)
     315        piz_aero_sw_rrtm(:,:,1,band)  = piz_aero_sw_rrtm(:,:,1,band)
     316        tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band)
    317317    ENDWHERE
    318318    ENDDO
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/rrtm/recmwf_aero.F90

    r3337 r3408  
    3030 & PTOPSWAIAERO,PSOLSWAIAERO,&
    3131 & PTOPSWCFAERO,PSOLSWCFAERO,&
     32 & PSWADAERO,& !--NL
    3233!--LW diagnostics CK
    3334 & PTOPLWADAERO,PSOLLWADAERO,&
    3435 & PTOPLWAD0AERO,PSOLLWAD0AERO,&
    3536 & PTOPLWAIAERO,PSOLLWAIAERO,&
     37 & PLWADAERO,& !--NL
    3638!..end
    37  & ok_ade, ok_aie, flag_aerosol,flag_aerosol_strat)
     39 & ok_ade, ok_aie, ok_volcan, flag_aerosol,flag_aerosol_strat)
    3840!--fin
    3941
     
    8284! ok_ade---input-L- apply the Aerosol Direct Effect or not?
    8385! ok_aie---input-L- apply the Aerosol Indirect Effect or not?
     86! ok_volcan-input-L- activate volcanic diags (SW heat & LW cool rate, SW & LW flux)
    8487! flag_aerosol-input-I- aerosol flag from 0 to 7
    8588! flag_aerosol_strat-input-I- use stratospheric aerosols flag (T/F)
     
    212215REAL(KIND=JPRB)   ,INTENT(IN)    :: PREF_ICE_PI(KPROMA,KLEV)
    213216LOGICAL, INTENT(in)  :: ok_ade, ok_aie         ! switches whether to use aerosol direct (indirect) effects or not
     217LOGICAL, INTENT(in)  :: ok_volcan              ! produce volcanic diags (SW/LW heat flux and rate)
    214218INTEGER, INTENT(in)  :: flag_aerosol           ! takes value 0 (no aerosol) or 1 to 6 (aerosols)
    215219LOGICAL, INTENT(in)  :: flag_aerosol_strat     ! use stratospheric aerosols
    216 REAL(KIND=JPRB)   ,INTENT(out)   :: PTOPSWADAERO(KPROMA), PSOLSWADAERO(KPROMA)       ! Aerosol direct forcing at TOA and surface
     220REAL(KIND=JPRB)   ,INTENT(OUT)   :: PTOPSWADAERO(KPROMA), PSOLSWADAERO(KPROMA)       ! Aerosol direct forcing at TOA and surface
    217221REAL(KIND=JPRB)   ,INTENT(OUT)   :: PTOPSWAD0AERO(KPROMA), PSOLSWAD0AERO(KPROMA)     ! Aerosol direct forcing at TOA and surface
    218222REAL(KIND=JPRB)   ,INTENT(OUT)   :: PTOPSWAIAERO(KPROMA), PSOLSWAIAERO(KPROMA)       ! ditto, indirect
    219223REAL(KIND=JPRB)   ,INTENT(OUT)   :: PTOPSWCFAERO(KPROMA,3), PSOLSWCFAERO(KPROMA,3) !--do we keep this ?
    220224!--fin
     225!--NL
     226REAL(KIND=JPRB)   ,INTENT(OUT)   :: PSWADAERO(KPROMA, KLEV+1)                        ! SW Aerosol direct forcing
     227REAL(KIND=JPRB)   ,INTENT(OUT)   :: PLWADAERO(KPROMA, KLEV+1)                        ! LW Aerosol direct forcing
    221228!--CK
    222229REAL(KIND=JPRB)   ,INTENT(out)   :: PTOPLWADAERO(KPROMA), PSOLLWADAERO(KPROMA)       ! LW Aerosol direct forcing at TOA + surface
     
    806813     PSOLSWAD0AERO(:) = (ZFSDN0_AERO(:,1,4)     -ZFSUP0_AERO(:,1,4))     -(ZFSDN0_AERO(:,1,2)     -ZFSUP0_AERO(:,1,2))
    807814     PTOPSWAD0AERO(:) = (ZFSDN0_AERO(:,KLEV+1,4)-ZFSUP0_AERO(:,KLEV+1,4))-(ZFSDN0_AERO(:,KLEV+1,2)-ZFSUP0_AERO(:,KLEV+1,2))
     815     IF(ok_volcan) THEN
     816        PSWADAERO(:,:)  = (ZFSDN_AERO(:,:,4) -ZFSUP_AERO(:,:,4)) -(ZFSDN_AERO(:,:,2) -ZFSUP_AERO(:,:,2)) !--NL
     817     ENDIF
    808818
    809819! indirect anthropogenic forcing
     
    826836     PSOLLWAD0AERO(:) = (-LWDN0_AERO(:,1,4)     -LWUP0_AERO(:,1,4))     -(-LWDN0_AERO(:,1,2)     -LWUP0_AERO(:,1,2))
    827837     PTOPLWAD0AERO(:) = (-LWDN0_AERO(:,KLEV+1,4)-LWUP0_AERO(:,KLEV+1,4))-(-LWDN0_AERO(:,KLEV+1,2)-LWUP0_AERO(:,KLEV+1,2))
     838     IF(ok_volcan) THEN
     839        PLWADAERO(:,:)  = (-LWDN_AERO(:,:,4) -LWUP_AERO(:,:,4)) -(-LWDN_AERO(:,:,2) -LWUP_AERO(:,:,2)) !--NL
     840     ENDIF
    828841
    829842! LW indirect anthropogenic forcing
     
    840853     PSOLSWAD0AERO(:) = (ZFSDN0_AERO(:,1,3)     -ZFSUP0_AERO(:,1,3))     -(ZFSDN0_AERO(:,1,1)     -ZFSUP0_AERO(:,1,1))
    841854     PTOPSWAD0AERO(:) = (ZFSDN0_AERO(:,KLEV+1,3)-ZFSUP0_AERO(:,KLEV+1,3))-(ZFSDN0_AERO(:,KLEV+1,1)-ZFSUP0_AERO(:,KLEV+1,1))
     855     IF(ok_volcan) THEN
     856        PSWADAERO(:,:)  = (ZFSDN_AERO(:,:,3) -ZFSUP_AERO(:,:,3)) -(ZFSDN_AERO(:,:,1) -ZFSUP_AERO(:,:,1)) !--NL
     857     ENDIF
    842858
    843859! indirect anthropogenic forcing
     
    860876     PSOLLWAD0AERO(:) = (-LWDN0_AERO(:,1,3)     -LWUP0_AERO(:,1,3))     -(-LWDN0_AERO(:,1,1)     -LWUP0_AERO(:,1,1))
    861877     PTOPLWAD0AERO(:) = (-LWDN0_AERO(:,KLEV+1,3)-LWUP0_AERO(:,KLEV+1,3))-(-LWDN0_AERO(:,KLEV+1,1)-LWUP0_AERO(:,KLEV+1,1))
    862 
     878     IF(ok_volcan) THEN
     879        PLWADAERO(:,:)  = (-LWDN_AERO(:,:,3) -LWUP_AERO(:,:,3)) -(-LWDN_AERO(:,:,1) -LWUP_AERO(:,:,1)) !--NL
     880     ENDIF
     881     
    863882! LW indirect anthropogenic forcing
    864883     PSOLLWAIAERO(:) = 0.0
     
    874893     PSOLSWAD0AERO(:) = 0.0
    875894     PTOPSWAD0AERO(:) = 0.0
    876 
     895     IF(ok_volcan) THEN
     896        PSWADAERO(:,:)  = 0.0 !--NL
     897     ENDIF
     898     
    877899! indirect anthropogenic forcing
    878900     PSOLSWAIAERO(:) = (ZFSDN_AERO(:,1,2)     -ZFSUP_AERO(:,1,2))     -(ZFSDN_AERO(:,1,1)     -ZFSUP_AERO(:,1,1))
     
    894916     PSOLLWAD0AERO(:) = 0.0
    895917     PTOPLWAD0AERO(:) = 0.0
    896 
     918     IF(ok_volcan) THEN
     919        PLWADAERO(:,:)  = 0.0 !--NL
     920     ENDIF
     921     
    897922! LW indirect anthropogenic forcing
    898923     PSOLLWAIAERO(:) = (-LWDN_AERO(:,1,2)     -LWUP_AERO(:,1,2))     -(-LWDN_AERO(:,1,1)     -LWUP_AERO(:,1,1))
     
    908933     PSOLSWAD0AERO(:) = 0.0
    909934     PTOPSWAD0AERO(:) = 0.0
    910 
     935     IF(ok_volcan) THEN
     936        PSWADAERO(:,:)  = 0.0 !--NL
     937     ENDIF
     938     
    911939! indirect anthropogenic forcing
    912940     PSOLSWAIAERO(:) = 0.0
     
    928956     PSOLLWAD0AERO(:) = 0.0
    929957     PTOPLWAD0AERO(:) = 0.0
    930 
     958     IF(ok_volcan) THEN
     959        PLWADAERO(:,:)  = 0.0 !--NL
     960     ENDIF
     961     
    931962! LW indirect anthropogenic forcing
    932963     PSOLLWAIAERO(:) = 0.0
Note: See TracChangeset for help on using the changeset viewer.