Ignore:
Timestamp:
Nov 21, 2019, 4:43:45 PM (5 years ago)
Author:
lguez
Message:

Merge revisions 3427:3600 of trunk into branch Ocean_skin

Location:
LMDZ6/branches/Ocean_skin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Ocean_skin

  • LMDZ6/branches/Ocean_skin/libf/phylmd/conf_phys_m.F90

    r3432 r3605  
    1717       iflag_cld_th, &
    1818       iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &
    19        ok_ade, ok_aie, ok_alw, ok_cdnc, aerosol_couple, chemistry_couple, &
     19       ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, aerosol_couple, chemistry_couple, &
    2020       flag_aerosol, flag_aerosol_strat, flag_aer_feedback, new_aod, &
    2121       flag_bc_internal_mixture, bl95_b0, bl95_b1,&
     
    2626    USE surface_data
    2727    USE phys_cal_mod
    28     USE carbon_cycle_mod,  ONLY: carbon_cycle_tr, carbon_cycle_cpl, level_coupling_esm
     28    USE carbon_cycle_mod,  ONLY: carbon_cycle_tr, carbon_cycle_cpl, carbon_cycle_rad, level_coupling_esm
    2929    USE mod_grid_phy_lmdz, ONLY: klon_glo
    3030    USE print_control_mod, ONLY: lunout
    3131    use config_ocean_skin_m, only: config_ocean_skin
     32    USE phys_state_var_mod, ONLY: phys_tstep
    3233
    3334    INCLUDE "conema3.h"
     
    6364    ! flag_bc_internal_mixture : use BC internal mixture if true
    6465    ! bl95_b*: parameters in the formula to link CDNC to aerosol mass conc
     66    ! ok_volcan: activate volcanic diags (SW heat & LW cool rate, SW & LW flux)
    6567    !
    6668
     
    7173    LOGICAL              :: ok_LES
    7274    LOGICAL              :: callstats
    73     LOGICAL              :: ok_ade, ok_aie, ok_alw, ok_cdnc
     75    LOGICAL              :: ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan
    7476    LOGICAL              :: aerosol_couple, chemistry_couple
    7577    INTEGER              :: flag_aerosol
     
    9395    LOGICAL, SAVE       :: ok_LES_omp   
    9496    LOGICAL, SAVE       :: callstats_omp
    95     LOGICAL, SAVE       :: ok_ade_omp, ok_aie_omp, ok_alw_omp, ok_cdnc_omp
     97    LOGICAL, SAVE       :: ok_ade_omp, ok_aie_omp, ok_alw_omp, ok_cdnc_omp, ok_volcan_omp
    9698    LOGICAL, SAVE       :: aerosol_couple_omp, chemistry_couple_omp
    9799    INTEGER, SAVE       :: flag_aerosol_omp
     
    151153
    152154    REAL,SAVE :: R_ecc_omp,R_peri_omp,R_incl_omp,solaire_omp
    153     REAL      :: solaire_omp_init
     155    REAL,SAVE      :: solaire_omp_init
    154156    LOGICAL,SAVE :: ok_suntime_rrtm_omp
    155157    REAL,SAVE :: co2_ppm_omp, RCO2_omp, co2_ppm_per_omp, RCO2_per_omp
     
    231233    LOGICAL, SAVE :: carbon_cycle_tr_omp
    232234    LOGICAL, SAVE :: carbon_cycle_cpl_omp
     235    LOGICAL, SAVE :: carbon_cycle_rad_omp
    233236    INTEGER, SAVE :: level_coupling_esm_omp
    234237    LOGICAL, SAVE :: adjust_tropopause_omp
     
    395398    ok_cdnc_omp = .FALSE.
    396399    CALL getin('ok_cdnc', ok_cdnc_omp)
     400
     401    !
     402    !Config Key  = ok_volcan
     403    !Config Desc = ok to generate volcanic diags
     404    !Config Def  = .FALSE.
     405    !Config Help = Used in radlwsw_m.F
     406    !
     407    ok_volcan_omp = .FALSE.
     408    CALL getin('ok_volcan', ok_volcan_omp)
     409
    397410    !
    398411    !Config Key  = aerosol_couple
     
    595608    ! RCO2 = 5.286789092164308E-04
    596609    !ancienne valeur
    597     RCO2_omp = co2_ppm_omp * 1.0e-06  * 44.011/28.97 ! pour co2_ppm=348.
     610    RCO2_omp = co2_ppm_omp * 1.0e-06 * RMCO2 / RMD ! pour co2_ppm=348.
    598611
    599612    !  CALL getin('RCO2', RCO2)
     
    615628    CALL getin('CH4_ppb', zzz)
    616629    CH4_ppb_omp = zzz
    617     RCH4_omp = CH4_ppb_omp * 1.0E-09 * 16.043/28.97
     630    RCH4_omp = CH4_ppb_omp * 1.0E-09 * RMCH4 / RMD
    618631    !
    619632    !Config Key  = RN2O
     
    633646    CALL getin('N2O_ppb', zzz)
    634647    N2O_ppb_omp = zzz
    635     RN2O_omp = N2O_ppb_omp * 1.0E-09 * 44.013/28.97
     648    RN2O_omp = N2O_ppb_omp * 1.0E-09 * RMN2O / RMD
    636649    !
    637650    !Config Key  = RCFC11
     
    645658    CALL getin('CFC11_ppt',zzz)
    646659    CFC11_ppt_omp = zzz
    647     RCFC11_omp=CFC11_ppt_omp* 1.0E-12 * 137.3686/28.97
     660    RCFC11_omp=CFC11_ppt_omp* 1.0E-12 * RMCFC11 / RMD
    648661    ! RCFC11 = 1.327690990680013E-09
    649662    !OK CALL getin('RCFC11', RCFC11)
     
    659672    CALL getin('CFC12_ppt',zzz)
    660673    CFC12_ppt_omp = zzz
    661     RCFC12_omp = CFC12_ppt_omp * 1.0E-12 * 120.9140/28.97
     674    RCFC12_omp = CFC12_ppt_omp * 1.0E-12 * RMCFC12 / RMD
    662675    ! RCFC12 = 2.020102726958923E-09
    663676    !OK CALL getin('RCFC12', RCFC12)
     
    679692    !Config Help =
    680693    !               
    681     RCO2_per_omp = co2_ppm_per_omp * 1.0e-06  * 44.011/28.97
     694    RCO2_per_omp = co2_ppm_per_omp * 1.0e-06 * RMCO2 / RMD
    682695
    683696    !Config Key  = ok_4xCO2atm
     
    694707    CALL getin('CH4_ppb_per', zzz)
    695708    CH4_ppb_per_omp = zzz
    696     RCH4_per_omp = CH4_ppb_per_omp * 1.0E-09 * 16.043/28.97
     709    RCH4_per_omp = CH4_ppb_per_omp * 1.0E-09 * RMCH4 / RMD
    697710    !
    698711    !Config Key  = RN2O_per
     
    704717    CALL getin('N2O_ppb_per', zzz)
    705718    N2O_ppb_per_omp = zzz
    706     RN2O_per_omp = N2O_ppb_per_omp * 1.0E-09 * 44.013/28.97
     719    RN2O_per_omp = N2O_ppb_per_omp * 1.0E-09 * RMN2O / RMD
    707720    !
    708721    !Config Key  = RCFC11_per
     
    714727    CALL getin('CFC11_ppt_per',zzz)
    715728    CFC11_ppt_per_omp = zzz
    716     RCFC11_per_omp=CFC11_ppt_per_omp* 1.0E-12 * 137.3686/28.97
     729    RCFC11_per_omp=CFC11_ppt_per_omp* 1.0E-12 * RMCFC11 / RMD
    717730    !
    718731    !Config Key  = RCFC12_per
     
    724737    CALL getin('CFC12_ppt_per',zzz)
    725738    CFC12_ppt_per_omp = zzz
    726     RCFC12_per_omp = CFC12_ppt_per_omp * 1.0E-12 * 120.9140/28.97
     739    RCFC12_per_omp = CFC12_ppt_per_omp * 1.0E-12 * RMCFC12 / RMD
    727740    !ajout CFMIP end
    728741
     
    10311044    ! - 1 = stratospheric aerosols scaled from 550 nm AOD
    10321045    ! - 2 = stratospheric aerosol properties from CMIP6
    1033     !Option 2 is only available with RRTM, this is tested later on
     1046    !Option 2 is only available with RRTM, this is tested later on 
    10341047    !Config Def  = 0
    10351048    !Config Help = Used in physiq.F
     
    17241737    !Config Desc = freq_calNMC(2) = frequence de calcul fichiers histdayNMC
    17251738    !Config Desc = freq_calNMC(3) = frequence de calcul fichiers histhfNMC
    1726     !Config Def  = pasphys
    1727     !Config Help =
    1728     !
    1729     freq_calNMC_omp(1) = pasphys
    1730     freq_calNMC_omp(2) = pasphys
    1731     freq_calNMC_omp(3) = pasphys
     1739    !Config Def  = phys_tstep
     1740    !Config Help =
     1741    !
     1742    freq_calNMC_omp(1) = phys_tstep
     1743    freq_calNMC_omp(2) = phys_tstep
     1744    freq_calNMC_omp(3) = phys_tstep
    17321745    CALL getin('freq_calNMC',freq_calNMC_omp)
    17331746    !
     
    21562169    carbon_cycle_cpl_omp=.FALSE.
    21572170    CALL getin('carbon_cycle_cpl',carbon_cycle_cpl_omp)
     2171
     2172    carbon_cycle_rad_omp=.FALSE.
     2173    CALL getin('carbon_cycle_rad',carbon_cycle_rad_omp)
    21582174
    21592175    ! >> PC
     
    23062322    ok_alw = ok_alw_omp
    23072323    ok_cdnc = ok_cdnc_omp
     2324    ok_volcan = ok_volcan_omp
    23082325    aerosol_couple = aerosol_couple_omp
    23092326    chemistry_couple = chemistry_couple_omp
     
    24282445    carbon_cycle_tr = carbon_cycle_tr_omp
    24292446    carbon_cycle_cpl = carbon_cycle_cpl_omp
     2447    carbon_cycle_rad = carbon_cycle_rad_omp
    24302448    level_coupling_esm = level_coupling_esm_omp
    24312449
     
    25292547    IF (flag_bc_internal_mixture .AND. flag_aerosol.NE.6) THEN
    25302548       CALL abort_physic('conf_phys', 'flag_bc_internal_mixture can only be activated with flag_aerosol=6',1)
     2549    ENDIF
     2550
     2551    ! Test on carbon cycle
     2552    IF (carbon_cycle_tr .AND. .NOT. carbon_cycle_cpl) THEN
     2553       CALL abort_physic('conf_phys', 'carbon_cycle_cpl has to be TRUE if carbon_cycle_tr is on',1)
     2554    ENDIF
     2555    IF (carbon_cycle_rad .AND. .NOT. carbon_cycle_cpl) THEN
     2556       CALL abort_physic('conf_phys', 'carbon_cycle_cpl has to be TRUE if carbon_cycle_rad is on',1)
    25312557    ENDIF
    25322558
     
    26432669    WRITE(lunout,*) ' pmagic = ',pmagic
    26442670    WRITE(lunout,*) ' ok_ade = ',ok_ade
     2671    WRITE(lunout,*) ' ok_volcan = ',ok_volcan
    26452672    WRITE(lunout,*) ' ok_aie = ',ok_aie
    26462673    WRITE(lunout,*) ' ok_alw = ',ok_alw
     
    27422769    WRITE(lunout,*) ' carbon_cycle_tr = ', carbon_cycle_tr
    27432770    WRITE(lunout,*) ' carbon_cycle_cpl = ', carbon_cycle_cpl
     2771    WRITE(lunout,*) ' carbon_cycle_rad = ', carbon_cycle_rad
    27442772    WRITE(lunout,*) ' level_coupling_esm = ', level_coupling_esm
    27452773
Note: See TracChangeset for help on using the changeset viewer.