Changeset 3090 for trunk/LMDZ.TITAN/libf/muphytitan
- Timestamp:
- Oct 17, 2023, 9:40:14 AM (15 months ago)
- Location:
- trunk/LMDZ.TITAN/libf/muphytitan
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/muphytitan/argparse.F90
r3083 r3090 1 ! Copyright (c) (2013-2015,2017 ) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr).1 ! Copyright (c) (2013-2015,2017,2022) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr). 2 2 ! 3 3 ! This file is part of SWIFT -
trunk/LMDZ.TITAN/libf/muphytitan/asciiread.f90
r3083 r3090 1 ! Copyright (c) (2013-2015,2017 ) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr).1 ! Copyright (c) (2013-2015,2017,2022) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr). 2 2 ! 3 3 ! This file is part of SWIFT -
trunk/LMDZ.TITAN/libf/muphytitan/cfgparse.F90
r3083 r3090 1 ! Copyright (c) (2013-2015,2017 ) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr).1 ! Copyright (c) (2013-2015,2017,2022) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr). 2 2 ! 3 3 ! This file is part of SWIFT -
trunk/LMDZ.TITAN/libf/muphytitan/config/config.ne15.cfg
r1897 r3090 19 19 # 2 - SF interactions 20 20 # 4 - FF interactions. 21 # (for example : 5 = 4+1 --> SS and FF coagulation only)21 # (for example : 5 = 4+1 --> SS and FF coagulation only) 22 22 haze_coag_interactions = 7 23 23 # Enable/disable Haze sedimentation process 24 24 haze_sedimentation = T 25 25 # Disable Fiadero correction for sedimentation process 26 no_fiadero = F26 no_fiadero = T 27 27 # Fiadero correction minimum ratio threshold 28 28 fiadero_min_ratio = 0.1 … … 30 30 fiadero_max_ratio = 10. 31 31 # Force settling velocity to M0 32 wsed_m0 = T32 wsed_m0 = T 33 33 # Force settling velocity to M3 34 wsed_m3 = F34 wsed_m3 = F 35 35 # Enable/disable clouds sedimentation process 36 36 # (automatically set to F if clouds microphysics is not enabled) … … 41 41 # Condensible species configuration file 42 42 # (not needed if clouds microphysics is not enabled) 43 specie_cfg = ../ datagcm/microphysics/mp2m_species.cfg43 specie_cfg = ../../datagcm/microphysics/mp2m_species.cfg 44 44 45 45 # Enable/disable spherical mode transfert probability … … 47 47 # Path of the spherical mode transfert probability look-up tables file 48 48 # (optional if 'transfert_probability' is False) 49 ps2s_file = ../ datagcm/microphysics/mmp_ps2s_rm50_ne15.nc49 ps2s_file = ../../datagcm/microphysics/mmp_ps2s_rm50_ne15.nc 50 50 51 51 # Electric charging coagulation correction … … 54 54 # Path of the electric charging correction factor. 55 55 # (optional if 'electric_charging' is False) 56 mq_file = ../ datagcm/microphysics/mmp_qmean_rm50_ne15.nc56 mq_file = ../../datagcm/microphysics/mmp_qmean_rm50_ne15.nc 57 57 58 # alpha_X sections contain the parameters of the inter-moments relation function for 59 # the mode X: either spherical (s) or fractal (f) 60 # dndr_X sections contain the parameters of the size-distribution law of the mode X 58 ### Thresholds related parameters 59 ### ----------------------------- 60 # Aerosol spherical mode total number min. threshold 61 m0as_min = 1e-10 62 # Aerosol spherical mode min. caracteristic radius threshold 63 rcs_min = 1e-9 64 # Aerosol fractal mode total number min. threshold 65 m0af_min = 1e-10 66 # Aerosol fractal mode min. caracteristic radius threshold (updated to monomer radius at runtime if needed) 67 rcf_min = 1e-9 68 # cloud drop total number min. threshold 69 m0n_min = 1e-10 70 71 72 # =================== # 73 # alpha_k cofficients # 74 # =================== # 75 # alpha_X sections contain the parameters of the inter-moments relation function for the mode X (spherical (s) or fractal (f)) 61 76 [alpha_s] 62 77 a = 1.5044478E-02, -2.0948806E-01, -1.5824302E+02, 1.1597818E-01, 9.9502283E-02, -1.1223796E-01 63 78 b = -2.8622255E-01, 7.7089599E+00, -1.7000626E+02, 2.6012143E+00, 5.5138784E-01, 9.2024747E-01 64 79 c = -3.0205020E-02, -3.5510239E+01, -2.0306468E+02, -1.3605159E+01, -4.1653422E+00, -4.2571698E+00 65 [dndr_s] 66 rc = 4.58219580180634588E-007 67 a0 = 86144.861255561875 68 c = 0d0 69 a = 2.48333861883769357E-040, 1.46076790655632173E-013, 1.71525517568997062E-009, 70 1.80855172875974993E-019, 1.48212594918347503E-047, 6.87247318898338451E-081 71 b = 59.518212357684796, 15.507500262021228, -5.4179933012448069, 72 -9.3500794017892854, -18.207927270524777, -27.248924688740562 80 73 81 [alpha_f] 74 82 a = 1.5044478E-02, -2.0948806E-01, -1.5824302E+02, 1.1597818E-01, 9.9502283E-02, -1.1223796E-01 75 83 b = -2.8622255E-01, 7.7089599E+00, -1.7000626E+02, 2.6012143E+00, 5.5138784E-01, 9.2024747E-01 76 84 c = -3.0205020E-02, -3.5510239E+01, -2.0306468E+02, -1.3605159E+01, -4.1653422E+00, -4.2571698E+00 77 [dndr_f]78 rc = 4.58219580180634588E-00779 a0 = 86144.86125556187580 c = 0d081 a = 2.48333861883769357E-040, 1.46076790655632173E-013, 1.71525517568997062E-009,82 1.80855172875974993E-019, 1.48212594918347503E-047, 6.87247318898338451E-08183 b = 59.518212357684796, 15.507500262021228, -5.4179933012448069,84 -9.3500794017892854, -18.207927270524777, -27.24892468874056285 85 86 86 # ================= # 87 87 # b^T_k cofficients # 88 88 # ================= # 89 # This section gathers the values of all the btk coefficient used in the coagulation 90 # equations for the free-molecular regime. 89 # This section gathers the values of all the btk coefficient used in the coagulation equations for the free-molecular regime 91 90 [btks] 92 91 bt0 = 0.73d0, 0.73d0, 0.75d0, 0.99d0, 0.00d0 93 92 bt3 = 0.97d0, 0.97d0, 0.00d0, 0.99d0, 0.99d0 94 95 [optics]96 optic_file = /path/to/optics_look_up_table.nc97 98 99 -
trunk/LMDZ.TITAN/libf/muphytitan/config/mp2m_species.cfg
r1793 r3090 1 # ----------------------------------------------------------------------------------------2 # mp _scpecies.cfg1 # ---------------------------------------------------------------------------------------- 2 # mp2m_scpecies.cfg 3 3 # Thermodynamic properties of chemical species used in the cloud microphysics processes. 4 4 # Each condensible specie that should be treated by the model must be entirely described 5 5 # here. 6 6 # 7 # Air specie is always mandatory. It is saved in a special variable in the model and is 8 # never used as cloud condensible specie. 9 #----------------------------------------------------------------------------------------- 7 # ---------------------------------------------------------------------------------------- 10 8 # PARAMETER | DESCRIPTION 11 9 # ----------|----------------------------------------------------------------------------- 12 10 # name | Specie name, should be the same as the section name 13 # mas | Molecular weight 14 # vol | Molecular volume 15 # ray | Molecular radius 16 # masmol | Molar mass 17 # rho | Density 18 # tc | Critical temperature 19 # tb | Boiling temperature 20 # pc | Critical pressure (in bar !!!) 11 # mas | Molecular weight [kg] 12 # vol | Molecular volume [m3] 13 # ray | Molecular radius [m] 14 # masmol | Molar mass [kg.mol-1] 15 # rho | Density [kg.m-3] 16 # tc | Critical temperature [K] 17 # tb | Boiling temperature [K] 18 # pc | Critical pressure [bar] 19 # tx_prod | Production rate [kg.m-2.s-1] (actually this is not used by the model) 21 20 # w | Acentric factor 22 # a_sat | Coefficient A of Psat equation (from Reid et al. 1986) .23 # b_sat | Coefficient B of Psat equation (from Reid et al. 1986) .24 # c_sat | Coefficient C of Psat equation (from Reid et al. 1986) .25 # d_sat | Coefficient D of Psat equation (from Reid et al. 1986) .21 # a_sat | Coefficient A of Psat equation (from Reid et al. 1986) 22 # b_sat | Coefficient B of Psat equation (from Reid et al. 1986) 23 # c_sat | Coefficient C of Psat equation (from Reid et al. 1986) 24 # d_sat | Coefficient D of Psat equation (from Reid et al. 1986) 26 25 # mteta | Wettability (free parameter in most cases, from 0 to 1) 27 # tx_prod | Production rate (actually this is not used by the model) 28 #----------------------------------------------------------------------------------------- 26 # ----------------------------------------------------------------------------------------- 29 27 30 ### List of actual species to be used in the model: 31 ### WARNING : the list of species specified here should be ordered: 32 ### In the model, ice tracers as well as condensible gazs species must have the same 33 ### index. 34 used_species = "CH4", "C2H6", "C2H2" 35 36 # AIR properties (MANDATORY !!!) 37 ################################ 38 [air] 39 name = "air" 40 mas = 4.650e-26 41 vol = 5.750e-29 42 ray = 1.750e-10 43 masmol = 28.e-3 44 rho = 808.6 45 tc = 126.2 46 tb = 77.4 47 pc = 33.9 48 w = 3.9e-2 49 a_sat = -6.09676 50 b_sat = 1.13670 51 c_sat = -1.04072 52 d_sat = -1.93306 53 mteta = 0. 54 tx_prod = 0. 28 ### List of actual species to be used in the model : 29 ### WARNING : The list of species specified here should be ordered : 30 ### In the model, ice tracers as well as condensible gazs species must 31 ### have the same index. 32 used_species = CH4, C2H6, C2H2, HCN 55 33 56 34 # CH4 properties (useful for Titan :) 57 35 ##################################### 58 36 [CH4] 59 name = "CH4"37 name = CH4 60 38 mas = 2.6578e-26 61 39 vol = 6.252e-29 62 40 ray = 2.000e-10 63 masmol = 16. e-341 masmol = 16.04e-3 64 42 rho = 425. 65 tc = 190. 466 tb = 111.6 67 pc = 4 6.043 tc = 190.551 44 tb = 111.66 45 pc = 45.992 68 46 w = 1.1e-2 69 a_sat = -6.0 043570 b_sat = 1. 1885071 c_sat = -0. 8340872 d_sat = -1. 2283373 mteta = 0.9 247 a_sat = -6.02242 48 b_sat = 1.26652 49 c_sat = -0.5707 50 d_sat = -1.366 51 mteta = 0.99 74 52 tx_prod = 0. 75 53 … … 77 55 ################# 78 56 [C2H6] 79 name = "C2H6"57 name = C2H6 80 58 mas = 4.983e-26 81 59 vol = 9.094e-29 82 60 ray = 2.220e-10 83 masmol = 30. e-361 masmol = 30.07e-3 84 62 rho = 544.6 85 tc = 305. 486 tb = 184. 687 pc = 48. 863 tc = 305.33 64 tb = 184.55 65 pc = 48.71 88 66 w = 9.9e-2 89 a_sat = -6. 3430790 b_sat = 1. 0116391 c_sat = -1.1 911692 d_sat = - 2.0353993 mteta = 0.9 267 a_sat = -6.47500 68 b_sat = 1.41071 69 c_sat = -1.1440 70 d_sat = -1.8590 71 mteta = 0.99 94 72 tx_prod = 1.2e-12 95 73 … … 97 75 ################# 98 76 [C2H2] 99 name = "C2H2"77 name = C2H2 100 78 mas = 4.319e-26 101 79 vol = 7.020e-29 102 80 ray = 2.015e-10 103 masmol = 26. e-381 masmol = 26.04e-3 104 82 rho = 615. 105 tc = 308. 8106 tb = 188.4 107 pc = 61. 483 tc = 308.35 84 tb = 188.40 85 pc = 61.39 108 86 w = 19.0e-2 109 a_sat = -6. 90128110 b_sat = 1. 26873111 c_sat = - 2.09113112 d_sat = - 2.75601113 mteta = 0.9 287 a_sat = -6.87886 88 b_sat = 1.30164 89 c_sat = -1.22474 90 d_sat = -3.59556 91 mteta = 0.99 114 92 tx_prod = 3.2e-13 115 93 … … 117 95 ################# 118 96 [HCN] 119 name = "HCN"97 name = HCN 120 98 mas = 4.484e-26 121 99 vol = 6.498e-29 … … 131 109 c_sat = -3.004 132 110 d_sat = 1635. 133 mteta = 0.9 2111 mteta = 0.99 134 112 tx_prod = 1e-12 135 -
trunk/LMDZ.TITAN/libf/muphytitan/csystem.c
r3083 r3090 1 1 /* 2 * Copyright (c) (2013-2015,2017 ) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr).2 * Copyright (c) (2013-2015,2017,2022) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr). 3 3 * 4 4 * This file is part of SWIFT -
trunk/LMDZ.TITAN/libf/muphytitan/csystem.h
r3083 r3090 1 1 /* 2 * Copyright (c) (2013-2015,2017 ) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr).2 * Copyright (c) (2013-2015,2017,2022) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr). 3 3 * 4 4 * This file is part of SWIFT -
trunk/LMDZ.TITAN/libf/muphytitan/defined.h
r3083 r3090 1 1 /* 2 * Copyright (c) (2013-2015,2017 ) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr).2 * Copyright (c) (2013-2015,2017,2022) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr). 3 3 * 4 4 * This file is part of SWIFT -
trunk/LMDZ.TITAN/libf/muphytitan/errors.F90
r3083 r3090 1 ! Copyright (c) (2013-2015,2017 ) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr).1 ! Copyright (c) (2013-2015,2017,2022) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr). 2 2 ! 3 3 ! This file is part of SWIFT -
trunk/LMDZ.TITAN/libf/muphytitan/fsystem.F90
r3083 r3090 1 ! Copyright (c) (2013-2015,2017 ) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr).1 ! Copyright (c) (2013-2015,2017,2022) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr). 2 2 ! 3 3 ! This file is part of SWIFT -
trunk/LMDZ.TITAN/libf/muphytitan/mm_clouds.f90
r3083 r3090 1 ! Copyright 2013-2015,2017,2022Université de Reims Champagne-Ardenne2 ! Contributors : J. Burgalat (GSMA, URCA), B. de Batz de Trenquelléon (GSMA, URCA)1 ! Copyright (2013-2015,2017,2022-2023) Université de Reims Champagne-Ardenne 2 ! Contributors : J. Burgalat (GSMA, URCA), B. de Batz de Trenquelléon (GSMA, URCA) 3 3 ! email of the author : jeremie.burgalat@univ-reims.fr 4 4 ! … … 35 35 !! summary: Clouds microphysics module 36 36 !! author: J. Burgalat 37 !! date: 2013-2015,2017,2022 38 !! corrections: B. de Batz de Trenquelléon (2023)37 !! date: 2013-2015,2017,2022-2023 38 !! modifications: B. de Batz de Trenquelléon 39 39 40 40 MODULE MM_CLOUDS … … 109 109 call mm_cloud_sedimentation(zdm0n,zdm3n,zdm3i) 110 110 111 ! computes precipitation, settling velocity and flux of ices 111 ! Computes settling velocity [m.s-1] of clouds (ccn and ices) 112 mm_ccn_vsed(:) = wsettle(mm_play,mm_temp,mm_zlay,mm_drho,mm_drad) 113 114 ! Computes flux [kg.m-2.s-1] and precipitation [m.iphysiq] of ccn 115 mm_ccn_flux(:) = get_mass_flux(mm_rhoaer,mm_m3ccn(:)) 112 116 mm_ccn_prec = SUM(zdm3n*mm_dzlev) 113 mm_ccn_w(:) = wsettle(mm_play,mm_temp,mm_zlay,mm_drho,mm_drad) 114 mm_ccn_flux(:) = get_mass_flux(mm_rhoaer,mm_m3ccn(:))115 116 DO i=1, mm_nesp117 118 ! Computes flux [kg.m-2.s-1] and precipitation [m.iphysiq] of ices 119 DO i = 1, mm_nesp 120 mm_ice_fluxes(:,i) = get_mass_flux(mm_xESPS(i)%rho,(3._mm_wp*mm_m3ice(:,i))/(4._mm_wp*mm_pi)) 117 121 mm_ice_prec(i) = SUM(zdm3i(:,i)*mm_dzlev) 118 mm_ice_fluxes(:,i) = get_mass_flux(mm_xESPS(i)%rho,mm_m3ice(:,i))119 122 ENDDO 123 120 124 ! updates tendencies 121 125 dm0n = dm0n + zdm0n … … 724 728 REAL(kind=mm_wp), INTENT(in) :: rad !! Radius of the particle (m). 725 729 REAL(kind=mm_wp) :: w !! Settling velocity (\(m.s^{-1}\)). 726 REAL(kind=mm_wp) :: Us, Fc 730 REAL(kind=mm_wp) :: Us, Fc, kn 731 REAL(kind=mm_wp), PARAMETER :: ra = 1.75e-10_mm_wp 732 733 ! Knudsen number 734 kn = (mm_kboltz * t) / (p * 4._mm_wp * sqrt(2._mm_wp) * mm_pi * ra**2) / rad 735 736 ! Computes slip-flow correction : Fc = 1 + (mm_akn * mm_lambda_g(t,p) / rad) 737 Fc = (1._mm_wp + 1.2517_mm_wp*kn + 0.4_mm_wp*kn*dexp(-1.1_mm_wp/kn)) 727 738 728 739 ! Computes Stokes settling velocity 729 740 Us = (2._mm_wp * rad**2 * rho * mm_effg(z)) / (9._mm_wp * mm_eta_g(t)) 730 741 731 ! Apply slip-flow correction 732 Fc = 1 + (mm_akn * mm_lambda_g(t,p) / rad) 733 734 ! Computes settling velocity 735 w = Us * Fc 736 !>>> [TEMPO : BBT] 737 !w = Us * Fc * 5. 738 !<<< [TEMPO : BBT] 742 ! Computes settling velocity (correction factor : x2.0) 743 w = Us * Fc * 2._mm_wp 739 744 END FUNCTION wsettle 740 745 … … 753 758 REAL(kind=mm_wp), INTENT(in), DIMENSION(:) :: m3 754 759 !! Vertical profile of the total volume of tracer (i.e. M3) from __TOP__ to __GROUND__ (\(m^{3}.m^{-3}\)). 755 REAL(kind=mm_wp), DIMENSION(SIZE(m3)) :: flx760 REAL(kind=mm_wp), DIMENSION(SIZE(m3)) :: flx 756 761 !! Mass sedimentation fluxes at each layer from __TOP__ to __GROUND__ (\(kg.m^{-2}.s^{-1}\)). 757 REAL(kind=mm_wp), SAVE :: fac = 4._mm_wp/3._mm_wp * mm_pi758 flx = fac * rho* m3 * wsettle(mm_play,mm_temp,mm_zlay,mm_drho,mm_drad)762 REAL(kind=mm_wp), SAVE :: pifac = (4._mm_wp * mm_pi) / 3._mm_wp 763 flx = rho * pifac * m3 * wsettle(mm_play,mm_temp,mm_zlay,mm_drho,mm_drad) 759 764 RETURN 760 765 END FUNCTION get_mass_flux -
trunk/LMDZ.TITAN/libf/muphytitan/mm_globals.f90
r3083 r3090 1 ! Copyright 2013-2015,2017,2022Université de Reims Champagne-Ardenne2 ! Contributor : J. Burgalat(GSMA, URCA)1 ! Copyright (2013-2015,2017,2022-2023) Université de Reims Champagne-Ardenne 2 ! Contributors : J. Burgalat (GSMA, URCA), B. de Batz de Trenquelléon (GSMA, URCA) 3 3 ! email of the author : jeremie.burgalat@univ-reims.fr 4 4 ! … … 35 35 !! summary: Parameters and global variables module. 36 36 !! author: J. Burgalat 37 !! date: 2013-2015,2017,2022 37 !! date: 2013-2015,2017,2022-2023 38 !! modifications: B. de Batz de Trenquelléon 38 39 39 40 MODULE MM_GLOBALS … … 274 275 275 276 ! Thresholds ! 276 277 277 !> (min.) Total number of aerosols minimum threshold for the spherical mode. 278 278 REAL(kind=mm_wp), SAVE :: mm_m0as_min = 1.e-10_mm_wp 279 280 279 !> (min.) Total volume of aerosols minimum threshold for the spherical mode. 281 280 REAL(kind=mm_wp), SAVE :: mm_m3as_min = 1.e-40_mm_wp 282 283 281 !> Characteristic radius minimum threshold for the spherical mode. 284 282 REAL(kind=mm_wp), SAVE :: mm_rcs_min = 1.e-9_mm_wp … … 286 284 !> (min.) Total number of aerosols minimum threshold for the fractal mode. 287 285 REAL(kind=mm_wp), SAVE :: mm_m0af_min = 1.e-10_mm_wp 288 289 286 !> (min.) Total volume of aerosols minimum threshold for the fractal mode. 290 287 REAL(kind=mm_wp), SAVE :: mm_m3af_min = 1.e-40_mm_wp 291 292 288 !> Characteristic radius minimum threshold for the fractal mode. 293 289 REAL(kind=mm_wp), SAVE :: mm_rcf_min = 1.e-9_mm_wp … … 295 291 !> (min.) Total number of cloud drop minimum threshold. 296 292 REAL(kind=mm_wp), SAVE :: mm_m0n_min = 1.e-10_mm_wp 297 298 293 !> (min.) Total volume of cloud drop minimum threshold. 299 294 REAL(kind=mm_wp), SAVE :: mm_m3cld_min = 1.e-40_mm_wp 295 !> Minimum cloud drop radius 296 REAL(kind=mm_wp), SAVE :: mm_drad_min = 1.e-9_mm_wp 297 !> Maximum cloud drop radius 298 REAL(kind=mm_wp), SAVE :: mm_drad_max = 1.e-3_mm_wp 300 299 301 300 !> Characteristic radius threshold. 302 301 REAL(kind=mm_wp), SAVE :: mm_rc_min = 1.e-200_mm_wp 303 304 !> Minimum cloud drop radius305 REAL(kind=mm_wp), SAVE :: mm_drad_min = 1.e-9_mm_wp306 307 !> Maximum cloud drop radius308 REAL(kind=mm_wp), SAVE :: mm_drad_max = 1.e-3_mm_wp309 302 310 303 !> Name of condensible species. … … 442 435 REAL(kind=mm_wp), SAVE :: mm_aer_prec = 0._mm_wp 443 436 437 !> CCN precipitations (m). 438 !! It is updated in [[mm_clouds(module):mm_cloud_microphysics(subroutine)]]. 439 REAL(kind=mm_wp), SAVE :: mm_ccn_prec = 0._mm_wp 440 444 441 !> Spherical mode \(M_{0}\) settling velocity (\(m.s^{-1}\)). 445 442 !! … … 478 475 REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE, SAVE :: mm_m3af_vsed 479 476 477 !> CCN settling velocity (\(m.s^{-1}\)). 478 !! 479 !! It is a vector with the vertical layers that contains the 480 !! settling velocity for CCN (and ices). 481 !! It is updated in [[mm_clouds(module):mm_cloud_microphysics(subroutine)]]. 482 REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE, SAVE :: mm_ccn_vsed 483 480 484 !> Spherical aerosol mass fluxes (\(kg.m^{-2}.s^{-1}\)). 481 485 !! … … 493 497 !! This variable is always negative. 494 498 REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE, SAVE :: mm_aer_f_flux 495 496 !> CCN precipitations (m).497 !! It is updated in [[mm_clouds(module):mm_cloud_microphysics(subroutine)]].498 REAL(kind=mm_wp), SAVE :: mm_ccn_prec = 0._mm_wp499 500 !> CCN settling velocity (\(m.s^{-1}\)).501 !!502 !! It is a vector with the vertical layers that contains the503 !! settling velocity for CCN (and ices).504 !! It is updated in [[mm_clouds(module):mm_cloud_microphysics(subroutine)]].505 !! @note506 !! This variable is always positive.507 REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE, SAVE :: mm_ccn_w508 499 509 500 !> CCN mass fluxes (\(kg.m^{-2}.s^{-1}\)). … … 512 503 !! mass fluxes for CCN. 513 504 !! It is updated in [[mm_clouds(module):mm_cloud_microphysics(subroutine)]]. 514 !! @note515 !! This variable is always positive.516 505 REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE, SAVE :: mm_ccn_flux 517 506 … … 593 582 !$OMP THREADPRIVATE(mm_m0ccn,mm_m3ccn,mm_m3ice,mm_gazs) 594 583 !$OMP THREADPRIVATE(mm_rcs,mm_rcf,mm_drad,mm_drho) 595 !$OMP THREADPRIVATE(mm_aer_s_flux,mm_aer_f_flux,mm_ccn_w,mm_ccn_flux,mm_ice_prec,mm_ice_fluxes,mm_gazs_sat)596 584 !$OMP THREADPRIVATE(mm_m0as_vsed,mm_m3as_vsed,mm_m0af_vsed,mm_m3af_vsed) 585 !$OMP THREADPRIVATE(mm_aer_s_flux,mm_aer_f_flux,mm_ccn_vsed,mm_ccn_flux,mm_ice_prec,mm_ice_fluxes,mm_gazs_sat) 597 586 !$OMP THREADPRIVATE(mm_m0as_min,mm_m3as_min,mm_rcs_min,mm_m0af_min,mm_m3af_min,mm_rcf_min,mm_m0n_min,mm_m3cld_min) 598 587 !$OMP THREADPRIVATE(mm_nla,mm_nle) … … 997 986 err = mm_check_opt(cfg_get_value(cfg,"fiadero_min_ratio",mm_fiadero_min),mm_fiadero_min,zfiamin,wlog=mm_log) 998 987 err = mm_check_opt(cfg_get_value(cfg,"fiadero_max_ratio",mm_fiadero_max),mm_fiadero_max,zfiamax,wlog=mm_log) 999 1000 988 err = mm_check_opt(cfg_get_value(cfg,"m0as_min",mm_m0as_min),mm_m0as_min,1e-10_mm_wp,wlog=mm_log) 1001 989 err = mm_check_opt(cfg_get_value(cfg,"rcs_min",mm_rcs_min),mm_rcs_min,1e-9_mm_wp,wlog=mm_log) … … 1003 991 err = mm_check_opt(cfg_get_value(cfg,"rcf_min",mm_rcf_min),mm_rcf_min,mm_rm,wlog=mm_log) 1004 992 err = mm_check_opt(cfg_get_value(cfg,"m0n_min",mm_m0n_min),mm_m0n_min,1e-10_mm_wp,wlog=mm_log) 1005 1006 993 1007 994 ! force fractal radius minimum threshold to monomer radius ^^ … … 1152 1139 IF (.NOT.ALLOCATED(mm_rcf)) ALLOCATE(mm_rcf(mm_nla)) 1153 1140 ! Allocate memory for diagnostics 1141 IF (.NOT.ALLOCATED(mm_m0as_vsed)) THEN 1142 ALLOCATE(mm_m0as_vsed(mm_nla)) ; mm_m0as_vsed(:) = 0._mm_wp 1143 ENDIF 1144 IF (.NOT.ALLOCATED(mm_m3as_vsed)) THEN 1145 ALLOCATE(mm_m3as_vsed(mm_nla)) ; mm_m3as_vsed(:) = 0._mm_wp 1146 ENDIF 1147 IF (.NOT.ALLOCATED(mm_m0af_vsed)) THEN 1148 ALLOCATE(mm_m0af_vsed(mm_nla)) ; mm_m0af_vsed(:) = 0._mm_wp 1149 ENDIF 1150 IF (.NOT.ALLOCATED(mm_m3af_vsed)) THEN 1151 ALLOCATE(mm_m3af_vsed(mm_nla)) ; mm_m3af_vsed(:) = 0._mm_wp 1152 ENDIF 1154 1153 IF (.NOT.ALLOCATED(mm_aer_s_flux)) THEN 1155 1154 ALLOCATE(mm_aer_s_flux(mm_nla)) ; mm_aer_s_flux(:) = 0._mm_wp … … 1157 1156 IF (.NOT.ALLOCATED(mm_aer_f_flux)) THEN 1158 1157 ALLOCATE(mm_aer_f_flux(mm_nla)) ; mm_aer_f_flux(:) = 0._mm_wp 1159 ENDIF1160 IF (.NOT.ALLOCATED(mm_m0as_vsed)) THEN1161 ALLOCATE(mm_m0as_vsed(mm_nla)) ; mm_m0as_vsed(:) = 0._mm_wp1162 ENDIF1163 IF (.NOT.ALLOCATED(mm_m3as_vsed)) THEN1164 ALLOCATE(mm_m3as_vsed(mm_nla)) ; mm_m3as_vsed(:) = 0._mm_wp1165 ENDIF1166 IF (.NOT.ALLOCATED(mm_m0af_vsed)) THEN1167 ALLOCATE(mm_m0af_vsed(mm_nla)) ; mm_m0af_vsed(:) = 0._mm_wp1168 ENDIF1169 IF (.NOT.ALLOCATED(mm_m3af_vsed)) THEN1170 ALLOCATE(mm_m3af_vsed(mm_nla)) ; mm_m3af_vsed(:) = 0._mm_wp1171 1158 ENDIF 1172 1159 ! note : mm_dzlev is already from top to ground … … 1241 1228 IF (.NOT.ALLOCATED(mm_drho)) ALLOCATE(mm_drho(mm_nla)) 1242 1229 ! Allocate memory for diagnostics 1243 IF (.NOT.ALLOCATED(mm_ccn_ w)) THEN1244 ALLOCATE(mm_ccn_ w(mm_nla)) ; mm_ccn_w(:) = 0._mm_wp1230 IF (.NOT.ALLOCATED(mm_ccn_vsed)) THEN 1231 ALLOCATE(mm_ccn_vsed(mm_nla)) ; mm_ccn_vsed(:) = 0._mm_wp 1245 1232 ENDIF 1246 1233 IF (.NOT.ALLOCATED(mm_ccn_flux)) THEN … … 1444 1431 ! Initialization : 1445 1432 Ntot = m0ccn 1446 Vtot = pifac *m3ccn + SUM(m3ice)1447 Wtot = pifac * ((m3ccn*mm_rhoaer) + SUM(m3ice*mm_xESPS(:)%rho))1433 Vtot = pifac*m3ccn + SUM(m3ice) 1434 Wtot = pifac*m3ccn*mm_rhoaer + SUM(m3ice*mm_xESPS(:)%rho) 1448 1435 1449 1436 IF (Ntot <= mm_m0n_min .OR. Vtot <= mm_m3cld_min) THEN -
trunk/LMDZ.TITAN/libf/muphytitan/mm_haze.f90
r3083 r3090 731 731 cslf = mm_akn * mm_lambda_g(mm_btemp(i),mm_plev(i)) 732 732 wth(i) = - csto/(rb2ra*afun(k)) * (rc(i-1)**ar1 * afun(af1) + cslf/rb2ra * rc(i-1)**ar2 * afun(af2)) 733 734 ! >>> [TEMPO : BBT]735 !wth(i) = wth(i) * (2574e3 / (2574e3+mm_zlev(i)))**4736 ! <<< [TEMPO : BBT]737 733 738 734 ! now correct velocity to reduce numerical diffusion -
trunk/LMDZ.TITAN/libf/muphytitan/mm_methods.f90
r3083 r3090 1 ! Copyright 2013-2015,2017,2022Université de Reims Champagne-Ardenne2 ! Contributors : J. Burgalat (GSMA, URCA), B. de Batz de Trenquelléon (GSMA, URCA)1 ! Copyright (2013-2015,2017,2022-2023) Université de Reims Champagne-Ardenne 2 ! Contributors : J. Burgalat (GSMA, URCA), B. de Batz de Trenquelléon (GSMA, URCA) 3 3 ! email of the author : jeremie.burgalat@univ-reims.fr 4 4 ! … … 35 35 !! summary: Model miscellaneous methods module. 36 36 !! author: J. Burgalat 37 !! date: 2013-2015,2017,2022 38 !! corrections: B. de Batz de Trenquelléon (2023)37 !! date: 2013-2015,2017,2022-2023 38 !! modifications: B. de Batz de Trenquelléon 39 39 40 40 MODULE MM_METHODS … … 133 133 !! 134 134 !! The method computes the molar mixing ratio at saturation of a given specie at given temperature(s) 135 !! and pressure level(s) [Fray and Schmidt (2009)].135 !! and pressure level(s). 136 136 !! 137 137 !! ```fortran … … 314 314 !! 315 315 !! @warning 316 !! The method applies a multiplicative factor of 0.8 5if the specie is CH4 :316 !! The method applies a multiplicative factor of 0.80 if the specie is CH4 : 317 317 !! this is done to account for dissolution in N2 and is somehow specific to Titan atmosphere. 318 318 REAL(kind=mm_wp), INTENT(in) :: temp !! Temperature (K). 319 319 REAL(kind=mm_wp), INTENT(in) :: pres !! Pressure level (Pa). 320 TYPE(mm_esp), INTENT(in) :: xESP!! Specie properties.321 REAL(kind=mm_wp) :: res!! Mass mixing ratio of the specie.322 REAL(kind=mm_wp) :: psat320 TYPE(mm_esp), INTENT(in) :: xESP !! Specie properties. 321 REAL(kind=mm_wp) :: res !! Mass mixing ratio of the specie. 322 REAL(kind=mm_wp) :: psat 323 323 psat = mm_psatX(temp,xESP) 324 324 res = (psat / pres) * xESP%fmol2fmas 325 ! Peculiar case : CH4 : x0.85(dissolution in N2)325 ! Peculiar case of CH4 : x0.80 (dissolution in N2) 326 326 IF (xESP%name == "CH4") THEN 327 res = res * 0.8 5_mm_wp327 res = res * 0.80_mm_wp 328 328 IF (mm_debug) WRITE(*,'(a)') "[DEBUG] mm_qsat: applying .85 factor to qsat for CH4 specie (N2 dissolution)" 329 329 ENDIF … … 339 339 REAL(kind=mm_wp), INTENT(in), DIMENSION(:) :: pres !! Pressure levels (Pa). 340 340 TYPE(mm_esp), INTENT(in) :: xESP !! Specie properties. 341 REAL(kind=mm_wp), DIMENSION(SIZE(temp)) :: res!! Mass mixing ratios of the specie.342 REAL(kind=mm_wp), DIMENSION(SIZE(temp)) :: psat341 REAL(kind=mm_wp), DIMENSION(SIZE(temp)) :: res !! Mass mixing ratios of the specie. 342 REAL(kind=mm_wp), DIMENSION(SIZE(temp)) :: psat 343 343 psat = mm_psatX(temp,xESP) 344 344 res = (psat / pres) * xESP%fmol2fmas 345 ! Peculiar case : CH4 : x0.85(dissolution in N2)345 ! Peculiar case of CH4 : x0.80 (dissolution in N2) 346 346 IF (xESP%name == "CH4") THEN 347 res = res * 0.8 5_mm_wp347 res = res * 0.80_mm_wp 348 348 IF (mm_debug) WRITE(*,'(a)') "[DEBUG] mm_qsat: applying .85 factor to qsat for CH4 specie (N2 dissolution)" 349 349 ENDIF … … 352 352 FUNCTION ysatX_sc(temp,pres,xESP) RESULT(res) 353 353 !! Get the molar mixing ratio of a given specie at saturation (scalar). 354 !! Compute saturation profiles (mol/mol) for condensable tracers 354 355 !! 355 356 !! @warning 356 !! The method applies a multiplicative factor of 0.8 5if the specie is CH4 :357 !! The method applies a multiplicative factor of 0.80 if the specie is CH4 : 357 358 !! this is done to account for dissolution in N2 and is somehow specific to Titan atmosphere. 358 359 REAL(kind=mm_wp), INTENT(in) :: temp !! Temperature (K). … … 361 362 REAL(kind=mm_wp) :: res !! Molar mixing ratio of the specie. 362 363 363 ! Fray and Schmidt (2009)364 364 IF(xESP%name == "C2H2") THEN 365 ! Fray and Schmidt (2009) 365 366 res = (1.0e5 / pres) * exp(1.340e1 - 2.536e3/temp) 366 367 367 368 ELSE IF(xESP%name == "C2H6") THEN 369 ! Fray and Schmidt (2009) 368 370 res = (1.0e5 / pres) * exp(1.511e1 - 2.207e3/temp - 2.411e4/temp**2 + 7.744e5/temp**3 - 1.161e7/temp**4 + 6.763e7/temp**5) 369 371 370 372 ELSE IF(xESP%name == "HCN") THEN 373 ! Fray and Schmidt (2009) 371 374 res = (1.0e5 / pres) * exp(1.393e1 - 3.624e3/temp - 1.325e5/temp**2 + 6.314e6/temp**3 - 1.128e8/temp**4) 372 375 373 376 ELSE IF (xESP%name == "CH4") THEN 377 ! Fray and Schmidt (2009) 374 378 res = (1.0e5 / pres) * exp(1.051e1 - 1.110e3/temp - 4.341e3/temp**2 + 1.035e5/temp**3 - 7.910e5/temp**4) 375 res = res * 0.85_mm_wp 376 !IF (res < 0.014) THEN 377 ! res = 0.014 378 !ENDIF 379 ! Peculiar case of CH4 : x0.80 (dissolution in N2) 380 res = res * 0.80_mm_wp 381 ! Forcing CH4 to 1.4% minimum 382 IF (res < 0.014) THEN 383 res = 0.014 384 ENDIF 379 385 ENDIF 380 386 END FUNCTION ysatX_sc … … 382 388 FUNCTION ysatX_ve(temp,pres,xESP) RESULT(res) 383 389 !! Get the molar mixing ratio of a given specie at saturation (vector). 390 !! Compute saturation profiles (mol/mol) for condensable tracers 384 391 !! 385 392 !! @warning 386 !! The method applies a multiplicative factor of 0.8 5if the specie is CH4 :393 !! The method applies a multiplicative factor of 0.80 if the specie is CH4 : 387 394 !! this is done to account for dissolution in N2 and is somehow specific to Titan atmosphere. 388 395 REAL(kind=mm_wp), INTENT(in), DIMENSION(:) :: temp !! Temperatures (K). … … 391 398 REAL(kind=mm_wp), DIMENSION(SIZE(temp)) :: res !! Molar mixing ratios of the specie. 392 399 393 ! Fray and Schmidt (2009)394 400 IF(xESP%name == "C2H2") THEN 401 ! Fray and Schmidt (2009) 395 402 res = (1.0e5 / pres) * exp(1.340e1 - 2.536e3/temp) 396 403 397 404 ELSE IF(xESP%name == "C2H6") THEN 405 ! Fray and Schmidt (2009) 398 406 res = (1.0e5 / pres) * exp(1.511e1 - 2.207e3/temp - 2.411e4/temp**2 + 7.744e5/temp**3 - 1.161e7/temp**4 + 6.763e7/temp**5) 399 407 400 408 ELSE IF(xESP%name == "HCN") THEN 409 ! Fray and Schmidt (2009) 401 410 res = (1.0e5 / pres) * exp(1.393e1 - 3.624e3/temp - 1.325e5/temp**2 + 6.314e6/temp**3 - 1.128e8/temp**4) 402 411 … … 404 413 ELSE IF (xESP%name == "CH4") THEN 405 414 res = (1.0e5 / pres) * exp(1.051e1 - 1.110e3/temp - 4.341e3/temp**2 + 1.035e5/temp**3 - 7.910e5/temp**4) 406 res = res * 0.85_mm_wp 407 !WHERE (res(:) < 0.014) res(:) = 0.014 415 ! Peculiar case of CH4 : x0.80 (dissolution in N2) 416 res = res * 0.80_mm_wp 417 ! Forcing CH4 to 1.4% minimum 418 WHERE (res(:) < 0.014) res(:) = 0.014 408 419 ENDIF 409 420 END FUNCTION ysatX_ve -
trunk/LMDZ.TITAN/libf/muphytitan/mm_microphysic.f90
r3083 r3090 1 ! Copyright 2013-2015,2017,2022Université de Reims Champagne-Ardenne2 ! Contributor : J. Burgalat(GSMA, URCA)1 ! Copyright (2013-2015,2017,2022-2023) Université de Reims Champagne-Ardenne 2 ! Contributors : J. Burgalat (GSMA, URCA), B. de Batz de Trenquelléon (GSMA, URCA) 3 3 ! email of the author : jeremie.burgalat@univ-reims.fr 4 4 ! … … 35 35 !! brief: Microphysic processes interface module. 36 36 !! author: J. Burgalat 37 !! date: 2013-2015,2017,2022 37 !! date: 2013-2015,2017,2022-2023 38 !! modifications: B. de Batz de Trenquelléon 38 39 39 40 MODULE MM_MICROPHYSIC … … 114 115 dm0n = dm0n(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) 115 116 dm3n = dm3n(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) 116 ! sanity check for clouds tendencies : call mm_check_tendencies(mm_m0ccn,dm0n)117 ! sanity check for clouds tendencies : call mm_check_tendencies(mm_m3ccn,dm3n)118 117 DO i=1,mm_nesp 119 118 dm3i(:,i) = dm3i(mm_nla:1:-1,i) * mm_dzlev(mm_nla:1:-1) 120 ! sanity check for clouds tendencies : call mm_check_tendencies(mm_m3ice,dm3i)121 119 dgazs(:,i) = dgazs(mm_nla:1:-1,i) 122 ! no sanity check for gazs, let's prey.123 120 ENDDO 124 121 ELSE … … 130 127 dm0a_f = dm0a_f(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) 131 128 dm3a_f = dm3a_f(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) 132 ! sanity check133 ! sanity check : call mm_check_tendencies(mm_m0aer_s,dm0a_s)134 ! sanity check : call mm_check_tendencies(mm_m3aer_s,dm3a_s)135 ! sanity check : call mm_check_tendencies(mm_m0aer_f,dm0a_f)136 ! sanity check : call mm_check_tendencies(mm_m3aer_f,dm3a_f)137 129 RETURN 138 130 END FUNCTION muphys_all … … 168 160 dm0a_f = dm0a_f(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) 169 161 dm3a_f = dm3a_f(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) 170 ! sanity check171 ! sanity check : call mm_check_tendencies(mm_m0aer_s,dm0a_s)172 ! sanity check : call mm_check_tendencies(mm_m3aer_s,dm3a_s)173 ! sanity check : call mm_check_tendencies(mm_m0aer_f,dm0a_f)174 ! sanity check : call mm_check_tendencies(mm_m3aer_f,dm3a_f)175 162 RETURN 176 163 END FUNCTION muphys_nocld … … 219 206 IF (PRESENT(ccn_prec)) ccn_prec = ABS(mm_ccn_prec) 220 207 IF (PRESENT(ice_prec)) ice_prec = ABS(mm_ice_prec) 221 IF (PRESENT(ccn_w)) ccn_w = mm_ccn_ w(mm_nla:1:-1)222 IF (PRESENT(ccn_flux)) ccn_flux = -mm_ccn_flux(mm_nla:1:-1)208 IF (PRESENT(ccn_w)) ccn_w = mm_ccn_vsed(mm_nla:1:-1) 209 IF (PRESENT(ccn_flux)) ccn_flux = mm_ccn_flux(mm_nla:1:-1) 223 210 IF (PRESENT(ice_fluxes)) ice_fluxes = mm_ice_fluxes(mm_nla:1:-1,:) 224 IF (PRESENT(gazs_sat)) gazs_sat = 211 IF (PRESENT(gazs_sat)) gazs_sat = mm_gazs_sat(mm_nla:1:-1,:) 225 212 ELSE 226 213 IF (PRESENT(ccn_prec)) ccn_prec = 0._mm_wp -
trunk/LMDZ.TITAN/libf/muphytitan/mmp_gcm.f90
r3083 r3090 1 ! Copyright 2017Université de Reims Champagne-Ardenne2 ! Contributor : J. Burgalat(GSMA, URCA)1 ! Copyright (2017,2022-2023) Université de Reims Champagne-Ardenne 2 ! Contributors : J. Burgalat (GSMA, URCA), B. de Batz de Trenquelléon (GSMA, URCA) 3 3 ! email of the author : jeremie.burgalat@univ-reims.fr 4 4 ! … … 35 35 !! summary: YAMMS interfaces for the LMDZ GCM. 36 36 !! author: J. Burgalat 37 !! date: 2017 37 !! date: 2017,2022,2023 38 !! modifications: B. de Batz de Trenquelléon 38 39 MODULE MMP_GCM 39 40 !! Interface to YAMMS for the LMDZ GCM. … … 247 248 WRITE(*,'(a,L2)') "electric_charging : ", mmp_w_qe 248 249 call mm_dump_parameters() 249 250 250 IF (clouds) THEN 251 251 DO i=1, size(mm_xESPS) -
trunk/LMDZ.TITAN/libf/muphytitan/string_op.F90
r3083 r3090 1 ! Copyright (c) (2013-2015,2017 ) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr).1 ! Copyright (c) (2013-2015,2017,2022) Jeremie Burgalat (jeremie.burgalat@univ-reims.fr). 2 2 ! 3 3 ! This file is part of SWIFT
Note: See TracChangeset
for help on using the changeset viewer.