Changeset 4585


Ignore:
Timestamp:
Jun 23, 2023, 6:03:57 PM (11 months ago)
Author:
Laurent Fairhead
Message:

Adding some files that didn't make it on the last commit ("Node filename has unexpectedly changed kind" error)

Location:
LMDZ6/branches/Portage_acc/libf/phylmdiso
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Portage_acc/libf/phylmdiso/lscp_ini_mod.F90

    r4447 r4585  
    55  ! PARAMETERS for lscp:
    66  !--------------------
    7  
     7 
     8  REAL RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG
     9  !$OMP THREADPRIVATE(RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG)
     10
    811  REAL, SAVE :: seuil_neb=0.001                 ! cloud fraction threshold: a cloud really exists when exceeded
    912  !$OMP THREADPRIVATE(seuil_neb)
    1013
    11   INTEGER, SAVE :: ninter=5                     ! number of iterations to calculate autoconversion to precipitation
    12   !$OMP THREADPRIVATE(ninter)
     14  INTEGER, SAVE :: niter_lscp=5                 ! number of iterations to calculate autoconversion to precipitation
     15  !$OMP THREADPRIVATE(niter_lscp)
    1316
    1417  INTEGER,SAVE :: iflag_evap_prec=1             ! precipitation evaporation flag. 0: nothing, 1: "old way",
    1518                                                ! 2: Max cloud fraction above to calculate the max of reevaporation
    16                                                 ! 4: LTP'method i.e. evaporation in the clear-sky fraction of the mesh only
     19                                                ! >=4: LTP'method i.e. evaporation in the clear-sky fraction of the mesh only
     20                                                ! pay attention that iflag_evap_prec=4 may lead to unrealistic and overestimated
     21                                                ! evaporation. Use 5 instead
    1722  !$OMP THREADPRIVATE(iflag_evap_prec)
    1823
     
    3843  !$OMP THREADPRIVATE(ok_radocond_snow)
    3944
    40   LOGICAL, SAVE :: ok_debug_autoconversion=.true.   ! removes a bug in the autoconversion process
    41   !$OMP THREADPRIVATE(ok_debug_autoconversion)
    42 
     45  REAL, SAVE :: t_glace_min=258.0                ! lower-bound temperature parameter for cloud phase determination
     46  !$OMP THREADPRIVATE(t_glace_min)
     47
     48  REAL, SAVE :: t_glace_max=273.15               ! upper-bound temperature parameter for cloud phase determination
     49  !$OMP THREADPRIVATE(t_glace_max)
     50
     51  REAL, SAVE :: exposant_glace=1.0               ! parameter for cloud phase determination
     52  !$OMP THREADPRIVATE(exposant_glace)
     53
     54  INTEGER, SAVE :: iflag_vice=0                  ! which expression for ice crystall fall velocity
     55  !$OMP THREADPRIVATE(iflag_vice)
     56
     57  INTEGER, SAVE :: iflag_t_glace=0               ! which expression for cloud phase partitioning
     58  !$OMP THREADPRIVATE(iflag_t_glace)
     59
     60  INTEGER, SAVE :: iflag_cloudth_vert=0          ! option for determining cloud fraction and content in convective boundary layers
     61  !$OMP THREADPRIVATE(iflag_cloudth_vert)
     62
     63  INTEGER, SAVE :: iflag_gammasat=0              ! which threshold for homogeneous nucleation below -40oC
     64  !$OMP THREADPRIVATE(iflag_gammasat)
     65
     66  INTEGER, SAVE :: iflag_rain_incloud_vol=0      ! use of volume cloud fraction for rain autoconversion
     67  !$OMP THREADPRIVATE(iflag_rain_incloud_vol)
     68
     69  INTEGER, SAVE :: iflag_bergeron=0              ! bergeron effect for liquid precipitation treatment 
     70  !$OMP THREADPRIVATE(iflag_bergeron)
     71
     72  INTEGER, SAVE :: iflag_fisrtilp_qsat=0         ! qsat adjustment (iterative) during autoconversion
     73  !$OMP THREADPRIVATE(iflag_fisrtilp_qsat)
     74
     75  INTEGER, SAVE :: iflag_pdf=0                   ! type of subgrid scale qtot pdf
     76  !$OMP THREADPRIVATE(iflag_pdf)
     77
     78  INTEGER, SAVE :: iflag_autoconversion=0        ! autoconversion option
     79  !$OMP THREADPRIVATE(iflag_autoconversion)
     80
     81  LOGICAL, SAVE :: reevap_ice=.false.            ! no liquid precip for T< threshold
     82  !$OMP THREADPRIVATE(reevap_ice)
     83
     84  REAL, SAVE :: cld_lc_lsc=2.6e-4                ! liquid autoconversion coefficient, stratiform rain
     85  !$OMP THREADPRIVATE(cld_lc_lsc)
     86
     87  REAL, SAVE :: cld_lc_con=2.6e-4                ! liquid autoconversion coefficient, convective rain
     88  !$OMP THREADPRIVATE(cld_lc_con)
     89
     90  REAL, SAVE :: cld_tau_lsc=3600.                ! liquid autoconversion timescale, stratiform rain
     91  !$OMP THREADPRIVATE(cld_tau_lsc)
     92
     93  REAL, SAVE :: cld_tau_con=3600.                ! liquid autoconversion timescale, convective rain
     94  !$OMP THREADPRIVATE(cld_tau_con)
     95
     96  REAL, SAVE :: cld_expo_lsc=2.                  ! liquid autoconversion threshold exponent, stratiform rain
     97  !$OMP THREADPRIVATE(cld_expo_lsc)
     98
     99  REAL, SAVE :: cld_expo_con=2.                  ! liquid autoconversion threshold exponent, convective rain
     100  !$OMP THREADPRIVATE(cld_expo_con)
     101
     102  REAL, SAVE :: ffallv_lsc=1.                    ! tuning coefficient crystal fall velocity, stratiform
     103  !$OMP THREADPRIVATE(ffallv_lsc)
     104
     105  REAL, SAVE :: ffallv_con=1.                    ! tuning coefficient crystal fall velocity, convective
     106  !$OMP THREADPRIVATE(ffallv_con)
     107
     108  REAL, SAVE :: coef_eva=2e-5                    ! tuning coefficient liquid precip evaporation
     109  !$OMP THREADPRIVATE(coef_eva)
     110
     111  REAL, SAVE :: coef_eva_i                       ! tuning coefficient ice precip sublimation
     112  !$OMP THREADPRIVATE(coef_eva_i)
     113
     114  REAL cice_velo                                 ! factor in the ice fall velocity formulation
     115  PARAMETER (cice_velo=1.645)
     116
     117  REAL dice_velo                                 ! exponent in the ice fall velocity formulation
     118  PARAMETER (dice_velo=0.16)
     119
     120  REAL, SAVE :: dist_liq=300.                    ! typical deph of cloud-top liquid layer in mpcs
     121  !$OMP THREADPRIVATE(dist_liq)
     122
     123  REAL, SAVE    :: tresh_cl=0.0                  ! cloud fraction threshold for cloud top search
     124  !$OMP THREADPRIVATE(tresh_cl)
    43125
    44126CONTAINS
    45127
    46 SUBROUTINE lscp_ini(dtime,ok_ice_sursat)
     128SUBROUTINE lscp_ini(dtime,ok_ice_sursat, RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in, &
     129                    RVTMP2_in, RTT_in,RD_in,RG_in)
    47130
    48131
     
    54137   LOGICAL, INTENT(IN)   :: ok_ice_sursat 
    55138
    56     CALL getin_p('ninter',ninter)
     139   REAL, INTENT(IN)      :: RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in
     140   REAL, INTENT(IN)      ::  RVTMP2_in, RTT_in, RD_in, RG_in
     141   character (len=20) :: modname='lscp_ini_mod'
     142   character (len=80) :: abort_message
     143
     144
     145    RG=RG_in
     146    RD=RD_in
     147    RCPD=RCPD_in
     148    RLVTT=RLVTT_in
     149    RLSTT=RLSTT_in
     150    RLMLT=RLMLT_in
     151    RTT=RTT_in
     152    RG=RG_in
     153    RVTMP2=RVTMP2_in
     154
     155
     156
     157    CALL getin_p('niter_lscp',niter_lscp)
    57158    CALL getin_p('iflag_evap_prec',iflag_evap_prec)
    58159    CALL getin_p('seuil_neb',seuil_neb)
     
    60161    CALL getin_p('iflag_mpc_bl',iflag_mpc_bl)
    61162    CALL getin_p('ok_radocond_snow',ok_radocond_snow)
    62     CALL getin_p('ok_debug_autoconversion',ok_debug_autoconversion)   
    63     WRITE(lunout,*) 'lscp, ninter:', ninter
     163    CALL getin_p('t_glace_max',t_glace_max)
     164    CALL getin_p('t_glace_min',t_glace_min)
     165    CALL getin_p('exposant_glace',exposant_glace)
     166    CALL getin_p('iflag_vice',iflag_vice)
     167    CALL getin_p('iflag_t_glace',iflag_t_glace)
     168    CALL getin_p('iflag_cloudth_vert',iflag_cloudth_vert)
     169    CALL getin_p('iflag_gammasat',iflag_gammasat)
     170    CALL getin_p('iflag_rain_incloud_vol',iflag_rain_incloud_vol)
     171    CALL getin_p('iflag_bergeron',iflag_bergeron)
     172    CALL getin_p('iflag_fisrtilp_qsat',iflag_fisrtilp_qsat)
     173    CALL getin_p('iflag_pdf',iflag_pdf)
     174    CALL getin_p('reevap_ice',reevap_ice)
     175    CALL getin_p('cld_lc_lsc',cld_lc_lsc)
     176    CALL getin_p('cld_lc_con',cld_lc_con)
     177    CALL getin_p('cld_tau_lsc',cld_tau_lsc)
     178    CALL getin_p('cld_tau_con',cld_tau_con)
     179    CALL getin_p('cld_expo_lsc',cld_expo_lsc)
     180    CALL getin_p('cld_expo_con',cld_expo_con)
     181    CALL getin_p('ffallv_lsc',ffallv_lsc)
     182    CALL getin_p('ffallv_lsc',ffallv_con)
     183    CALL getin_p('coef_eva',coef_eva)
     184    coef_eva_i=coef_eva
     185    CALL getin_p('coef_eva_i',coef_eva_i)
     186    CALL getin_p('iflag_autoconversion',iflag_autoconversion)
     187    CALL getin_p('dist_liq',dist_liq)
     188    CALL getin_p('tresh_cl',tresh_cl)
     189
     190
     191
     192
     193    WRITE(lunout,*) 'lscp, niter_lscp:', niter_lscp
    64194    WRITE(lunout,*) 'lscp, iflag_evap_prec:', iflag_evap_prec
    65195    WRITE(lunout,*) 'lscp, seuil_neb:', seuil_neb
     
    67197    WRITE(lunout,*) 'lscp, iflag_mpc_bl:', iflag_mpc_bl
    68198    WRITE(lunout,*) 'lscp, ok_radocond_snow:', ok_radocond_snow
    69     WRITE(lunout,*) 'lscp, ok_debug_autoconversion:', ok_debug_autoconversion
     199    WRITE(lunout,*) 'lscp, t_glace_max:', t_glace_max
     200    WRITE(lunout,*) 'lscp, t_glace_min:', t_glace_min
     201    WRITE(lunout,*) 'lscp, exposant_glace:', exposant_glace
     202    WRITE(lunout,*) 'lscp, iflag_vice:', iflag_vice
     203    WRITE(lunout,*) 'lscp, iflag_t_glace:', iflag_t_glace
     204    WRITE(lunout,*) 'lscp, iflag_cloudth_vert:', iflag_cloudth_vert
     205    WRITE(lunout,*) 'lscp, iflag_gammasat:', iflag_gammasat
     206    WRITE(lunout,*) 'lscp, iflag_rain_incloud_vol:', iflag_rain_incloud_vol
     207    WRITE(lunout,*) 'lscp, iflag_bergeron:', iflag_bergeron
     208    WRITE(lunout,*) 'lscp, iflag_fisrtilp_qsat:', iflag_fisrtilp_qsat
     209    WRITE(lunout,*) 'lscp, iflag_pdf', iflag_pdf
     210    WRITE(lunout,*) 'lscp, reevap_ice', reevap_ice
     211    WRITE(lunout,*) 'lscp, cld_lc_lsc', cld_lc_lsc
     212    WRITE(lunout,*) 'lscp, cld_lc_con', cld_lc_con
     213    WRITE(lunout,*) 'lscp, cld_tau_lsc', cld_tau_lsc
     214    WRITE(lunout,*) 'lscp, cld_tau_con', cld_tau_con
     215    WRITE(lunout,*) 'lscp, cld_expo_lsc', cld_expo_lsc
     216    WRITE(lunout,*) 'lscp, cld_expo_con', cld_expo_con
     217    WRITE(lunout,*) 'lscp, ffallv_lsc', ffallv_lsc
     218    WRITE(lunout,*) 'lscp, ffallv_con', ffallv_con
     219    WRITE(lunout,*) 'lscp, coef_eva', coef_eva
     220    WRITE(lunout,*) 'lscp, coef_eva_i', coef_eva_i
     221    WRITE(lunout,*) 'lscp, iflag_autoconversion', iflag_autoconversion
     222    WRITE(lunout,*) 'lscp, dist_liq', dist_liq
     223    WRITE(lunout,*) 'lscp, tresh_cl', tresh_cl
     224
     225
     226
     227
    70228
    71229    ! check for precipitation sub-time steps
    72     IF (ABS(dtime/REAL(ninter)-360.0).GT.0.001) THEN
     230    IF (ABS(dtime/REAL(niter_lscp)-360.0).GT.0.001) THEN
    73231        WRITE(lunout,*) 'lscp: it is not expected, see Z.X.Li', dtime
    74232        WRITE(lunout,*) 'I would prefer a 6 min sub-timestep'
     233    ENDIF
     234
     235    ! check consistency between numerical resolution of autoconversion
     236    ! and other options
     237   
     238    IF (iflag_autoconversion .EQ. 2) THEN
     239        IF ((iflag_vice .NE. 0) .OR. (niter_lscp .GT. 1)) THEN
     240           abort_message = 'in lscp, iflag_autoconversion=2 requires iflag_vice=0 and niter_lscp=1'
     241           CALL abort_physic (modname,abort_message,1)
     242        ENDIF
    75243    ENDIF
    76244
  • LMDZ6/branches/Portage_acc/libf/phylmdiso/thermcell_down.F90

    r4447 r4585  
    5858
    5959   if ( iflag_thermals_down < 10 ) then
    60         stop 'thermcell_down_dq = 0 or >= 10'
     60      call abort_physic("thermcell_updown_dq", &
     61           'thermcell_down_dq = 0 or >= 10', 1)
    6162   else
    6263        iflag_impl=iflag_thermals_down-10
     
    128129         !!!! tentative de prise en compte d'un flux compensatoire montant  !!!!
    129130         if (fup(ig,ilay)-fdn(ig,ilay) .lt. 0.) then
    130             write(*,*) 'flux compensatoire montant, cas non traite par thermcell_updown_dq'
    131             stop         
     131            call abort_physic("thermcell_updown_dq", 'flux compensatoire '&
     132                 // 'montant, cas non traite par thermcell_updown_dq', 1)
    132133            !fthe(ig,ilay)=(fup(ig,ilay)-fdn(ig,ilay))*trac(ig,ilay-1)
    133134         else
     
    161162       do ig=1,ngrid
    162163         if (fup(ig,ilay)-fdn(ig,ilay) .lt. 0.) then
    163             write(*,*) 'flux compensatoire montant, cas non traite par thermcell_updown_dq'
    164             stop         
     164            call abort_physic("thermcell_updown_dq", 'flux compensatoire ' &
     165                 // 'montant, cas non traite par thermcell_updown_dq', 1)
    165166         else
    166167            fthe(ig,ilay)=-(fup(ig,ilay)-fdn(ig,ilay))*trac(ig,ilay)
     
    191192         if((fup(ig,ilay)-fdn(ig,ilay)) .lt. 0) then
    192193            write(*,*) 'flux compensatoire montant, cas non traite par thermcell_updown_dq dans le cas d une resolution implicite, ilay : ', ilay
    193             stop 
     194            call abort_physic("thermcell_updown_dq", "", 1)
    194195         else
    195196           mstar_inv=ptimestep/masse(ig,ilay)
     
    205206
    206207   else
    207       write(*,*) 'valeur de iflag_impl non prevue'
    208       stop
    209 
     208      call abort_physic("thermcell_updown_dq", &
     209           'valeur de iflag_impl non prevue', 1)
    210210   endif
    211211
  • LMDZ6/branches/Portage_acc/libf/phylmdiso/wake_ini_mod.F90

    r4447 r4585  
    2525  INTEGER, SAVE, PROTECTED                                         :: prt_level
    2626  REAL, SAVE, PROTECTED, DIMENSION(2)                              :: wdens_ref
    27   REAL, SAVE, PROTECTED                                            :: stark, coefgw, alpk, pupperbyphs
     27  REAL, SAVE, PROTECTED                                            :: stark, coefgw, alpk, wk_pupper
    2828!>jyg
    2929  REAL, SAVE, PROTECTED                                            :: crep_upper, crep_sol 
    30   !$OMP THREADPRIVATE(stark, wdens_ref, coefgw, alpk, pupperbyphs, crep_upper, crep_sol)
     30  !$OMP THREADPRIVATE(stark, wdens_ref, coefgw, alpk, wk_pupper, crep_upper, crep_sol)
    3131
    3232  REAL, SAVE, PROTECTED                                            :: tau_cv
     
    153153  CALL getin_p('alpk',alpk)
    154154 
    155   pupperbyphs=0.6
    156   CALL getin_p('pupperbyphs',pupperbyphs)
     155  wk_pupper=0.6
     156  CALL getin_p('wk_pupper',wk_pupper)
    157157
    158158
     
    195195  WRITE(*,*) 'stark=', stark
    196196  WRITE(*,*) 'alpk=', alpk
    197   WRITE(*,*) 'pupperbyphs=', pupperbyphs
     197  WRITE(*,*) 'wk_pupper=', wk_pupper
    198198!jyg<
    199199!!  WRITE(*,*) 'wdens_ref=', wdens_ref
Note: See TracChangeset for help on using the changeset viewer.