Changeset 4692


Ignore:
Timestamp:
Sep 18, 2023, 6:43:31 PM (14 months ago)
Author:
Laurent Fairhead
Message:

Continuing work from poihl workshop on replayisation of routines:
removed most of the modules (discussion needed for rest), declared calling arguments
with INTENTs and created the ini routine

Location:
LMDZ6/trunk/libf/phylmd
Files:
1 added
3 edited

Legend:

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

    r4683 r4692  
    44CONTAINS
    55
    6 SUBROUTINE cloud_optics_prop(flag_aerosol, ok_cdnc, bl95_b0, bl95_b1, paprs, pplay, t, pqlwp, picefra, pclc, &
     6SUBROUTINE cloud_optics_prop(klon, klev, paprs, pplay, t, pqlwp, picefra, pclc, &
    77    pcltau, pclemi, pch, pcl, pcm, pct, pctlwp, xflwp, xfiwp, xflwc, xfiwc, &
    8     mass_solu_aero, mass_solu_aero_pi, pcldtaupi, latitude_deg, distcltop, temp_cltop, re, fl, reliq, reice, &
    9     reliq_pi, reice_pi)
    10 
    11   USE dimphy
    12   USE phys_local_var_mod, ONLY: scdnc, cldncl, reffclwtop, lcc, reffclws, &
    13       reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra,  &
    14       zfice, dNovrN, ptconv
    15   USE phys_state_var_mod, ONLY: rnebcon, clwcon
     8    mass_solu_aero, mass_solu_aero_pi, pcldtaupi, distcltop, temp_cltop, re, fl, reliq, reice, &
     9    reliq_pi, reice_pi, scdnc, cldncl, reffclwtop, lcc, reffclws, &
     10    reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra,  &
     11    zfice, dNovrN, ptconv,rnebcon, clwcon)
     12
     13  USE lmdz_cloud_optics_prop_ini , ONLY : flag_aerosol, ok_cdnc
     14  USE lmdz_cloud_optics_prop_ini , ONLY : lunout
     15  USE lmdz_cloud_optics_prop_ini , ONLY : bl95_b0, bl95_b1
     16  USE lmdz_cloud_optics_prop_ini , ONLY : latitude_deg
     17  USE lmdz_cloud_optics_prop_ini , ONLY : iflag_t_glace
     18  USE lmdz_cloud_optics_prop_ini , ONLY : cdnc_max, cdnc_max_m3
     19  USE lmdz_cloud_optics_prop_ini , ONLY : cdnc_min, cdnc_min_m3
     20
    1621  USE icefrac_lsc_mod ! computes ice fraction (JBM 3/14)
    17   USE lmdz_lscp_ini, only: iflag_t_glace
    18   USE ioipsl_getin_p_mod, ONLY : getin_p
    19   USE print_control_mod, ONLY: lunout
    2022  USE lmdz_lscp_tools, only: icefrac_lscp
    2123
     
    6365  ! ======================================================================
    6466
     67
    6568  include "YOMCST.h"
    6669  include "nuage.h"
     
    6972  include "clesphys.h"
    7073
     74 
    7175  ! choix de l'hypothese de recouvrement nuageuse via radopt.h (IM, 19.07.2016)
    7276  ! !novlp=1: max-random
     
    8084  INTEGER flag_max
    8185
     86  ! List of arguments:
     87  INTEGER, INTENT(IN) :: klon, klev
     88  REAL, INTENT(IN) :: paprs(klon, klev+1)
     89  REAL, INTENT(IN) :: pplay(klon, klev)
     90  REAL, INTENT(IN) :: t(klon, klev)
     91  REAL, INTENT(INOUT) :: pclc(klon, klev)
     92  REAL, INTENT(IN) :: pqlwp(klon, klev), picefra(klon,klev)
     93  REAL, INTENT(IN) :: rnebcon(klon,klev), clwcon(klon,klev)
     94  REAL, INTENT(OUT) :: pcltau(klon, klev)
     95  REAL, INTENT(OUT) :: pclemi(klon, klev)
     96  REAL, INTENT(OUT) :: pcldtaupi(klon, klev)
     97
     98  REAL, INTENT(OUT) :: pct(klon)
     99  REAL, INTENT(OUT) :: pcl(klon)
     100  REAL, INTENT(OUT) :: pcm(klon)
     101  REAL, INTENT(OUT) :: pch(klon)
     102  REAL, INTENT(OUT) :: pctlwp(klon)
     103
     104  REAL, INTENT(OUT) :: distcltop(klon,klev)
     105  REAL, INTENT(OUT) :: temp_cltop(klon,klev)
     106  REAL, INTENT(OUT) :: xflwp(klon), xfiwp(klon)
     107  REAL, INTENT(OUT) :: xflwc(klon, klev), xfiwc(klon, klev)
     108  ! jq for the aerosol indirect effect
     109  ! jq introduced by Johannes Quaas (quaas@lmd.jussieu.fr), 27/11/2003
     110  REAL, INTENT(IN) :: mass_solu_aero(klon, klev) ! total mass concentration for all soluble aerosols [ug m-3]
     111  REAL, INTENT(IN) :: mass_solu_aero_pi(klon, klev) ! - " - (pre-industrial value)
     112  REAL, INTENT(OUT) :: re(klon, klev) ! cloud droplet effective radius [um]
     113  REAL, INTENT(OUT) :: fl(klon, klev) ! xliq * rneb (denominator to re; fraction of liquid water clouds
     114  ! within the grid cell)
     115  ! Abderrahmane oct 2009
     116  REAL, INTENT(OUT) :: reliq(klon, klev), reice(klon, klev)
     117  REAL, INTENT(OUT) :: reliq_pi(klon, klev), reice_pi(klon, klev)
     118  !
     119  REAL, INTENT(OUT) :: scdnc(klon, klev), cldncl(klon), reffclwtop(klon)
     120  REAL, INTENT(OUT) :: lcc(klon), reffclws(klon, klev)
     121  REAL, INTENT(OUT) :: reffclwc(klon, klev), cldnvi(klon), lcc3d(klon, klev)
     122  REAL, INTENT(OUT) :: lcc3dcon(klon, klev), lcc3dstra(klon, klev), icc3dcon(klon, klev)
     123  REAL, INTENT(OUT) :: icc3dstra(klon, klev), zfice(klon, klev)
     124  REAL, INTENT(IN)  :: dNovrN(klon)
     125  LOGICAL, INTENT(IN) :: ptconv(klon, klev)
     126
     127  ! Local variables
    82128  ! threshold PARAMETERs
    83129  REAL thres_tau, thres_neb
     
    87133  REAL tcc(klon), ftmp(klon), lcc_integrat(klon), height(klon)
    88134
    89   REAL paprs(klon, klev+1)
    90   REAL pplay(klon, klev)
    91   REAL t(klon, klev)
    92   REAL pclc(klon, klev)
    93   REAL pqlwp(klon, klev), picefra(klon,klev)
    94   REAL pcltau(klon, klev)
    95   REAL pclemi(klon, klev)
    96   REAL pcldtaupi(klon, klev)
    97   REAL latitude_deg(klon)
    98 
    99   REAL pct(klon)
    100   REAL pcl(klon)
    101   REAL pcm(klon)
    102   REAL pch(klon)
    103   REAL pctlwp(klon)
    104 
    105   REAL distcltop(klon,klev)
    106   REAL temp_cltop(klon,klev)
    107135  LOGICAL lo
    108136
     
    118146
    119147  INTEGER i, k
    120   REAL xflwp(klon), xfiwp(klon)
    121   REAL xflwc(klon, klev), xfiwc(klon, klev)
    122148
    123149  REAL radius
     
    145171  ! jq introduced by Johannes Quaas (quaas@lmd.jussieu.fr), 27/11/2003
    146172  ! jq
    147   REAL mass_solu_aero(klon, klev) ! total mass concentration for all soluble aerosols [ug m-3]
    148   REAL mass_solu_aero_pi(klon, klev) ! - " - (pre-industrial value)
    149173  REAL cdnc(klon, klev) ! cloud droplet number concentration [m-3]
    150   REAL re(klon, klev) ! cloud droplet effective radius [um]
    151174  REAL cdnc_pi(klon, klev) ! cloud droplet number concentration [m-3] (pi value)
    152175  REAL re_pi(klon, klev) ! cloud droplet effective radius [um] (pi value)
    153176
    154   REAL fl(klon, klev) ! xliq * rneb (denominator to re; fraction of liquid water clouds
    155   ! within the grid cell)
    156 
    157   INTEGER flag_aerosol
    158   LOGICAL ok_cdnc
    159   REAL bl95_b0, bl95_b1 ! Parameter in B&L 95-Formula
    160 
    161   ! jq-end
    162177  ! IM cf. CR:parametres supplementaires
    163178  REAL dzfice(klon,klev)
     
    175190  REAL d_rei_dt
    176191
    177   ! Abderrahmane oct 2009
    178   REAL reliq(klon, klev), reice(klon, klev)
    179   REAL reliq_pi(klon, klev), reice_pi(klon, klev)
    180 
    181   REAL,SAVE :: cdnc_min=-1.
    182   REAL,SAVE :: cdnc_min_m3
    183   !$OMP THREADPRIVATE(cdnc_min,cdnc_min_m3)
    184   REAL,SAVE :: cdnc_max=-1.
    185   REAL,SAVE :: cdnc_max_m3
    186   !$OMP THREADPRIVATE(cdnc_max,cdnc_max_m3)
    187192
    188193  ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    198203  ! on impose 0.71 quand on est proche de 0.71
    199204
    200   if (first) THEN
    201       call getin_p('cdnc_min',cdnc_min)
    202       cdnc_min_m3=cdnc_min*1.E6
    203       IF (cdnc_min_m3<0.) cdnc_min_m3=20.E6 ! astuce pour retrocompatibilite
    204       write(lunout,*)'cdnc_min=', cdnc_min_m3/1.E6
    205       call getin_p('cdnc_max',cdnc_max)
    206       cdnc_max_m3=cdnc_max*1.E6
    207       IF (cdnc_max_m3<0.) cdnc_max_m3=1000.E6 ! astuce pour retrocompatibilite
    208       write(lunout,*)'cdnc_max=', cdnc_max_m3/1.E6
    209   ENDIF
    210205
    211206  d_rei_dt = (rei_max-rei_min)/81.4
  • LMDZ6/trunk/libf/phylmd/lmdz_thermcell_main.F90

    r4690 r4692  
    197197      ENDIF
    198198!
    199 print*,'thermcell_main debut'
     199!print*,'thermcell_main debut'
    200200!     write(lunout,*)'WARNING thermcell_main f0=max(f0,1.e-2)'
    201201     do ig=1,ngrid
     
    821821      if (prt_level.ge.1) print*,'thermcell_main FIN  OK'
    822822
    823 print*,'thermcell_main fin'
     823!print*,'thermcell_main fin'
    824824 RETURN
    825825      end subroutine thermcell_main
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r4690 r4692  
    9090    USE lmdz_ratqs_main, ONLY : ratqs_main
    9191    USE lmdz_ratqs_ini, ONLY : ratqs_ini
     92    USE lmdz_cloud_optics_prop_ini, ONLY : cloud_optics_prop_ini
    9293    USE phys_output_var_mod, ONLY :      cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv
    9394
     
    357358       zxfluxt,zxfluxq
    358359       !
    359       USE output_physiqex_mod, ONLY: output_physiqex
     360       USE phys_local_var_mod, ONLY: scdnc, cldncl, reffclwtop, lcc, reffclws, &
     361       reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra,  &
     362       zfice, dNovrN, ptconv
     363       USE output_physiqex_mod, ONLY: output_physiqex
    360364
    361365
     
    18401844                             RCPD, RLSTT, RLVTT, RLMLT, &
    18411845                             RVTMP2, RTT,RD,RG)
    1842 
     1846       CALL cloud_optics_prop_ini(klon, prt_level, lunout, flag_aerosol, &
     1847                                  & ok_cdnc, bl95_b0, &
     1848                                  & bl95_b1, latitude_deg)
    18431849!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    18441850
     
    43954401#endif
    43964402          ENDIF
    4397           CALL cloud_optics_prop(flag_aerosol, ok_cdnc, bl95_b0, bl95_b1, &
     4403          CALL cloud_optics_prop(klon, klev, &
    43984404               paprs, pplay, t_seri, radocond, picefra, cldfra, &
    43994405               cldtau, cldemi, cldh, cldl, cldm, cldt, cldq, &
    44004406               flwp, fiwp, flwc, fiwc, &
    44014407               mass_solu_aero, mass_solu_aero_pi, &
    4402                cldtaupi, latitude_deg, distcltop, temp_cltop, re, fl, ref_liq, ref_ice, &
    4403                ref_liq_pi, ref_ice_pi)
     4408               cldtaupi, distcltop, temp_cltop, re, fl, ref_liq, ref_ice, &
     4409               ref_liq_pi, ref_ice_pi, scdnc, cldncl, reffclwtop, lcc, reffclws, &
     4410               reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra,  &
     4411               zfice, dNovrN, ptconv, rnebcon, clwcon)
    44044412       ELSE
    44054413          CALL nuage (paprs, pplay, &
Note: See TracChangeset for help on using the changeset viewer.