[4588] | 1 | MODULE lmdz_wake_ini |
---|
[4085] | 2 | IMPLICIT NONE |
---|
| 3 | |
---|
| 4 | ! ============================================================================ |
---|
| 5 | |
---|
| 6 | |
---|
| 7 | ! But : Decrire le comportement des poches froides apparaissant dans les |
---|
| 8 | ! grands systemes convectifs, et fournir l'energie disponible pour |
---|
| 9 | ! le declenchement de nouvelles colonnes convectives. |
---|
| 10 | |
---|
| 11 | ! State variables : |
---|
| 12 | ! deltatw : temperature difference between wake and off-wake regions |
---|
| 13 | ! deltaqw : specific humidity difference between wake and off-wake regions |
---|
| 14 | ! sigmaw : fractional area covered by wakes. |
---|
| 15 | ! wdens : number of wakes per unit area |
---|
| 16 | |
---|
| 17 | ! ------------------------------------------------------------------------- |
---|
[4230] | 18 | ! Declaration de variables |
---|
[4085] | 19 | ! ------------------------------------------------------------------------- |
---|
| 20 | |
---|
[4230] | 21 | ! Variables a fixer |
---|
[4085] | 22 | !jyg< |
---|
| 23 | !! REAL, SAVE :: stark, wdens_ref, coefgw, alpk |
---|
[4744] | 24 | INTEGER, SAVE, PROTECTED :: prt_level |
---|
| 25 | REAL, SAVE, PROTECTED, DIMENSION(2) :: wdens_ref |
---|
| 26 | REAL, SAVE, PROTECTED :: stark, coefgw, alpk, wk_pupper |
---|
[4085] | 27 | !>jyg |
---|
[4744] | 28 | REAL, SAVE, PROTECTED :: crep_upper, crep_sol |
---|
[4453] | 29 | !$OMP THREADPRIVATE(stark, wdens_ref, coefgw, alpk, wk_pupper, crep_upper, crep_sol) |
---|
[4085] | 30 | |
---|
[4744] | 31 | REAL, SAVE, PROTECTED :: tau_cv |
---|
[4085] | 32 | !$OMP THREADPRIVATE(tau_cv) |
---|
[4845] | 33 | |
---|
| 34 | REAL, SAVE, PROTECTED :: wk_delta_t_min |
---|
| 35 | !$OMP THREADPRIVATE(wk_delta_t_min) |
---|
| 36 | |
---|
| 37 | REAL, SAVE, PROTECTED :: wk_frac_int_delta_t |
---|
| 38 | !$OMP THREADPRIVATE(wk_frac_int_delta_t) |
---|
| 39 | |
---|
[4744] | 40 | REAL, SAVE, PROTECTED :: rzero, aa0 ! minimal wake radius and area |
---|
[4085] | 41 | !$OMP THREADPRIVATE(rzero, aa0) |
---|
| 42 | |
---|
[4744] | 43 | LOGICAL, SAVE, PROTECTED :: ok_bug_gfl |
---|
[4695] | 44 | !$OMP THREADPRIVATE(ok_bug_gfl) |
---|
[4744] | 45 | LOGICAL, SAVE, PROTECTED :: flag_wk_check_trgl |
---|
[4085] | 46 | !$OMP THREADPRIVATE(flag_wk_check_trgl) |
---|
[4744] | 47 | INTEGER, SAVE, PROTECTED :: iflag_wk_act |
---|
[4085] | 48 | !$OMP THREADPRIVATE(iflag_wk_act) |
---|
| 49 | |
---|
[4744] | 50 | INTEGER, SAVE, PROTECTED :: iflag_wk_check_trgl |
---|
[4085] | 51 | !$OMP THREADPRIVATE(iflag_wk_check_trgl) |
---|
[4744] | 52 | INTEGER, SAVE, PROTECTED :: iflag_wk_pop_dyn |
---|
[4085] | 53 | !$OMP THREADPRIVATE(iflag_wk_pop_dyn) |
---|
| 54 | |
---|
[4744] | 55 | INTEGER, SAVE, PROTECTED :: iflag_wk_profile |
---|
[4294] | 56 | !$OMP THREADPRIVATE(iflag_wk_profile) |
---|
| 57 | |
---|
[4908] | 58 | INTEGER, SAVE, PROTECTED :: wk_nsub |
---|
| 59 | !$OMP THREADPRIVATE(wk_nsub) |
---|
| 60 | |
---|
[4842] | 61 | INTEGER, SAVE, PROTECTED :: iflag_wk_new_ptop |
---|
| 62 | !$OMP THREADPRIVATE(iflag_wk_new_ptop) |
---|
| 63 | |
---|
[4744] | 64 | REAL, SAVE, PROTECTED :: wdensinit ! Minimum wake density used to restart wakes from a wake-free state |
---|
| 65 | !$OMP THREADPRIVATE(wdensinit) |
---|
| 66 | REAL, SAVE, PROTECTED :: wdensthreshold ! Threshold wake density below which wakes are killed |
---|
| 67 | !$OMP THREADPRIVATE(wdensthreshold) |
---|
| 68 | REAL, SAVE, PROTECTED :: sigmad, hwmin, wapecut, cstart |
---|
[4085] | 69 | !$OMP THREADPRIVATE(sigmad, hwmin, wapecut, cstart) |
---|
[4744] | 70 | REAL, SAVE, PROTECTED :: sigmaw_max |
---|
[4085] | 71 | !$OMP THREADPRIVATE(sigmaw_max) |
---|
[4744] | 72 | REAL, SAVE, PROTECTED :: dens_rate |
---|
[4085] | 73 | !$OMP THREADPRIVATE(dens_rate) |
---|
[4744] | 74 | REAL, SAVE, PROTECTED :: epsilon_loc |
---|
[4085] | 75 | !$OMP THREADPRIVATE(epsilon_loc) |
---|
[4744] | 76 | REAL, SAVE, PROTECTED :: epsim1,RG,RD |
---|
[4085] | 77 | !$OMP THREADPRIVATE(epsim1,RG,RD) |
---|
[4744] | 78 | REAL, SAVE, PROTECTED ::smallestreal |
---|
| 79 | !$OMP THREADPRIVATE(smallestreal) |
---|
[4908] | 80 | REAL, SAVE, PROTECTED :: wk_int_delta_t_min |
---|
| 81 | !$OMP THREADPRIVATE(wk_int_delta_t_min) |
---|
[4085] | 82 | |
---|
| 83 | |
---|
| 84 | |
---|
| 85 | CONTAINS |
---|
| 86 | |
---|
| 87 | ! ========================================================================= |
---|
| 88 | SUBROUTINE wake_ini(rg_in,rd_in,rv_in,prt_lev) |
---|
| 89 | ! ========================================================================= |
---|
| 90 | |
---|
| 91 | ! ************************************************************** |
---|
| 92 | ! * |
---|
| 93 | ! WAKE * |
---|
| 94 | ! retour a un Pupper fixe * |
---|
| 95 | ! * |
---|
| 96 | ! written by : GRANDPEIX Jean-Yves 09/03/2000 * |
---|
| 97 | ! modified by : ROEHRIG Romain 01/29/2007 * |
---|
| 98 | ! ************************************************************** |
---|
| 99 | |
---|
| 100 | ! ------------------------------------------------------------------------- |
---|
| 101 | ! Initialisations |
---|
| 102 | ! ------------------------------------------------------------------------- |
---|
| 103 | |
---|
| 104 | USE ioipsl_getin_p_mod, ONLY : getin_p |
---|
| 105 | real eps |
---|
| 106 | integer, intent(in) :: prt_lev |
---|
| 107 | real, intent(in) :: rg_in,rd_in,rv_in |
---|
| 108 | |
---|
[4744] | 109 | smallestreal=tiny(smallestreal) |
---|
| 110 | ! |
---|
[4085] | 111 | prt_level=prt_lev |
---|
| 112 | epsilon_loc=1.E-15 |
---|
| 113 | wapecut=1. ! previously 5. |
---|
[4744] | 114 | ! |
---|
| 115 | rzero = 5000. |
---|
| 116 | CALL getin_p('rzero_wk', rzero) |
---|
| 117 | aa0 = 3.14*rzero*rzero |
---|
| 118 | ! |
---|
[4085] | 119 | ! Essais d'initialisation avec sigmaw = 0.02 et hw = 10. |
---|
[4744] | 120 | !! sigmad=0.005 |
---|
[4085] | 121 | sigmad=0.02 |
---|
[4744] | 122 | CALL getin_p('sigmad', sigmad) |
---|
[4085] | 123 | hwmin=10. |
---|
[4744] | 124 | ! |
---|
| 125 | !!wdensthreshold=1.e-12 |
---|
| 126 | wdensthreshold=1.e-14 |
---|
| 127 | wdensthreshold=2.e-14 |
---|
| 128 | CALL getin_p('wdensthreshold', wdensthreshold) |
---|
| 129 | ! |
---|
| 130 | IF (sigmad < 0.) THEN |
---|
| 131 | sigmad = abs(sigmad) |
---|
| 132 | !! wdensmin=sigmad/(3.14*rzero**2) |
---|
| 133 | wdensinit=sigmad/(3.14*rzero**2) |
---|
| 134 | ELSE |
---|
| 135 | wdensinit = wdensthreshold/2. |
---|
| 136 | ENDIF |
---|
| 137 | ! |
---|
| 138 | ! |
---|
[4085] | 139 | ! cc nrlmd |
---|
| 140 | sigmaw_max=0.4 |
---|
| 141 | dens_rate=0.1 |
---|
| 142 | |
---|
| 143 | eps = rd_in/rv_in |
---|
| 144 | epsim1 = 1.0/eps - 1.0 |
---|
| 145 | RG=rg_in |
---|
| 146 | RD=rd_in |
---|
| 147 | |
---|
| 148 | |
---|
| 149 | ! cc |
---|
| 150 | ! Longueur de maille (en m) |
---|
| 151 | ! ------------------------------------------------------------------------- |
---|
| 152 | |
---|
| 153 | ! ALON = 3.e5 |
---|
| 154 | ! alon = 1.E6 |
---|
| 155 | |
---|
| 156 | ! Configuration de coefgw,stark,wdens (22/02/06 by YU Jingmei) |
---|
| 157 | |
---|
[4230] | 158 | ! coefgw : Coefficient pour les ondes de gravite |
---|
[4085] | 159 | ! stark : Coefficient k dans Cstar=k*sqrt(2*WAPE) |
---|
[4230] | 160 | ! wdens : Densite surfacique de poche froide |
---|
[4085] | 161 | ! ------------------------------------------------------------------------- |
---|
| 162 | |
---|
| 163 | ! cc nrlmd coefgw=10 |
---|
| 164 | ! coefgw=1 |
---|
| 165 | ! wdens0 = 1.0/(alon**2) |
---|
| 166 | ! cc nrlmd wdens = 1.0/(alon**2) |
---|
| 167 | ! cc nrlmd stark = 0.50 |
---|
| 168 | ! CRtest |
---|
| 169 | ! cc nrlmd alpk=0.1 |
---|
| 170 | ! alpk = 1.0 |
---|
| 171 | ! alpk = 0.5 |
---|
| 172 | ! alpk = 0.05 |
---|
| 173 | |
---|
| 174 | |
---|
| 175 | |
---|
| 176 | crep_upper = 0.9 |
---|
| 177 | crep_sol = 1.0 |
---|
| 178 | |
---|
[4695] | 179 | ! Flag concerning the bug in gfl computation |
---|
| 180 | ok_bug_gfl = .True. |
---|
| 181 | call getin_p('ok_bug_gfl', ok_bug_gfl) |
---|
| 182 | |
---|
[4085] | 183 | ! Get wapecut from parameter file |
---|
| 184 | wapecut = 1. |
---|
| 185 | |
---|
| 186 | print*,'wapecut',wapecut |
---|
| 187 | CALL getin_p('wapecut', wapecut) |
---|
| 188 | print*,'wapecut',wapecut |
---|
| 189 | |
---|
| 190 | ! cc nrlmd Lecture du fichier wake_param.data |
---|
| 191 | |
---|
| 192 | |
---|
| 193 | ! cc nrlmd Lecture du fichier wake_param.data |
---|
| 194 | stark=0.33 |
---|
| 195 | CALL getin_p('stark',stark) |
---|
| 196 | cstart = stark*sqrt(2.*wapecut) |
---|
| 197 | |
---|
| 198 | alpk=0.25 |
---|
| 199 | CALL getin_p('alpk',alpk) |
---|
[4230] | 200 | |
---|
[4453] | 201 | wk_pupper=0.6 |
---|
| 202 | CALL getin_p('wk_pupper',wk_pupper) |
---|
[4230] | 203 | |
---|
| 204 | |
---|
[4085] | 205 | !jyg< |
---|
| 206 | !! wdens_ref=8.E-12 |
---|
| 207 | !! CALL getin_p('wdens_ref',wdens_ref) |
---|
| 208 | wdens_ref(1)=8.E-12 |
---|
| 209 | wdens_ref(2)=8.E-12 |
---|
| 210 | CALL getin_p('wdens_ref_o',wdens_ref(1)) !wake number per unit area ; ocean |
---|
| 211 | CALL getin_p('wdens_ref_l',wdens_ref(2)) !wake number per unit area ; land |
---|
| 212 | !>jyg |
---|
| 213 | ! |
---|
| 214 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 215 | !!!!!!!!! Population dynamics parameters !!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 216 | !------------------------------------------------------------------------ |
---|
| 217 | |
---|
| 218 | iflag_wk_pop_dyn = 0 |
---|
| 219 | CALL getin_p('iflag_wk_pop_dyn',iflag_wk_pop_dyn) ! switch between wdens prescribed |
---|
| 220 | ! and wdens prognostic |
---|
| 221 | iflag_wk_act = 0 |
---|
| 222 | CALL getin_p('iflag_wk_act',iflag_wk_act) ! 0: act(:)=0. |
---|
| 223 | ! 1: act(:)=1. |
---|
| 224 | ! 2: act(:)=f(Wape) |
---|
| 225 | |
---|
[4294] | 226 | iflag_wk_profile = 0 |
---|
| 227 | CALL getin_p('iflag_wk_profile',iflag_wk_profile) ! switch between wdens prescribed |
---|
| 228 | ! and wdens prognostic |
---|
[4845] | 229 | ! iflag_wk_profile = 0 |
---|
| 230 | iflag_wk_new_ptop = 0 |
---|
[4842] | 231 | CALL getin_p('iflag_wk_new_ptop',iflag_wk_new_ptop) |
---|
| 232 | |
---|
[4908] | 233 | wk_nsub = 10 |
---|
| 234 | CALL getin_p('wk_nsub',wk_nsub) |
---|
| 235 | |
---|
[4085] | 236 | tau_cv = 4000. |
---|
| 237 | CALL getin_p('tau_cv', tau_cv) |
---|
[4845] | 238 | |
---|
| 239 | wk_delta_t_min = 0. |
---|
| 240 | CALL getin_p('wk_delta_t_min', wk_delta_t_min) |
---|
| 241 | |
---|
[4908] | 242 | wk_int_delta_t_min = 10. |
---|
| 243 | CALL getin_p('wk_int_delta_t_min', wk_int_delta_t_min) |
---|
| 244 | |
---|
[4845] | 245 | wk_frac_int_delta_t = 0.9 |
---|
| 246 | CALL getin_p('wk_frac_int_delta_t', wk_frac_int_delta_t) |
---|
[4085] | 247 | |
---|
[4845] | 248 | |
---|
[4085] | 249 | !------------------------------------------------------------------------ |
---|
| 250 | |
---|
| 251 | coefgw=4. |
---|
| 252 | CALL getin_p('coefgw',coefgw) |
---|
| 253 | |
---|
| 254 | WRITE(*,*) 'stark=', stark |
---|
| 255 | WRITE(*,*) 'alpk=', alpk |
---|
[4453] | 256 | WRITE(*,*) 'wk_pupper=', wk_pupper |
---|
[4085] | 257 | !jyg< |
---|
| 258 | !! WRITE(*,*) 'wdens_ref=', wdens_ref |
---|
| 259 | WRITE(*,*) 'wdens_ref_o=', wdens_ref(1) |
---|
| 260 | WRITE(*,*) 'wdens_ref_l=', wdens_ref(2) |
---|
| 261 | !>jyg |
---|
| 262 | WRITE(*,*) 'iflag_wk_pop_dyn=',iflag_wk_pop_dyn |
---|
| 263 | WRITE(*,*) 'iflag_wk_act',iflag_wk_act |
---|
| 264 | WRITE(*,*) 'coefgw=', coefgw |
---|
| 265 | |
---|
| 266 | flag_wk_check_trgl=.false. |
---|
| 267 | CALL getin_p('flag_wk_check_trgl ', flag_wk_check_trgl) |
---|
| 268 | WRITE(*,*) 'flag_wk_check_trgl=', flag_wk_check_trgl |
---|
| 269 | WRITE(*,*) 'flag_wk_check_trgl OBSOLETE. Utilisr iflag_wk_check_trgl plutot' |
---|
| 270 | iflag_wk_check_trgl=0 ; IF (flag_wk_check_trgl) iflag_wk_check_trgl=1 |
---|
| 271 | CALL getin_p('iflag_wk_check_trgl ', iflag_wk_check_trgl) |
---|
| 272 | WRITE(*,*) 'iflag_wk_check_trgl=', iflag_wk_check_trgl |
---|
[4845] | 273 | |
---|
| 274 | WRITE(*,*) 'wk_delta_t_min=', wk_delta_t_min |
---|
[4908] | 275 | WRITE(*,*) 'wk_int_delta_t_min=', wk_int_delta_t_min |
---|
[4845] | 276 | WRITE(*,*) 'wk_frac_int_delta_t=', wk_frac_int_delta_t |
---|
| 277 | WRITE(*,*) 'iflag_wk_new_ptop=', iflag_wk_new_ptop |
---|
[4908] | 278 | WRITE(*,*) 'wk_nsub=', wk_nsub |
---|
[4085] | 279 | |
---|
| 280 | RETURN |
---|
| 281 | |
---|
| 282 | END SUBROUTINE wake_ini |
---|
| 283 | |
---|
[4744] | 284 | |
---|
| 285 | |
---|
[4588] | 286 | END MODULE lmdz_wake_ini |
---|