Ignore:
Timestamp:
Jul 24, 2024, 4:23:34 PM (4 months ago)
Author:
abarral
Message:

rename modules properly lmdz_*
move some unused files to obsolete/
(lint) uppercase fortran keywords

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/radlwsw_m.F90

    r5116 r5117  
    195195
    196196    ! Input arguments
    197     REAL, INTENT(in) :: dist
    198     REAL, INTENT(in) :: rmu0(KLON), fract(KLON)
    199     REAL, INTENT(in) :: paprs(KLON, KLEV + 1), pplay(KLON, KLEV)
     197    REAL, INTENT(IN) :: dist
     198    REAL, INTENT(IN) :: rmu0(KLON), fract(KLON)
     199    REAL, INTENT(IN) :: paprs(KLON, KLEV + 1), pplay(KLON, KLEV)
    200200    !albedo SB >>>
    201     ! REAL,    INTENT(in)  :: alb1(KLON), alb2(KLON), tsol(KLON)
    202     REAL, INTENT(in) :: tsol(KLON)
    203     REAL, INTENT(in) :: alb_dir(KLON, NSW), alb_dif(KLON, NSW)
    204     REAL, INTENT(in) :: SFRWL(6)
     201    ! REAL,    INTENT(IN)  :: alb1(KLON), alb2(KLON), tsol(KLON)
     202    REAL, INTENT(IN) :: tsol(KLON)
     203    REAL, INTENT(IN) :: alb_dir(KLON, NSW), alb_dif(KLON, NSW)
     204    REAL, INTENT(IN) :: SFRWL(6)
    205205    !albedo SB <<<
    206     REAL, INTENT(in) :: t(KLON, KLEV), q(KLON, KLEV)
    207 
    208     REAL, INTENT(in) :: wo(:, :, :) ! dimension(KLON,KLEV, 1 or 2)
     206    REAL, INTENT(IN) :: t(KLON, KLEV), q(KLON, KLEV)
     207
     208    REAL, INTENT(IN) :: wo(:, :, :) ! DIMENSION(KLON,KLEV, 1 or 2)
    209209    ! column-density of ozone in a layer, in kilo-Dobsons
    210210    ! "wo(:, :, 1)" is for the average day-night field,
    211211    ! "wo(:, :, 2)" is for daylight time.
    212212
    213     LOGICAL, INTENT(in) :: ok_ade, ok_aie                                 ! switches whether to use aerosol direct (indirect) effects or not
    214     LOGICAL, INTENT(in) :: ok_volcan                                      ! produce volcanic diags (SW/LW heat flux and rate)
    215     INTEGER, INTENT(in) :: flag_volc_surfstrat                            ! allow to impose volcanic cooling rate at surf or heating in strato
     213    LOGICAL, INTENT(IN) :: ok_ade, ok_aie                                 ! switches whether to use aerosol direct (indirect) effects or not
     214    LOGICAL, INTENT(IN) :: ok_volcan                                      ! produce volcanic diags (SW/LW heat flux and rate)
     215    INTEGER, INTENT(IN) :: flag_volc_surfstrat                            ! allow to impose volcanic cooling rate at surf or heating in strato
    216216    LOGICAL :: lldebug = .FALSE.
    217     INTEGER, INTENT(in) :: flag_aerosol                                   ! takes value 0 (no aerosol) or 1 to 6 (aerosols)
    218     INTEGER, INTENT(in) :: flag_aerosol_strat                             ! use stratospheric aerosols
    219     LOGICAL, INTENT(in) :: flag_aer_feedback                              ! activate aerosol radiative feedback
    220     REAL, INTENT(in) :: cldfra(KLON, KLEV), cldemi(KLON, KLEV), cldtaupd(KLON, KLEV)
    221     REAL, INTENT(in) :: tau_aero(KLON, KLEV, naero_grp, 2)                        ! aerosol optical properties (see aeropt.F)
    222     REAL, INTENT(in) :: piz_aero(KLON, KLEV, naero_grp, 2)                        ! aerosol optical properties (see aeropt.F)
    223     REAL, INTENT(in) :: cg_aero(KLON, KLEV, naero_grp, 2)                         ! aerosol optical properties (see aeropt.F)
     217    INTEGER, INTENT(IN) :: flag_aerosol                                   ! takes value 0 (no aerosol) or 1 to 6 (aerosols)
     218    INTEGER, INTENT(IN) :: flag_aerosol_strat                             ! use stratospheric aerosols
     219    LOGICAL, INTENT(IN) :: flag_aer_feedback                              ! activate aerosol radiative feedback
     220    REAL, INTENT(IN) :: cldfra(KLON, KLEV), cldemi(KLON, KLEV), cldtaupd(KLON, KLEV)
     221    REAL, INTENT(IN) :: tau_aero(KLON, KLEV, naero_grp, 2)                        ! aerosol optical properties (see aeropt.F)
     222    REAL, INTENT(IN) :: piz_aero(KLON, KLEV, naero_grp, 2)                        ! aerosol optical properties (see aeropt.F)
     223    REAL, INTENT(IN) :: cg_aero(KLON, KLEV, naero_grp, 2)                         ! aerosol optical properties (see aeropt.F)
    224224    !--OB
    225     REAL, INTENT(in) :: tau_aero_sw_rrtm(KLON, KLEV, 2, NSW)                 ! aerosol optical properties RRTM
    226     REAL, INTENT(in) :: piz_aero_sw_rrtm(KLON, KLEV, 2, NSW)                 ! aerosol optical properties RRTM
    227     REAL, INTENT(in) :: cg_aero_sw_rrtm(KLON, KLEV, 2, NSW)                  ! aerosol optical properties RRTM
     225    REAL, INTENT(IN) :: tau_aero_sw_rrtm(KLON, KLEV, 2, NSW)                 ! aerosol optical properties RRTM
     226    REAL, INTENT(IN) :: piz_aero_sw_rrtm(KLON, KLEV, 2, NSW)                 ! aerosol optical properties RRTM
     227    REAL, INTENT(IN) :: cg_aero_sw_rrtm(KLON, KLEV, 2, NSW)                  ! aerosol optical properties RRTM
    228228    ! AI
    229229    !--OB fin
     
    231231    !--C. Kleinschmitt
    232232#ifdef CPP_RRTM
    233     REAL,    INTENT(in)  :: tau_aero_lw_rrtm(KLON,KLEV,2,NLW)                 ! LW aerosol optical properties RRTM
     233    REAL,    INTENT(IN)  :: tau_aero_lw_rrtm(KLON,KLEV,2,NLW)                 ! LW aerosol optical properties RRTM
    234234#else
    235     REAL, INTENT(in) :: tau_aero_lw_rrtm(KLON, KLEV, 2, nbands_lw_rrtm)
     235    REAL, INTENT(IN) :: tau_aero_lw_rrtm(KLON, KLEV, 2, nbands_lw_rrtm)
    236236#endif
    237237    !--C. Kleinschmitt end
    238238
    239     REAL, INTENT(in) :: cldtaupi(KLON, KLEV)                            ! cloud optical thickness for pre-industrial aerosol concentrations
    240     REAL, INTENT(in) :: qsat(klon, klev) ! Variable pour iflag_rrtm=1
    241     REAL, INTENT(in) :: flwc(klon, klev) ! Variable pour iflag_rrtm=1
    242     REAL, INTENT(in) :: fiwc(klon, klev) ! Variable pour iflag_rrtm=1
    243     REAL, INTENT(in) :: ref_liq(klon, klev) ! cloud droplet radius present-day from newmicro
    244     REAL, INTENT(in) :: ref_ice(klon, klev) ! ice crystal radius   present-day from newmicro
    245     REAL, INTENT(in) :: ref_liq_pi(klon, klev) ! cloud droplet radius pre-industrial from newmicro
    246     REAL, INTENT(in) :: ref_ice_pi(klon, klev) ! ice crystal radius   pre-industrial from newmicro
    247     REAL, INTENT(in) :: m_allaer(klon, klev, naero_tot) ! mass aero
    248 
    249     CHARACTER(len = 512), INTENT(in) :: namelist_ecrad_file
    250     LOGICAL, INTENT(in) :: debut
     239    REAL, INTENT(IN) :: cldtaupi(KLON, KLEV)                            ! cloud optical thickness for pre-industrial aerosol concentrations
     240    REAL, INTENT(IN) :: qsat(klon, klev) ! Variable pour iflag_rrtm=1
     241    REAL, INTENT(IN) :: flwc(klon, klev) ! Variable pour iflag_rrtm=1
     242    REAL, INTENT(IN) :: fiwc(klon, klev) ! Variable pour iflag_rrtm=1
     243    REAL, INTENT(IN) :: ref_liq(klon, klev) ! cloud droplet radius present-day from newmicro
     244    REAL, INTENT(IN) :: ref_ice(klon, klev) ! ice crystal radius   present-day from newmicro
     245    REAL, INTENT(IN) :: ref_liq_pi(klon, klev) ! cloud droplet radius pre-industrial from newmicro
     246    REAL, INTENT(IN) :: ref_ice_pi(klon, klev) ! ice crystal radius   pre-industrial from newmicro
     247    REAL, INTENT(IN) :: m_allaer(klon, klev, naero_tot) ! mass aero
     248
     249    CHARACTER(len = 512), INTENT(IN) :: namelist_ecrad_file
     250    LOGICAL, INTENT(IN) :: debut
    251251
    252252    ! Output arguments
    253     REAL, INTENT(out) :: heat(KLON, KLEV), cool(KLON, KLEV)
    254     REAL, INTENT(out) :: heat0(KLON, KLEV), cool0(KLON, KLEV)
    255     REAL, INTENT(out) :: heat_volc(KLON, KLEV), cool_volc(KLON, KLEV) !NL
    256     REAL, INTENT(out) :: topsw(KLON), toplw(KLON)
    257     REAL, INTENT(out) :: solsw(KLON), sollw(KLON), albpla(KLON), solswfdiff(KLON)
    258     REAL, INTENT(out) :: topsw0(KLON), toplw0(KLON), solsw0(KLON), sollw0(KLON)
    259     REAL, INTENT(out) :: sollwdown(KLON)
    260     REAL, INTENT(out) :: swdn(KLON, kflev + 1), swdn0(KLON, kflev + 1), swdnc0(KLON, kflev + 1)
    261     REAL, INTENT(out) :: swup(KLON, kflev + 1), swup0(KLON, kflev + 1), swupc0(KLON, kflev + 1)
    262     REAL, INTENT(out) :: lwdn(KLON, kflev + 1), lwdn0(KLON, kflev + 1), lwdnc0(KLON, kflev + 1)
    263     REAL, INTENT(out) :: lwup(KLON, kflev + 1), lwup0(KLON, kflev + 1), lwupc0(KLON, kflev + 1)
    264     REAL, INTENT(out) :: topswad_aero(KLON), solswad_aero(KLON)         ! output: aerosol direct forcing at TOA and surface
    265     REAL, INTENT(out) :: topswai_aero(KLON), solswai_aero(KLON)         ! output: aerosol indirect forcing atTOA and surface
    266     REAL, INTENT(out) :: toplwad_aero(KLON), sollwad_aero(KLON)         ! output: LW aerosol direct forcing at TOA and surface
    267     REAL, INTENT(out) :: toplwai_aero(KLON), sollwai_aero(KLON)         ! output: LW aerosol indirect forcing atTOA and surface
    268     REAL, DIMENSION(klon), INTENT(out) :: topswad0_aero
    269     REAL, DIMENSION(klon), INTENT(out) :: solswad0_aero
    270     REAL, DIMENSION(klon), INTENT(out) :: toplwad0_aero
    271     REAL, DIMENSION(klon), INTENT(out) :: sollwad0_aero
    272     REAL, DIMENSION(kdlon, 9), INTENT(out) :: topsw_aero
    273     REAL, DIMENSION(kdlon, 9), INTENT(out) :: topsw0_aero
    274     REAL, DIMENSION(kdlon, 9), INTENT(out) :: solsw_aero
    275     REAL, DIMENSION(kdlon, 9), INTENT(out) :: solsw0_aero
    276     REAL, DIMENSION(kdlon, 3), INTENT(out) :: topswcf_aero
    277     REAL, DIMENSION(kdlon, 3), INTENT(out) :: solswcf_aero
    278     REAL, DIMENSION(kdlon, kflev + 1), INTENT(out) :: ZSWFT0_i
    279     REAL, DIMENSION(kdlon, kflev + 1), INTENT(out) :: ZLWFT0_i
     253    REAL, INTENT(OUT) :: heat(KLON, KLEV), cool(KLON, KLEV)
     254    REAL, INTENT(OUT) :: heat0(KLON, KLEV), cool0(KLON, KLEV)
     255    REAL, INTENT(OUT) :: heat_volc(KLON, KLEV), cool_volc(KLON, KLEV) !NL
     256    REAL, INTENT(OUT) :: topsw(KLON), toplw(KLON)
     257    REAL, INTENT(OUT) :: solsw(KLON), sollw(KLON), albpla(KLON), solswfdiff(KLON)
     258    REAL, INTENT(OUT) :: topsw0(KLON), toplw0(KLON), solsw0(KLON), sollw0(KLON)
     259    REAL, INTENT(OUT) :: sollwdown(KLON)
     260    REAL, INTENT(OUT) :: swdn(KLON, kflev + 1), swdn0(KLON, kflev + 1), swdnc0(KLON, kflev + 1)
     261    REAL, INTENT(OUT) :: swup(KLON, kflev + 1), swup0(KLON, kflev + 1), swupc0(KLON, kflev + 1)
     262    REAL, INTENT(OUT) :: lwdn(KLON, kflev + 1), lwdn0(KLON, kflev + 1), lwdnc0(KLON, kflev + 1)
     263    REAL, INTENT(OUT) :: lwup(KLON, kflev + 1), lwup0(KLON, kflev + 1), lwupc0(KLON, kflev + 1)
     264    REAL, INTENT(OUT) :: topswad_aero(KLON), solswad_aero(KLON)         ! output: aerosol direct forcing at TOA and surface
     265    REAL, INTENT(OUT) :: topswai_aero(KLON), solswai_aero(KLON)         ! output: aerosol indirect forcing atTOA and surface
     266    REAL, INTENT(OUT) :: toplwad_aero(KLON), sollwad_aero(KLON)         ! output: LW aerosol direct forcing at TOA and surface
     267    REAL, INTENT(OUT) :: toplwai_aero(KLON), sollwai_aero(KLON)         ! output: LW aerosol indirect forcing atTOA and surface
     268    REAL, DIMENSION(klon), INTENT(OUT) :: topswad0_aero
     269    REAL, DIMENSION(klon), INTENT(OUT) :: solswad0_aero
     270    REAL, DIMENSION(klon), INTENT(OUT) :: toplwad0_aero
     271    REAL, DIMENSION(klon), INTENT(OUT) :: sollwad0_aero
     272    REAL, DIMENSION(kdlon, 9), INTENT(OUT) :: topsw_aero
     273    REAL, DIMENSION(kdlon, 9), INTENT(OUT) :: topsw0_aero
     274    REAL, DIMENSION(kdlon, 9), INTENT(OUT) :: solsw_aero
     275    REAL, DIMENSION(kdlon, 9), INTENT(OUT) :: solsw0_aero
     276    REAL, DIMENSION(kdlon, 3), INTENT(OUT) :: topswcf_aero
     277    REAL, DIMENSION(kdlon, 3), INTENT(OUT) :: solswcf_aero
     278    REAL, DIMENSION(kdlon, kflev + 1), INTENT(OUT) :: ZSWFT0_i
     279    REAL, DIMENSION(kdlon, kflev + 1), INTENT(OUT) :: ZLWFT0_i
    280280
    281281    ! Local variables
     
    403403    REAL(KIND = 8) zsolsw_aero(kdlon, 9), zsolsw0_aero(kdlon, 9)
    404404    REAL(KIND = 8) ztopswcf_aero(kdlon, 3), zsolswcf_aero(kdlon, 3)
    405     ! real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 deje declare dans physiq.F MPL 20130618
     405    ! REAL, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 deje declare dans physiq.F MPL 20130618
    406406    !MPL input supplementaires pour RECMWFL
    407407    ! flwc, fiwc = Liquid Water Content & Ice Water Content (kg/kg)
     
    13161316!!! - Gas en VMR pour offline et MMR pour online
    13171317!!! - on utilise pour solarirrad une valeur constante
    1318           if (lldebug_for_offline) THEN
     1318          IF (lldebug_for_offline) THEN
    13191319             SOLARIRAD = 1366.0896
    13201320             ZCH4_off = CH4_ppb*1e-9
     
    13541354          ! lldebug_for_offline
    13551355
    1356           if (namelist_ecrad_file.eq.'namelist_ecrad') THEN
     1356          IF (namelist_ecrad_file.EQ.'namelist_ecrad') THEN
    13571357             PRINT*,' 1er apell Ecrad : ok_3Deffect, namelist_ecrad_file = ', &
    13581358                  ok_3Deffect, namelist_ecrad_file   
     
    14471447          print *,'========= RADLWSW: apres RADIATION_SCHEME ==================== '
    14481448
    1449           if (lldebug_for_offline) THEN
     1449          IF (lldebug_for_offline) THEN
    14501450             CALL writefield_phy('FLUX_LW',ZLWFT_i,klev+1)
    14511451             CALL writefield_phy('FLUX_LW_CLEAR',ZLWFT0_ii,klev+1)
     
    15311531             zdir=SUM(PSFSWDIR(i,:))
    15321532             zdif=SUM(PSFSWDIF(i,:))
    1533              IF (fract(i).GT.0.0.and.(zdir+zdif).gt.seuilmach) THEN
     1533             IF (fract(i).GT.0.0.AND.(zdir+zdif).gt.seuilmach) THEN
    15341534                zsolswfdiff(i) = zdif/(zdir+zdif)
    15351535             ELSE  !--night
     
    16731673
    16741674    IF (lldebug) THEN
    1675       if (0==1) THEN
     1675      IF (0==1) THEN
    16761676        ! Verifs dans le cas 1D
    16771677        PRINT*, '================== Sortie de radlw ================='
Note: See TracChangeset for help on using the changeset viewer.