Changeset 4707


Ignore:
Timestamp:
Sep 25, 2023, 8:19:15 PM (14 months ago)
Author:
Laurent Fairhead
Message:

Continuing on from the morning's poihl workshop: getting rid of the includes in the routine

Location:
LMDZ6/trunk/libf
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/conf_phys_m.F90

    r4645 r4707  
    175175    LOGICAL,SAVE :: ok_ice_sursat_omp
    176176    LOGICAL,SAVE :: ok_plane_h2o_omp, ok_plane_contrail_omp
    177     INTEGER,SAVE :: iflag_rei_omp
    178177    REAL,SAVE :: rad_froid_omp, rad_chau1_omp, rad_chau2_omp
    179     REAL,SAVE :: rei_min_omp, rei_max_omp
    180178    INTEGER,SAVE :: iflag_sic_omp, iflag_inertie_omp
    181179    REAL,SAVE :: inertie_sol_omp,inertie_sno_omp,inertie_sic_omp
     
    13081306
    13091307
    1310     !Config Key  = iflag_rei
    1311     !Config Desc = 
    1312     !Config Def  = 0
    1313     !Config Help =
    1314     !
    1315     iflag_rei_omp = 0
    1316     CALL getin('iflag_rei',iflag_rei_omp)
    1317 
    1318 
    13191308    !
    13201309    !Config Key  = iflag_ice_thermo
     
    13501339    ok_plane_contrail_omp = .FALSE.
    13511340    CALL getin('ok_plane_contrail',ok_plane_contrail_omp)
    1352 
    1353     !
    1354     !Config Key  = rei_min
    1355     !Config Desc = 
    1356     !Config Def  = 3.5
    1357     !Config Help =
    1358     !
    1359     rei_min_omp = 3.5
    1360     CALL getin('rei_min',rei_min_omp)
    1361 
    1362     !
    1363     !Config Key  = rei_max
    1364     !Config Desc = 
    1365     !Config Def  = 61.29
    1366     !Config Help =
    1367     !
    1368     rei_max_omp = 61.29
    1369     CALL getin('rei_max',rei_max_omp)
    13701341
    13711342    !
     
    23182289    rad_chau1 = rad_chau1_omp
    23192290    rad_chau2 = rad_chau2_omp
    2320     iflag_rei=iflag_rei_omp
    23212291    iflag_ice_thermo = iflag_ice_thermo_omp
    23222292    ok_ice_sursat = ok_ice_sursat_omp
    23232293    ok_plane_h2o = ok_plane_h2o_omp
    23242294    ok_plane_contrail = ok_plane_contrail_omp
    2325     rei_min = rei_min_omp
    2326     rei_max = rei_max_omp
    23272295    top_height = top_height_omp
    23282296    overlap = overlap_omp
     
    27392707    WRITE(lunout,*) ' rad_chau1 = ',rad_chau1
    27402708    WRITE(lunout,*) ' rad_chau2 = ',rad_chau2
    2741     WRITE(lunout,*) ' iflag_rei = ',iflag_rei
    27422709    WRITE(lunout,*) ' iflag_ice_thermo = ',iflag_ice_thermo
    27432710    WRITE(lunout,*) ' ok_ice_sursat = ',ok_ice_sursat
    27442711    WRITE(lunout,*) ' ok_plane_h2o = ',ok_plane_h2o
    27452712    WRITE(lunout,*) ' ok_plane_contrail = ',ok_plane_contrail
    2746     WRITE(lunout,*) ' rei_min = ',rei_min
    2747     WRITE(lunout,*) ' rei_max = ',rei_max
    27482713    WRITE(lunout,*) ' overlap = ',overlap
    27492714    WRITE(lunout,*) ' cdmmax = ',cdmmax
  • LMDZ6/trunk/libf/phylmd/lmdz_cloud_optics_prop.F90

    r4704 r4707  
    1818  USE lmdz_cloud_optics_prop_ini , ONLY : cdnc_max, cdnc_max_m3
    1919  USE lmdz_cloud_optics_prop_ini , ONLY : cdnc_min, cdnc_min_m3
    20 
     20  USE lmdz_cloud_optics_prop_ini , ONLY : thres_tau, thres_neb
     21  USE lmdz_cloud_optics_prop_ini , ONLY : prmhc, prlmc
     22  USE lmdz_cloud_optics_prop_ini , ONLY : coef_froi, coef_chau
     23  USE lmdz_cloud_optics_prop_ini , ONLY : seuil_neb
     24  USE lmdz_cloud_optics_prop_ini , ONLY : t_glace_min_old, t_glace_max_old
     25  USE lmdz_cloud_optics_prop_ini , ONLY : k_ice0, df
     26  USE lmdz_cloud_optics_prop_ini , ONLY : rg, rd, rpi
     27  USE lmdz_cloud_optics_prop_ini , ONLY : rad_chau1, rad_chau2, rad_froid, iflag_rei
     28  USE lmdz_cloud_optics_prop_ini , ONLY : ok_icefra_lscp, rei_max, rei_min
     29  USE lmdz_cloud_optics_prop_ini , ONLY : zepsec, novlp, iflag_ice_thermo, ok_new_lscp
     30 
    2131  USE icefrac_lsc_mod ! computes ice fraction (JBM 3/14)
    2232  USE lmdz_lscp_tools, only: icefrac_lscp
     
    4050  ! ======================================================================
    4151 
    42   include "YOMCST.h"
    43   include "nuage.h"
    44   include "radepsi.h"
    45   include "radopt.h"
    46   include "clesphys.h"
    47 
    48 
    4952  ! List of arguments
    5053  !------------------
     
    119122
    120123  ! threshold PARAMETERs
    121   REAL thres_tau, thres_neb
    122   PARAMETER (thres_tau=0.3, thres_neb=0.001)
    123124  REAL phase3d(klon, klev)
    124125  REAL tcc(klon), ftmp(klon), lcc_integrat(klon), height(klon)
    125126  LOGICAL lo
    126   REAL prmhc ! Pressure between medium and high level cloud in Pa
    127   REAL prlmc ! Pressure between low and medium level cloud in Pa
    128   PARAMETER (prmhc=440.*100., prlmc=680.*100.)
    129127  INTEGER i, k
    130128  REAL radius
    131   REAL coef_froi, coef_chau
    132   PARAMETER (coef_chau=0.13, coef_froi=0.09)
    133   REAL seuil_neb
    134   PARAMETER (seuil_neb=0.001)
    135 
    136 ! if iflag_t_glace=0, old values are used for liquid/ice partitionning:
    137   REAL, PARAMETER :: t_glace_min_old = 258.
    138   REAL, PARAMETER :: t_glace_max_old = 273.13
     129
    139130
    140131  REAL rel, tc, rei, iwc, dei, deimin, deimax
    141   REAL k_ice0, k_ice, df
    142   PARAMETER (k_ice0=0.005) ! units=m2/g
    143   PARAMETER (df=1.66) ! diffusivity factor
     132  REAL k_ice
    144133
    145134  ! jq for the aerosol indirect effect
  • LMDZ6/trunk/libf/phylmd/lmdz_cloud_optics_prop_ini.F90

    r4692 r4707  
    77  INTEGER, PROTECTED :: flag_aerosol
    88  INTEGER, PROTECTED :: iflag_t_glace=0
    9   LOGICAL, PROTECTED ::ok_cdnc
     9  INTEGER, PROTECTED :: iflag_rei
     10  INTEGER, PROTECTED :: novlp, iflag_ice_thermo
     11  LOGICAL, PROTECTED :: ok_cdnc
     12  LOGICAL, PROTECTED :: ok_icefra_lscp, ok_new_lscp
    1013  REAL, PROTECTED :: bl95_b0, bl95_b1 ! Parameter in B&L 95-Formula
    1114  REAL, ALLOCATABLE :: latitude_deg(:)
     
    1518  REAL, PROTECTED :: cdnc_min=-1.
    1619  REAL, PROTECTED :: cdnc_min_m3=-1.
     20  REAL, PROTECTED :: rpi, rg, rd
     21  REAL, PROTECTED :: rad_chau1, rad_chau2, rad_froid
     22  REAL, PROTECTED :: rei_max, rei_min
     23  REAL, PROTECTED :: zepsec
     24  REAL, PARAMETER :: thres_tau=0.3, thres_neb=0.001
     25  REAL, PARAMETER :: prmhc=440.*100. ! Pressure between medium and high level cloud in Pa
     26  REAL, PARAMETER :: prlmc=680.*100. ! Pressure between low and medium level cloud in Pa
     27  REAL, PARAMETER :: coef_froi=0.09, coef_chau =0.13
     28  REAL, PARAMETER :: seuil_neb=0.001
     29! if iflag_t_glace=0, old values are used for liquid/ice partitionning:
     30  REAL, PARAMETER :: t_glace_min_old = 258.
     31  REAL, PARAMETER :: t_glace_max_old = 273.13
     32  REAL, PARAMETER :: k_ice0=0.005 ! units=m2/g
     33  REAL, PARAMETER :: df=1.66 ! diffusivity factor
     34!$OMP THREADPRIVATE(prt_level, lunout, flag_aerosol, iflag_t_glace)
     35!$OMP THREADPRIVATE(iflag_rei, novlp, iflag_ice_thermo) 
     36!$OMP THREADPRIVATE(ok_cdnc, ok_icefra_lscp)
     37!$OMP THREADPRIVATE(bl95_b0, bl95_b1, cdnc_max, cdnc_max_m3)
     38!$OMP THREADPRIVATE(cdnc_min, cdnc_min_m3, rpi, rg, rd)
     39!$OMP THREADPRIVATE(rad_chau1, rad_chau2, rad_froid, rei_max, rei_min)
     40!$OMP THREADPRIVATE(zepsec)
     41
    1742 
    1843CONTAINS
     
    2045  SUBROUTINE cloud_optics_prop_ini(klon, prt_level_in, lunout_in, flag_aerosol_in, &
    2146       & ok_cdnc_in, bl95_b0_in, &
    22        & bl95_b1_in, latitude_deg_in)
     47       & bl95_b1_in, latitude_deg_in, rpi_in, rg_in, rd_in, zepsec_in, novlp_in, &
     48       & iflag_ice_thermo_in, ok_new_lscp_in)
    2349
    2450    USE ioipsl_getin_p_mod, ONLY : getin_p
     
    2854    INTEGER, INTENT(IN) :: prt_level_in, lunout_in
    2955    INTEGER, INTENT(IN) :: flag_aerosol_in
    30     LOGICAL, INTENT(IN) :: ok_cdnc_in
     56    INTEGER, INTENT(IN) :: novlp_in, iflag_ice_thermo_in
     57    LOGICAL, INTENT(IN) :: ok_cdnc_in, ok_new_lscp_in
    3158    REAL, INTENT(IN) :: bl95_b0_in, bl95_b1_in
    3259    REAL, INTENT(IN) :: latitude_deg_in(klon)
     60    REAL, INTENT(IN) :: rpi_in, rg_in, rd_in
     61    REAL, INTENT(IN) :: zepsec_in
    3362
    3463    ALLOCATE(latitude_deg(klon))
     
    4170    bl95_b1 = bl95_b1_in
    4271    latitude_deg(:) = latitude_deg_in(:)
     72    rpi = rpi_in
     73    rg = rg_in
     74    rd = rd_in
     75    zepsec = zepsec_in
     76    novlp = novlp_in
     77    iflag_ice_thermo = iflag_ice_thermo_in
     78    ok_new_lscp = ok_new_lscp_in
     79   
    4380    call getin_p('cdnc_min',cdnc_min)
    4481    cdnc_min_m3=cdnc_min*1.E6
     
    5188    CALL getin_p('iflag_t_glace',iflag_t_glace)     
    5289    write(lunout,*)'iflag_t_glace= ',iflag_t_glace
    53    
     90    CALL getin_p('rad_chau1',rad_chau1)
     91    CALL getin_p('rad_chau2',rad_chau2)
     92    CALL getin_p('rad_froid ',rad_froid)
     93    CALL getin_p('ok_icefra_lscp', ok_icefra_lscp)
     94    iflag_rei = 0
     95    CALL getin_p('iflag_rei',iflag_rei)
     96    rei_min = 3.5
     97    CALL getin_p('rei_min',rei_min)
     98    rei_max = 61.29
     99    CALL getin_p('rei_max',rei_max)
     100
     101   
    54102  END SUBROUTINE cloud_optics_prop_ini
    55103
  • LMDZ6/trunk/libf/phylmd/nuage.h

    r4613 r4707  
    33!
    44      REAL rad_froid, rad_chau1, rad_chau2
    5       REAL rei_min,rei_max
    65      REAL tau_cld_cv,coefw_cld_cv
    76      REAL tmax_fonte_cv
    87      INTEGER iflag_cld_cv, iflag_ratqs
    9       INTEGER iflag_rei
    108      LOGICAL ok_icefra_lscp
    119
    1210      common /nuagecom/ rad_froid,rad_chau1, rad_chau2,                 &
    13      &                  rei_min,rei_max,                                &
    1411     &                  tau_cld_cv,coefw_cld_cv,                        &
    1512     &                  tmax_fonte_cv,iflag_ratqs,                      &
    1613     &                  iflag_cld_cv,                                   &
    17      &                  ok_icefra_lscp,                                 &
    18      &                  iflag_rei   
     14     &                  ok_icefra_lscp                                 
    1915!$OMP THREADPRIVATE(/nuagecom/)
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r4703 r4707  
    1 
    21!
    32! $Id$
     
    569568    !
    570569    !
     570    include "radepsi.h"
    571571    include "radopt.h"
    572572    !
     
    11631163    !     climatology and the daylight climatology
    11641164    INTEGER,SAVE :: ncid_climoz                ! NetCDF file identifier
    1165     REAL, allocatable, SAVE :: press_cen_climoz(:) ! Pressure levels
    1166     REAL, allocatable, SAVE :: press_edg_climoz(:) ! Edges of pressure intervals
    1167     REAL, allocatable, SAVE :: time_climoz(:)      ! Time vector
     1165    REAL, ALLOCATABLE, SAVE :: press_cen_climoz(:) ! Pressure levels
     1166    REAL, ALLOCATABLE, SAVE :: press_edg_climoz(:) ! Edges of pressure intervals
     1167    REAL, ALLOCATABLE, SAVE :: time_climoz(:)      ! Time vector
    11681168    CHARACTER(LEN=13), PARAMETER :: vars_climoz(2) &
    11691169                                  = ["tro3         ","tro3_daylight"]
     
    18461846       CALL cloud_optics_prop_ini(klon, prt_level, lunout, flag_aerosol, &
    18471847                                  & ok_cdnc, bl95_b0, &
    1848                                   & bl95_b1, latitude_deg)
     1848                                  & bl95_b1, latitude_deg, rpi, rg, rd, &
     1849                                  & zepsec, novlp, iflag_ice_thermo, ok_new_lscp)
    18491850!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    18501851
  • LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90

    r4703 r4707  
    610610    !
    611611    !
     612    include "radepsi.h"
    612613    include "radopt.h"
    613614    !
     
    19331934       CALL cloud_optics_prop_ini(klon, prt_level, lunout, flag_aerosol, &
    19341935                                  & ok_cdnc, bl95_b0, &
    1935                                   & bl95_b1, latitude_deg)
     1936                                  & bl95_b1, latitude_deg, rpi, rg, rd, &
     1937                                  & zepsec, novlp, iflag_ice_thermo, ok_new_lscp)
    19361938!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    19371939
Note: See TracChangeset for help on using the changeset viewer.