[2418] | 1 | ! |
---|
[1279] | 2 | ! $Id: physiq_mod.F90 2925 2017-06-30 10:17:42Z oboucher $ |
---|
[2418] | 3 | ! |
---|
[1862] | 4 | !#define IO_DEBUG |
---|
[2418] | 5 | MODULE physiq_mod |
---|
[766] | 6 | |
---|
[2469] | 7 | IMPLICIT NONE |
---|
[2418] | 8 | |
---|
| 9 | CONTAINS |
---|
| 10 | |
---|
[2469] | 11 | SUBROUTINE physiq (nlon,nlev, & |
---|
| 12 | debut,lafin,pdtphys_, & |
---|
| 13 | paprs,pplay,pphi,pphis,presnivs, & |
---|
| 14 | u,v,rot,t,qx, & |
---|
| 15 | flxmass_w, & |
---|
| 16 | d_u, d_v, d_t, d_qx, d_ps) |
---|
[524] | 17 | |
---|
[2769] | 18 | use assert_m, only: assert |
---|
[2469] | 19 | USE ioipsl, only: histbeg, histvert, histdef, histend, histsync, & |
---|
| 20 | histwrite, ju2ymds, ymds2ju, getin |
---|
| 21 | USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg |
---|
| 22 | USE phys_cal_mod, only: year_len, mth_len, days_elapsed, jh_1jan, & |
---|
[2783] | 23 | year_cur, mth_cur,jD_cur, jH_cur, jD_ref, day_cur, hour |
---|
[2469] | 24 | USE write_field_phy |
---|
| 25 | USE dimphy |
---|
| 26 | USE infotrac_phy, ONLY: nqtot, nbtr, nqo, type_trac |
---|
| 27 | USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev, klon_glo |
---|
| 28 | USE mod_phys_lmdz_para |
---|
| 29 | USE iophy |
---|
| 30 | USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level |
---|
| 31 | USE phystokenc_mod, ONLY: offline, phystokenc |
---|
[2783] | 32 | USE time_phylmdz_mod, only: raz_date, day_step_phy, update_time,current_time |
---|
[2469] | 33 | USE vampir |
---|
| 34 | USE pbl_surface_mod, ONLY : pbl_surface |
---|
| 35 | USE change_srf_frac_mod |
---|
| 36 | USE surface_data, ONLY : type_ocean, ok_veget, ok_snow |
---|
[2788] | 37 | USE tropopause_m, ONLY: dyn_tropopause |
---|
[2630] | 38 | #ifdef CPP_Dust |
---|
| 39 | USE phytracr_spl_mod, ONLY: phytracr_spl |
---|
| 40 | #endif |
---|
[2606] | 41 | USE phys_local_var_mod, ONLY: phys_local_var_init, phys_local_var_end, & |
---|
| 42 | ! [Variables internes non sauvegardees de la physique] |
---|
| 43 | ! Variables locales pour effectuer les appels en serie |
---|
| 44 | t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,tr_seri, & |
---|
| 45 | ! Dynamic tendencies (diagnostics) |
---|
| 46 | d_t_dyn,d_q_dyn,d_ql_dyn,d_qs_dyn,d_u_dyn,d_v_dyn,d_tr_dyn, & |
---|
| 47 | d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d, & |
---|
| 48 | ! Physic tendencies |
---|
| 49 | d_t_con,d_q_con,d_u_con,d_v_con, & |
---|
| 50 | d_tr, & !! to be removed?? (jyg) |
---|
| 51 | d_t_wake,d_q_wake, & |
---|
| 52 | d_t_lwr,d_t_lw0,d_t_swr,d_t_sw0, & |
---|
| 53 | d_t_ajsb,d_q_ajsb, & |
---|
| 54 | d_t_ajs,d_q_ajs,d_u_ajs,d_v_ajs, & |
---|
| 55 | d_t_ajs_w,d_q_ajs_w, & |
---|
| 56 | d_t_ajs_x,d_q_ajs_x, & |
---|
| 57 | ! |
---|
[2705] | 58 | d_t_eva,d_q_eva,d_ql_eva,d_qi_eva, & |
---|
[2606] | 59 | d_t_lsc,d_q_lsc,d_ql_lsc,d_qi_lsc, & |
---|
| 60 | d_t_lscst,d_q_lscst, & |
---|
| 61 | d_t_lscth,d_q_lscth, & |
---|
| 62 | plul_st,plul_th, & |
---|
| 63 | ! |
---|
| 64 | d_t_vdf,d_q_vdf,d_u_vdf,d_v_vdf,d_t_diss, & |
---|
| 65 | d_t_vdf_w,d_q_vdf_w, & |
---|
| 66 | d_t_vdf_x,d_q_vdf_x, & |
---|
| 67 | d_ts, & |
---|
| 68 | ! |
---|
| 69 | d_t_oli,d_u_oli,d_v_oli, & |
---|
| 70 | d_t_oro,d_u_oro,d_v_oro, & |
---|
[2897] | 71 | d_t_oro_gw,d_u_oro_gw,d_v_oro_gw, & |
---|
[2606] | 72 | d_t_lif,d_u_lif,d_v_lif, & |
---|
| 73 | d_t_ec, & |
---|
| 74 | ! |
---|
| 75 | du_gwd_hines,dv_gwd_hines,d_t_hin, & |
---|
| 76 | dv_gwd_rando,dv_gwd_front, & |
---|
| 77 | east_gwstress,west_gwstress, & |
---|
| 78 | d_q_ch4, & |
---|
| 79 | ! Special RRTM |
---|
| 80 | ZLWFT0_i,ZSWFT0_i,ZFLDN0, & |
---|
| 81 | ZFLUP0,ZFSDN0,ZFSUP0, & |
---|
| 82 | ! |
---|
| 83 | topswad_aero,solswad_aero, & |
---|
| 84 | topswai_aero,solswai_aero, & |
---|
| 85 | topswad0_aero,solswad0_aero, & |
---|
| 86 | !LW additional |
---|
| 87 | toplwad_aero,sollwad_aero, & |
---|
| 88 | toplwai_aero,sollwai_aero, & |
---|
| 89 | toplwad0_aero,sollwad0_aero, & |
---|
| 90 | ! |
---|
| 91 | topsw_aero,solsw_aero, & |
---|
| 92 | topsw0_aero,solsw0_aero, & |
---|
| 93 | topswcf_aero,solswcf_aero, & |
---|
| 94 | tausum_aero,tau3d_aero, & |
---|
[2854] | 95 | drytausum_aero, & |
---|
[2606] | 96 | ! |
---|
| 97 | !variables CFMIP2/CMIP5 |
---|
| 98 | topswad_aerop, solswad_aerop, & |
---|
| 99 | topswai_aerop, solswai_aerop, & |
---|
| 100 | topswad0_aerop, solswad0_aerop, & |
---|
| 101 | topsw_aerop, topsw0_aerop, & |
---|
| 102 | solsw_aerop, solsw0_aerop, & |
---|
| 103 | topswcf_aerop, solswcf_aerop, & |
---|
| 104 | !LW diagnostics |
---|
| 105 | toplwad_aerop, sollwad_aerop, & |
---|
| 106 | toplwai_aerop, sollwai_aerop, & |
---|
| 107 | toplwad0_aerop, sollwad0_aerop, & |
---|
| 108 | ! |
---|
| 109 | ptstar, pt0, slp, & |
---|
| 110 | ! |
---|
| 111 | bils, & |
---|
| 112 | ! |
---|
| 113 | cldh, cldl,cldm, cldq, cldt, & |
---|
| 114 | JrNt, & |
---|
| 115 | dthmin, evap, fder, plcl, plfc, & |
---|
| 116 | prw, prlw, prsw, & |
---|
| 117 | s_lcl, s_pblh, s_pblt, s_therm, & |
---|
| 118 | cdragm, cdragh, & |
---|
| 119 | zustar, zu10m, zv10m, rh2m, qsat2m, & |
---|
| 120 | zq2m, zt2m, weak_inversion, & |
---|
| 121 | zt2m_min_mon, zt2m_max_mon, & ! pour calcul_divers.h |
---|
| 122 | t2m_min_mon, t2m_max_mon, & ! pour calcul_divers.h |
---|
| 123 | ! |
---|
| 124 | s_pblh_x, s_pblh_w, & |
---|
| 125 | s_lcl_x, s_lcl_w, & |
---|
| 126 | ! |
---|
| 127 | slab_wfbils, tpot, tpote, & |
---|
| 128 | ue, uq, ve, vq, zxffonte, & |
---|
| 129 | zxfqcalving, zxfluxlat, & |
---|
| 130 | zxrunofflic, & |
---|
| 131 | zxtsol, snow_lsc, zxfqfonte, zxqsurf, & |
---|
| 132 | rain_lsc, rain_num, & |
---|
| 133 | ! |
---|
| 134 | sens_x, sens_w, & |
---|
| 135 | zxfluxlat_x, zxfluxlat_w, & |
---|
| 136 | ! |
---|
| 137 | dtvdf_x, dtvdf_w, & |
---|
| 138 | dqvdf_x, dqvdf_w, & |
---|
| 139 | pbl_tke_input, & |
---|
| 140 | t_therm, q_therm, u_therm, v_therm, & |
---|
| 141 | cdragh_x, cdragh_w, & |
---|
| 142 | cdragm_x, cdragm_w, & |
---|
| 143 | kh, kh_x, kh_w, & |
---|
| 144 | ! |
---|
[2730] | 145 | wake_k, & |
---|
[2606] | 146 | ale_wake, alp_wake, & |
---|
[2635] | 147 | wake_h, wake_omg, & |
---|
| 148 | ! tendencies of delta T and delta q: |
---|
| 149 | d_deltat_wk, d_deltaq_wk, & ! due to wakes |
---|
| 150 | d_deltat_wk_gw, d_deltaq_wk_gw, & ! due to wake induced gravity waves |
---|
| 151 | d_deltat_vdf, d_deltaq_vdf, & ! due to vertical diffusion |
---|
| 152 | d_deltat_the, d_deltaq_the, & ! due to thermals |
---|
| 153 | d_deltat_ajs_cv, d_deltaq_ajs_cv, & ! due to dry adjustment of (w) before convection |
---|
| 154 | ! tendencies of wake fractional area and wake number per unit area: |
---|
| 155 | d_s_wk, d_dens_wk, & ! due to wakes |
---|
| 156 | !!! d_s_vdf, d_dens_vdf, & ! due to vertical diffusion |
---|
| 157 | !!! d_s_the, d_dens_the, & ! due to thermals |
---|
| 158 | ! |
---|
[2877] | 159 | ptconv, & |
---|
[2824] | 160 | wbeff, convoccur, zmax_th, & |
---|
[2606] | 161 | sens, flwp, fiwp, & |
---|
| 162 | ale_bl_stat,alp_bl_conv,alp_bl_det, & |
---|
| 163 | alp_bl_fluct_m,alp_bl_fluct_tke, & |
---|
| 164 | alp_bl_stat, n2, s2, & |
---|
| 165 | proba_notrig, random_notrig, & |
---|
| 166 | ! |
---|
| 167 | dnwd, dnwd0, & |
---|
| 168 | upwd, omega, & |
---|
| 169 | epmax_diag, & |
---|
| 170 | ep, & |
---|
| 171 | cldemi, & |
---|
| 172 | cldfra, cldtau, fiwc, & |
---|
| 173 | fl, re, flwc, & |
---|
| 174 | ref_liq, ref_ice, theta, & |
---|
| 175 | ref_liq_pi, ref_ice_pi, & |
---|
[2635] | 176 | zphi, zx_rh, & |
---|
[2606] | 177 | pmfd, pmfu, & |
---|
| 178 | ! |
---|
| 179 | t2m, fluxlat, & |
---|
| 180 | fsollw, evap_pot, & |
---|
| 181 | fsolsw, wfbils, wfbilo, & |
---|
[2670] | 182 | wfevap, wfrain, wfsnow, & |
---|
[2606] | 183 | pmflxr, pmflxs, prfl, & |
---|
| 184 | psfl, fraca, Vprecip, & |
---|
| 185 | zw2, & |
---|
| 186 | |
---|
| 187 | fluxu, fluxv, & |
---|
| 188 | fluxt, & |
---|
| 189 | |
---|
| 190 | uwriteSTD, vwriteSTD, & !pour calcul_STDlev.h |
---|
| 191 | wwriteSTD, phiwriteSTD, & !pour calcul_STDlev.h |
---|
| 192 | qwriteSTD, twriteSTD, rhwriteSTD, & !pour calcul_STDlev.h |
---|
| 193 | |
---|
| 194 | wdtrainA, wdtrainM, & |
---|
| 195 | beta_prec, & |
---|
| 196 | rneb, & |
---|
[2788] | 197 | zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic, & |
---|
| 198 | pr_tropopause |
---|
[2606] | 199 | ! |
---|
[2469] | 200 | USE phys_state_var_mod ! Variables sauvegardees de la physique |
---|
[2630] | 201 | #ifdef CPP_Dust |
---|
| 202 | USE phys_output_write_spl_mod |
---|
| 203 | #else |
---|
[2469] | 204 | USE phys_output_var_mod ! Variables pour les ecritures des sorties |
---|
[2630] | 205 | #endif |
---|
| 206 | |
---|
[2469] | 207 | USE phys_output_write_mod |
---|
| 208 | USE fonte_neige_mod, ONLY : fonte_neige_get_vars |
---|
| 209 | USE phys_output_mod |
---|
| 210 | USE phys_output_ctrlout_mod |
---|
| 211 | use open_climoz_m, only: open_climoz ! ozone climatology from a file |
---|
[2788] | 212 | use regr_pr_time_av_m, only: regr_pr_time_av |
---|
[2469] | 213 | use netcdf95, only: nf95_close |
---|
| 214 | !IM for NMC files |
---|
| 215 | ! use netcdf, only: nf90_fill_real |
---|
| 216 | use netcdf |
---|
| 217 | use mod_phys_lmdz_mpi_data, only: is_mpi_root |
---|
| 218 | USE aero_mod |
---|
| 219 | use ozonecm_m, only: ozonecm ! ozone of J.-F. Royer |
---|
| 220 | use conf_phys_m, only: conf_phys |
---|
| 221 | use radlwsw_m, only: radlwsw |
---|
| 222 | use phyaqua_mod, only: zenang_an |
---|
| 223 | USE time_phylmdz_mod, only: day_step_phy, annee_ref, day_ref, itau_phy, & |
---|
| 224 | start_time, pdtphys, day_ini |
---|
| 225 | USE tracinca_mod, ONLY: config_inca |
---|
[2271] | 226 | #ifdef CPP_XIOS |
---|
[2469] | 227 | USE wxios, ONLY: missing_val, missing_val_omp |
---|
[2679] | 228 | USE xios, ONLY: xios_get_field_attr, xios_field_is_active |
---|
[2271] | 229 | #endif |
---|
[1565] | 230 | #ifdef REPROBUS |
---|
[2469] | 231 | USE CHEM_REP, ONLY : Init_chem_rep_xjour |
---|
[1565] | 232 | #endif |
---|
[2469] | 233 | USE indice_sol_mod |
---|
| 234 | USE phytrac_mod, ONLY : phytrac |
---|
[782] | 235 | |
---|
[2009] | 236 | #ifdef CPP_RRTM |
---|
[2517] | 237 | USE YOERAD, ONLY : NRADLP |
---|
[2524] | 238 | USE YOESW, ONLY : RSUN |
---|
[2009] | 239 | #endif |
---|
[2469] | 240 | USE ioipsl_getin_p_mod, ONLY : getin_p |
---|
[2003] | 241 | |
---|
[2651] | 242 | #ifndef CPP_XIOS |
---|
[2590] | 243 | USE paramLMDZ_phy_mod |
---|
[2651] | 244 | #endif |
---|
[2294] | 245 | |
---|
[2611] | 246 | USE cmp_seri_mod |
---|
[2925] | 247 | USE add_phys_tend_mod, only : add_pbl_tend, add_phys_tend, diag_phys_tend, prt_enerbil, & |
---|
[2799] | 248 | & fl_ebil, fl_cor_ebil |
---|
[2611] | 249 | |
---|
[2469] | 250 | !IM stations CFMIP |
---|
| 251 | USE CFMIP_point_locations |
---|
| 252 | use FLOTT_GWD_rando_m, only: FLOTT_GWD_rando |
---|
| 253 | use ACAMA_GWD_rando_m, only: ACAMA_GWD_rando |
---|
[2832] | 254 | USE VERTICAL_LAYERS_MOD, ONLY: aps,bps |
---|
[1938] | 255 | |
---|
[2832] | 256 | |
---|
[2469] | 257 | IMPLICIT none |
---|
| 258 | !>====================================================================== |
---|
| 259 | !! |
---|
| 260 | !! Auteur(s) Z.X. Li (LMD/CNRS) date: 19930818 |
---|
| 261 | !! |
---|
| 262 | !! Objet: Moniteur general de la physique du modele |
---|
| 263 | !!AA Modifications quant aux traceurs : |
---|
| 264 | !!AA - uniformisation des parametrisations ds phytrac |
---|
| 265 | !!AA - stockage des moyennes des champs necessaires |
---|
| 266 | !!AA en mode traceur off-line |
---|
| 267 | !!====================================================================== |
---|
| 268 | !! CLEFS CPP POUR LES IO |
---|
| 269 | !! ===================== |
---|
[1352] | 270 | #define histNMC |
---|
[2469] | 271 | !!====================================================================== |
---|
| 272 | !! modif ( P. Le Van , 12/10/98 ) |
---|
| 273 | !! |
---|
| 274 | !! Arguments: |
---|
| 275 | !! |
---|
| 276 | !! nlon----input-I-nombre de points horizontaux |
---|
| 277 | !! nlev----input-I-nombre de couches verticales, doit etre egale a klev |
---|
| 278 | !! debut---input-L-variable logique indiquant le premier passage |
---|
| 279 | !! lafin---input-L-variable logique indiquant le dernier passage |
---|
| 280 | !! jD_cur -R-jour courant a l'appel de la physique (jour julien) |
---|
| 281 | !! jH_cur -R-heure courante a l'appel de la physique (jour julien) |
---|
| 282 | !! pdtphys-input-R-pas d'integration pour la physique (seconde) |
---|
| 283 | !! paprs---input-R-pression pour chaque inter-couche (en Pa) |
---|
| 284 | !! pplay---input-R-pression pour le mileu de chaque couche (en Pa) |
---|
| 285 | !! pphi----input-R-geopotentiel de chaque couche (g z) (reference sol) |
---|
| 286 | !! pphis---input-R-geopotentiel du sol |
---|
| 287 | !! presnivs-input_R_pressions approximat. des milieux couches ( en PA) |
---|
| 288 | !! u-------input-R-vitesse dans la direction X (de O a E) en m/s |
---|
| 289 | !! v-------input-R-vitesse Y (de S a N) en m/s |
---|
| 290 | !! t-------input-R-temperature (K) |
---|
| 291 | !! qx------input-R-humidite specifique (kg/kg) et d'autres traceurs |
---|
| 292 | !! d_t_dyn-input-R-tendance dynamique pour "t" (K/s) |
---|
| 293 | !! d_q_dyn-input-R-tendance dynamique pour "q" (kg/kg/s) |
---|
[2496] | 294 | !! d_ql_dyn-input-R-tendance dynamique pour "ql" (kg/kg/s) |
---|
| 295 | !! d_qs_dyn-input-R-tendance dynamique pour "qs" (kg/kg/s) |
---|
[2469] | 296 | !! flxmass_w -input-R- flux de masse verticale |
---|
| 297 | !! d_u-----output-R-tendance physique de "u" (m/s/s) |
---|
| 298 | !! d_v-----output-R-tendance physique de "v" (m/s/s) |
---|
| 299 | !! d_t-----output-R-tendance physique de "t" (K/s) |
---|
| 300 | !! d_qx----output-R-tendance physique de "qx" (kg/kg/s) |
---|
| 301 | !! d_ps----output-R-tendance physique de la pression au sol |
---|
| 302 | !!====================================================================== |
---|
| 303 | integer jjmp1 |
---|
| 304 | ! parameter (jjmp1=jjm+1-1/jjm) ! => (jjmp1=nbp_lat-1/(nbp_lat-1)) |
---|
| 305 | ! integer iip1 |
---|
| 306 | ! parameter (iip1=iim+1) |
---|
[782] | 307 | |
---|
[2469] | 308 | include "regdim.h" |
---|
| 309 | include "dimsoil.h" |
---|
| 310 | include "clesphys.h" |
---|
| 311 | include "thermcell.h" |
---|
| 312 | !====================================================================== |
---|
| 313 | LOGICAL ok_cvl ! pour activer le nouveau driver pour convection KE |
---|
| 314 | PARAMETER (ok_cvl=.TRUE.) |
---|
| 315 | LOGICAL ok_gust ! pour activer l'effet des gust sur flux surface |
---|
| 316 | PARAMETER (ok_gust=.FALSE.) |
---|
| 317 | integer iflag_radia ! active ou non le rayonnement (MPL) |
---|
| 318 | save iflag_radia |
---|
| 319 | !$OMP THREADPRIVATE(iflag_radia) |
---|
| 320 | !====================================================================== |
---|
| 321 | LOGICAL check ! Verifier la conservation du modele en eau |
---|
| 322 | PARAMETER (check=.FALSE.) |
---|
| 323 | LOGICAL ok_stratus ! Ajouter artificiellement les stratus |
---|
| 324 | PARAMETER (ok_stratus=.FALSE.) |
---|
| 325 | !====================================================================== |
---|
| 326 | REAL amn, amx |
---|
| 327 | INTEGER igout |
---|
| 328 | !====================================================================== |
---|
| 329 | ! Clef controlant l'activation du cycle diurne: |
---|
| 330 | ! en attente du codage des cles par Fred |
---|
| 331 | INTEGER iflag_cycle_diurne |
---|
| 332 | PARAMETER (iflag_cycle_diurne=1) |
---|
| 333 | !====================================================================== |
---|
| 334 | ! Modele thermique du sol, a activer pour le cycle diurne: |
---|
| 335 | !cc LOGICAL soil_model |
---|
| 336 | !cc PARAMETER (soil_model=.FALSE.) |
---|
| 337 | !====================================================================== |
---|
| 338 | ! Dans les versions precedentes, l'eau liquide nuageuse utilisee dans |
---|
| 339 | ! le calcul du rayonnement est celle apres la precipitation des nuages. |
---|
| 340 | ! Si cette cle new_oliq est activee, ce sera une valeur moyenne entre |
---|
| 341 | ! la condensation et la precipitation. Cette cle augmente les impacts |
---|
| 342 | ! radiatifs des nuages. |
---|
| 343 | !cc LOGICAL new_oliq |
---|
| 344 | !cc PARAMETER (new_oliq=.FALSE.) |
---|
| 345 | !====================================================================== |
---|
| 346 | ! Clefs controlant deux parametrisations de l'orographie: |
---|
| 347 | !c LOGICAL ok_orodr |
---|
| 348 | !cc PARAMETER (ok_orodr=.FALSE.) |
---|
| 349 | !cc LOGICAL ok_orolf |
---|
| 350 | !cc PARAMETER (ok_orolf=.FALSE.) |
---|
| 351 | !====================================================================== |
---|
| 352 | LOGICAL ok_journe ! sortir le fichier journalier |
---|
| 353 | save ok_journe |
---|
| 354 | !$OMP THREADPRIVATE(ok_journe) |
---|
| 355 | ! |
---|
| 356 | LOGICAL ok_mensuel ! sortir le fichier mensuel |
---|
| 357 | save ok_mensuel |
---|
| 358 | !$OMP THREADPRIVATE(ok_mensuel) |
---|
| 359 | ! |
---|
| 360 | LOGICAL ok_instan ! sortir le fichier instantane |
---|
| 361 | save ok_instan |
---|
| 362 | !$OMP THREADPRIVATE(ok_instan) |
---|
| 363 | ! |
---|
| 364 | LOGICAL ok_LES ! sortir le fichier LES |
---|
| 365 | save ok_LES |
---|
| 366 | !$OMP THREADPRIVATE(ok_LES) |
---|
| 367 | ! |
---|
| 368 | LOGICAL callstats ! sortir le fichier stats |
---|
| 369 | save callstats |
---|
| 370 | !$OMP THREADPRIVATE(callstats) |
---|
| 371 | ! |
---|
| 372 | LOGICAL ok_region ! sortir le fichier regional |
---|
| 373 | PARAMETER (ok_region=.FALSE.) |
---|
| 374 | !====================================================================== |
---|
| 375 | real seuil_inversion |
---|
| 376 | save seuil_inversion |
---|
| 377 | !$OMP THREADPRIVATE(seuil_inversion) |
---|
| 378 | integer iflag_ratqs |
---|
| 379 | save iflag_ratqs |
---|
| 380 | !$OMP THREADPRIVATE(iflag_ratqs) |
---|
| 381 | real facteur |
---|
[1507] | 382 | |
---|
[2469] | 383 | REAL wmax_th(klon) |
---|
| 384 | REAL tau_overturning_th(klon) |
---|
[878] | 385 | |
---|
[2469] | 386 | integer lmax_th(klon) |
---|
| 387 | integer limbas(klon) |
---|
| 388 | real ratqscth(klon,klev) |
---|
| 389 | real ratqsdiff(klon,klev) |
---|
| 390 | real zqsatth(klon,klev) |
---|
[878] | 391 | |
---|
[2469] | 392 | !====================================================================== |
---|
| 393 | ! |
---|
| 394 | INTEGER ivap ! indice de traceurs pour vapeur d'eau |
---|
| 395 | PARAMETER (ivap=1) |
---|
| 396 | INTEGER iliq ! indice de traceurs pour eau liquide |
---|
| 397 | PARAMETER (iliq=2) |
---|
| 398 | !CR: on ajoute la phase glace |
---|
| 399 | INTEGER isol ! indice de traceurs pour eau glace |
---|
| 400 | PARAMETER (isol=3) |
---|
| 401 | ! |
---|
| 402 | ! |
---|
| 403 | ! Variables argument: |
---|
| 404 | ! |
---|
| 405 | INTEGER nlon |
---|
| 406 | INTEGER nlev |
---|
| 407 | REAL,INTENT(IN) :: pdtphys_ |
---|
| 408 | ! NB: pdtphys to be used in physics is in time_phylmdz_mod |
---|
| 409 | LOGICAL debut, lafin |
---|
| 410 | REAL paprs(klon,klev+1) |
---|
| 411 | REAL pplay(klon,klev) |
---|
| 412 | REAL pphi(klon,klev) |
---|
| 413 | REAL pphis(klon) |
---|
| 414 | REAL presnivs(klev) |
---|
[2799] | 415 | !JLD REAL znivsig(klev) |
---|
| 416 | !JLD real pir |
---|
[719] | 417 | |
---|
[2469] | 418 | REAL u(klon,klev) |
---|
| 419 | REAL v(klon,klev) |
---|
[2333] | 420 | |
---|
[2469] | 421 | REAL, intent(in):: rot(klon, klev) |
---|
| 422 | ! relative vorticity, in s-1, needed for frontal waves |
---|
[2333] | 423 | |
---|
[2469] | 424 | REAL t(klon,klev),thetal(klon,klev) |
---|
| 425 | ! thetal: ligne suivante a decommenter si vous avez les fichiers |
---|
| 426 | ! MPL 20130625 |
---|
| 427 | ! fth_fonctions.F90 et parkind1.F90 |
---|
| 428 | ! sinon thetal=theta |
---|
| 429 | ! REAL fth_thetae,fth_thetav,fth_thetal |
---|
| 430 | REAL qx(klon,klev,nqtot) |
---|
| 431 | REAL flxmass_w(klon,klev) |
---|
| 432 | REAL d_u(klon,klev) |
---|
| 433 | REAL d_v(klon,klev) |
---|
| 434 | REAL d_t(klon,klev) |
---|
| 435 | REAL d_qx(klon,klev,nqtot) |
---|
| 436 | REAL d_ps(klon) |
---|
[2897] | 437 | ! variables pour tend_to_tke |
---|
| 438 | REAL duadd(klon,klev) |
---|
| 439 | REAL dvadd(klon,klev) |
---|
| 440 | REAL dtadd(klon,klev) |
---|
| 441 | |
---|
[2469] | 442 | ! Variables pour le transport convectif |
---|
| 443 | real da(klon,klev),phi(klon,klev,klev),mp(klon,klev) |
---|
| 444 | real wght_cvfd(klon,klev) |
---|
[2271] | 445 | #ifndef CPP_XIOS |
---|
[2469] | 446 | REAL, SAVE :: missing_val |
---|
[2271] | 447 | #endif |
---|
[2469] | 448 | ! Variables pour le lessivage convectif |
---|
| 449 | ! RomP >>> |
---|
| 450 | real phi2(klon,klev,klev) |
---|
| 451 | real d1a(klon,klev),dam(klon,klev) |
---|
[2481] | 452 | real ev(klon,klev) |
---|
[2469] | 453 | real clw(klon,klev),elij(klon,klev,klev) |
---|
| 454 | real epmlmMm(klon,klev,klev),eplaMm(klon,klev) |
---|
| 455 | ! RomP <<< |
---|
| 456 | !IM definition dynamique o_trac dans phys_output_open |
---|
| 457 | ! type(ctrl_out) :: o_trac(nqtot) |
---|
[524] | 458 | |
---|
[2469] | 459 | ! variables a une pression donnee |
---|
| 460 | ! |
---|
| 461 | include "declare_STDlev.h" |
---|
| 462 | ! |
---|
| 463 | ! |
---|
| 464 | include "radopt.h" |
---|
| 465 | ! |
---|
| 466 | ! |
---|
| 467 | INTEGER debug |
---|
| 468 | INTEGER n |
---|
| 469 | !ym INTEGER npoints |
---|
| 470 | !ym PARAMETER(npoints=klon) |
---|
| 471 | ! |
---|
| 472 | INTEGER nregISCtot |
---|
| 473 | PARAMETER(nregISCtot=1) |
---|
| 474 | ! |
---|
| 475 | ! imin_debut, nbpti, jmin_debut, nbptj : parametres pour sorties |
---|
| 476 | ! sur 1 region rectangulaire y compris pour 1 point |
---|
| 477 | ! imin_debut : indice minimum de i; nbpti : nombre de points en |
---|
| 478 | ! direction i (longitude) |
---|
| 479 | ! jmin_debut : indice minimum de j; nbptj : nombre de points en |
---|
| 480 | ! direction j (latitude) |
---|
[2799] | 481 | !JLD INTEGER imin_debut, nbpti |
---|
| 482 | !JLD INTEGER jmin_debut, nbptj |
---|
[2469] | 483 | !IM: region='3d' <==> sorties en global |
---|
| 484 | CHARACTER*3 region |
---|
| 485 | PARAMETER(region='3d') |
---|
| 486 | logical ok_hf |
---|
| 487 | ! |
---|
| 488 | save ok_hf |
---|
| 489 | !$OMP THREADPRIVATE(ok_hf) |
---|
[524] | 490 | |
---|
[2469] | 491 | INTEGER,PARAMETER :: longcles=20 |
---|
| 492 | REAL,SAVE :: clesphy0(longcles) |
---|
| 493 | !$OMP THREADPRIVATE(clesphy0) |
---|
| 494 | ! |
---|
| 495 | ! Variables propres a la physique |
---|
| 496 | INTEGER itap |
---|
| 497 | SAVE itap ! compteur pour la physique |
---|
| 498 | !$OMP THREADPRIVATE(itap) |
---|
[2235] | 499 | |
---|
[2469] | 500 | INTEGER, SAVE :: abortphy=0 ! Reprere si on doit arreter en fin de phys |
---|
| 501 | !$OMP THREADPRIVATE(abortphy) |
---|
| 502 | ! |
---|
| 503 | REAL,save :: solarlong0 |
---|
| 504 | !$OMP THREADPRIVATE(solarlong0) |
---|
[987] | 505 | |
---|
[2469] | 506 | ! |
---|
| 507 | ! Parametres de l'Orographie a l'Echelle Sous-Maille (OESM): |
---|
| 508 | ! |
---|
| 509 | !IM 141004 REAL zulow(klon),zvlow(klon),zustr(klon), zvstr(klon) |
---|
| 510 | REAL zulow(klon),zvlow(klon) |
---|
| 511 | ! |
---|
| 512 | INTEGER igwd,idx(klon),itest(klon) |
---|
| 513 | ! |
---|
| 514 | ! REAL,allocatable,save :: run_off_lic_0(:) |
---|
| 515 | ! !$OMP THREADPRIVATE(run_off_lic_0) |
---|
| 516 | !ym SAVE run_off_lic_0 |
---|
| 517 | !KE43 |
---|
| 518 | ! Variables liees a la convection de K. Emanuel (sb): |
---|
| 519 | ! |
---|
| 520 | REAL bas, top ! cloud base and top levels |
---|
| 521 | SAVE bas |
---|
| 522 | SAVE top |
---|
| 523 | !$OMP THREADPRIVATE(bas, top) |
---|
| 524 | !------------------------------------------------------------------ |
---|
| 525 | ! Upmost level reached by deep convection and related variable (jyg) |
---|
| 526 | ! |
---|
| 527 | INTEGER izero |
---|
| 528 | INTEGER k_upper_cv |
---|
| 529 | !------------------------------------------------------------------ |
---|
| 530 | ! |
---|
| 531 | !========================================================================== |
---|
| 532 | !CR04.12.07: on ajoute les nouvelles variables du nouveau schema |
---|
| 533 | !de convection avec poches froides |
---|
| 534 | ! Variables li\'ees \`a la poche froide (jyg) |
---|
[879] | 535 | |
---|
[2469] | 536 | REAL mip(klon,klev) ! mass flux shed by the adiab ascent at each level |
---|
| 537 | ! |
---|
| 538 | REAL wape_prescr, fip_prescr |
---|
| 539 | INTEGER it_wape_prescr |
---|
| 540 | SAVE wape_prescr, fip_prescr, it_wape_prescr |
---|
| 541 | !$OMP THREADPRIVATE(wape_prescr, fip_prescr, it_wape_prescr) |
---|
| 542 | ! |
---|
| 543 | ! variables supplementaires de concvl |
---|
| 544 | REAL Tconv(klon,klev) |
---|
| 545 | REAL sij(klon,klev,klev) |
---|
[2812] | 546 | !! ! |
---|
| 547 | !! ! variables pour tester la conservation de l'energie dans concvl |
---|
| 548 | !! REAL, DIMENSION(klon,klev) :: d_t_con_sat |
---|
| 549 | !! REAL, DIMENSION(klon,klev) :: d_q_con_sat |
---|
| 550 | !! REAL, DIMENSION(klon,klev) :: dql_sat |
---|
[970] | 551 | |
---|
[2469] | 552 | real, save :: alp_bl_prescr=0. |
---|
| 553 | real, save :: ale_bl_prescr=0. |
---|
[979] | 554 | |
---|
[2469] | 555 | real, save :: wake_s_min_lsp=0.1 |
---|
[1516] | 556 | |
---|
[2469] | 557 | !$OMP THREADPRIVATE(alp_bl_prescr,ale_bl_prescr) |
---|
| 558 | !$OMP THREADPRIVATE(wake_s_min_lsp) |
---|
[970] | 559 | |
---|
[1516] | 560 | |
---|
[2469] | 561 | real ok_wk_lsp(klon) |
---|
[1516] | 562 | |
---|
[2469] | 563 | !RC |
---|
| 564 | ! Variables li\'ees \`a la poche froide (jyg et rr) |
---|
[879] | 565 | |
---|
[2635] | 566 | INTEGER, SAVE :: iflag_wake_tend ! wake: if =0, then wake state variables are |
---|
| 567 | ! updated within calwake |
---|
| 568 | !$OMP THREADPRIVATE(iflag_wake_tend) |
---|
| 569 | REAL t_w(klon,klev),q_w(klon,klev) ! temperature and moisture profiles in the wake region |
---|
| 570 | REAL t_x(klon,klev),q_x(klon,klev) ! temperature and moisture profiles in the off-wake region |
---|
[879] | 571 | |
---|
[2469] | 572 | REAL wake_dth(klon,klev) ! wake : temp pot difference |
---|
[879] | 573 | |
---|
[2469] | 574 | REAL wake_omgbdth(klon,klev) ! Wake : flux of Delta_Theta |
---|
| 575 | ! transported by LS omega |
---|
| 576 | REAL wake_dp_omgb(klon,klev) ! Wake : vertical gradient of |
---|
| 577 | ! large scale omega |
---|
| 578 | REAL wake_dtKE(klon,klev) ! Wake : differential heating |
---|
| 579 | ! (wake - unpertubed) CONV |
---|
| 580 | REAL wake_dqKE(klon,klev) ! Wake : differential moistening |
---|
| 581 | ! (wake - unpertubed) CONV |
---|
| 582 | REAL wake_dp_deltomg(klon,klev) ! Wake : gradient vertical de wake_omg |
---|
| 583 | REAL wake_spread(klon,klev) ! spreading term in wake_delt |
---|
| 584 | ! |
---|
| 585 | !pourquoi y'a pas de save?? |
---|
| 586 | ! |
---|
[2730] | 587 | !!! INTEGER, SAVE, DIMENSION(klon) :: wake_k |
---|
| 588 | !!! !$OMP THREADPRIVATE(wake_k) |
---|
[2469] | 589 | ! |
---|
| 590 | !jyg< |
---|
| 591 | !cc REAL wake_pe(klon) ! Wake potential energy - WAPE |
---|
| 592 | !>jyg |
---|
[879] | 593 | |
---|
[2469] | 594 | REAL wake_gfl(klon) ! Gust Front Length |
---|
[2635] | 595 | !!! REAL wake_dens(klon) ! moved to phys_state_var_mod |
---|
[2469] | 596 | ! |
---|
| 597 | ! |
---|
| 598 | REAL dt_dwn(klon,klev) |
---|
| 599 | REAL dq_dwn(klon,klev) |
---|
| 600 | REAL M_dwn(klon,klev) |
---|
| 601 | REAL M_up(klon,klev) |
---|
| 602 | REAL dt_a(klon,klev) |
---|
| 603 | REAL dq_a(klon,klev) |
---|
| 604 | REAL d_t_adjwk(klon,klev) !jyg |
---|
| 605 | REAL d_q_adjwk(klon,klev) !jyg |
---|
| 606 | LOGICAL,SAVE :: ok_adjwk=.FALSE. |
---|
| 607 | !$OMP THREADPRIVATE(ok_adjwk) |
---|
[2882] | 608 | INTEGER,SAVE :: iflag_adjwk=0 !jyg |
---|
| 609 | !$OMP THREADPRIVATE(iflag_adjwk) !jyg |
---|
[2657] | 610 | REAL,SAVE :: oliqmax=999.,oicemax=999. |
---|
| 611 | !$OMP THREADPRIVATE(oliqmax,oicemax) |
---|
[2469] | 612 | REAL, SAVE :: alp_offset |
---|
| 613 | !$OMP THREADPRIVATE(alp_offset) |
---|
[2897] | 614 | |
---|
[2469] | 615 | ! |
---|
| 616 | !RR:fin declarations poches froides |
---|
| 617 | !========================================================================== |
---|
[1032] | 618 | |
---|
[2469] | 619 | REAL ztv(klon,klev),ztva(klon,klev) |
---|
| 620 | REAL zpspsk(klon,klev) |
---|
| 621 | REAL ztla(klon,klev),zqla(klon,klev) |
---|
| 622 | REAL zthl(klon,klev) |
---|
[1638] | 623 | |
---|
[2469] | 624 | !cc nrlmd le 10/04/2012 |
---|
[1638] | 625 | |
---|
[2469] | 626 | !--------Stochastic Boundary Layer Triggering: ALE_BL-------- |
---|
| 627 | !---Propri\'et\'es du thermiques au LCL |
---|
| 628 | real zlcl_th(klon) ! Altitude du LCL calcul\'e |
---|
| 629 | ! continument (pcon dans |
---|
| 630 | ! thermcell_main.F90) |
---|
| 631 | real fraca0(klon) ! Fraction des thermiques au LCL |
---|
| 632 | real w0(klon) ! Vitesse des thermiques au LCL |
---|
| 633 | real w_conv(klon) ! Vitesse verticale de grande \'echelle au LCL |
---|
| 634 | real tke0(klon,klev+1) ! TKE au d\'ebut du pas de temps |
---|
| 635 | real therm_tke_max0(klon) ! TKE dans les thermiques au LCL |
---|
| 636 | real env_tke_max0(klon) ! TKE dans l'environnement au LCL |
---|
[1638] | 637 | |
---|
[2799] | 638 | !JLD !---D\'eclenchement stochastique |
---|
| 639 | !JLD integer :: tau_trig(klon) |
---|
[1638] | 640 | |
---|
[2469] | 641 | REAL,SAVE :: random_notrig_max=1. |
---|
| 642 | !$OMP THREADPRIVATE(random_notrig_max) |
---|
[2294] | 643 | |
---|
[2469] | 644 | !--------Statistical Boundary Layer Closure: ALP_BL-------- |
---|
| 645 | !---Profils de TKE dans et hors du thermique |
---|
| 646 | real therm_tke_max(klon,klev) ! Profil de TKE dans les thermiques |
---|
| 647 | real env_tke_max(klon,klev) ! Profil de TKE dans l'environnement |
---|
[1638] | 648 | |
---|
[2897] | 649 | !-------Activer les tendances de TKE due a l'orograp??ie--------- |
---|
| 650 | INTEGER, SAVE :: addtkeoro |
---|
| 651 | !$OMP THREADPRIVATE(addtkeoro) |
---|
| 652 | REAL, SAVE :: alphatkeoro |
---|
| 653 | !$OMP THREADPRIVATE(alphatkeoro) |
---|
| 654 | LOGICAL, SAVE :: smallscales_tkeoro |
---|
| 655 | !$OMP THREADPRIVATE(smallscales_tkeoro) |
---|
[1638] | 656 | |
---|
[2897] | 657 | |
---|
| 658 | |
---|
[2469] | 659 | !cc fin nrlmd le 10/04/2012 |
---|
[782] | 660 | |
---|
[2469] | 661 | ! Variables locales pour la couche limite (al1): |
---|
| 662 | ! |
---|
| 663 | !Al1 REAL pblh(klon) ! Hauteur de couche limite |
---|
| 664 | !Al1 SAVE pblh |
---|
| 665 | !34EK |
---|
| 666 | ! |
---|
| 667 | ! Variables locales: |
---|
| 668 | ! |
---|
| 669 | !AA |
---|
| 670 | !AA Pour phytrac |
---|
| 671 | REAL u1(klon) ! vents dans la premiere couche U |
---|
| 672 | REAL v1(klon) ! vents dans la premiere couche V |
---|
[524] | 673 | |
---|
[2469] | 674 | !@$$ LOGICAL offline ! Controle du stockage ds "physique" |
---|
| 675 | !@$$ PARAMETER (offline=.false.) |
---|
| 676 | !@$$ INTEGER physid |
---|
| 677 | REAL frac_impa(klon,klev) ! fractions d'aerosols lessivees (impaction) |
---|
| 678 | REAL frac_nucl(klon,klev) ! idem (nucleation) |
---|
| 679 | ! RomP >>> |
---|
| 680 | REAL beta_prec_fisrt(klon,klev) ! taux de conv de l'eau cond (fisrt) |
---|
| 681 | ! RomP <<< |
---|
[2832] | 682 | REAL :: calday |
---|
[2068] | 683 | |
---|
[2469] | 684 | !IM cf FH pour Tiedtke 080604 |
---|
| 685 | REAL rain_tiedtke(klon),snow_tiedtke(klon) |
---|
| 686 | ! |
---|
| 687 | !IM 050204 END |
---|
| 688 | REAL devap(klon) ! evaporation et sa derivee |
---|
| 689 | REAL dsens(klon) ! chaleur sensible et sa derivee |
---|
[1279] | 690 | |
---|
[2469] | 691 | ! |
---|
| 692 | ! Conditions aux limites |
---|
| 693 | ! |
---|
| 694 | ! |
---|
| 695 | REAL :: day_since_equinox |
---|
| 696 | ! Date de l'equinoxe de printemps |
---|
| 697 | INTEGER, parameter :: mth_eq=3, day_eq=21 |
---|
| 698 | REAL :: jD_eq |
---|
[1279] | 699 | |
---|
[2469] | 700 | LOGICAL, parameter :: new_orbit = .true. |
---|
[524] | 701 | |
---|
[2469] | 702 | ! |
---|
| 703 | INTEGER lmt_pas |
---|
| 704 | SAVE lmt_pas ! frequence de mise a jour |
---|
| 705 | !$OMP THREADPRIVATE(lmt_pas) |
---|
| 706 | real zmasse(klon, nbp_lev),exner(klon, nbp_lev) |
---|
| 707 | ! (column-density of mass of air in a cell, in kg m-2) |
---|
| 708 | real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 |
---|
[1797] | 709 | |
---|
[2469] | 710 | !IM sorties |
---|
| 711 | REAL un_jour |
---|
| 712 | PARAMETER(un_jour=86400.) |
---|
| 713 | INTEGER itapm1 !pas de temps de la physique du(es) mois precedents |
---|
| 714 | SAVE itapm1 !mis a jour le dernier pas de temps du mois en cours |
---|
| 715 | !$OMP THREADPRIVATE(itapm1) |
---|
| 716 | !====================================================================== |
---|
| 717 | ! |
---|
| 718 | ! Declaration des procedures appelees |
---|
| 719 | ! |
---|
| 720 | EXTERNAL angle ! calculer angle zenithal du soleil |
---|
| 721 | EXTERNAL alboc ! calculer l'albedo sur ocean |
---|
| 722 | EXTERNAL ajsec ! ajustement sec |
---|
| 723 | EXTERNAL conlmd ! convection (schema LMD) |
---|
| 724 | !KE43 |
---|
| 725 | EXTERNAL conema3 ! convect4.3 |
---|
| 726 | EXTERNAL fisrtilp ! schema de condensation a grande echelle (pluie) |
---|
| 727 | !AA |
---|
| 728 | ! JBM (3/14) fisrtilp_tr not loaded |
---|
| 729 | ! EXTERNAL fisrtilp_tr ! schema de condensation a grande echelle (pluie) |
---|
| 730 | ! ! stockage des coefficients necessaires au |
---|
| 731 | ! ! lessivage OFF-LINE et ON-LINE |
---|
| 732 | EXTERNAL hgardfou ! verifier les temperatures |
---|
| 733 | EXTERNAL nuage ! calculer les proprietes radiatives |
---|
| 734 | !C EXTERNAL o3cm ! initialiser l'ozone |
---|
| 735 | EXTERNAL orbite ! calculer l'orbite terrestre |
---|
| 736 | EXTERNAL phyetat0 ! lire l'etat initial de la physique |
---|
| 737 | EXTERNAL phyredem ! ecrire l'etat de redemarrage de la physique |
---|
| 738 | EXTERNAL suphel ! initialiser certaines constantes |
---|
| 739 | EXTERNAL transp ! transport total de l'eau et de l'energie |
---|
| 740 | !IM |
---|
| 741 | EXTERNAL haut2bas !variables de haut en bas |
---|
| 742 | EXTERNAL ini_undefSTD !initialise a 0 une variable a 1 niveau de pression |
---|
| 743 | EXTERNAL undefSTD !somme les valeurs definies d'1 var a 1 niveau de pression |
---|
| 744 | ! EXTERNAL moy_undefSTD !moyenne d'1 var a 1 niveau de pression |
---|
| 745 | ! EXTERNAL moyglo_aire |
---|
| 746 | ! moyenne globale d'1 var ponderee par l'aire de la maille (moyglo_pondaire) |
---|
| 747 | ! par la masse/airetot (moyglo_pondaima) et la vraie masse (moyglo_pondmass) |
---|
| 748 | ! |
---|
| 749 | ! |
---|
| 750 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 751 | ! Local variables |
---|
| 752 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 753 | ! |
---|
| 754 | REAL rhcl(klon,klev) ! humiditi relative ciel clair |
---|
| 755 | REAL dialiq(klon,klev) ! eau liquide nuageuse |
---|
| 756 | REAL diafra(klon,klev) ! fraction nuageuse |
---|
| 757 | REAL cldliq(klon,klev) ! eau liquide nuageuse |
---|
| 758 | ! |
---|
| 759 | !XXX PB |
---|
| 760 | REAL fluxq(klon,klev, nbsrf) ! flux turbulent d'humidite |
---|
| 761 | ! |
---|
| 762 | REAL zxfluxt(klon, klev) |
---|
| 763 | REAL zxfluxq(klon, klev) |
---|
| 764 | REAL zxfluxu(klon, klev) |
---|
| 765 | REAL zxfluxv(klon, klev) |
---|
[1797] | 766 | |
---|
[2469] | 767 | ! Le rayonnement n'est pas calcule tous les pas, il faut donc |
---|
| 768 | ! sauvegarder les sorties du rayonnement |
---|
| 769 | !ym SAVE heat,cool,albpla,topsw,toplw,solsw,sollw,sollwdown |
---|
| 770 | !ym SAVE sollwdownclr, toplwdown, toplwdownclr |
---|
| 771 | !ym SAVE topsw0,toplw0,solsw0,sollw0, heat0, cool0 |
---|
| 772 | ! |
---|
| 773 | INTEGER itaprad |
---|
| 774 | SAVE itaprad |
---|
| 775 | !$OMP THREADPRIVATE(itaprad) |
---|
| 776 | ! |
---|
| 777 | REAL conv_q(klon,klev) ! convergence de l'humidite (kg/kg/s) |
---|
| 778 | REAL conv_t(klon,klev) ! convergence de la temperature(K/s) |
---|
| 779 | ! |
---|
[2799] | 780 | #ifdef INCA |
---|
[2469] | 781 | REAL zxsnow_dummy(klon) |
---|
[2799] | 782 | #endif |
---|
[2469] | 783 | REAL zsav_tsol(klon) |
---|
| 784 | ! |
---|
| 785 | REAL dist, rmu0(klon), fract(klon) |
---|
| 786 | REAL zrmu0(klon), zfract(klon) |
---|
| 787 | REAL zdtime, zdtime1, zdtime2, zlongi |
---|
| 788 | ! |
---|
| 789 | REAL qcheck |
---|
| 790 | REAL z_avant(klon), z_apres(klon), z_factor(klon) |
---|
| 791 | LOGICAL zx_ajustq |
---|
| 792 | ! |
---|
[2799] | 793 | REAL za |
---|
| 794 | REAL zx_t, zx_qs, zdelta, zcor |
---|
[2469] | 795 | real zqsat(klon,klev) |
---|
| 796 | ! |
---|
[2897] | 797 | INTEGER i, k, iq, j, nsrf, ll, l |
---|
[2469] | 798 | ! |
---|
| 799 | REAL t_coup |
---|
| 800 | PARAMETER (t_coup=234.0) |
---|
[1797] | 801 | |
---|
[2469] | 802 | !ym A voir plus tard !! |
---|
| 803 | !ym REAL zx_relief(iim,jjmp1) |
---|
| 804 | !ym REAL zx_aire(iim,jjmp1) |
---|
| 805 | ! |
---|
| 806 | ! Grandeurs de sorties |
---|
| 807 | REAL s_capCL(klon) |
---|
| 808 | REAL s_oliqCL(klon), s_cteiCL(klon) |
---|
| 809 | REAL s_trmb1(klon), s_trmb2(klon) |
---|
| 810 | REAL s_trmb3(klon) |
---|
[2707] | 811 | |
---|
| 812 | ! La convection n'est pas calculee tous les pas, il faut donc |
---|
| 813 | ! sauvegarder les sorties de la convection |
---|
| 814 | !ym SAVE |
---|
| 815 | !ym SAVE |
---|
| 816 | !ym SAVE |
---|
| 817 | ! |
---|
[2730] | 818 | INTEGER itapcv, itapwk |
---|
| 819 | SAVE itapcv, itapwk |
---|
| 820 | !$OMP THREADPRIVATE(itapcv, itapwk) |
---|
[2707] | 821 | |
---|
[2469] | 822 | !KE43 |
---|
| 823 | ! Variables locales pour la convection de K. Emanuel (sb): |
---|
[524] | 824 | |
---|
[2469] | 825 | REAL tvp(klon,klev) ! virtual temp of lifted parcel |
---|
| 826 | CHARACTER*40 capemaxcels !max(CAPE) |
---|
[1412] | 827 | |
---|
[2469] | 828 | REAL rflag(klon) ! flag fonctionnement de convect |
---|
| 829 | INTEGER iflagctrl(klon) ! flag fonctionnement de convect |
---|
[904] | 830 | |
---|
[2469] | 831 | ! -- convect43: |
---|
| 832 | INTEGER ntra ! nb traceurs pour convect4.3 |
---|
| 833 | REAL dtvpdt1(klon,klev), dtvpdq1(klon,klev) |
---|
| 834 | REAL dplcldt(klon), dplcldr(klon) |
---|
| 835 | !? . condm_con(klon,klev),conda_con(klon,klev), |
---|
| 836 | !? . mr_con(klon,klev),ep_con(klon,klev) |
---|
| 837 | !? . ,sadiab(klon,klev),wadiab(klon,klev) |
---|
| 838 | ! -- |
---|
| 839 | !34EK |
---|
| 840 | ! |
---|
| 841 | ! Variables du changement |
---|
| 842 | ! |
---|
| 843 | ! con: convection |
---|
| 844 | ! lsc: condensation a grande echelle (Large-Scale-Condensation) |
---|
| 845 | ! ajs: ajustement sec |
---|
| 846 | ! eva: evaporation de l'eau liquide nuageuse |
---|
| 847 | ! vdf: couche limite (Vertical DiFfusion) |
---|
[2611] | 848 | ! |
---|
[2469] | 849 | ! tendance nulles |
---|
[2812] | 850 | REAL, dimension(klon,klev):: du0, dv0, dt0, dq0, dql0, dqi0 |
---|
| 851 | REAL, dimension(klon) :: dsig0, ddens0 |
---|
| 852 | INTEGER, dimension(klon) :: wkoccur1 |
---|
[2801] | 853 | ! tendance buffer pour appel de add_phys_tend |
---|
| 854 | REAL, DIMENSION(klon,klev) :: d_q_ch4_dtime |
---|
[2611] | 855 | ! |
---|
| 856 | ! Flag pour pouvoir ne pas ajouter les tendances. |
---|
| 857 | ! Par defaut, les tendances doivente etre ajoutees et |
---|
| 858 | ! flag_inhib_tend = 0 |
---|
| 859 | ! flag_inhib_tend > 0 : tendances non ajoutees, avec un nombre |
---|
| 860 | ! croissant de print quand la valeur du flag augmente |
---|
| 861 | !!! attention, ce flag doit etre change avec prudence !!! |
---|
| 862 | INTEGER :: flag_inhib_tend = 0 ! 0 is the default value |
---|
| 863 | !! INTEGER :: flag_inhib_tend = 2 |
---|
[524] | 864 | |
---|
[2469] | 865 | ! |
---|
| 866 | !******************************************************** |
---|
| 867 | ! declarations |
---|
[524] | 868 | |
---|
[2469] | 869 | !******************************************************** |
---|
| 870 | !IM 081204 END |
---|
| 871 | ! |
---|
| 872 | REAL pen_u(klon,klev), pen_d(klon,klev) |
---|
| 873 | REAL pde_u(klon,klev), pde_d(klon,klev) |
---|
| 874 | INTEGER kcbot(klon), kctop(klon), kdtop(klon) |
---|
| 875 | ! |
---|
| 876 | REAL ratqsc(klon,klev) |
---|
| 877 | real ratqsbas,ratqshaut,tau_ratqs |
---|
| 878 | save ratqsbas,ratqshaut,tau_ratqs |
---|
| 879 | !$OMP THREADPRIVATE(ratqsbas,ratqshaut,tau_ratqs) |
---|
[2534] | 880 | REAL, SAVE :: ratqsp0=50000., ratqsdp=20000. |
---|
| 881 | !$OMP THREADPRIVATE(ratqsp0, ratqsdp) |
---|
[644] | 882 | |
---|
[2469] | 883 | ! Parametres lies au nouveau schema de nuages (SB, PDF) |
---|
| 884 | real fact_cldcon |
---|
| 885 | real facttemps |
---|
| 886 | logical ok_newmicro |
---|
| 887 | save ok_newmicro |
---|
| 888 | !$OMP THREADPRIVATE(ok_newmicro) |
---|
| 889 | !real ref_liq_pi(klon,klev), ref_ice_pi(klon,klev) |
---|
| 890 | save fact_cldcon,facttemps |
---|
| 891 | !$OMP THREADPRIVATE(fact_cldcon,facttemps) |
---|
[524] | 892 | |
---|
[2469] | 893 | integer iflag_cld_th |
---|
| 894 | save iflag_cld_th |
---|
| 895 | !$OMP THREADPRIVATE(iflag_cld_th) |
---|
[2877] | 896 | !IM logical ptconv(klon,klev) !passe dans phys_local_var_mod |
---|
[2469] | 897 | !IM cf. AM 081204 BEG |
---|
| 898 | logical ptconvth(klon,klev) |
---|
| 899 | !IM cf. AM 081204 END |
---|
| 900 | ! |
---|
| 901 | ! Variables liees a l'ecriture de la bande histoire physique |
---|
| 902 | ! |
---|
| 903 | !====================================================================== |
---|
| 904 | ! |
---|
[2068] | 905 | |
---|
[2469] | 906 | ! |
---|
[2799] | 907 | !JLD integer itau_w ! pas de temps ecriture = itap + itau_phy |
---|
[2469] | 908 | ! |
---|
| 909 | ! |
---|
| 910 | ! Variables locales pour effectuer les appels en serie |
---|
| 911 | ! |
---|
| 912 | !IM RH a 2m (la surface) |
---|
| 913 | REAL Lheat |
---|
[524] | 914 | |
---|
[2469] | 915 | INTEGER length |
---|
| 916 | PARAMETER ( length = 100 ) |
---|
| 917 | REAL tabcntr0( length ) |
---|
| 918 | ! |
---|
[2799] | 919 | !JLD INTEGER ndex2d(nbp_lon*nbp_lat) |
---|
[2469] | 920 | !IM |
---|
| 921 | ! |
---|
| 922 | !IM AMIP2 BEG |
---|
[2799] | 923 | !JLD REAL moyglo, mountor |
---|
[2469] | 924 | !IM 141004 BEG |
---|
| 925 | REAL zustrdr(klon), zvstrdr(klon) |
---|
| 926 | REAL zustrli(klon), zvstrli(klon) |
---|
| 927 | REAL zustrph(klon), zvstrph(klon) |
---|
| 928 | REAL aam, torsfc |
---|
| 929 | !IM 141004 END |
---|
| 930 | !IM 190504 BEG |
---|
| 931 | ! INTEGER imp1jmp1 |
---|
| 932 | ! PARAMETER(imp1jmp1=(iim+1)*jjmp1) |
---|
| 933 | !ym A voir plus tard |
---|
| 934 | ! REAL zx_tmp((nbp_lon+1)*nbp_lat) |
---|
| 935 | ! REAL airedyn(nbp_lon+1,nbp_lat) |
---|
| 936 | !IM 190504 END |
---|
[2799] | 937 | !JLD LOGICAL ok_msk |
---|
| 938 | !JLD REAL msk(klon) |
---|
[2469] | 939 | !ym A voir plus tard |
---|
| 940 | !ym REAL zm_wo(jjmp1, klev) |
---|
| 941 | !IM AMIP2 END |
---|
| 942 | ! |
---|
| 943 | REAL zx_tmp_fi2d(klon) ! variable temporaire grille physique |
---|
| 944 | REAL zx_tmp_fi3d(klon,klev) ! variable temporaire pour champs 3D |
---|
[2799] | 945 | !JLD REAL zx_tmp_2d(nbp_lon,nbp_lat) |
---|
| 946 | !JLD REAL zx_lon(nbp_lon,nbp_lat) |
---|
| 947 | !JLD REAL zx_lat(nbp_lon,nbp_lat) |
---|
[2469] | 948 | ! |
---|
[2630] | 949 | INTEGER nid_ctesGCM |
---|
| 950 | SAVE nid_ctesGCM |
---|
| 951 | !$OMP THREADPRIVATE(nid_ctesGCM) |
---|
[2469] | 952 | ! |
---|
| 953 | !IM 280405 BEG |
---|
| 954 | ! INTEGER nid_bilKPins, nid_bilKPave |
---|
| 955 | ! SAVE nid_bilKPins, nid_bilKPave |
---|
| 956 | ! !$OMP THREADPRIVATE(nid_bilKPins, nid_bilKPave) |
---|
| 957 | ! |
---|
| 958 | REAL ve_lay(klon,klev) ! transport meri. de l'energie a chaque niveau vert. |
---|
| 959 | REAL vq_lay(klon,klev) ! transport meri. de l'eau a chaque niveau vert. |
---|
| 960 | REAL ue_lay(klon,klev) ! transport zonal de l'energie a chaque niveau vert. |
---|
| 961 | REAL uq_lay(klon,klev) ! transport zonal de l'eau a chaque niveau vert. |
---|
| 962 | ! |
---|
[2799] | 963 | !JLD REAL zjulian |
---|
| 964 | !JLD SAVE zjulian |
---|
| 965 | !JLD!$OMP THREADPRIVATE(zjulian) |
---|
[2590] | 966 | |
---|
[2799] | 967 | !JLD INTEGER nhori, nvert |
---|
| 968 | !JLD REAL zsto |
---|
| 969 | !JLD REAL zstophy, zout |
---|
[2068] | 970 | |
---|
[2469] | 971 | character*20 modname |
---|
| 972 | character*80 abort_message |
---|
| 973 | logical, save :: ok_sync, ok_sync_omp |
---|
| 974 | !$OMP THREADPRIVATE(ok_sync) |
---|
| 975 | real date0 |
---|
[524] | 976 | |
---|
[2469] | 977 | ! essai writephys |
---|
| 978 | integer fid_day, fid_mth, fid_ins |
---|
| 979 | parameter (fid_ins = 1, fid_day = 2, fid_mth = 3) |
---|
| 980 | integer prof2d_on, prof3d_on, prof2d_av, prof3d_av |
---|
| 981 | parameter (prof2d_on = 1, prof3d_on = 2, & |
---|
| 982 | prof2d_av = 3, prof3d_av = 4) |
---|
| 983 | REAL ztsol(klon) |
---|
| 984 | REAL q2m(klon,nbsrf) ! humidite a 2m |
---|
[524] | 985 | |
---|
[2469] | 986 | !IM: t2m, q2m, ustar, u10m, v10m et t2mincels, t2maxcels |
---|
| 987 | CHARACTER*40 t2mincels, t2maxcels !t2m min., t2m max |
---|
[2799] | 988 | CHARACTER*40 tinst, tave |
---|
[2469] | 989 | REAL cldtaupi(klon,klev) ! Cloud optical thickness for |
---|
| 990 | ! pre-industrial (pi) aerosols |
---|
[524] | 991 | |
---|
[2863] | 992 | INTEGER :: naero |
---|
[2469] | 993 | ! Aerosol optical properties |
---|
| 994 | CHARACTER*4, DIMENSION(naero_grp) :: rfname |
---|
| 995 | REAL, DIMENSION(klon,klev) :: mass_solu_aero ! total mass |
---|
| 996 | ! concentration |
---|
| 997 | ! for all soluble |
---|
| 998 | ! aerosols[ug/m3] |
---|
| 999 | REAL, DIMENSION(klon,klev) :: mass_solu_aero_pi |
---|
| 1000 | ! - " - (pre-industrial value) |
---|
[1279] | 1001 | |
---|
[2469] | 1002 | ! Parameters |
---|
| 1003 | LOGICAL ok_ade, ok_aie ! Apply aerosol (in)direct effects or not |
---|
[2738] | 1004 | LOGICAL ok_alw ! Apply aerosol LW effect or not |
---|
[2469] | 1005 | LOGICAL ok_cdnc ! ok cloud droplet number concentration (O. Boucher 01-2013) |
---|
| 1006 | REAL bl95_b0, bl95_b1 ! Parameter in Boucher and Lohmann (1995) |
---|
[2738] | 1007 | SAVE ok_ade, ok_aie, ok_alw, ok_cdnc, bl95_b0, bl95_b1 |
---|
| 1008 | !$OMP THREADPRIVATE(ok_ade, ok_aie, ok_alw, ok_cdnc, bl95_b0, bl95_b1) |
---|
[2469] | 1009 | LOGICAL, SAVE :: aerosol_couple ! true : calcul des aerosols dans INCA |
---|
| 1010 | ! false : lecture des aerosol dans un fichier |
---|
| 1011 | !$OMP THREADPRIVATE(aerosol_couple) |
---|
| 1012 | INTEGER, SAVE :: flag_aerosol |
---|
| 1013 | !$OMP THREADPRIVATE(flag_aerosol) |
---|
[2644] | 1014 | LOGICAL, SAVE :: flag_bc_internal_mixture |
---|
| 1015 | !$OMP THREADPRIVATE(flag_bc_internal_mixture) |
---|
[2469] | 1016 | LOGICAL, SAVE :: new_aod |
---|
| 1017 | !$OMP THREADPRIVATE(new_aod) |
---|
| 1018 | ! |
---|
| 1019 | !--STRAT AEROSOL |
---|
[2530] | 1020 | INTEGER, SAVE :: flag_aerosol_strat |
---|
[2469] | 1021 | !$OMP THREADPRIVATE(flag_aerosol_strat) |
---|
| 1022 | !c-fin STRAT AEROSOL |
---|
| 1023 | ! |
---|
| 1024 | ! Declaration des constantes et des fonctions thermodynamiques |
---|
| 1025 | ! |
---|
| 1026 | LOGICAL,SAVE :: first=.true. |
---|
| 1027 | !$OMP THREADPRIVATE(first) |
---|
[1279] | 1028 | |
---|
[2788] | 1029 | ! VARIABLES RELATED TO OZONE CLIMATOLOGIES ; all are OpenMP shared |
---|
| 1030 | ! Note that pressure vectors are in Pa and in stricly ascending order |
---|
| 1031 | INTEGER,SAVE :: read_climoz ! Read ozone climatology |
---|
[2469] | 1032 | ! (let it keep the default OpenMP shared attribute) |
---|
| 1033 | ! Allowed values are 0, 1 and 2 |
---|
| 1034 | ! 0: do not read an ozone climatology |
---|
| 1035 | ! 1: read a single ozone climatology that will be used day and night |
---|
| 1036 | ! 2: read two ozone climatologies, the average day and night |
---|
| 1037 | ! climatology and the daylight climatology |
---|
[2788] | 1038 | INTEGER,SAVE :: ncid_climoz ! NetCDF file identifier |
---|
| 1039 | REAL, POINTER, SAVE :: press_cen_climoz(:) ! Pressure levels |
---|
| 1040 | REAL, POINTER, SAVE :: press_edg_climoz(:) ! Edges of pressure intervals |
---|
| 1041 | REAL, POINTER, SAVE :: time_climoz(:) ! Time vector |
---|
| 1042 | CHARACTER(LEN=13), PARAMETER :: vars_climoz(2) & |
---|
| 1043 | = ["tro3 ","tro3_daylight"] |
---|
| 1044 | ! vars_climoz(1:read_climoz): variables names in climoz file. |
---|
[2819] | 1045 | ! vars_climoz(1:read_climoz-2) if read_climoz>2 (temporary) |
---|
| 1046 | REAL :: ro3i ! 0<=ro3i<=360 ; required time index in NetCDF file for |
---|
| 1047 | ! the ozone fields, old method. |
---|
[1279] | 1048 | |
---|
[2469] | 1049 | include "YOMCST.h" |
---|
| 1050 | include "YOETHF.h" |
---|
| 1051 | include "FCTTRE.h" |
---|
| 1052 | !IM 100106 BEG : pouvoir sortir les ctes de la physique |
---|
| 1053 | include "conema3.h" |
---|
| 1054 | include "fisrtilp.h" |
---|
| 1055 | include "nuage.h" |
---|
| 1056 | include "compbl.h" |
---|
| 1057 | !IM 100106 END : pouvoir sortir les ctes de la physique |
---|
| 1058 | ! |
---|
| 1059 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 1060 | ! Declarations pour Simulateur COSP |
---|
| 1061 | !============================================================ |
---|
[2799] | 1062 | #ifdef CPP_COSP |
---|
[2469] | 1063 | real :: mr_ozone(klon,klev) |
---|
[2799] | 1064 | #endif |
---|
[2469] | 1065 | !IM stations CFMIP |
---|
| 1066 | INTEGER, SAVE :: nCFMIP |
---|
| 1067 | !$OMP THREADPRIVATE(nCFMIP) |
---|
| 1068 | INTEGER, PARAMETER :: npCFMIP=120 |
---|
| 1069 | INTEGER, ALLOCATABLE, SAVE :: tabCFMIP(:) |
---|
| 1070 | REAL, ALLOCATABLE, SAVE :: lonCFMIP(:), latCFMIP(:) |
---|
| 1071 | !$OMP THREADPRIVATE(tabCFMIP, lonCFMIP, latCFMIP) |
---|
| 1072 | INTEGER, ALLOCATABLE, SAVE :: tabijGCM(:) |
---|
| 1073 | REAL, ALLOCATABLE, SAVE :: lonGCM(:), latGCM(:) |
---|
| 1074 | !$OMP THREADPRIVATE(tabijGCM, lonGCM, latGCM) |
---|
| 1075 | INTEGER, ALLOCATABLE, SAVE :: iGCM(:), jGCM(:) |
---|
| 1076 | !$OMP THREADPRIVATE(iGCM, jGCM) |
---|
| 1077 | logical, dimension(nfiles) :: phys_out_filestations |
---|
| 1078 | logical, parameter :: lNMC=.FALSE. |
---|
[1539] | 1079 | |
---|
[2469] | 1080 | !IM betaCRF |
---|
| 1081 | REAL, SAVE :: pfree, beta_pbl, beta_free |
---|
| 1082 | !$OMP THREADPRIVATE(pfree, beta_pbl, beta_free) |
---|
| 1083 | REAL, SAVE :: lon1_beta, lon2_beta, lat1_beta, lat2_beta |
---|
| 1084 | !$OMP THREADPRIVATE(lon1_beta, lon2_beta, lat1_beta, lat2_beta) |
---|
| 1085 | LOGICAL, SAVE :: mskocean_beta |
---|
| 1086 | !$OMP THREADPRIVATE(mskocean_beta) |
---|
| 1087 | REAL, dimension(klon, klev) :: beta ! facteur sur cldtaurad et |
---|
| 1088 | ! cldemirad pour evaluer les |
---|
| 1089 | ! retros liees aux CRF |
---|
| 1090 | REAL, dimension(klon, klev) :: cldtaurad ! epaisseur optique |
---|
| 1091 | ! pour radlwsw pour |
---|
| 1092 | ! tester "CRF off" |
---|
| 1093 | REAL, dimension(klon, klev) :: cldtaupirad ! epaisseur optique |
---|
| 1094 | ! pour radlwsw pour |
---|
| 1095 | ! tester "CRF off" |
---|
| 1096 | REAL, dimension(klon, klev) :: cldemirad ! emissivite pour |
---|
| 1097 | ! radlwsw pour tester |
---|
| 1098 | ! "CRF off" |
---|
| 1099 | REAL, dimension(klon, klev) :: cldfrarad ! fraction nuageuse |
---|
[1735] | 1100 | |
---|
[2469] | 1101 | INTEGER :: nbtr_tmp ! Number of tracer inside concvl |
---|
| 1102 | REAL, dimension(klon,klev) :: sh_in ! Specific humidity entering in phytrac |
---|
[2784] | 1103 | REAL, dimension(klon,klev) :: ch_in ! Condensed humidity entering in phytrac (eau liquide) |
---|
[2469] | 1104 | integer iostat |
---|
[1539] | 1105 | |
---|
[2469] | 1106 | REAL zzz |
---|
| 1107 | !albedo SB >>> |
---|
| 1108 | real,dimension(6),save :: SFRWL |
---|
| 1109 | !albedo SB <<< |
---|
[1955] | 1110 | |
---|
[2485] | 1111 | !--OB variables for mass fixer (hard coded for now) |
---|
[2477] | 1112 | logical, parameter :: mass_fixer=.false. |
---|
[2799] | 1113 | real qql1(klon),qql2(klon),corrqql |
---|
[2476] | 1114 | |
---|
[2469] | 1115 | ! Ehouarn: set value of jjmp1 since it is no longer a "fixed parameter" |
---|
| 1116 | jjmp1=nbp_lat |
---|
[2344] | 1117 | |
---|
[2469] | 1118 | !====================================================================== |
---|
| 1119 | ! Gestion calendrier : mise a jour du module phys_cal_mod |
---|
| 1120 | ! |
---|
| 1121 | pdtphys=pdtphys_ |
---|
| 1122 | CALL update_time(pdtphys) |
---|
[1355] | 1123 | |
---|
[2469] | 1124 | !====================================================================== |
---|
| 1125 | ! Ecriture eventuelle d'un profil verticale en entree de la physique. |
---|
| 1126 | ! Utilise notamment en 1D mais peut etre active egalement en 3D |
---|
| 1127 | ! en imposant la valeur de igout. |
---|
| 1128 | !======================================================================d |
---|
[2692] | 1129 | IF (prt_level.ge.1) THEN |
---|
[2469] | 1130 | igout=klon/2+1/klon |
---|
| 1131 | write(lunout,*) 'DEBUT DE PHYSIQ !!!!!!!!!!!!!!!!!!!!' |
---|
| 1132 | write(lunout,*) 'igout, lat, lon ',igout, latitude_deg(igout), & |
---|
| 1133 | longitude_deg(igout) |
---|
| 1134 | write(lunout,*) & |
---|
| 1135 | 'nlon,klev,nqtot,debut,lafin, jD_cur, jH_cur,pdtphys' |
---|
| 1136 | write(lunout,*) & |
---|
| 1137 | nlon,klev,nqtot,debut,lafin, jD_cur, jH_cur,pdtphys |
---|
[879] | 1138 | |
---|
[2469] | 1139 | write(lunout,*) 'paprs, play, phi, u, v, t' |
---|
[2692] | 1140 | DO k=1,klev |
---|
[2469] | 1141 | write(lunout,*) paprs(igout,k),pplay(igout,k),pphi(igout,k), & |
---|
| 1142 | u(igout,k),v(igout,k),t(igout,k) |
---|
[2692] | 1143 | ENDDO |
---|
[2469] | 1144 | write(lunout,*) 'ovap (g/kg), oliq (g/kg)' |
---|
[2692] | 1145 | DO k=1,klev |
---|
[2469] | 1146 | write(lunout,*) qx(igout,k,1)*1000,qx(igout,k,2)*1000. |
---|
[2692] | 1147 | ENDDO |
---|
| 1148 | ENDIF |
---|
[879] | 1149 | |
---|
[2769] | 1150 | ! Quick check on pressure levels: |
---|
[2774] | 1151 | call assert(paprs(:, nbp_lev + 1) < paprs(:, nbp_lev), & |
---|
[2769] | 1152 | "physiq_mod paprs bad order") |
---|
[879] | 1153 | |
---|
[2692] | 1154 | IF (first) THEN |
---|
[2469] | 1155 | !CR:nvelles variables convection/poches froides |
---|
| 1156 | |
---|
| 1157 | print*, '=================================================' |
---|
| 1158 | print*, 'Allocation des variables locales et sauvegardees' |
---|
[2692] | 1159 | CALL phys_local_var_init |
---|
[2469] | 1160 | ! |
---|
| 1161 | pasphys=pdtphys |
---|
| 1162 | ! appel a la lecture du run.def physique |
---|
[2692] | 1163 | CALL conf_phys(ok_journe, ok_mensuel, & |
---|
[2469] | 1164 | ok_instan, ok_hf, & |
---|
| 1165 | ok_LES, & |
---|
| 1166 | callstats, & |
---|
| 1167 | solarlong0,seuil_inversion, & |
---|
| 1168 | fact_cldcon, facttemps,ok_newmicro,iflag_radia, & |
---|
| 1169 | iflag_cld_th,iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, & |
---|
[2738] | 1170 | ok_ade, ok_aie, ok_alw, ok_cdnc, aerosol_couple, & |
---|
[2469] | 1171 | flag_aerosol, flag_aerosol_strat, new_aod, & |
---|
[2644] | 1172 | flag_bc_internal_mixture, bl95_b0, bl95_b1, & |
---|
[2469] | 1173 | ! nv flags pour la convection et les |
---|
| 1174 | ! poches froides |
---|
| 1175 | read_climoz, & |
---|
| 1176 | alp_offset) |
---|
[2692] | 1177 | CALL phys_state_var_init(read_climoz) |
---|
| 1178 | CALL phys_output_var_init |
---|
[2469] | 1179 | print*, '=================================================' |
---|
| 1180 | ! |
---|
| 1181 | !CR: check sur le nb de traceurs de l eau |
---|
[2692] | 1182 | IF ((iflag_ice_thermo.gt.0).and.(nqo==2)) THEN |
---|
[2469] | 1183 | WRITE (lunout, *) ' iflag_ice_thermo==1 requires 3 H2O tracers ', & |
---|
| 1184 | '(H2Ov, H2Ol, H2Oi) but nqo=', nqo, '. Might as well stop here.' |
---|
[2224] | 1185 | STOP |
---|
[2692] | 1186 | ENDIF |
---|
[2224] | 1187 | |
---|
[2469] | 1188 | dnwd0=0.0 |
---|
| 1189 | ftd=0.0 |
---|
| 1190 | fqd=0.0 |
---|
| 1191 | cin=0. |
---|
| 1192 | !ym Attention pbase pas initialise dans concvl !!!! |
---|
| 1193 | pbase=0 |
---|
| 1194 | !IM 180608 |
---|
[904] | 1195 | |
---|
[2469] | 1196 | itau_con=0 |
---|
| 1197 | first=.false. |
---|
[1797] | 1198 | |
---|
[2692] | 1199 | ENDIF ! first |
---|
[1797] | 1200 | |
---|
[2469] | 1201 | !ym => necessaire pour iflag_con != 2 |
---|
| 1202 | pmfd(:,:) = 0. |
---|
| 1203 | pen_u(:,:) = 0. |
---|
| 1204 | pen_d(:,:) = 0. |
---|
| 1205 | pde_d(:,:) = 0. |
---|
| 1206 | pde_u(:,:) = 0. |
---|
| 1207 | aam=0. |
---|
| 1208 | d_t_adjwk(:,:)=0 |
---|
| 1209 | d_q_adjwk(:,:)=0 |
---|
[1797] | 1210 | |
---|
[2469] | 1211 | alp_bl_conv(:)=0. |
---|
[2245] | 1212 | |
---|
[2469] | 1213 | torsfc=0. |
---|
| 1214 | forall (k=1: nbp_lev) zmasse(:, k) = (paprs(:, k)-paprs(:, k+1)) / rg |
---|
[1797] | 1215 | |
---|
[2469] | 1216 | modname = 'physiq' |
---|
[644] | 1217 | |
---|
[2469] | 1218 | IF (debut) THEN |
---|
| 1219 | CALL suphel ! initialiser constantes et parametres phys. |
---|
| 1220 | CALL getin_p('random_notrig_max',random_notrig_max) |
---|
[2882] | 1221 | CALL getin_p('ok_adjwk',ok_adjwk) |
---|
| 1222 | IF (ok_adjwk) iflag_adjwk=2 ! for compatibility with older versions |
---|
| 1223 | ! iflag_adjwk: ! 0 = Default: no convective adjustment of w-region |
---|
| 1224 | ! 1 => convective adjustment but state variables are unchanged |
---|
| 1225 | ! 2 => convective adjustment and state variables are changed |
---|
| 1226 | CALL getin_p('iflag_adjwk',iflag_adjwk) |
---|
[2613] | 1227 | CALL getin_p('oliqmax',oliqmax) |
---|
[2657] | 1228 | CALL getin_p('oicemax',oicemax) |
---|
[2534] | 1229 | CALL getin_p('ratqsp0',ratqsp0) |
---|
| 1230 | CALL getin_p('ratqsdp',ratqsdp) |
---|
[2635] | 1231 | iflag_wake_tend = 0 |
---|
| 1232 | CALL getin_p('iflag_wake_tend',iflag_wake_tend) |
---|
[2799] | 1233 | ok_bad_ecmwf_thermo=.TRUE. ! By default thermodynamical constants are set |
---|
| 1234 | ! in rrtm/suphec.F90 (and rvtmp2 is set to 0). |
---|
| 1235 | CALL getin_p('ok_bad_ecmwf_thermo',ok_bad_ecmwf_thermo) |
---|
| 1236 | fl_ebil = 0 ! by default, conservation diagnostics are desactivated |
---|
| 1237 | CALL getin_p('fl_ebil',fl_ebil) |
---|
| 1238 | fl_cor_ebil = 0 ! by default, no correction to ensure energy conservation |
---|
| 1239 | CALL getin_p('fl_cor_ebil',fl_cor_ebil) |
---|
[2469] | 1240 | ENDIF |
---|
[878] | 1241 | |
---|
[2692] | 1242 | IF (prt_level.ge.1) print *,'CONVERGENCE PHYSIQUE THERM 1 ' |
---|
[1279] | 1243 | |
---|
[959] | 1244 | |
---|
[2469] | 1245 | !====================================================================== |
---|
| 1246 | ! Gestion calendrier : mise a jour du module phys_cal_mod |
---|
| 1247 | ! |
---|
| 1248 | ! CALL phys_cal_update(jD_cur,jH_cur) |
---|
[1279] | 1249 | |
---|
[2469] | 1250 | ! |
---|
| 1251 | ! Si c'est le debut, il faut initialiser plusieurs choses |
---|
| 1252 | ! ******** |
---|
| 1253 | ! |
---|
| 1254 | IF (debut) THEN |
---|
| 1255 | !rv CRinitialisation de wght_th et lalim_conv pour la |
---|
| 1256 | !definition de la couche alimentation de la convection a partir |
---|
| 1257 | !des caracteristiques du thermique |
---|
| 1258 | wght_th(:,:)=1. |
---|
| 1259 | lalim_conv(:)=1 |
---|
| 1260 | !RC |
---|
| 1261 | ustar(:,:)=0. |
---|
[2569] | 1262 | ! u10m(:,:)=0. |
---|
| 1263 | ! v10m(:,:)=0. |
---|
[2469] | 1264 | rain_con(:)=0. |
---|
| 1265 | snow_con(:)=0. |
---|
| 1266 | topswai(:)=0. |
---|
| 1267 | topswad(:)=0. |
---|
| 1268 | solswai(:)=0. |
---|
| 1269 | solswad(:)=0. |
---|
[959] | 1270 | |
---|
[2469] | 1271 | wmax_th(:)=0. |
---|
| 1272 | tau_overturning_th(:)=0. |
---|
[645] | 1273 | |
---|
[2469] | 1274 | IF (type_trac == 'inca') THEN |
---|
| 1275 | ! jg : initialisation jusqu'au ces variables sont dans restart |
---|
| 1276 | ccm(:,:,:) = 0. |
---|
| 1277 | tau_aero(:,:,:,:) = 0. |
---|
| 1278 | piz_aero(:,:,:,:) = 0. |
---|
| 1279 | cg_aero(:,:,:,:) = 0. |
---|
[2372] | 1280 | |
---|
[2469] | 1281 | config_inca='none' ! default |
---|
| 1282 | CALL getin_p('config_inca',config_inca) |
---|
[2372] | 1283 | |
---|
[2469] | 1284 | ELSE |
---|
| 1285 | config_inca='none' ! default |
---|
[2692] | 1286 | ENDIF |
---|
[782] | 1287 | |
---|
[2469] | 1288 | IF (aerosol_couple .AND. (config_inca /= "aero" & |
---|
| 1289 | .AND. config_inca /= "aeNP ")) THEN |
---|
| 1290 | abort_message & |
---|
| 1291 | = 'if aerosol_couple is activated, config_inca need to be ' & |
---|
| 1292 | // 'aero or aeNP' |
---|
| 1293 | CALL abort_physic (modname,abort_message,1) |
---|
| 1294 | ENDIF |
---|
[2443] | 1295 | |
---|
| 1296 | |
---|
[1863] | 1297 | |
---|
[2469] | 1298 | rnebcon0(:,:) = 0.0 |
---|
| 1299 | clwcon0(:,:) = 0.0 |
---|
| 1300 | rnebcon(:,:) = 0.0 |
---|
| 1301 | clwcon(:,:) = 0.0 |
---|
[1863] | 1302 | |
---|
[2469] | 1303 | ! |
---|
| 1304 | print*,'iflag_coupl,iflag_clos,iflag_wake', & |
---|
| 1305 | iflag_coupl,iflag_clos,iflag_wake |
---|
| 1306 | print*,'iflag_CYCLE_DIURNE', iflag_cycle_diurne |
---|
| 1307 | ! |
---|
| 1308 | IF (iflag_con.EQ.2.AND.iflag_cld_th.GT.-1) THEN |
---|
| 1309 | abort_message = 'Tiedtke needs iflag_cld_th=-2 or -1' |
---|
| 1310 | CALL abort_physic (modname,abort_message,1) |
---|
| 1311 | ENDIF |
---|
| 1312 | ! |
---|
| 1313 | ! |
---|
| 1314 | ! Initialiser les compteurs: |
---|
| 1315 | ! |
---|
| 1316 | itap = 0 |
---|
| 1317 | itaprad = 0 |
---|
[2707] | 1318 | itapcv = 0 |
---|
[2730] | 1319 | itapwk = 0 |
---|
[878] | 1320 | |
---|
[2469] | 1321 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 1322 | !! Un petit travail \`a faire ici. |
---|
| 1323 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
[878] | 1324 | |
---|
[2692] | 1325 | IF (iflag_pbl>1) THEN |
---|
[2469] | 1326 | PRINT*, "Using method MELLOR&YAMADA" |
---|
[2692] | 1327 | ENDIF |
---|
[956] | 1328 | |
---|
[2469] | 1329 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 1330 | ! FH 2008/05/02 changement lie a la lecture de nbapp_rad dans |
---|
| 1331 | ! phylmd plutot que dyn3d |
---|
| 1332 | ! Attention : la version precedente n'etait pas tres propre. |
---|
| 1333 | ! Il se peut qu'il faille prendre une valeur differente de nbapp_rad |
---|
| 1334 | ! pour obtenir le meme resultat. |
---|
[2731] | 1335 | !jyg for fh< |
---|
| 1336 | !! dtime=pdtphys |
---|
| 1337 | dtime=NINT(pdtphys) |
---|
| 1338 | WRITE(lunout,*) 'Pas de temps dtime pdtphys ',dtime,pdtphys |
---|
| 1339 | IF (abs(dtime-pdtphys)>1.e-10) THEN |
---|
| 1340 | abort_message='pas de temps doit etre entier en seconde pour orchidee et XIOS' |
---|
| 1341 | CALL abort_physic(modname,abort_message,1) |
---|
| 1342 | ENDIF |
---|
| 1343 | !>jyg |
---|
| 1344 | IF (MOD(NINT(86400./dtime),nbapp_rad).EQ.0) THEN |
---|
| 1345 | radpas = NINT( 86400./dtime)/nbapp_rad |
---|
[2469] | 1346 | ELSE |
---|
| 1347 | WRITE(lunout,*) 'le nombre de pas de temps physique doit etre un ', & |
---|
| 1348 | 'multiple de nbapp_rad' |
---|
| 1349 | WRITE(lunout,*) 'changer nbapp_rad ou alors commenter ce test ', & |
---|
| 1350 | 'mais 1+1<>2' |
---|
| 1351 | abort_message='nbre de pas de temps physique n est pas multiple ' & |
---|
| 1352 | // 'de nbapp_rad' |
---|
[2692] | 1353 | CALL abort_physic(modname,abort_message,1) |
---|
[2469] | 1354 | ENDIF |
---|
[2707] | 1355 | IF (nbapp_cv .EQ. 0) nbapp_cv=86400./dtime |
---|
[2730] | 1356 | IF (nbapp_wk .EQ. 0) nbapp_wk=86400./dtime |
---|
| 1357 | print *,'physiq, nbapp_cv, nbapp_wk ',nbapp_cv,nbapp_wk |
---|
[2731] | 1358 | IF (MOD(NINT(86400./dtime),nbapp_cv).EQ.0) THEN |
---|
| 1359 | cvpas = NINT( 86400./dtime)/nbapp_cv |
---|
[2707] | 1360 | print *,'physiq, cvpas ',cvpas |
---|
| 1361 | ELSE |
---|
| 1362 | WRITE(lunout,*) 'le nombre de pas de temps physique doit etre un ', & |
---|
| 1363 | 'multiple de nbapp_cv' |
---|
| 1364 | WRITE(lunout,*) 'changer nbapp_cv ou alors commenter ce test ', & |
---|
| 1365 | 'mais 1+1<>2' |
---|
| 1366 | abort_message='nbre de pas de temps physique n est pas multiple ' & |
---|
| 1367 | // 'de nbapp_cv' |
---|
| 1368 | call abort_physic(modname,abort_message,1) |
---|
| 1369 | ENDIF |
---|
[2731] | 1370 | IF (MOD(NINT(86400./dtime),nbapp_wk).EQ.0) THEN |
---|
| 1371 | wkpas = NINT( 86400./dtime)/nbapp_wk |
---|
[2730] | 1372 | print *,'physiq, wkpas ',wkpas |
---|
| 1373 | ELSE |
---|
| 1374 | WRITE(lunout,*) 'le nombre de pas de temps physique doit etre un ', & |
---|
| 1375 | 'multiple de nbapp_wk' |
---|
| 1376 | WRITE(lunout,*) 'changer nbapp_wk ou alors commenter ce test ', & |
---|
| 1377 | 'mais 1+1<>2' |
---|
| 1378 | abort_message='nbre de pas de temps physique n est pas multiple ' & |
---|
| 1379 | // 'de nbapp_wk' |
---|
| 1380 | call abort_physic(modname,abort_message,1) |
---|
| 1381 | ENDIF |
---|
[2469] | 1382 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
[524] | 1383 | |
---|
[2469] | 1384 | CALL phyetat0 ("startphy.nc",clesphy0,tabcntr0) |
---|
[2565] | 1385 | !jyg< |
---|
[2469] | 1386 | IF (klon_glo==1) THEN |
---|
[2565] | 1387 | pbl_tke(:,:,is_ave) = 0. |
---|
| 1388 | DO nsrf=1,nbsrf |
---|
| 1389 | DO k = 1,klev+1 |
---|
| 1390 | pbl_tke(:,k,is_ave) = pbl_tke(:,k,is_ave) & |
---|
| 1391 | +pctsrf(:,nsrf)*pbl_tke(:,k,nsrf) |
---|
| 1392 | ENDDO |
---|
| 1393 | ENDDO |
---|
| 1394 | !>jyg |
---|
[2469] | 1395 | ENDIF |
---|
| 1396 | !IM begin |
---|
| 1397 | print*,'physiq: clwcon rnebcon ratqs',clwcon(1,1),rnebcon(1,1) & |
---|
| 1398 | ,ratqs(1,1) |
---|
| 1399 | !IM end |
---|
[878] | 1400 | |
---|
| 1401 | |
---|
[2469] | 1402 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 1403 | ! |
---|
| 1404 | ! on remet le calendrier a zero |
---|
| 1405 | ! |
---|
| 1406 | IF (raz_date .eq. 1) THEN |
---|
| 1407 | itau_phy = 0 |
---|
| 1408 | ENDIF |
---|
[524] | 1409 | |
---|
[2469] | 1410 | CALL printflag( tabcntr0,radpas,ok_journe, & |
---|
| 1411 | ok_instan, ok_region ) |
---|
| 1412 | ! |
---|
| 1413 | IF (ABS(dtime-pdtphys).GT.0.001) THEN |
---|
| 1414 | WRITE(lunout,*) 'Pas physique n est pas correct',dtime, & |
---|
| 1415 | pdtphys |
---|
| 1416 | abort_message='Pas physique n est pas correct ' |
---|
| 1417 | ! call abort_physic(modname,abort_message,1) |
---|
| 1418 | dtime=pdtphys |
---|
| 1419 | ENDIF |
---|
| 1420 | IF (nlon .NE. klon) THEN |
---|
| 1421 | WRITE(lunout,*)'nlon et klon ne sont pas coherents', nlon, & |
---|
| 1422 | klon |
---|
| 1423 | abort_message='nlon et klon ne sont pas coherents' |
---|
[2692] | 1424 | CALL abort_physic(modname,abort_message,1) |
---|
[2469] | 1425 | ENDIF |
---|
| 1426 | IF (nlev .NE. klev) THEN |
---|
| 1427 | WRITE(lunout,*)'nlev et klev ne sont pas coherents', nlev, & |
---|
| 1428 | klev |
---|
| 1429 | abort_message='nlev et klev ne sont pas coherents' |
---|
[2692] | 1430 | CALL abort_physic(modname,abort_message,1) |
---|
[2469] | 1431 | ENDIF |
---|
| 1432 | ! |
---|
| 1433 | IF (dtime*REAL(radpas).GT.21600..AND.iflag_cycle_diurne.GE.1) THEN |
---|
| 1434 | WRITE(lunout,*)'Nbre d appels au rayonnement insuffisant' |
---|
| 1435 | WRITE(lunout,*)"Au minimum 4 appels par jour si cycle diurne" |
---|
| 1436 | abort_message='Nbre d appels au rayonnement insuffisant' |
---|
[2692] | 1437 | CALL abort_physic(modname,abort_message,1) |
---|
[2469] | 1438 | ENDIF |
---|
| 1439 | WRITE(lunout,*)"Clef pour la convection, iflag_con=", iflag_con |
---|
| 1440 | WRITE(lunout,*)"Clef pour le driver de la convection, ok_cvl=", & |
---|
| 1441 | ok_cvl |
---|
| 1442 | ! |
---|
| 1443 | !KE43 |
---|
| 1444 | ! Initialisation pour la convection de K.E. (sb): |
---|
| 1445 | IF (iflag_con.GE.3) THEN |
---|
[524] | 1446 | |
---|
[2469] | 1447 | WRITE(lunout,*)"*** Convection de Kerry Emanuel 4.3 " |
---|
| 1448 | WRITE(lunout,*) & |
---|
| 1449 | "On va utiliser le melange convectif des traceurs qui" |
---|
| 1450 | WRITE(lunout,*)"est calcule dans convect4.3" |
---|
| 1451 | WRITE(lunout,*)" !!! penser aux logical flags de phytrac" |
---|
[524] | 1452 | |
---|
[2469] | 1453 | DO i = 1, klon |
---|
| 1454 | ema_cbmf(i) = 0. |
---|
| 1455 | ema_pcb(i) = 0. |
---|
| 1456 | ema_pct(i) = 0. |
---|
| 1457 | ! ema_workcbmf(i) = 0. |
---|
| 1458 | ENDDO |
---|
| 1459 | !IM15/11/02 rajout initialisation ibas_con,itop_con cf. SB =>BEG |
---|
| 1460 | DO i = 1, klon |
---|
| 1461 | ibas_con(i) = 1 |
---|
| 1462 | itop_con(i) = 1 |
---|
| 1463 | ENDDO |
---|
| 1464 | !IM15/11/02 rajout initialisation ibas_con,itop_con cf. SB =>END |
---|
| 1465 | !================================================================ |
---|
| 1466 | !CR:04.12.07: initialisations poches froides |
---|
| 1467 | ! Controle de ALE et ALP pour la fermeture convective (jyg) |
---|
[2692] | 1468 | IF (iflag_wake>=1) THEN |
---|
[2469] | 1469 | CALL ini_wake(0.,0.,it_wape_prescr,wape_prescr,fip_prescr & |
---|
| 1470 | ,alp_bl_prescr, ale_bl_prescr) |
---|
| 1471 | ! 11/09/06 rajout initialisation ALE et ALP du wake et PBL(YU) |
---|
| 1472 | ! print*,'apres ini_wake iflag_cld_th=', iflag_cld_th |
---|
[2638] | 1473 | ! |
---|
| 1474 | ! Initialize tendencies of wake state variables (for some flag values |
---|
| 1475 | ! they are not computed). |
---|
| 1476 | d_deltat_wk(:,:) = 0. |
---|
| 1477 | d_deltaq_wk(:,:) = 0. |
---|
| 1478 | d_deltat_wk_gw(:,:) = 0. |
---|
| 1479 | d_deltaq_wk_gw(:,:) = 0. |
---|
| 1480 | d_deltat_vdf(:,:) = 0. |
---|
| 1481 | d_deltaq_vdf(:,:) = 0. |
---|
| 1482 | d_deltat_the(:,:) = 0. |
---|
| 1483 | d_deltaq_the(:,:) = 0. |
---|
| 1484 | d_deltat_ajs_cv(:,:) = 0. |
---|
| 1485 | d_deltaq_ajs_cv(:,:) = 0. |
---|
| 1486 | d_s_wk(:) = 0. |
---|
| 1487 | d_dens_wk(:) = 0. |
---|
[2692] | 1488 | ENDIF |
---|
[973] | 1489 | |
---|
[2469] | 1490 | ! do i = 1,klon |
---|
| 1491 | ! Ale_bl(i)=0. |
---|
| 1492 | ! Alp_bl(i)=0. |
---|
| 1493 | ! enddo |
---|
[1638] | 1494 | |
---|
[2469] | 1495 | !=================================================================== |
---|
| 1496 | !IM stations CFMIP |
---|
| 1497 | nCFMIP=npCFMIP |
---|
| 1498 | OPEN(98,file='npCFMIP_param.data',status='old', & |
---|
| 1499 | form='formatted',iostat=iostat) |
---|
[2692] | 1500 | IF (iostat == 0) THEN |
---|
[2469] | 1501 | READ(98,*,end=998) nCFMIP |
---|
| 1502 | 998 CONTINUE |
---|
| 1503 | CLOSE(98) |
---|
| 1504 | CONTINUE |
---|
| 1505 | IF(nCFMIP.GT.npCFMIP) THEN |
---|
| 1506 | print*,'nCFMIP > npCFMIP : augmenter npCFMIP et recompiler' |
---|
[2692] | 1507 | CALL abort_physic("physiq", "", 1) |
---|
| 1508 | ELSE |
---|
[2469] | 1509 | print*,'physiq npCFMIP=',npCFMIP,'nCFMIP=',nCFMIP |
---|
| 1510 | ENDIF |
---|
[1279] | 1511 | |
---|
[2469] | 1512 | ! |
---|
| 1513 | ALLOCATE(tabCFMIP(nCFMIP)) |
---|
| 1514 | ALLOCATE(lonCFMIP(nCFMIP), latCFMIP(nCFMIP)) |
---|
| 1515 | ALLOCATE(tabijGCM(nCFMIP)) |
---|
| 1516 | ALLOCATE(lonGCM(nCFMIP), latGCM(nCFMIP)) |
---|
| 1517 | ALLOCATE(iGCM(nCFMIP), jGCM(nCFMIP)) |
---|
| 1518 | ! |
---|
| 1519 | ! lecture des nCFMIP stations CFMIP, de leur numero |
---|
| 1520 | ! et des coordonnees geographiques lonCFMIP, latCFMIP |
---|
| 1521 | ! |
---|
| 1522 | CALL read_CFMIP_point_locations(nCFMIP, tabCFMIP, & |
---|
| 1523 | lonCFMIP, latCFMIP) |
---|
| 1524 | ! |
---|
| 1525 | ! identification des |
---|
| 1526 | ! 1) coordonnees lonGCM, latGCM des points CFMIP dans la |
---|
| 1527 | ! grille de LMDZ |
---|
| 1528 | ! 2) indices points tabijGCM de la grille physique 1d sur |
---|
| 1529 | ! klon points |
---|
| 1530 | ! 3) indices iGCM, jGCM de la grille physique 2d |
---|
| 1531 | ! |
---|
| 1532 | CALL LMDZ_CFMIP_point_locations(nCFMIP, lonCFMIP, latCFMIP, & |
---|
| 1533 | tabijGCM, lonGCM, latGCM, iGCM, jGCM) |
---|
| 1534 | ! |
---|
[2692] | 1535 | ELSE |
---|
[2469] | 1536 | ALLOCATE(tabijGCM(0)) |
---|
| 1537 | ALLOCATE(lonGCM(0), latGCM(0)) |
---|
| 1538 | ALLOCATE(iGCM(0), jGCM(0)) |
---|
[2692] | 1539 | ENDIF |
---|
| 1540 | ELSE |
---|
[2469] | 1541 | ALLOCATE(tabijGCM(0)) |
---|
| 1542 | ALLOCATE(lonGCM(0), latGCM(0)) |
---|
| 1543 | ALLOCATE(iGCM(0), jGCM(0)) |
---|
| 1544 | ENDIF |
---|
[878] | 1545 | |
---|
[2469] | 1546 | DO i=1,klon |
---|
| 1547 | rugoro(i) = f_rugoro * MAX(1.0e-05, zstd(i)*zsig(i)/2.0) |
---|
| 1548 | ENDDO |
---|
[1863] | 1549 | |
---|
[2469] | 1550 | !34EK |
---|
| 1551 | IF (ok_orodr) THEN |
---|
[524] | 1552 | |
---|
[2469] | 1553 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 1554 | ! FH sans doute a enlever de finitivement ou, si on le |
---|
| 1555 | ! garde, l'activer justement quand ok_orodr = false. |
---|
| 1556 | ! ce rugoro est utilise par la couche limite et fait double emploi |
---|
| 1557 | ! avec les param\'etrisations sp\'ecifiques de Francois Lott. |
---|
| 1558 | ! DO i=1,klon |
---|
| 1559 | ! rugoro(i) = MAX(1.0e-05, zstd(i)*zsig(i)/2.0) |
---|
| 1560 | ! ENDDO |
---|
| 1561 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 1562 | IF (ok_strato) THEN |
---|
| 1563 | CALL SUGWD_strato(klon,klev,paprs,pplay) |
---|
| 1564 | ELSE |
---|
| 1565 | CALL SUGWD(klon,klev,paprs,pplay) |
---|
| 1566 | ENDIF |
---|
[1863] | 1567 | |
---|
[2469] | 1568 | DO i=1,klon |
---|
| 1569 | zuthe(i)=0. |
---|
| 1570 | zvthe(i)=0. |
---|
[2692] | 1571 | IF (zstd(i).gt.10.) THEN |
---|
[2469] | 1572 | zuthe(i)=(1.-zgam(i))*cos(zthe(i)) |
---|
| 1573 | zvthe(i)=(1.-zgam(i))*sin(zthe(i)) |
---|
[2692] | 1574 | ENDIF |
---|
[2469] | 1575 | ENDDO |
---|
| 1576 | ENDIF |
---|
| 1577 | ! |
---|
| 1578 | ! |
---|
| 1579 | lmt_pas = NINT(86400./dtime * 1.0) ! tous les jours |
---|
| 1580 | WRITE(lunout,*)'La frequence de lecture surface est de ', & |
---|
| 1581 | lmt_pas |
---|
| 1582 | ! |
---|
| 1583 | capemaxcels = 't_max(X)' |
---|
| 1584 | t2mincels = 't_min(X)' |
---|
| 1585 | t2maxcels = 't_max(X)' |
---|
| 1586 | tinst = 'inst(X)' |
---|
| 1587 | tave = 'ave(X)' |
---|
| 1588 | !IM cf. AM 081204 BEG |
---|
| 1589 | write(lunout,*)'AVANT HIST IFLAG_CON=',iflag_con |
---|
| 1590 | !IM cf. AM 081204 END |
---|
| 1591 | ! |
---|
| 1592 | !============================================================= |
---|
| 1593 | ! Initialisation des sorties |
---|
| 1594 | !============================================================= |
---|
| 1595 | |
---|
[2679] | 1596 | #ifdef CPP_XIOS |
---|
| 1597 | !--setting up swaero_diag to TRUE in XIOS case |
---|
| 1598 | IF (xios_field_is_active("topswad").OR.xios_field_is_active("topswad0").OR. & |
---|
| 1599 | xios_field_is_active("solswad").OR.xios_field_is_active("solswad0").OR. & |
---|
| 1600 | xios_field_is_active("topswai").OR.xios_field_is_active("solswai").OR. & |
---|
| 1601 | (iflag_rrtm==1.AND.(xios_field_is_active("toplwad").OR.xios_field_is_active("toplwad0").OR. & |
---|
| 1602 | xios_field_is_active("sollwad").OR.xios_field_is_active("sollwad0")))) & |
---|
| 1603 | !!!--for now these fields are not in the XML files so they are omitted |
---|
| 1604 | !!! xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) & |
---|
| 1605 | swaero_diag=.TRUE. |
---|
[2854] | 1606 | |
---|
| 1607 | !--setting up dryaod_diag to TRUE in XIOS case |
---|
| 1608 | DO naero = 1, naero_tot-1 |
---|
[2863] | 1609 | IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE. |
---|
[2854] | 1610 | ENDDO |
---|
[2679] | 1611 | #endif |
---|
| 1612 | |
---|
[524] | 1613 | #ifdef CPP_IOIPSL |
---|
| 1614 | |
---|
[2469] | 1615 | !$OMP MASTER |
---|
| 1616 | ! FH : if ok_sync=.true. , the time axis is written at each time step |
---|
| 1617 | ! in the output files. Only at the end in the opposite case |
---|
| 1618 | ok_sync_omp=.false. |
---|
| 1619 | CALL getin('ok_sync',ok_sync_omp) |
---|
[2692] | 1620 | CALL phys_output_open(longitude_deg,latitude_deg,nCFMIP,tabijGCM, & |
---|
[2469] | 1621 | iGCM,jGCM,lonGCM,latGCM, & |
---|
| 1622 | jjmp1,nlevSTD,clevSTD,rlevSTD, dtime,ok_veget, & |
---|
| 1623 | type_ocean,iflag_pbl,iflag_pbl_split,ok_mensuel,ok_journe, & |
---|
[2738] | 1624 | ok_hf,ok_instan,ok_LES,ok_ade,ok_aie, & |
---|
[2469] | 1625 | read_climoz, phys_out_filestations, & |
---|
| 1626 | new_aod, aerosol_couple, & |
---|
| 1627 | flag_aerosol_strat, pdtphys, paprs, pphis, & |
---|
| 1628 | pplay, lmax_th, ptconv, ptconvth, ivap, & |
---|
[2665] | 1629 | d_u, d_t, qx, d_qx, zmasse, ok_sync_omp) |
---|
[2469] | 1630 | !$OMP END MASTER |
---|
| 1631 | !$OMP BARRIER |
---|
| 1632 | ok_sync=ok_sync_omp |
---|
[909] | 1633 | |
---|
[2469] | 1634 | freq_outNMC(1) = ecrit_files(7) |
---|
| 1635 | freq_outNMC(2) = ecrit_files(8) |
---|
| 1636 | freq_outNMC(3) = ecrit_files(9) |
---|
| 1637 | WRITE(lunout,*)'OK freq_outNMC(1)=',freq_outNMC(1) |
---|
| 1638 | WRITE(lunout,*)'OK freq_outNMC(2)=',freq_outNMC(2) |
---|
| 1639 | WRITE(lunout,*)'OK freq_outNMC(3)=',freq_outNMC(3) |
---|
[524] | 1640 | |
---|
[2651] | 1641 | #ifndef CPP_XIOS |
---|
[2590] | 1642 | CALL ini_paramLMDZ_phy(dtime,nid_ctesGCM) |
---|
[2651] | 1643 | #endif |
---|
[524] | 1644 | |
---|
[644] | 1645 | #endif |
---|
[2469] | 1646 | ecrit_reg = ecrit_reg * un_jour |
---|
| 1647 | ecrit_tra = ecrit_tra * un_jour |
---|
[1863] | 1648 | |
---|
[2469] | 1649 | !XXXPB Positionner date0 pour initialisation de ORCHIDEE |
---|
| 1650 | date0 = jD_ref |
---|
| 1651 | WRITE(*,*) 'physiq date0 : ',date0 |
---|
| 1652 | ! |
---|
| 1653 | ! |
---|
| 1654 | ! |
---|
| 1655 | ! Prescrire l'ozone dans l'atmosphere |
---|
| 1656 | ! |
---|
| 1657 | ! |
---|
| 1658 | !c DO i = 1, klon |
---|
| 1659 | !c DO k = 1, klev |
---|
| 1660 | !c CALL o3cm (paprs(i,k)/100.,paprs(i,k+1)/100., wo(i,k),20) |
---|
| 1661 | !c ENDDO |
---|
| 1662 | !c ENDDO |
---|
| 1663 | ! |
---|
| 1664 | IF (type_trac == 'inca') THEN |
---|
[524] | 1665 | #ifdef INCA |
---|
[2469] | 1666 | CALL VTe(VTphysiq) |
---|
| 1667 | CALL VTb(VTinca) |
---|
| 1668 | calday = REAL(days_elapsed) + jH_cur |
---|
| 1669 | WRITE(lunout,*) 'initial time chemini', days_elapsed, calday |
---|
[959] | 1670 | |
---|
[2469] | 1671 | CALL chemini( & |
---|
| 1672 | rg, & |
---|
| 1673 | ra, & |
---|
| 1674 | cell_area, & |
---|
| 1675 | latitude_deg, & |
---|
| 1676 | longitude_deg, & |
---|
| 1677 | presnivs, & |
---|
| 1678 | calday, & |
---|
| 1679 | klon, & |
---|
| 1680 | nqtot, & |
---|
[2566] | 1681 | nqo, & |
---|
[2469] | 1682 | pdtphys, & |
---|
| 1683 | annee_ref, & |
---|
[2925] | 1684 | year_cur, & |
---|
[2469] | 1685 | day_ref, & |
---|
| 1686 | day_ini, & |
---|
| 1687 | start_time, & |
---|
| 1688 | itau_phy, & |
---|
[2831] | 1689 | date0, & |
---|
[2469] | 1690 | io_lon, & |
---|
| 1691 | io_lat) |
---|
[959] | 1692 | |
---|
[2469] | 1693 | CALL VTe(VTinca) |
---|
| 1694 | CALL VTb(VTphysiq) |
---|
[524] | 1695 | #endif |
---|
[2692] | 1696 | ENDIF |
---|
[2469] | 1697 | ! |
---|
| 1698 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 1699 | ! Nouvelle initialisation pour le rayonnement RRTM |
---|
| 1700 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
[998] | 1701 | |
---|
[2692] | 1702 | CALL iniradia(klon,klev,paprs(1,1:klev+1)) |
---|
[998] | 1703 | |
---|
[2469] | 1704 | !$omp single |
---|
[2788] | 1705 | IF (read_climoz >= 1) CALL open_climoz(ncid_climoz, press_cen_climoz, & |
---|
[2820] | 1706 | press_edg_climoz, time_climoz, ok_daily_climoz, adjust_tropopause) |
---|
[2469] | 1707 | !$omp end single |
---|
| 1708 | ! |
---|
| 1709 | !IM betaCRF |
---|
| 1710 | pfree=70000. !Pa |
---|
| 1711 | beta_pbl=1. |
---|
| 1712 | beta_free=1. |
---|
| 1713 | lon1_beta=-180. |
---|
| 1714 | lon2_beta=+180. |
---|
| 1715 | lat1_beta=90. |
---|
| 1716 | lat2_beta=-90. |
---|
| 1717 | mskocean_beta=.FALSE. |
---|
[1539] | 1718 | |
---|
[2469] | 1719 | !albedo SB >>> |
---|
| 1720 | select case(nsw) |
---|
| 1721 | case(2) |
---|
| 1722 | SFRWL(1)=0.45538747 |
---|
| 1723 | SFRWL(2)=0.54461211 |
---|
| 1724 | case(4) |
---|
| 1725 | SFRWL(1)=0.45538747 |
---|
| 1726 | SFRWL(2)=0.32870591 |
---|
| 1727 | SFRWL(3)=0.18568763 |
---|
| 1728 | SFRWL(4)=3.02191470E-02 |
---|
| 1729 | case(6) |
---|
| 1730 | SFRWL(1)=1.28432794E-03 |
---|
| 1731 | SFRWL(2)=0.12304168 |
---|
| 1732 | SFRWL(3)=0.33106142 |
---|
| 1733 | SFRWL(4)=0.32870591 |
---|
| 1734 | SFRWL(5)=0.18568763 |
---|
| 1735 | SFRWL(6)=3.02191470E-02 |
---|
| 1736 | end select |
---|
[2227] | 1737 | |
---|
| 1738 | |
---|
[2469] | 1739 | !albedo SB <<< |
---|
[2227] | 1740 | |
---|
[2469] | 1741 | OPEN(99,file='beta_crf.data',status='old', & |
---|
| 1742 | form='formatted',err=9999) |
---|
| 1743 | READ(99,*,end=9998) pfree |
---|
| 1744 | READ(99,*,end=9998) beta_pbl |
---|
| 1745 | READ(99,*,end=9998) beta_free |
---|
| 1746 | READ(99,*,end=9998) lon1_beta |
---|
| 1747 | READ(99,*,end=9998) lon2_beta |
---|
| 1748 | READ(99,*,end=9998) lat1_beta |
---|
| 1749 | READ(99,*,end=9998) lat2_beta |
---|
| 1750 | READ(99,*,end=9998) mskocean_beta |
---|
| 1751 | 9998 Continue |
---|
| 1752 | CLOSE(99) |
---|
| 1753 | 9999 Continue |
---|
| 1754 | WRITE(*,*)'pfree=',pfree |
---|
| 1755 | WRITE(*,*)'beta_pbl=',beta_pbl |
---|
| 1756 | WRITE(*,*)'beta_free=',beta_free |
---|
| 1757 | WRITE(*,*)'lon1_beta=',lon1_beta |
---|
| 1758 | WRITE(*,*)'lon2_beta=',lon2_beta |
---|
| 1759 | WRITE(*,*)'lat1_beta=',lat1_beta |
---|
| 1760 | WRITE(*,*)'lat2_beta=',lat2_beta |
---|
| 1761 | WRITE(*,*)'mskocean_beta=',mskocean_beta |
---|
| 1762 | ENDIF |
---|
| 1763 | ! |
---|
| 1764 | ! **************** Fin de IF ( debut ) *************** |
---|
| 1765 | ! |
---|
| 1766 | ! |
---|
| 1767 | ! Incrementer le compteur de la physique |
---|
| 1768 | ! |
---|
| 1769 | itap = itap + 1 |
---|
[2795] | 1770 | IF (is_master .OR. prt_level > 9) THEN |
---|
[2783] | 1771 | IF (prt_level > 5 .or. MOD(itap,5) == 0) THEN |
---|
[2795] | 1772 | WRITE(LUNOUT,*)'Entering physics elapsed seconds since start ', current_time |
---|
| 1773 | WRITE(LUNOUT,100)year_cur,mth_cur,day_cur,hour/3600. |
---|
| 1774 | 100 FORMAT('Date = ',i4.4,' / ',i2.2, ' / ',i2.2,' : ',f20.17) |
---|
[2783] | 1775 | ENDIF |
---|
| 1776 | ENDIF |
---|
[2469] | 1777 | ! |
---|
| 1778 | ! |
---|
| 1779 | ! Update fraction of the sub-surfaces (pctsrf) and |
---|
| 1780 | ! initialize, where a new fraction has appeared, all variables depending |
---|
| 1781 | ! on the surface fraction. |
---|
| 1782 | ! |
---|
| 1783 | CALL change_srf_frac(itap, dtime, days_elapsed+1, & |
---|
| 1784 | pctsrf, fevap, z0m, z0h, agesno, & |
---|
| 1785 | falb_dir, falb_dif, ftsol, ustar, u10m, v10m, pbl_tke) |
---|
[996] | 1786 | |
---|
[2469] | 1787 | ! Update time and other variables in Reprobus |
---|
| 1788 | IF (type_trac == 'repr') THEN |
---|
[1565] | 1789 | #ifdef REPROBUS |
---|
[2469] | 1790 | CALL Init_chem_rep_xjour(jD_cur-jD_ref+day_ref) |
---|
| 1791 | print*,'xjour equivalent rjourvrai',jD_cur-jD_ref+day_ref |
---|
| 1792 | CALL Rtime(debut) |
---|
[1565] | 1793 | #endif |
---|
[2692] | 1794 | ENDIF |
---|
[1565] | 1795 | |
---|
| 1796 | |
---|
[2469] | 1797 | ! Tendances bidons pour les processus qui n'affectent pas certaines |
---|
| 1798 | ! variables. |
---|
| 1799 | du0(:,:)=0. |
---|
| 1800 | dv0(:,:)=0. |
---|
| 1801 | dt0 = 0. |
---|
| 1802 | dq0(:,:)=0. |
---|
| 1803 | dql0(:,:)=0. |
---|
| 1804 | dqi0(:,:)=0. |
---|
[2635] | 1805 | dsig0(:) = 0. |
---|
| 1806 | ddens0(:) = 0. |
---|
| 1807 | wkoccur1(:)=1 |
---|
[2469] | 1808 | ! |
---|
| 1809 | ! Mettre a zero des variables de sortie (pour securite) |
---|
| 1810 | ! |
---|
| 1811 | DO i = 1, klon |
---|
| 1812 | d_ps(i) = 0.0 |
---|
| 1813 | ENDDO |
---|
| 1814 | DO k = 1, klev |
---|
| 1815 | DO i = 1, klon |
---|
| 1816 | d_t(i,k) = 0.0 |
---|
| 1817 | d_u(i,k) = 0.0 |
---|
| 1818 | d_v(i,k) = 0.0 |
---|
| 1819 | ENDDO |
---|
| 1820 | ENDDO |
---|
| 1821 | DO iq = 1, nqtot |
---|
| 1822 | DO k = 1, klev |
---|
| 1823 | DO i = 1, klon |
---|
| 1824 | d_qx(i,k,iq) = 0.0 |
---|
| 1825 | ENDDO |
---|
| 1826 | ENDDO |
---|
| 1827 | ENDDO |
---|
| 1828 | da(:,:)=0. |
---|
| 1829 | mp(:,:)=0. |
---|
| 1830 | phi(:,:,:)=0. |
---|
| 1831 | ! RomP >>> |
---|
| 1832 | phi2(:,:,:)=0. |
---|
| 1833 | beta_prec_fisrt(:,:)=0. |
---|
| 1834 | beta_prec(:,:)=0. |
---|
| 1835 | epmlmMm(:,:,:)=0. |
---|
| 1836 | eplaMm(:,:)=0. |
---|
| 1837 | d1a(:,:)=0. |
---|
| 1838 | dam(:,:)=0. |
---|
| 1839 | pmflxr=0. |
---|
| 1840 | pmflxs=0. |
---|
| 1841 | ! RomP <<< |
---|
[1742] | 1842 | |
---|
[2469] | 1843 | ! |
---|
| 1844 | ! Ne pas affecter les valeurs entrees de u, v, h, et q |
---|
| 1845 | ! |
---|
| 1846 | DO k = 1, klev |
---|
| 1847 | DO i = 1, klon |
---|
| 1848 | t_seri(i,k) = t(i,k) |
---|
| 1849 | u_seri(i,k) = u(i,k) |
---|
| 1850 | v_seri(i,k) = v(i,k) |
---|
| 1851 | q_seri(i,k) = qx(i,k,ivap) |
---|
| 1852 | ql_seri(i,k) = qx(i,k,iliq) |
---|
| 1853 | !CR: ATTENTION, on rajoute la variable glace |
---|
[2692] | 1854 | IF (nqo.eq.2) THEN |
---|
[2469] | 1855 | qs_seri(i,k) = 0. |
---|
[2692] | 1856 | ELSE IF (nqo.eq.3) THEN |
---|
[2469] | 1857 | qs_seri(i,k) = qx(i,k,isol) |
---|
[2692] | 1858 | ENDIF |
---|
[2469] | 1859 | ENDDO |
---|
| 1860 | ENDDO |
---|
[2476] | 1861 | ! |
---|
| 1862 | !--OB mass fixer |
---|
| 1863 | IF (mass_fixer) THEN |
---|
| 1864 | !--store initial water burden |
---|
| 1865 | qql1(:)=0.0 |
---|
[2499] | 1866 | DO k = 1, klev |
---|
| 1867 | qql1(:)=qql1(:)+(q_seri(:,k)+ql_seri(:,k)+qs_seri(:,k))*zmasse(:,k) |
---|
[2476] | 1868 | ENDDO |
---|
| 1869 | ENDIF |
---|
| 1870 | !--fin mass fixer |
---|
| 1871 | |
---|
[2469] | 1872 | tke0(:,:)=pbl_tke(:,:,is_ave) |
---|
| 1873 | !CR:Nombre de traceurs de l'eau: nqo |
---|
| 1874 | ! IF (nqtot.GE.3) THEN |
---|
| 1875 | IF (nqtot.GE.(nqo+1)) THEN |
---|
| 1876 | ! DO iq = 3, nqtot |
---|
| 1877 | DO iq = nqo+1, nqtot |
---|
| 1878 | DO k = 1, klev |
---|
| 1879 | DO i = 1, klon |
---|
| 1880 | ! tr_seri(i,k,iq-2) = qx(i,k,iq) |
---|
| 1881 | tr_seri(i,k,iq-nqo) = qx(i,k,iq) |
---|
| 1882 | ENDDO |
---|
| 1883 | ENDDO |
---|
| 1884 | ENDDO |
---|
| 1885 | ELSE |
---|
| 1886 | DO k = 1, klev |
---|
| 1887 | DO i = 1, klon |
---|
| 1888 | tr_seri(i,k,1) = 0.0 |
---|
| 1889 | ENDDO |
---|
| 1890 | ENDDO |
---|
| 1891 | ENDIF |
---|
| 1892 | ! |
---|
| 1893 | DO i = 1, klon |
---|
| 1894 | ztsol(i) = 0. |
---|
| 1895 | ENDDO |
---|
| 1896 | DO nsrf = 1, nbsrf |
---|
| 1897 | DO i = 1, klon |
---|
| 1898 | ztsol(i) = ztsol(i) + ftsol(i,nsrf)*pctsrf(i,nsrf) |
---|
| 1899 | ENDDO |
---|
| 1900 | ENDDO |
---|
[2611] | 1901 | ! Initialize variables used for diagnostic purpose |
---|
[2692] | 1902 | IF (flag_inhib_tend .ne. 0) CALL init_cmp_seri |
---|
[524] | 1903 | |
---|
[2469] | 1904 | ! Diagnostiquer la tendance dynamique |
---|
| 1905 | ! |
---|
| 1906 | IF (ancien_ok) THEN |
---|
[2499] | 1907 | ! |
---|
| 1908 | d_u_dyn(:,:) = (u_seri(:,:)-u_ancien(:,:))/dtime |
---|
| 1909 | d_v_dyn(:,:) = (v_seri(:,:)-v_ancien(:,:))/dtime |
---|
| 1910 | d_t_dyn(:,:) = (t_seri(:,:)-t_ancien(:,:))/dtime |
---|
| 1911 | d_q_dyn(:,:) = (q_seri(:,:)-q_ancien(:,:))/dtime |
---|
| 1912 | d_ql_dyn(:,:) = (ql_seri(:,:)-ql_ancien(:,:))/dtime |
---|
| 1913 | d_qs_dyn(:,:) = (qs_seri(:,:)-qs_ancien(:,:))/dtime |
---|
| 1914 | CALL water_int(klon,klev,q_seri,zmasse,zx_tmp_fi2d) |
---|
| 1915 | d_q_dyn2d(:)=(zx_tmp_fi2d(:)-prw_ancien(:))/dtime |
---|
| 1916 | CALL water_int(klon,klev,ql_seri,zmasse,zx_tmp_fi2d) |
---|
| 1917 | d_ql_dyn2d(:)=(zx_tmp_fi2d(:)-prlw_ancien(:))/dtime |
---|
| 1918 | CALL water_int(klon,klev,qs_seri,zmasse,zx_tmp_fi2d) |
---|
| 1919 | d_qs_dyn2d(:)=(zx_tmp_fi2d(:)-prsw_ancien(:))/dtime |
---|
[2469] | 1920 | ! !! RomP >>> td dyn traceur |
---|
[2499] | 1921 | IF (nqtot.GT.nqo) THEN ! jyg |
---|
[2469] | 1922 | DO iq = nqo+1, nqtot ! jyg |
---|
[2499] | 1923 | d_tr_dyn(:,:,iq-nqo)=(tr_seri(:,:,iq-nqo)-tr_ancien(:,:,iq-nqo))/dtime ! jyg |
---|
[2469] | 1924 | ENDDO |
---|
| 1925 | ENDIF |
---|
| 1926 | ! !! RomP <<< |
---|
| 1927 | ELSE |
---|
[2499] | 1928 | d_u_dyn(:,:) = 0.0 |
---|
| 1929 | d_v_dyn(:,:) = 0.0 |
---|
| 1930 | d_t_dyn(:,:) = 0.0 |
---|
| 1931 | d_q_dyn(:,:) = 0.0 |
---|
| 1932 | d_ql_dyn(:,:) = 0.0 |
---|
| 1933 | d_qs_dyn(:,:) = 0.0 |
---|
| 1934 | d_q_dyn2d(:) = 0.0 |
---|
| 1935 | d_ql_dyn2d(:) = 0.0 |
---|
| 1936 | d_qs_dyn2d(:) = 0.0 |
---|
[2469] | 1937 | ! !! RomP >>> td dyn traceur |
---|
[2499] | 1938 | IF (nqtot.GT.nqo) THEN ! jyg |
---|
| 1939 | DO iq = nqo+1, nqtot ! jyg |
---|
| 1940 | d_tr_dyn(:,:,iq-nqo)= 0.0 ! jyg |
---|
[2469] | 1941 | ENDDO |
---|
| 1942 | ENDIF |
---|
| 1943 | ! !! RomP <<< |
---|
| 1944 | ancien_ok = .TRUE. |
---|
| 1945 | ENDIF |
---|
| 1946 | ! |
---|
| 1947 | ! Ajouter le geopotentiel du sol: |
---|
| 1948 | ! |
---|
| 1949 | DO k = 1, klev |
---|
| 1950 | DO i = 1, klon |
---|
| 1951 | zphi(i,k) = pphi(i,k) + pphis(i) |
---|
| 1952 | ENDDO |
---|
| 1953 | ENDDO |
---|
| 1954 | ! |
---|
| 1955 | ! Verifier les temperatures |
---|
| 1956 | ! |
---|
| 1957 | !IM BEG |
---|
| 1958 | IF (check) THEN |
---|
| 1959 | amn=MIN(ftsol(1,is_ter),1000.) |
---|
| 1960 | amx=MAX(ftsol(1,is_ter),-1000.) |
---|
| 1961 | DO i=2, klon |
---|
| 1962 | amn=MIN(ftsol(i,is_ter),amn) |
---|
| 1963 | amx=MAX(ftsol(i,is_ter),amx) |
---|
| 1964 | ENDDO |
---|
| 1965 | ! |
---|
| 1966 | PRINT*,' debut avant hgardfou min max ftsol',itap,amn,amx |
---|
| 1967 | ENDIF !(check) THEN |
---|
| 1968 | !IM END |
---|
| 1969 | ! |
---|
| 1970 | CALL hgardfou(t_seri,ftsol,'debutphy',abortphy) |
---|
| 1971 | IF (abortphy==1) Print*,'ERROR ABORT hgardfou debutphy' |
---|
[2235] | 1972 | |
---|
[2469] | 1973 | ! |
---|
| 1974 | !IM BEG |
---|
| 1975 | IF (check) THEN |
---|
| 1976 | amn=MIN(ftsol(1,is_ter),1000.) |
---|
| 1977 | amx=MAX(ftsol(1,is_ter),-1000.) |
---|
| 1978 | DO i=2, klon |
---|
| 1979 | amn=MIN(ftsol(i,is_ter),amn) |
---|
| 1980 | amx=MAX(ftsol(i,is_ter),amx) |
---|
| 1981 | ENDDO |
---|
| 1982 | ! |
---|
| 1983 | PRINT*,' debut apres hgardfou min max ftsol',itap,amn,amx |
---|
| 1984 | ENDIF !(check) THEN |
---|
| 1985 | !IM END |
---|
| 1986 | ! |
---|
| 1987 | ! Mettre en action les conditions aux limites (albedo, sst, etc.). |
---|
| 1988 | ! Prescrire l'ozone et calculer l'albedo sur l'ocean. |
---|
| 1989 | ! |
---|
[2661] | 1990 | ! Update ozone if day change |
---|
| 1991 | IF (MOD(itap-1,lmt_pas) == 0) THEN |
---|
[2774] | 1992 | IF (read_climoz <= 0) THEN |
---|
| 1993 | ! Once per day, update ozone from Royer: |
---|
| 1994 | IF (solarlong0<-999.) then |
---|
| 1995 | ! Generic case with evolvoing season |
---|
| 1996 | zzz=real(days_elapsed+1) |
---|
| 1997 | ELSE IF (abs(solarlong0-1000.)<1.e-4) then |
---|
| 1998 | ! Particular case with annual mean insolation |
---|
| 1999 | zzz=real(90) ! could be revisited |
---|
| 2000 | IF (read_climoz/=-1) THEN |
---|
| 2001 | abort_message ='read_climoz=-1 is recommended when ' & |
---|
| 2002 | // 'solarlong0=1000.' |
---|
| 2003 | CALL abort_physic (modname,abort_message,1) |
---|
| 2004 | ENDIF |
---|
| 2005 | ELSE |
---|
| 2006 | ! Case where the season is imposed with solarlong0 |
---|
| 2007 | zzz=real(90) ! could be revisited |
---|
| 2008 | ENDIF |
---|
[2661] | 2009 | |
---|
[2774] | 2010 | wo(:,:,1)=ozonecm(latitude_deg, paprs,read_climoz,rjour=zzz) |
---|
| 2011 | ELSE |
---|
[2820] | 2012 | !--- ro3i = elapsed days number since current year 1st january, 0h |
---|
| 2013 | ro3i=days_elapsed+jh_cur-jh_1jan |
---|
| 2014 | !--- scaling for old style files (360 records) |
---|
| 2015 | IF(SIZE(time_climoz)==360.AND..NOT.ok_daily_climoz) ro3i=ro3i*360./year_len |
---|
[2788] | 2016 | IF(adjust_tropopause) THEN |
---|
[2820] | 2017 | CALL dyn_tropopause(t_seri, ztsol, paprs, pplay, presnivs, rot, & |
---|
| 2018 | pr_tropopause) |
---|
| 2019 | CALL regr_pr_time_av(ncid_climoz, vars_climoz(1:read_climoz), & |
---|
| 2020 | ro3i, press_edg_climoz, paprs, wo, time_climoz, & |
---|
| 2021 | latitude_deg, press_cen_climoz, pr_tropopause) |
---|
[2774] | 2022 | ELSE |
---|
[2820] | 2023 | CALL regr_pr_time_av(ncid_climoz, vars_climoz(1:read_climoz), & |
---|
| 2024 | ro3i, press_edg_climoz, paprs, wo, time_climoz) |
---|
[2788] | 2025 | END IF |
---|
[2774] | 2026 | ! Convert from mole fraction of ozone to column density of ozone in a |
---|
| 2027 | ! cell, in kDU: |
---|
| 2028 | FORALL (l = 1: read_climoz) wo(:, :, l) = wo(:, :, l) * rmo3 / rmd & |
---|
| 2029 | * zmasse / dobson_u / 1e3 |
---|
[2788] | 2030 | ! (By regridding ozone values for LMDZ only once a day, we |
---|
[2774] | 2031 | ! have already neglected the variation of pressure in one |
---|
| 2032 | ! day. So do not recompute "wo" at each time step even if |
---|
| 2033 | ! "zmasse" changes a little.) |
---|
| 2034 | ENDIF |
---|
[2469] | 2035 | ENDIF |
---|
| 2036 | ! |
---|
| 2037 | ! Re-evaporer l'eau liquide nuageuse |
---|
| 2038 | ! |
---|
[2705] | 2039 | CALL reevap (klon,klev,iflag_ice_thermo,t_seri,q_seri,ql_seri,qs_seri, & |
---|
| 2040 | & d_t_eva,d_q_eva,d_ql_eva,d_qi_eva) |
---|
[1849] | 2041 | |
---|
[2705] | 2042 | CALL add_phys_tend & |
---|
| 2043 | (du0,dv0,d_t_eva,d_q_eva,d_ql_eva,d_qi_eva,paprs,& |
---|
[2812] | 2044 | 'eva',abortphy,flag_inhib_tend,itap,0) |
---|
[2799] | 2045 | call prt_enerbil('eva',itap) |
---|
[2086] | 2046 | |
---|
[2469] | 2047 | !========================================================================= |
---|
| 2048 | ! Calculs de l'orbite. |
---|
| 2049 | ! Necessaires pour le rayonnement et la surface (calcul de l'albedo). |
---|
| 2050 | ! doit donc etre plac\'e avant radlwsw et pbl_surface |
---|
[883] | 2051 | |
---|
[2469] | 2052 | ! !! jyg 17 Sep 2010 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
[2692] | 2053 | CALL ymds2ju(year_cur, mth_eq, day_eq,0., jD_eq) |
---|
[2469] | 2054 | day_since_equinox = (jD_cur + jH_cur) - jD_eq |
---|
| 2055 | ! |
---|
| 2056 | ! choix entre calcul de la longitude solaire vraie ou valeur fixee a |
---|
| 2057 | ! solarlong0 |
---|
[2692] | 2058 | IF (solarlong0<-999.) THEN |
---|
| 2059 | IF (new_orbit) THEN |
---|
[2469] | 2060 | ! calcul selon la routine utilisee pour les planetes |
---|
[2692] | 2061 | CALL solarlong(day_since_equinox, zlongi, dist) |
---|
| 2062 | ELSE |
---|
[2469] | 2063 | ! calcul selon la routine utilisee pour l'AR4 |
---|
| 2064 | CALL orbite(REAL(days_elapsed+1),zlongi,dist) |
---|
[2692] | 2065 | ENDIF |
---|
| 2066 | ELSE |
---|
[2469] | 2067 | zlongi=solarlong0 ! longitude solaire vraie |
---|
| 2068 | dist=1. ! distance au soleil / moyenne |
---|
[2692] | 2069 | ENDIF |
---|
[1529] | 2070 | |
---|
[2692] | 2071 | IF (prt_level.ge.1) write(lunout,*)'Longitude solaire ',zlongi,solarlong0,dist |
---|
[524] | 2072 | |
---|
[2692] | 2073 | |
---|
[2469] | 2074 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 2075 | ! Calcul de l'ensoleillement : |
---|
| 2076 | ! ============================ |
---|
| 2077 | ! Pour une solarlong0=1000., on calcule un ensoleillement moyen sur |
---|
| 2078 | ! l'annee a partir d'une formule analytique. |
---|
| 2079 | ! Cet ensoleillement est sym\'etrique autour de l'\'equateur et |
---|
| 2080 | ! non nul aux poles. |
---|
[2692] | 2081 | IF (abs(solarlong0-1000.)<1.e-4) THEN |
---|
| 2082 | CALL zenang_an(iflag_cycle_diurne.GE.1,jH_cur, & |
---|
[2469] | 2083 | latitude_deg,longitude_deg,rmu0,fract) |
---|
| 2084 | JrNt = 1.0 |
---|
| 2085 | ELSE |
---|
| 2086 | ! recode par Olivier Boucher en sept 2015 |
---|
| 2087 | SELECT CASE (iflag_cycle_diurne) |
---|
| 2088 | CASE(0) |
---|
| 2089 | ! Sans cycle diurne |
---|
| 2090 | CALL angle(zlongi, latitude_deg, fract, rmu0) |
---|
| 2091 | swradcorr = 1.0 |
---|
| 2092 | JrNt = 1.0 |
---|
| 2093 | zrmu0 = rmu0 |
---|
| 2094 | CASE(1) |
---|
| 2095 | ! Avec cycle diurne sans application des poids |
---|
| 2096 | ! bit comparable a l ancienne formulation cycle_diurne=true |
---|
| 2097 | ! on integre entre gmtime et gmtime+radpas |
---|
| 2098 | zdtime=dtime*REAL(radpas) ! pas de temps du rayonnement (s) |
---|
| 2099 | CALL zenang(zlongi,jH_cur,0.0,zdtime, & |
---|
| 2100 | latitude_deg,longitude_deg,rmu0,fract) |
---|
| 2101 | zrmu0 = rmu0 |
---|
| 2102 | swradcorr = 1.0 |
---|
| 2103 | ! Calcul du flag jour-nuit |
---|
| 2104 | JrNt = 0.0 |
---|
| 2105 | WHERE (fract.GT.0.0) JrNt = 1.0 |
---|
| 2106 | CASE(2) |
---|
| 2107 | ! Avec cycle diurne sans application des poids |
---|
| 2108 | ! On integre entre gmtime-pdtphys et gmtime+pdtphys*(radpas-1) |
---|
| 2109 | ! Comme cette routine est appele a tous les pas de temps de |
---|
| 2110 | ! la physique meme si le rayonnement n'est pas appele je |
---|
| 2111 | ! remonte en arriere les radpas-1 pas de temps |
---|
| 2112 | ! suivant. Petite ruse avec MOD pour prendre en compte le |
---|
| 2113 | ! premier pas de temps de la physique pendant lequel |
---|
| 2114 | ! itaprad=0 |
---|
| 2115 | zdtime1=dtime*REAL(-MOD(itaprad,radpas)-1) |
---|
| 2116 | zdtime2=dtime*REAL(radpas-MOD(itaprad,radpas)-1) |
---|
| 2117 | CALL zenang(zlongi,jH_cur,zdtime1,zdtime2, & |
---|
| 2118 | latitude_deg,longitude_deg,rmu0,fract) |
---|
| 2119 | ! |
---|
| 2120 | ! Calcul des poids |
---|
| 2121 | ! |
---|
| 2122 | zdtime1=-dtime !--on corrige le rayonnement pour representer le |
---|
| 2123 | zdtime2=0.0 !--pas de temps de la physique qui se termine |
---|
| 2124 | CALL zenang(zlongi,jH_cur,zdtime1,zdtime2, & |
---|
| 2125 | latitude_deg,longitude_deg,zrmu0,zfract) |
---|
| 2126 | swradcorr = 0.0 |
---|
| 2127 | WHERE (rmu0.GE.1.e-10 .OR. fract.GE.1.e-10) & |
---|
| 2128 | swradcorr=zfract/fract*zrmu0/rmu0 |
---|
| 2129 | ! Calcul du flag jour-nuit |
---|
| 2130 | JrNt = 0.0 |
---|
| 2131 | WHERE (zfract.GT.0.0) JrNt = 1.0 |
---|
| 2132 | END SELECT |
---|
| 2133 | ENDIF |
---|
[782] | 2134 | |
---|
[2692] | 2135 | IF (mydebug) THEN |
---|
| 2136 | CALL writefield_phy('u_seri',u_seri,nbp_lev) |
---|
| 2137 | CALL writefield_phy('v_seri',v_seri,nbp_lev) |
---|
| 2138 | CALL writefield_phy('t_seri',t_seri,nbp_lev) |
---|
| 2139 | CALL writefield_phy('q_seri',q_seri,nbp_lev) |
---|
| 2140 | ENDIF |
---|
[883] | 2141 | |
---|
[2469] | 2142 | !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 2143 | ! Appel au pbl_surface : Planetary Boudary Layer et Surface |
---|
| 2144 | ! Cela implique tous les interactions des sous-surfaces et la |
---|
| 2145 | ! partie diffusion turbulent du couche limit. |
---|
| 2146 | ! |
---|
| 2147 | ! Certains varibales de sorties de pbl_surface sont utiliser que pour |
---|
| 2148 | ! ecriture des fihiers hist_XXXX.nc, ces sont : |
---|
| 2149 | ! qsol, zq2m, s_pblh, s_lcl, |
---|
| 2150 | ! s_capCL, s_oliqCL, s_cteiCL,s_pblT, |
---|
| 2151 | ! s_therm, s_trmb1, s_trmb2, s_trmb3, |
---|
| 2152 | ! zu10m, zv10m, fder, |
---|
| 2153 | ! zxqsurf, rh2m, zxfluxu, zxfluxv, |
---|
| 2154 | ! frugs, agesno, fsollw, fsolsw, |
---|
| 2155 | ! d_ts, fevap, fluxlat, t2m, |
---|
| 2156 | ! wfbils, wfbilo, fluxt, fluxu, fluxv, |
---|
| 2157 | ! |
---|
| 2158 | ! Certains ne sont pas utiliser du tout : |
---|
| 2159 | ! dsens, devap, zxsnow, zxfluxt, zxfluxq, q2m, fluxq |
---|
| 2160 | ! |
---|
[1724] | 2161 | |
---|
[2469] | 2162 | ! Calcul de l'humidite de saturation au niveau du sol |
---|
[1724] | 2163 | |
---|
| 2164 | |
---|
[996] | 2165 | |
---|
[2692] | 2166 | IF (iflag_pbl/=0) THEN |
---|
[2240] | 2167 | |
---|
[2469] | 2168 | !jyg+nrlmd< |
---|
[2852] | 2169 | !!jyg IF (prt_level .ge. 2 .and. mod(iflag_pbl_split,2) .eq. 1) THEN |
---|
| 2170 | IF (prt_level .ge. 2 .and. mod(iflag_pbl_split,10) .ge. 1) THEN |
---|
[2469] | 2171 | print *,'debut du splitting de la PBL' |
---|
| 2172 | ENDIF |
---|
| 2173 | ! !! |
---|
| 2174 | !>jyg+nrlmd |
---|
| 2175 | ! |
---|
| 2176 | !-------gustiness calculation-------! |
---|
| 2177 | IF (iflag_gusts==0) THEN |
---|
| 2178 | gustiness(1:klon)=0 |
---|
| 2179 | ELSE IF (iflag_gusts==1) THEN |
---|
| 2180 | do i = 1, klon |
---|
| 2181 | gustiness(i)=f_gust_bl*ale_bl(i)+f_gust_wk*ale_wake(i) |
---|
| 2182 | enddo |
---|
| 2183 | ! ELSE IF (iflag_gusts==2) THEN |
---|
| 2184 | ! do i = 1, klon |
---|
| 2185 | ! gustiness(i)=f_gust_bl*ale_bl(i)+sigma_wk(i)*f_gust_wk& |
---|
| 2186 | ! *ale_wake(i) !! need to make sigma_wk accessible here |
---|
| 2187 | ! enddo |
---|
| 2188 | ! ELSE IF (iflag_gusts==3) THEN |
---|
| 2189 | ! do i = 1, klon |
---|
| 2190 | ! gustiness(i)=f_gust_bl*alp_bl(i)+f_gust_wk*alp_wake(i) |
---|
| 2191 | ! enddo |
---|
| 2192 | ENDIF |
---|
[2278] | 2193 | |
---|
| 2194 | |
---|
[1067] | 2195 | |
---|
[2469] | 2196 | CALL pbl_surface( & |
---|
| 2197 | dtime, date0, itap, days_elapsed+1, & |
---|
| 2198 | debut, lafin, & |
---|
| 2199 | longitude_deg, latitude_deg, rugoro, zrmu0, & |
---|
| 2200 | zsig, sollwdown, pphi, cldt, & |
---|
| 2201 | rain_fall, snow_fall, solsw, sollw, & |
---|
| 2202 | gustiness, & |
---|
| 2203 | t_seri, q_seri, u_seri, v_seri, & |
---|
| 2204 | !nrlmd+jyg< |
---|
| 2205 | wake_deltat, wake_deltaq, wake_cstar, wake_s, & |
---|
| 2206 | !>nrlmd+jyg |
---|
| 2207 | pplay, paprs, pctsrf, & |
---|
| 2208 | ftsol,SFRWL,falb_dir,falb_dif,ustar,u10m,v10m,wstar, & |
---|
| 2209 | !albedo SB <<< |
---|
| 2210 | cdragh, cdragm, u1, v1, & |
---|
| 2211 | !albedo SB >>> |
---|
| 2212 | ! albsol1, albsol2, sens, evap, & |
---|
| 2213 | albsol_dir, albsol_dif, sens, evap, & |
---|
| 2214 | !albedo SB <<< |
---|
| 2215 | albsol3_lic,runoff, snowhgt, qsnow, to_ice, sissnow, & |
---|
| 2216 | zxtsol, zxfluxlat, zt2m, qsat2m, & |
---|
| 2217 | d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, d_t_diss, & |
---|
| 2218 | !nrlmd< |
---|
| 2219 | !jyg< |
---|
| 2220 | d_t_vdf_w, d_q_vdf_w, & |
---|
| 2221 | d_t_vdf_x, d_q_vdf_x, & |
---|
| 2222 | sens_x, zxfluxlat_x, sens_w, zxfluxlat_w, & |
---|
| 2223 | !>jyg |
---|
| 2224 | delta_tsurf,wake_dens, & |
---|
| 2225 | cdragh_x,cdragh_w,cdragm_x,cdragm_w, & |
---|
| 2226 | kh,kh_x,kh_w, & |
---|
| 2227 | !>nrlmd |
---|
| 2228 | coefh(1:klon,1:klev,1:nbsrf+1), coefm(1:klon,1:klev,1:nbsrf+1), & |
---|
| 2229 | slab_wfbils, & |
---|
| 2230 | qsol, zq2m, s_pblh, s_lcl, & |
---|
| 2231 | !jyg< |
---|
| 2232 | s_pblh_x, s_lcl_x, s_pblh_w, s_lcl_w, & |
---|
| 2233 | !>jyg |
---|
| 2234 | s_capCL, s_oliqCL, s_cteiCL,s_pblT, & |
---|
| 2235 | s_therm, s_trmb1, s_trmb2, s_trmb3, & |
---|
| 2236 | zustar, zu10m, zv10m, fder, & |
---|
| 2237 | zxqsurf, rh2m, zxfluxu, zxfluxv, & |
---|
| 2238 | z0m, z0h, agesno, fsollw, fsolsw, & |
---|
| 2239 | d_ts, fevap, fluxlat, t2m, & |
---|
[2670] | 2240 | wfbils, wfbilo, wfevap, wfrain, wfsnow, & |
---|
| 2241 | fluxt, fluxu, fluxv, & |
---|
[2469] | 2242 | dsens, devap, zxsnow, & |
---|
| 2243 | zxfluxt, zxfluxq, q2m, fluxq, pbl_tke, & |
---|
| 2244 | !nrlmd+jyg< |
---|
[2924] | 2245 | wake_delta_pbl_TKE, & |
---|
[2469] | 2246 | !>nrlmd+jyg |
---|
[2924] | 2247 | treedrg ) |
---|
| 2248 | !FC |
---|
[2469] | 2249 | ! |
---|
| 2250 | ! Add turbulent diffusion tendency to the wake difference variables |
---|
[2852] | 2251 | !!jyg IF (mod(iflag_pbl_split,2) .NE. 0) THEN |
---|
| 2252 | IF (mod(iflag_pbl_split,10) .NE. 0) THEN |
---|
[2635] | 2253 | !jyg< |
---|
| 2254 | d_deltat_vdf(:,:) = d_t_vdf_w(:,:)-d_t_vdf_x(:,:) |
---|
| 2255 | d_deltaq_vdf(:,:) = d_q_vdf_w(:,:)-d_q_vdf_x(:,:) |
---|
| 2256 | CALL add_wake_tend & |
---|
| 2257 | (d_deltat_vdf, d_deltaq_vdf, dsig0, ddens0, wkoccur1, 'vdf', abortphy) |
---|
| 2258 | ELSE |
---|
| 2259 | d_deltat_vdf(:,:) = 0. |
---|
| 2260 | d_deltaq_vdf(:,:) = 0. |
---|
| 2261 | !>jyg |
---|
[2469] | 2262 | ENDIF |
---|
[1624] | 2263 | |
---|
[766] | 2264 | |
---|
[2897] | 2265 | |
---|
| 2266 | |
---|
| 2267 | |
---|
[2469] | 2268 | !--------------------------------------------------------------------- |
---|
| 2269 | ! ajout des tendances de la diffusion turbulente |
---|
| 2270 | IF (klon_glo==1) THEN |
---|
| 2271 | CALL add_pbl_tend & |
---|
| 2272 | (d_u_vdf,d_v_vdf,d_t_vdf+d_t_diss,d_q_vdf,dql0,dqi0,paprs,& |
---|
[2799] | 2273 | 'vdf',abortphy,flag_inhib_tend,itap) |
---|
[2469] | 2274 | ELSE |
---|
| 2275 | CALL add_phys_tend & |
---|
| 2276 | (d_u_vdf,d_v_vdf,d_t_vdf+d_t_diss,d_q_vdf,dql0,dqi0,paprs,& |
---|
[2812] | 2277 | 'vdf',abortphy,flag_inhib_tend,itap,0) |
---|
[2469] | 2278 | ENDIF |
---|
[2799] | 2279 | call prt_enerbil('vdf',itap) |
---|
[2469] | 2280 | !-------------------------------------------------------------------- |
---|
[766] | 2281 | |
---|
[2692] | 2282 | IF (mydebug) THEN |
---|
| 2283 | CALL writefield_phy('u_seri',u_seri,nbp_lev) |
---|
| 2284 | CALL writefield_phy('v_seri',v_seri,nbp_lev) |
---|
| 2285 | CALL writefield_phy('t_seri',t_seri,nbp_lev) |
---|
| 2286 | CALL writefield_phy('q_seri',q_seri,nbp_lev) |
---|
| 2287 | ENDIF |
---|
[2227] | 2288 | |
---|
[2469] | 2289 | !albedo SB >>> |
---|
| 2290 | albsol1=0. |
---|
| 2291 | albsol2=0. |
---|
| 2292 | falb1=0. |
---|
| 2293 | falb2=0. |
---|
[2692] | 2294 | SELECT CASE(nsw) |
---|
| 2295 | CASE(2) |
---|
[2469] | 2296 | albsol1=albsol_dir(:,1) |
---|
| 2297 | albsol2=albsol_dir(:,2) |
---|
| 2298 | falb1=falb_dir(:,1,:) |
---|
| 2299 | falb2=falb_dir(:,2,:) |
---|
[2692] | 2300 | CASE(4) |
---|
[2469] | 2301 | albsol1=albsol_dir(:,1) |
---|
| 2302 | albsol2=albsol_dir(:,2)*SFRWL(2)+albsol_dir(:,3)*SFRWL(3) & |
---|
| 2303 | +albsol_dir(:,4)*SFRWL(4) |
---|
| 2304 | albsol2=albsol2/(SFRWL(2)+SFRWL(3)+SFRWL(4)) |
---|
| 2305 | falb1=falb_dir(:,1,:) |
---|
| 2306 | falb2=falb_dir(:,2,:)*SFRWL(2)+falb_dir(:,3,:)*SFRWL(3) & |
---|
| 2307 | +falb_dir(:,4,:)*SFRWL(4) |
---|
| 2308 | falb2=falb2/(SFRWL(2)+SFRWL(3)+SFRWL(4)) |
---|
[2692] | 2309 | CASE(6) |
---|
[2469] | 2310 | albsol1=albsol_dir(:,1)*SFRWL(1)+albsol_dir(:,2)*SFRWL(2) & |
---|
| 2311 | +albsol_dir(:,3)*SFRWL(3) |
---|
| 2312 | albsol1=albsol1/(SFRWL(1)+SFRWL(2)+SFRWL(3)) |
---|
| 2313 | albsol2=albsol_dir(:,4)*SFRWL(4)+albsol_dir(:,5)*SFRWL(5) & |
---|
| 2314 | +albsol_dir(:,6)*SFRWL(6) |
---|
| 2315 | albsol2=albsol2/(SFRWL(4)+SFRWL(5)+SFRWL(6)) |
---|
| 2316 | falb1=falb_dir(:,1,:)*SFRWL(1)+falb_dir(:,2,:)*SFRWL(2) & |
---|
| 2317 | +falb_dir(:,3,:)*SFRWL(3) |
---|
| 2318 | falb1=falb1/(SFRWL(1)+SFRWL(2)+SFRWL(3)) |
---|
| 2319 | falb2=falb_dir(:,4,:)*SFRWL(4)+falb_dir(:,5,:)*SFRWL(5) & |
---|
| 2320 | +falb_dir(:,6,:)*SFRWL(6) |
---|
| 2321 | falb2=falb2/(SFRWL(4)+SFRWL(5)+SFRWL(6)) |
---|
[2692] | 2322 | END SELECt |
---|
[2469] | 2323 | !albedo SB <<< |
---|
[2227] | 2324 | |
---|
[766] | 2325 | |
---|
[2469] | 2326 | CALL evappot(klon,nbsrf,ftsol,pplay(:,1),cdragh, & |
---|
| 2327 | t_seri(:,1),q_seri(:,1),u_seri(:,1),v_seri(:,1),evap_pot) |
---|
[1724] | 2328 | |
---|
[2469] | 2329 | ENDIF |
---|
| 2330 | ! =================================================================== c |
---|
| 2331 | ! Calcul de Qsat |
---|
[881] | 2332 | |
---|
[2469] | 2333 | DO k = 1, klev |
---|
| 2334 | DO i = 1, klon |
---|
| 2335 | zx_t = t_seri(i,k) |
---|
| 2336 | IF (thermcep) THEN |
---|
| 2337 | zdelta = MAX(0.,SIGN(1.,rtt-zx_t)) |
---|
| 2338 | zx_qs = r2es * FOEEW(zx_t,zdelta)/pplay(i,k) |
---|
| 2339 | zx_qs = MIN(0.5,zx_qs) |
---|
| 2340 | zcor = 1./(1.-retv*zx_qs) |
---|
| 2341 | zx_qs = zx_qs*zcor |
---|
| 2342 | ELSE |
---|
| 2343 | !! IF (zx_t.LT.t_coup) THEN !jyg |
---|
| 2344 | IF (zx_t.LT.rtt) THEN !jyg |
---|
| 2345 | zx_qs = qsats(zx_t)/pplay(i,k) |
---|
| 2346 | ELSE |
---|
| 2347 | zx_qs = qsatl(zx_t)/pplay(i,k) |
---|
| 2348 | ENDIF |
---|
| 2349 | ENDIF |
---|
| 2350 | zqsat(i,k)=zx_qs |
---|
| 2351 | ENDDO |
---|
| 2352 | ENDDO |
---|
[959] | 2353 | |
---|
[2692] | 2354 | IF (prt_level.ge.1) THEN |
---|
[2469] | 2355 | write(lunout,*) 'L qsat (g/kg) avant clouds_gno' |
---|
| 2356 | write(lunout,'(i4,f15.4)') (k,1000.*zqsat(igout,k),k=1,klev) |
---|
[2692] | 2357 | ENDIF |
---|
[2469] | 2358 | ! |
---|
| 2359 | ! Appeler la convection (au choix) |
---|
| 2360 | ! |
---|
| 2361 | DO k = 1, klev |
---|
| 2362 | DO i = 1, klon |
---|
| 2363 | conv_q(i,k) = d_q_dyn(i,k) & |
---|
| 2364 | + d_q_vdf(i,k)/dtime |
---|
| 2365 | conv_t(i,k) = d_t_dyn(i,k) & |
---|
| 2366 | + d_t_vdf(i,k)/dtime |
---|
| 2367 | ENDDO |
---|
| 2368 | ENDDO |
---|
| 2369 | IF (check) THEN |
---|
| 2370 | za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area) |
---|
| 2371 | WRITE(lunout,*) "avantcon=", za |
---|
| 2372 | ENDIF |
---|
| 2373 | zx_ajustq = .FALSE. |
---|
| 2374 | IF (iflag_con.EQ.2) zx_ajustq=.TRUE. |
---|
| 2375 | IF (zx_ajustq) THEN |
---|
| 2376 | DO i = 1, klon |
---|
| 2377 | z_avant(i) = 0.0 |
---|
| 2378 | ENDDO |
---|
| 2379 | DO k = 1, klev |
---|
| 2380 | DO i = 1, klon |
---|
| 2381 | z_avant(i) = z_avant(i) + (q_seri(i,k)+ql_seri(i,k)) & |
---|
| 2382 | *(paprs(i,k)-paprs(i,k+1))/RG |
---|
| 2383 | ENDDO |
---|
| 2384 | ENDDO |
---|
| 2385 | ENDIF |
---|
[959] | 2386 | |
---|
[2469] | 2387 | ! Calcule de vitesse verticale a partir de flux de masse verticale |
---|
| 2388 | DO k = 1, klev |
---|
| 2389 | DO i = 1, klon |
---|
| 2390 | omega(i,k) = RG*flxmass_w(i,k) / cell_area(i) |
---|
[2692] | 2391 | ENDDO |
---|
| 2392 | ENDDO |
---|
| 2393 | |
---|
| 2394 | IF (prt_level.ge.1) write(lunout,*) 'omega(igout, :) = ', & |
---|
[2469] | 2395 | omega(igout, :) |
---|
[2707] | 2396 | ! |
---|
| 2397 | ! Appel de la convection tous les "cvpas" |
---|
| 2398 | ! |
---|
| 2399 | IF (MOD(itapcv,cvpas).EQ.0) THEN |
---|
| 2400 | |
---|
[2469] | 2401 | IF (iflag_con.EQ.1) THEN |
---|
| 2402 | abort_message ='reactiver le call conlmd dans physiq.F' |
---|
| 2403 | CALL abort_physic (modname,abort_message,1) |
---|
| 2404 | ! CALL conlmd (dtime, paprs, pplay, t_seri, q_seri, conv_q, |
---|
| 2405 | ! . d_t_con, d_q_con, |
---|
| 2406 | ! . rain_con, snow_con, ibas_con, itop_con) |
---|
| 2407 | ELSE IF (iflag_con.EQ.2) THEN |
---|
| 2408 | CALL conflx(dtime, paprs, pplay, t_seri, q_seri, & |
---|
| 2409 | conv_t, conv_q, -evap, omega, & |
---|
| 2410 | d_t_con, d_q_con, rain_con, snow_con, & |
---|
| 2411 | pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, & |
---|
| 2412 | kcbot, kctop, kdtop, pmflxr, pmflxs) |
---|
| 2413 | d_u_con = 0. |
---|
| 2414 | d_v_con = 0. |
---|
[879] | 2415 | |
---|
[2469] | 2416 | WHERE (rain_con < 0.) rain_con = 0. |
---|
| 2417 | WHERE (snow_con < 0.) snow_con = 0. |
---|
| 2418 | DO i = 1, klon |
---|
| 2419 | ibas_con(i) = klev+1 - kcbot(i) |
---|
| 2420 | itop_con(i) = klev+1 - kctop(i) |
---|
| 2421 | ENDDO |
---|
| 2422 | ELSE IF (iflag_con.GE.3) THEN |
---|
| 2423 | ! nb of tracers for the KE convection: |
---|
| 2424 | ! MAF la partie traceurs est faite dans phytrac |
---|
| 2425 | ! on met ntra=1 pour limiter les appels mais on peut |
---|
| 2426 | ! supprimer les calculs / ftra. |
---|
| 2427 | ntra = 1 |
---|
| 2428 | |
---|
| 2429 | !======================================================================= |
---|
| 2430 | !ajout pour la parametrisation des poches froides: calcul de |
---|
[2635] | 2431 | !t_w et t_x: si pas de poches froides, t_w=t_x=t_seri |
---|
[2692] | 2432 | IF (iflag_wake>=1) THEN |
---|
| 2433 | DO k=1,klev |
---|
| 2434 | DO i=1,klon |
---|
| 2435 | t_w(i,k) = t_seri(i,k) + (1-wake_s(i))*wake_deltat(i,k) |
---|
| 2436 | q_w(i,k) = q_seri(i,k) + (1-wake_s(i))*wake_deltaq(i,k) |
---|
| 2437 | t_x(i,k) = t_seri(i,k) - wake_s(i)*wake_deltat(i,k) |
---|
| 2438 | q_x(i,k) = q_seri(i,k) - wake_s(i)*wake_deltaq(i,k) |
---|
| 2439 | ENDDO |
---|
| 2440 | ENDDO |
---|
| 2441 | ELSE |
---|
| 2442 | t_w(:,:) = t_seri(:,:) |
---|
[2635] | 2443 | q_w(:,:) = q_seri(:,:) |
---|
| 2444 | t_x(:,:) = t_seri(:,:) |
---|
| 2445 | q_x(:,:) = q_seri(:,:) |
---|
[2692] | 2446 | ENDIF |
---|
[2469] | 2447 | ! |
---|
| 2448 | !jyg< |
---|
| 2449 | ! Perform dry adiabatic adjustment on wake profile |
---|
| 2450 | ! The corresponding tendencies are added to the convective tendencies |
---|
| 2451 | ! after the call to the convective scheme. |
---|
| 2452 | IF (iflag_wake>=1) then |
---|
[2882] | 2453 | IF (iflag_adjwk >= 1) THEN |
---|
[2469] | 2454 | limbas(:) = 1 |
---|
[2635] | 2455 | CALL ajsec(paprs, pplay, t_w, q_w, limbas, & |
---|
[2309] | 2456 | d_t_adjwk, d_q_adjwk) |
---|
[2638] | 2457 | ! |
---|
| 2458 | DO k=1,klev |
---|
| 2459 | DO i=1,klon |
---|
| 2460 | IF (wake_s(i) .GT. 1.e-3) THEN |
---|
| 2461 | t_w(i,k) = t_w(i,k) + d_t_adjwk(i,k) |
---|
| 2462 | q_w(i,k) = q_w(i,k) + d_q_adjwk(i,k) |
---|
| 2463 | d_deltat_ajs_cv(i,k) = d_t_adjwk(i,k) |
---|
| 2464 | d_deltaq_ajs_cv(i,k) = d_q_adjwk(i,k) |
---|
| 2465 | ELSE |
---|
| 2466 | d_deltat_ajs_cv(i,k) = 0. |
---|
| 2467 | d_deltaq_ajs_cv(i,k) = 0. |
---|
| 2468 | ENDIF |
---|
| 2469 | ENDDO |
---|
[2469] | 2470 | ENDDO |
---|
[2882] | 2471 | IF (iflag_adjwk == 2) THEN |
---|
| 2472 | CALL add_wake_tend & |
---|
[2638] | 2473 | (d_deltat_ajs_cv, d_deltaq_ajs_cv, dsig0, ddens0, wkoccur1, 'ajs_cv', abortphy) |
---|
[2882] | 2474 | ENDIF ! (iflag_adjwk == 2) |
---|
| 2475 | ENDIF ! (iflag_adjwk >= 1) |
---|
[2469] | 2476 | ENDIF ! (iflag_wake>=1) |
---|
| 2477 | !>jyg |
---|
| 2478 | ! |
---|
[2638] | 2479 | |
---|
| 2480 | !! print *,'physiq. q_w(1,k), q_x(1,k) ', & |
---|
| 2481 | !! (k, q_w(1,k), q_x(1,k),k=1,25) |
---|
| 2482 | |
---|
[2513] | 2483 | !jyg< |
---|
| 2484 | CALL alpale( debut, itap, dtime, paprs, omega, t_seri, & |
---|
| 2485 | alp_offset, it_wape_prescr, wape_prescr, fip_prescr, & |
---|
| 2486 | ale_bl_prescr, alp_bl_prescr, & |
---|
| 2487 | wake_pe, wake_fip, & |
---|
| 2488 | Ale_bl, Ale_bl_trig, Alp_bl, & |
---|
[2554] | 2489 | Ale, Alp , Ale_wake, Alp_wake) |
---|
[2513] | 2490 | !>jyg |
---|
| 2491 | ! |
---|
[2469] | 2492 | ! sb, oct02: |
---|
| 2493 | ! Schema de convection modularise et vectorise: |
---|
| 2494 | ! (driver commun aux versions 3 et 4) |
---|
| 2495 | ! |
---|
| 2496 | IF (ok_cvl) THEN ! new driver for convectL |
---|
| 2497 | ! |
---|
| 2498 | !jyg< |
---|
| 2499 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 2500 | ! Calculate the upmost level of deep convection loops: k_upper_cv |
---|
| 2501 | ! (near 22 km) |
---|
| 2502 | izero = klon/2+1/klon |
---|
| 2503 | k_upper_cv = klev |
---|
| 2504 | DO k = klev,1,-1 |
---|
| 2505 | IF (pphi(izero,k) > 22.e4) k_upper_cv = k |
---|
| 2506 | ENDDO |
---|
| 2507 | IF (prt_level .ge. 5) THEN |
---|
| 2508 | Print *, 'upmost level of deep convection loops: k_upper_cv = ', & |
---|
| 2509 | k_upper_cv |
---|
| 2510 | ENDIF |
---|
| 2511 | ! |
---|
| 2512 | !>jyg |
---|
| 2513 | IF (type_trac == 'repr') THEN |
---|
| 2514 | nbtr_tmp=ntra |
---|
| 2515 | ELSE |
---|
| 2516 | nbtr_tmp=nbtr |
---|
[2692] | 2517 | ENDIF |
---|
[2469] | 2518 | !jyg iflag_con est dans clesphys |
---|
| 2519 | !c CALL concvl (iflag_con,iflag_clos, |
---|
| 2520 | CALL concvl (iflag_clos, & |
---|
[2635] | 2521 | dtime, paprs, pplay, k_upper_cv, t_x,q_x, & |
---|
| 2522 | t_w,q_w,wake_s, & |
---|
[2469] | 2523 | u_seri,v_seri,tr_seri,nbtr_tmp, & |
---|
| 2524 | ALE,ALP, & |
---|
| 2525 | sig1,w01, & |
---|
| 2526 | d_t_con,d_q_con,d_u_con,d_v_con,d_tr, & |
---|
| 2527 | rain_con, snow_con, ibas_con, itop_con, sigd, & |
---|
[2824] | 2528 | ema_cbmf,plcl,plfc,wbeff,convoccur,upwd,dnwd,dnwd0, & |
---|
[2469] | 2529 | Ma,mip,Vprecip,cape,cin,tvp,Tconv,iflagctrl, & |
---|
| 2530 | pbase,bbase,dtvpdt1,dtvpdq1,dplcldt,dplcldr,qcondc,wd, & |
---|
| 2531 | ! RomP >>> |
---|
| 2532 | !! . pmflxr,pmflxs,da,phi,mp, |
---|
| 2533 | !! . ftd,fqd,lalim_conv,wght_th) |
---|
| 2534 | pmflxr,pmflxs,da,phi,mp,phi2,d1a,dam,sij,clw,elij, & |
---|
| 2535 | ftd,fqd,lalim_conv,wght_th, & |
---|
| 2536 | ev, ep,epmlmMm,eplaMm, & |
---|
| 2537 | wdtrainA,wdtrainM,wght_cvfd,qtc_cv,sigt_cv, & |
---|
[2481] | 2538 | tau_cld_cv,coefw_cld_cv,epmax_diag) |
---|
[2630] | 2539 | |
---|
[2469] | 2540 | ! RomP <<< |
---|
[619] | 2541 | |
---|
[2469] | 2542 | !IM begin |
---|
| 2543 | ! print*,'physiq: cin pbase dnwd0 ftd fqd ',cin(1),pbase(1), |
---|
| 2544 | ! .dnwd0(1,1),ftd(1,1),fqd(1,1) |
---|
| 2545 | !IM end |
---|
| 2546 | !IM cf. FH |
---|
| 2547 | clwcon0=qcondc |
---|
| 2548 | pmfu(:,:)=upwd(:,:)+dnwd(:,:) |
---|
[524] | 2549 | |
---|
[2692] | 2550 | DO i = 1, klon |
---|
| 2551 | IF (iflagctrl(i).le.1) itau_con(i)=itau_con(i)+1 |
---|
| 2552 | ENDDO |
---|
[2469] | 2553 | ! |
---|
| 2554 | !jyg< |
---|
| 2555 | ! Add the tendency due to the dry adjustment of the wake profile |
---|
| 2556 | IF (iflag_wake>=1) THEN |
---|
[2882] | 2557 | IF (iflag_adjwk == 2) THEN |
---|
| 2558 | DO k=1,klev |
---|
| 2559 | DO i=1,klon |
---|
| 2560 | ftd(i,k) = ftd(i,k) + wake_s(i)*d_t_adjwk(i,k)/dtime |
---|
| 2561 | fqd(i,k) = fqd(i,k) + wake_s(i)*d_q_adjwk(i,k)/dtime |
---|
| 2562 | d_t_con(i,k) = d_t_con(i,k) + wake_s(i)*d_t_adjwk(i,k) |
---|
| 2563 | d_q_con(i,k) = d_q_con(i,k) + wake_s(i)*d_q_adjwk(i,k) |
---|
| 2564 | ENDDO |
---|
| 2565 | ENDDO |
---|
| 2566 | ENDIF ! (iflag_adjwk = 2) |
---|
| 2567 | ENDIF ! (iflag_wake>=1) |
---|
[2469] | 2568 | !>jyg |
---|
| 2569 | ! |
---|
| 2570 | ELSE ! ok_cvl |
---|
[1412] | 2571 | |
---|
[2469] | 2572 | ! MAF conema3 ne contient pas les traceurs |
---|
| 2573 | CALL conema3 (dtime, & |
---|
| 2574 | paprs,pplay,t_seri,q_seri, & |
---|
| 2575 | u_seri,v_seri,tr_seri,ntra, & |
---|
| 2576 | sig1,w01, & |
---|
| 2577 | d_t_con,d_q_con,d_u_con,d_v_con,d_tr, & |
---|
| 2578 | rain_con, snow_con, ibas_con, itop_con, & |
---|
| 2579 | upwd,dnwd,dnwd0,bas,top, & |
---|
| 2580 | Ma,cape,tvp,rflag, & |
---|
| 2581 | pbase & |
---|
| 2582 | ,bbase,dtvpdt1,dtvpdq1,dplcldt,dplcldr & |
---|
| 2583 | ,clwcon0) |
---|
[524] | 2584 | |
---|
[2469] | 2585 | ENDIF ! ok_cvl |
---|
[524] | 2586 | |
---|
[2469] | 2587 | ! |
---|
| 2588 | ! Correction precip |
---|
| 2589 | rain_con = rain_con * cvl_corr |
---|
| 2590 | snow_con = snow_con * cvl_corr |
---|
| 2591 | ! |
---|
[766] | 2592 | |
---|
[2469] | 2593 | IF (.NOT. ok_gust) THEN |
---|
| 2594 | do i = 1, klon |
---|
| 2595 | wd(i)=0.0 |
---|
| 2596 | enddo |
---|
| 2597 | ENDIF |
---|
[524] | 2598 | |
---|
[2469] | 2599 | ! =================================================================== c |
---|
| 2600 | ! Calcul des proprietes des nuages convectifs |
---|
| 2601 | ! |
---|
[524] | 2602 | |
---|
[2469] | 2603 | ! calcul des proprietes des nuages convectifs |
---|
| 2604 | clwcon0(:,:)=fact_cldcon*clwcon0(:,:) |
---|
| 2605 | IF (iflag_cld_cv == 0) THEN |
---|
[2692] | 2606 | CALL clouds_gno & |
---|
[2469] | 2607 | (klon,klev,q_seri,zqsat,clwcon0,ptconv,ratqsc,rnebcon0) |
---|
| 2608 | ELSE |
---|
[2692] | 2609 | CALL clouds_bigauss & |
---|
[2469] | 2610 | (klon,klev,q_seri,zqsat,qtc_cv,sigt_cv,ptconv,ratqsc,rnebcon0) |
---|
| 2611 | ENDIF |
---|
[524] | 2612 | |
---|
[2205] | 2613 | |
---|
[2469] | 2614 | ! =================================================================== c |
---|
[524] | 2615 | |
---|
[2469] | 2616 | DO i = 1, klon |
---|
| 2617 | itop_con(i) = min(max(itop_con(i),1),klev) |
---|
| 2618 | ibas_con(i) = min(max(ibas_con(i),1),itop_con(i)) |
---|
| 2619 | ENDDO |
---|
[1428] | 2620 | |
---|
[2469] | 2621 | DO i = 1, klon |
---|
| 2622 | ema_pcb(i) = paprs(i,ibas_con(i)) |
---|
| 2623 | ENDDO |
---|
| 2624 | DO i = 1, klon |
---|
| 2625 | ! L'idicage de itop_con peut cacher un pb potentiel |
---|
| 2626 | ! FH sous la dictee de JYG, CR |
---|
| 2627 | ema_pct(i) = paprs(i,itop_con(i)+1) |
---|
[879] | 2628 | |
---|
[2692] | 2629 | IF (itop_con(i).gt.klev-3) THEN |
---|
| 2630 | IF (prt_level >= 9) THEN |
---|
[2469] | 2631 | write(lunout,*)'La convection monte trop haut ' |
---|
| 2632 | write(lunout,*)'itop_con(,',i,',)=',itop_con(i) |
---|
[2692] | 2633 | ENDIF |
---|
| 2634 | ENDIF |
---|
[2469] | 2635 | ENDDO |
---|
| 2636 | ELSE IF (iflag_con.eq.0) THEN |
---|
| 2637 | write(lunout,*) 'On n appelle pas la convection' |
---|
| 2638 | clwcon0=0. |
---|
| 2639 | rnebcon0=0. |
---|
| 2640 | d_t_con=0. |
---|
| 2641 | d_q_con=0. |
---|
| 2642 | d_u_con=0. |
---|
| 2643 | d_v_con=0. |
---|
| 2644 | rain_con=0. |
---|
| 2645 | snow_con=0. |
---|
| 2646 | bas=1 |
---|
| 2647 | top=1 |
---|
| 2648 | ELSE |
---|
| 2649 | WRITE(lunout,*) "iflag_con non-prevu", iflag_con |
---|
[2692] | 2650 | CALL abort_physic("physiq", "", 1) |
---|
[2469] | 2651 | ENDIF |
---|
[524] | 2652 | |
---|
[2469] | 2653 | ! CALL homogene(paprs, q_seri, d_q_con, u_seri,v_seri, |
---|
| 2654 | ! . d_u_con, d_v_con) |
---|
[524] | 2655 | |
---|
[2730] | 2656 | !jyg Reinitialize proba_notrig and itapcv when convection has been called |
---|
| 2657 | proba_notrig(:) = 1. |
---|
[2707] | 2658 | itapcv = 0 |
---|
| 2659 | ENDIF ! (MOD(itapcv,cvpas).EQ.0) |
---|
[2730] | 2660 | ! |
---|
[2707] | 2661 | itapcv = itapcv+1 |
---|
| 2662 | |
---|
[2812] | 2663 | !!!jyg Appel diagnostique a add_phys_tend pour tester la conservation de |
---|
| 2664 | !!! l'energie dans les courants satures. |
---|
| 2665 | !! d_t_con_sat(:,:) = d_t_con(:,:) - ftd(:,:)*dtime |
---|
| 2666 | !! d_q_con_sat(:,:) = d_q_con(:,:) - fqd(:,:)*dtime |
---|
| 2667 | !! dql_sat(:,:) = (wdtrainA(:,:)+wdtrainM(:,:))*dtime/zmasse(:,:) |
---|
| 2668 | !! CALL add_phys_tend(d_u_con, d_v_con, d_t_con_sat, d_q_con_sat, dql_sat, & |
---|
| 2669 | !! dqi0, paprs, 'convection_sat', abortphy, flag_inhib_tend,& |
---|
| 2670 | !! itap, 1) |
---|
| 2671 | !! call prt_enerbil('convection_sat',itap) |
---|
| 2672 | !! |
---|
| 2673 | !! |
---|
[2469] | 2674 | CALL add_phys_tend(d_u_con, d_v_con, d_t_con, d_q_con, dql0, dqi0, paprs, & |
---|
[2812] | 2675 | 'convection',abortphy,flag_inhib_tend,itap,0) |
---|
[2799] | 2676 | call prt_enerbil('convection',itap) |
---|
[2235] | 2677 | |
---|
[2469] | 2678 | !------------------------------------------------------------------------- |
---|
[766] | 2679 | |
---|
[2692] | 2680 | IF (mydebug) THEN |
---|
| 2681 | CALL writefield_phy('u_seri',u_seri,nbp_lev) |
---|
| 2682 | CALL writefield_phy('v_seri',v_seri,nbp_lev) |
---|
| 2683 | CALL writefield_phy('t_seri',t_seri,nbp_lev) |
---|
| 2684 | CALL writefield_phy('q_seri',q_seri,nbp_lev) |
---|
| 2685 | ENDIF |
---|
[766] | 2686 | |
---|
[2469] | 2687 | IF (check) THEN |
---|
| 2688 | za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area) |
---|
| 2689 | WRITE(lunout,*)"aprescon=", za |
---|
| 2690 | zx_t = 0.0 |
---|
| 2691 | za = 0.0 |
---|
| 2692 | DO i = 1, klon |
---|
| 2693 | za = za + cell_area(i)/REAL(klon) |
---|
| 2694 | zx_t = zx_t + (rain_con(i)+ & |
---|
| 2695 | snow_con(i))*cell_area(i)/REAL(klon) |
---|
| 2696 | ENDDO |
---|
| 2697 | zx_t = zx_t/za*dtime |
---|
| 2698 | WRITE(lunout,*)"Precip=", zx_t |
---|
| 2699 | ENDIF |
---|
| 2700 | IF (zx_ajustq) THEN |
---|
| 2701 | DO i = 1, klon |
---|
| 2702 | z_apres(i) = 0.0 |
---|
| 2703 | ENDDO |
---|
| 2704 | DO k = 1, klev |
---|
| 2705 | DO i = 1, klon |
---|
| 2706 | z_apres(i) = z_apres(i) + (q_seri(i,k)+ql_seri(i,k)) & |
---|
| 2707 | *(paprs(i,k)-paprs(i,k+1))/RG |
---|
| 2708 | ENDDO |
---|
| 2709 | ENDDO |
---|
| 2710 | DO i = 1, klon |
---|
| 2711 | z_factor(i) = (z_avant(i)-(rain_con(i)+snow_con(i))*dtime) & |
---|
| 2712 | /z_apres(i) |
---|
| 2713 | ENDDO |
---|
| 2714 | DO k = 1, klev |
---|
| 2715 | DO i = 1, klon |
---|
| 2716 | IF (z_factor(i).GT.(1.0+1.0E-08) .OR. & |
---|
| 2717 | z_factor(i).LT.(1.0-1.0E-08)) THEN |
---|
| 2718 | q_seri(i,k) = q_seri(i,k) * z_factor(i) |
---|
| 2719 | ENDIF |
---|
| 2720 | ENDDO |
---|
| 2721 | ENDDO |
---|
| 2722 | ENDIF |
---|
| 2723 | zx_ajustq=.FALSE. |
---|
[879] | 2724 | |
---|
[2469] | 2725 | ! |
---|
| 2726 | !========================================================================== |
---|
| 2727 | !RR:Evolution de la poche froide: on ne fait pas de separation wake/env |
---|
| 2728 | !pour la couche limite diffuse pour l instant |
---|
| 2729 | ! |
---|
| 2730 | ! |
---|
| 2731 | ! nrlmd le 22/03/2011---Si on met les poches hors des thermiques |
---|
| 2732 | ! il faut rajouter cette tendance calcul\'ee hors des poches |
---|
| 2733 | ! froides |
---|
| 2734 | ! |
---|
[2692] | 2735 | IF (iflag_wake>=1) THEN |
---|
[2707] | 2736 | ! |
---|
| 2737 | ! |
---|
[2730] | 2738 | ! Call wakes every "wkpas" step |
---|
| 2739 | ! |
---|
| 2740 | IF (MOD(itapwk,wkpas).EQ.0) THEN |
---|
| 2741 | ! |
---|
| 2742 | DO k=1,klev |
---|
[2469] | 2743 | DO i=1,klon |
---|
[2730] | 2744 | dt_dwn(i,k) = ftd(i,k) |
---|
| 2745 | dq_dwn(i,k) = fqd(i,k) |
---|
| 2746 | M_dwn(i,k) = dnwd0(i,k) |
---|
| 2747 | M_up(i,k) = upwd(i,k) |
---|
| 2748 | dt_a(i,k) = d_t_con(i,k)/dtime - ftd(i,k) |
---|
| 2749 | dq_a(i,k) = d_q_con(i,k)/dtime - fqd(i,k) |
---|
[2469] | 2750 | ENDDO |
---|
| 2751 | ENDDO |
---|
[2730] | 2752 | |
---|
| 2753 | IF (iflag_wake==2) THEN |
---|
| 2754 | ok_wk_lsp(:)=max(sign(1.,wake_s(:)-wake_s_min_lsp),0.) |
---|
| 2755 | DO k = 1,klev |
---|
| 2756 | dt_dwn(:,k)= dt_dwn(:,k)+ & |
---|
| 2757 | ok_wk_lsp(:)*(d_t_eva(:,k)+d_t_lsc(:,k))/dtime |
---|
| 2758 | dq_dwn(:,k)= dq_dwn(:,k)+ & |
---|
| 2759 | ok_wk_lsp(:)*(d_q_eva(:,k)+d_q_lsc(:,k))/dtime |
---|
| 2760 | ENDDO |
---|
| 2761 | ELSEIF (iflag_wake==3) THEN |
---|
| 2762 | ok_wk_lsp(:)=max(sign(1.,wake_s(:)-wake_s_min_lsp),0.) |
---|
| 2763 | DO k = 1,klev |
---|
| 2764 | DO i=1,klon |
---|
| 2765 | IF (rneb(i,k)==0.) THEN |
---|
| 2766 | ! On ne tient compte des tendances qu'en dehors des |
---|
| 2767 | ! nuages (c'est-\`a-dire a priri dans une region ou |
---|
| 2768 | ! l'eau se reevapore). |
---|
| 2769 | dt_dwn(i,k)= dt_dwn(i,k)+ & |
---|
| 2770 | ok_wk_lsp(i)*d_t_lsc(i,k)/dtime |
---|
| 2771 | dq_dwn(i,k)= dq_dwn(i,k)+ & |
---|
| 2772 | ok_wk_lsp(i)*d_q_lsc(i,k)/dtime |
---|
| 2773 | ENDIF |
---|
| 2774 | ENDDO |
---|
| 2775 | ENDDO |
---|
| 2776 | ENDIF |
---|
| 2777 | |
---|
| 2778 | ! |
---|
| 2779 | !calcul caracteristiques de la poche froide |
---|
| 2780 | CALL calWAKE (iflag_wake_tend, paprs, pplay, dtime, & |
---|
| 2781 | t_seri, q_seri, omega, & |
---|
| 2782 | dt_dwn, dq_dwn, M_dwn, M_up, & |
---|
| 2783 | dt_a, dq_a, & |
---|
| 2784 | sigd, & |
---|
| 2785 | wake_deltat, wake_deltaq, wake_s, wake_dens, & |
---|
| 2786 | wake_dth, wake_h, & |
---|
| 2787 | wake_pe, wake_fip, wake_gfl, & |
---|
| 2788 | d_t_wake, d_q_wake, & |
---|
| 2789 | wake_k, t_x, q_x, & |
---|
| 2790 | wake_omgbdth, wake_dp_omgb, & |
---|
| 2791 | wake_dtKE, wake_dqKE, & |
---|
| 2792 | wake_omg, wake_dp_deltomg, & |
---|
| 2793 | wake_spread, wake_Cstar, d_deltat_wk_gw, & |
---|
| 2794 | d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_wk) |
---|
| 2795 | ! |
---|
| 2796 | !jyg Reinitialize itapwk when wakes have been called |
---|
| 2797 | itapwk = 0 |
---|
| 2798 | ENDIF ! (MOD(itapwk,wkpas).EQ.0) |
---|
[2469] | 2799 | ! |
---|
[2730] | 2800 | itapwk = itapwk+1 |
---|
[2469] | 2801 | ! |
---|
| 2802 | !----------------------------------------------------------------------- |
---|
| 2803 | ! ajout des tendances des poches froides |
---|
| 2804 | CALL add_phys_tend(du0,dv0,d_t_wake,d_q_wake,dql0,dqi0,paprs,'wake', & |
---|
[2812] | 2805 | abortphy,flag_inhib_tend,itap,0) |
---|
[2799] | 2806 | call prt_enerbil('wake',itap) |
---|
[2469] | 2807 | !------------------------------------------------------------------------ |
---|
[879] | 2808 | |
---|
[2730] | 2809 | ! Increment Wake state variables |
---|
[2635] | 2810 | IF (iflag_wake_tend .GT. 0.) THEN |
---|
| 2811 | |
---|
| 2812 | CALL add_wake_tend & |
---|
| 2813 | (d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_wk, wake_k, & |
---|
| 2814 | 'wake', abortphy) |
---|
[2799] | 2815 | call prt_enerbil('wake',itap) |
---|
[2635] | 2816 | ENDIF ! (iflag_wake_tend .GT. 0.) |
---|
| 2817 | |
---|
[2692] | 2818 | ENDIF ! (iflag_wake>=1) |
---|
[2469] | 2819 | ! |
---|
| 2820 | !=================================================================== |
---|
| 2821 | ! Convection seche (thermiques ou ajustement) |
---|
| 2822 | !=================================================================== |
---|
| 2823 | ! |
---|
[2692] | 2824 | CALL stratocu_if(klon,klev,pctsrf,paprs, pplay,t_seri & |
---|
[2469] | 2825 | ,seuil_inversion,weak_inversion,dthmin) |
---|
[878] | 2826 | |
---|
| 2827 | |
---|
| 2828 | |
---|
[2469] | 2829 | d_t_ajsb(:,:)=0. |
---|
| 2830 | d_q_ajsb(:,:)=0. |
---|
| 2831 | d_t_ajs(:,:)=0. |
---|
| 2832 | d_u_ajs(:,:)=0. |
---|
| 2833 | d_v_ajs(:,:)=0. |
---|
| 2834 | d_q_ajs(:,:)=0. |
---|
| 2835 | clwcon0th(:,:)=0. |
---|
| 2836 | ! |
---|
| 2837 | ! fm_therm(:,:)=0. |
---|
| 2838 | ! entr_therm(:,:)=0. |
---|
| 2839 | ! detr_therm(:,:)=0. |
---|
| 2840 | ! |
---|
[2692] | 2841 | IF (prt_level>9) WRITE(lunout,*) & |
---|
[2469] | 2842 | 'AVANT LA CONVECTION SECHE , iflag_thermals=' & |
---|
| 2843 | ,iflag_thermals,' nsplit_thermals=',nsplit_thermals |
---|
[2692] | 2844 | IF (iflag_thermals<0) THEN |
---|
[2469] | 2845 | ! Rien |
---|
| 2846 | ! ==== |
---|
[2692] | 2847 | IF (prt_level>9) WRITE(lunout,*)'pas de convection seche' |
---|
[541] | 2848 | |
---|
[878] | 2849 | |
---|
[2692] | 2850 | ELSE |
---|
[878] | 2851 | |
---|
[2469] | 2852 | ! Thermiques |
---|
| 2853 | ! ========== |
---|
[2692] | 2854 | IF (prt_level>9) WRITE(lunout,*)'JUSTE AVANT , iflag_thermals=' & |
---|
[2469] | 2855 | ,iflag_thermals,' nsplit_thermals=',nsplit_thermals |
---|
[878] | 2856 | |
---|
| 2857 | |
---|
[2469] | 2858 | !cc nrlmd le 10/04/2012 |
---|
| 2859 | DO k=1,klev+1 |
---|
| 2860 | DO i=1,klon |
---|
| 2861 | pbl_tke_input(i,k,is_oce)=pbl_tke(i,k,is_oce) |
---|
| 2862 | pbl_tke_input(i,k,is_ter)=pbl_tke(i,k,is_ter) |
---|
| 2863 | pbl_tke_input(i,k,is_lic)=pbl_tke(i,k,is_lic) |
---|
| 2864 | pbl_tke_input(i,k,is_sic)=pbl_tke(i,k,is_sic) |
---|
[2159] | 2865 | ENDDO |
---|
[2469] | 2866 | ENDDO |
---|
| 2867 | !cc fin nrlmd le 10/04/2012 |
---|
[1403] | 2868 | |
---|
[2692] | 2869 | IF (iflag_thermals>=1) THEN |
---|
[2469] | 2870 | !jyg< |
---|
[2852] | 2871 | !! IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN |
---|
| 2872 | IF (mod(iflag_pbl_split/10,10) .GE. 1) THEN |
---|
[2469] | 2873 | ! Appel des thermiques avec les profils exterieurs aux poches |
---|
| 2874 | DO k=1,klev |
---|
| 2875 | DO i=1,klon |
---|
| 2876 | t_therm(i,k) = t_seri(i,k) - wake_s(i)*wake_deltat(i,k) |
---|
| 2877 | q_therm(i,k) = q_seri(i,k) - wake_s(i)*wake_deltaq(i,k) |
---|
[2606] | 2878 | u_therm(i,k) = u_seri(i,k) |
---|
| 2879 | v_therm(i,k) = v_seri(i,k) |
---|
[2469] | 2880 | ENDDO |
---|
| 2881 | ENDDO |
---|
| 2882 | ELSE |
---|
| 2883 | ! Appel des thermiques avec les profils moyens |
---|
| 2884 | DO k=1,klev |
---|
| 2885 | DO i=1,klon |
---|
| 2886 | t_therm(i,k) = t_seri(i,k) |
---|
| 2887 | q_therm(i,k) = q_seri(i,k) |
---|
[2606] | 2888 | u_therm(i,k) = u_seri(i,k) |
---|
| 2889 | v_therm(i,k) = v_seri(i,k) |
---|
[2469] | 2890 | ENDDO |
---|
| 2891 | ENDDO |
---|
| 2892 | ENDIF |
---|
| 2893 | !>jyg |
---|
[2692] | 2894 | CALL calltherm(pdtphys & |
---|
[2469] | 2895 | ,pplay,paprs,pphi,weak_inversion & |
---|
[2606] | 2896 | ! ,u_seri,v_seri,t_seri,q_seri,zqsat,debut & !jyg |
---|
| 2897 | ,u_therm,v_therm,t_therm,q_therm,zqsat,debut & !jyg |
---|
[2469] | 2898 | ,d_u_ajs,d_v_ajs,d_t_ajs,d_q_ajs & |
---|
| 2899 | ,fm_therm,entr_therm,detr_therm & |
---|
| 2900 | ,zqasc,clwcon0th,lmax_th,ratqscth & |
---|
| 2901 | ,ratqsdiff,zqsatth & |
---|
| 2902 | !on rajoute ale et alp, et les |
---|
| 2903 | !caracteristiques de la couche alim |
---|
| 2904 | ,Ale_bl,Alp_bl,lalim_conv,wght_th, zmax0, f0, zw2,fraca & |
---|
| 2905 | ,ztv,zpspsk,ztla,zthl & |
---|
| 2906 | !cc nrlmd le 10/04/2012 |
---|
| 2907 | ,pbl_tke_input,pctsrf,omega,cell_area & |
---|
| 2908 | ,zlcl_th,fraca0,w0,w_conv,therm_tke_max0,env_tke_max0 & |
---|
| 2909 | ,n2,s2,ale_bl_stat & |
---|
| 2910 | ,therm_tke_max,env_tke_max & |
---|
| 2911 | ,alp_bl_det,alp_bl_fluct_m,alp_bl_fluct_tke & |
---|
| 2912 | ,alp_bl_conv,alp_bl_stat & |
---|
| 2913 | !cc fin nrlmd le 10/04/2012 |
---|
| 2914 | ,zqla,ztva ) |
---|
| 2915 | ! |
---|
| 2916 | !jyg< |
---|
[2852] | 2917 | !!jyg IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN |
---|
| 2918 | IF (mod(iflag_pbl_split/10,10) .GE. 1) THEN |
---|
[2469] | 2919 | ! Si les thermiques ne sont presents que hors des |
---|
| 2920 | ! poches, la tendance moyenne associ\'ee doit etre |
---|
| 2921 | ! multipliee par la fraction surfacique qu'ils couvrent. |
---|
| 2922 | DO k=1,klev |
---|
| 2923 | DO i=1,klon |
---|
| 2924 | ! |
---|
[2635] | 2925 | d_deltat_the(i,k) = - d_t_ajs(i,k) |
---|
| 2926 | d_deltaq_the(i,k) = - d_q_ajs(i,k) |
---|
[2469] | 2927 | ! |
---|
| 2928 | d_u_ajs(i,k) = d_u_ajs(i,k)*(1.-wake_s(i)) |
---|
| 2929 | d_v_ajs(i,k) = d_v_ajs(i,k)*(1.-wake_s(i)) |
---|
| 2930 | d_t_ajs(i,k) = d_t_ajs(i,k)*(1.-wake_s(i)) |
---|
| 2931 | d_q_ajs(i,k) = d_q_ajs(i,k)*(1.-wake_s(i)) |
---|
| 2932 | ! |
---|
| 2933 | ENDDO |
---|
| 2934 | ENDDO |
---|
[2606] | 2935 | ! |
---|
[2638] | 2936 | CALL add_wake_tend & |
---|
| 2937 | (d_deltat_the, d_deltaq_the, dsig0, ddens0, wkoccur1, 'the', abortphy) |
---|
[2799] | 2938 | call prt_enerbil('the',itap) |
---|
[2638] | 2939 | ! |
---|
[2852] | 2940 | ENDIF ! (mod(iflag_pbl_split/10,10) .GE. 1) |
---|
[2638] | 2941 | ! |
---|
[2606] | 2942 | CALL add_phys_tend(d_u_ajs,d_v_ajs,d_t_ajs,d_q_ajs, & |
---|
[2812] | 2943 | dql0,dqi0,paprs,'thermals', abortphy,flag_inhib_tend,itap,0) |
---|
[2799] | 2944 | call prt_enerbil('thermals',itap) |
---|
[2606] | 2945 | ! |
---|
[2513] | 2946 | ! |
---|
[2565] | 2947 | CALL alpale_th( dtime, lmax_th, t_seri, cell_area, & |
---|
[2513] | 2948 | cin, s2, n2, & |
---|
| 2949 | ale_bl_trig, ale_bl_stat, ale_bl, & |
---|
[2556] | 2950 | alp_bl, alp_bl_stat, & |
---|
| 2951 | proba_notrig, random_notrig) |
---|
[2635] | 2952 | !>jyg |
---|
[1638] | 2953 | |
---|
[2554] | 2954 | ! ------------------------------------------------------------------ |
---|
| 2955 | ! Transport de la TKE par les panaches thermiques. |
---|
| 2956 | ! FH : 2010/02/01 |
---|
| 2957 | ! if (iflag_pbl.eq.10) then |
---|
| 2958 | ! call thermcell_dtke(klon,klev,nbsrf,pdtphys,fm_therm,entr_therm, |
---|
| 2959 | ! s rg,paprs,pbl_tke) |
---|
| 2960 | ! endif |
---|
| 2961 | ! ------------------------------------------------------------------- |
---|
| 2962 | |
---|
[2692] | 2963 | DO i=1,klon |
---|
[2469] | 2964 | ! zmax_th(i)=pphi(i,lmax_th(i))/rg |
---|
| 2965 | !CR:04/05/12:correction calcul zmax |
---|
| 2966 | zmax_th(i)=zmax0(i) |
---|
[2692] | 2967 | ENDDO |
---|
[1507] | 2968 | |
---|
[2692] | 2969 | ENDIF |
---|
[878] | 2970 | |
---|
[2469] | 2971 | ! Ajustement sec |
---|
| 2972 | ! ============== |
---|
[878] | 2973 | |
---|
[2469] | 2974 | ! Dans le cas o\`u on active les thermiques, on fait partir l'ajustement |
---|
| 2975 | ! a partir du sommet des thermiques. |
---|
| 2976 | ! Dans le cas contraire, on demarre au niveau 1. |
---|
[878] | 2977 | |
---|
[2692] | 2978 | IF (iflag_thermals>=13.or.iflag_thermals<=0) THEN |
---|
[878] | 2979 | |
---|
[2692] | 2980 | IF (iflag_thermals.eq.0) THEN |
---|
| 2981 | IF (prt_level>9) WRITE(lunout,*)'ajsec' |
---|
[2469] | 2982 | limbas(:)=1 |
---|
[2692] | 2983 | ELSE |
---|
[2469] | 2984 | limbas(:)=lmax_th(:) |
---|
[2692] | 2985 | ENDIF |
---|
[878] | 2986 | |
---|
[2469] | 2987 | ! Attention : le call ajsec_convV2 n'est maintenu que momentanneement |
---|
| 2988 | ! pour des test de convergence numerique. |
---|
| 2989 | ! Le nouveau ajsec est a priori mieux, meme pour le cas |
---|
| 2990 | ! iflag_thermals = 0 (l'ancienne version peut faire des tendances |
---|
| 2991 | ! non nulles numeriquement pour des mailles non concernees. |
---|
[878] | 2992 | |
---|
[2692] | 2993 | IF (iflag_thermals==0) THEN |
---|
[2469] | 2994 | ! Calling adjustment alone (but not the thermal plume model) |
---|
| 2995 | CALL ajsec_convV2(paprs, pplay, t_seri,q_seri & |
---|
| 2996 | , d_t_ajsb, d_q_ajsb) |
---|
[2692] | 2997 | ELSE IF (iflag_thermals>0) THEN |
---|
[2469] | 2998 | ! Calling adjustment above the top of thermal plumes |
---|
| 2999 | CALL ajsec(paprs, pplay, t_seri,q_seri,limbas & |
---|
| 3000 | , d_t_ajsb, d_q_ajsb) |
---|
[2692] | 3001 | ENDIF |
---|
[878] | 3002 | |
---|
[2469] | 3003 | !-------------------------------------------------------------------- |
---|
| 3004 | ! ajout des tendances de l'ajustement sec ou des thermiques |
---|
| 3005 | CALL add_phys_tend(du0,dv0,d_t_ajsb,d_q_ajsb,dql0,dqi0,paprs, & |
---|
[2812] | 3006 | 'ajsb',abortphy,flag_inhib_tend,itap,0) |
---|
[2799] | 3007 | call prt_enerbil('ajsb',itap) |
---|
[2469] | 3008 | d_t_ajs(:,:)=d_t_ajs(:,:)+d_t_ajsb(:,:) |
---|
| 3009 | d_q_ajs(:,:)=d_q_ajs(:,:)+d_q_ajsb(:,:) |
---|
[904] | 3010 | |
---|
[2469] | 3011 | !--------------------------------------------------------------------- |
---|
[878] | 3012 | |
---|
[2692] | 3013 | ENDIF |
---|
[524] | 3014 | |
---|
[2692] | 3015 | ENDIF |
---|
[2469] | 3016 | ! |
---|
| 3017 | !=================================================================== |
---|
| 3018 | ! Computation of ratqs, the width (normalized) of the subrid scale |
---|
| 3019 | ! water distribution |
---|
| 3020 | CALL calcratqs(klon,klev,prt_level,lunout, & |
---|
| 3021 | iflag_ratqs,iflag_con,iflag_cld_th,pdtphys, & |
---|
[2534] | 3022 | ratqsbas,ratqshaut,ratqsp0, ratqsdp, & |
---|
| 3023 | tau_ratqs,fact_cldcon, & |
---|
[2469] | 3024 | ptconv,ptconvth,clwcon0th, rnebcon0th, & |
---|
| 3025 | paprs,pplay,q_seri,zqsat,fm_therm, & |
---|
| 3026 | ratqs,ratqsc) |
---|
[1032] | 3027 | |
---|
[2100] | 3028 | |
---|
[2469] | 3029 | ! |
---|
| 3030 | ! Appeler le processus de condensation a grande echelle |
---|
| 3031 | ! et le processus de precipitation |
---|
| 3032 | !------------------------------------------------------------------------- |
---|
| 3033 | IF (prt_level .GE.10) THEN |
---|
| 3034 | print *,'itap, ->fisrtilp ',itap |
---|
| 3035 | ENDIF |
---|
| 3036 | ! |
---|
| 3037 | CALL fisrtilp(dtime,paprs,pplay, & |
---|
| 3038 | t_seri, q_seri,ptconv,ratqs, & |
---|
| 3039 | d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, cldliq, & |
---|
| 3040 | rain_lsc, snow_lsc, & |
---|
| 3041 | pfrac_impa, pfrac_nucl, pfrac_1nucl, & |
---|
| 3042 | frac_impa, frac_nucl, beta_prec_fisrt, & |
---|
| 3043 | prfl, psfl, rhcl, & |
---|
| 3044 | zqasc, fraca,ztv,zpspsk,ztla,zthl,iflag_cld_th, & |
---|
| 3045 | iflag_ice_thermo) |
---|
| 3046 | ! |
---|
| 3047 | WHERE (rain_lsc < 0) rain_lsc = 0. |
---|
| 3048 | WHERE (snow_lsc < 0) snow_lsc = 0. |
---|
[766] | 3049 | |
---|
[2799] | 3050 | !+JLD |
---|
| 3051 | ! write(*,9000) 'phys lsc',"enerbil: bil_q, bil_e,",rain_lsc+snow_lsc & |
---|
| 3052 | ! & ,((rcw-rcpd)*rain_lsc + (rcs-rcpd)*snow_lsc)*t_seri(1,1)-rlvtt*rain_lsc+rlstt*snow_lsc & |
---|
| 3053 | ! & ,rain_lsc,snow_lsc |
---|
| 3054 | ! write(*,9000) "rcpv","rcw",rcpv,rcw,rcs,t_seri(1,1) |
---|
| 3055 | !-JLD |
---|
[2469] | 3056 | CALL add_phys_tend(du0,dv0,d_t_lsc,d_q_lsc,d_ql_lsc,d_qi_lsc,paprs, & |
---|
[2812] | 3057 | 'lsc',abortphy,flag_inhib_tend,itap,0) |
---|
[2799] | 3058 | call prt_enerbil('lsc',itap) |
---|
[2613] | 3059 | rain_num(:)=0. |
---|
[2657] | 3060 | DO k = 1, klev |
---|
[2613] | 3061 | DO i = 1, klon |
---|
| 3062 | IF (ql_seri(i,k)>oliqmax) THEN |
---|
| 3063 | rain_num(i)=rain_num(i)+(ql_seri(i,k)-oliqmax)*zmasse(i,k)/pdtphys |
---|
| 3064 | ql_seri(i,k)=oliqmax |
---|
| 3065 | ENDIF |
---|
| 3066 | ENDDO |
---|
| 3067 | ENDDO |
---|
[2657] | 3068 | IF (nqo==3) THEN |
---|
| 3069 | DO k = 1, klev |
---|
| 3070 | DO i = 1, klon |
---|
| 3071 | IF (qs_seri(i,k)>oicemax) THEN |
---|
| 3072 | rain_num(i)=rain_num(i)+(qs_seri(i,k)-oicemax)*zmasse(i,k)/pdtphys |
---|
| 3073 | qs_seri(i,k)=oicemax |
---|
| 3074 | ENDIF |
---|
| 3075 | ENDDO |
---|
| 3076 | ENDDO |
---|
| 3077 | ENDIF |
---|
[2613] | 3078 | |
---|
[2524] | 3079 | !--------------------------------------------------------------------------- |
---|
[2469] | 3080 | DO k = 1, klev |
---|
| 3081 | DO i = 1, klon |
---|
| 3082 | cldfra(i,k) = rneb(i,k) |
---|
| 3083 | !CR: a quoi ca sert? Faut-il ajouter qs_seri? |
---|
| 3084 | IF (.NOT.new_oliq) cldliq(i,k) = ql_seri(i,k) |
---|
| 3085 | ENDDO |
---|
| 3086 | ENDDO |
---|
| 3087 | IF (check) THEN |
---|
| 3088 | za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area) |
---|
| 3089 | WRITE(lunout,*)"apresilp=", za |
---|
| 3090 | zx_t = 0.0 |
---|
| 3091 | za = 0.0 |
---|
| 3092 | DO i = 1, klon |
---|
| 3093 | za = za + cell_area(i)/REAL(klon) |
---|
| 3094 | zx_t = zx_t + (rain_lsc(i) & |
---|
| 3095 | + snow_lsc(i))*cell_area(i)/REAL(klon) |
---|
| 3096 | ENDDO |
---|
| 3097 | zx_t = zx_t/za*dtime |
---|
| 3098 | WRITE(lunout,*)"Precip=", zx_t |
---|
| 3099 | ENDIF |
---|
[766] | 3100 | |
---|
[2692] | 3101 | IF (mydebug) THEN |
---|
| 3102 | CALL writefield_phy('u_seri',u_seri,nbp_lev) |
---|
| 3103 | CALL writefield_phy('v_seri',v_seri,nbp_lev) |
---|
| 3104 | CALL writefield_phy('t_seri',t_seri,nbp_lev) |
---|
| 3105 | CALL writefield_phy('q_seri',q_seri,nbp_lev) |
---|
| 3106 | ENDIF |
---|
[524] | 3107 | |
---|
[2469] | 3108 | ! |
---|
| 3109 | !------------------------------------------------------------------- |
---|
| 3110 | ! PRESCRIPTION DES NUAGES POUR LE RAYONNEMENT |
---|
| 3111 | !------------------------------------------------------------------- |
---|
[524] | 3112 | |
---|
[2469] | 3113 | ! 1. NUAGES CONVECTIFS |
---|
| 3114 | ! |
---|
| 3115 | !IM cf FH |
---|
| 3116 | ! IF (iflag_cld_th.eq.-1) THEN ! seulement pour Tiedtke |
---|
| 3117 | IF (iflag_cld_th.le.-1) THEN ! seulement pour Tiedtke |
---|
| 3118 | snow_tiedtke=0. |
---|
| 3119 | ! print*,'avant calcul de la pseudo precip ' |
---|
| 3120 | ! print*,'iflag_cld_th',iflag_cld_th |
---|
[2692] | 3121 | IF (iflag_cld_th.eq.-1) THEN |
---|
[2469] | 3122 | rain_tiedtke=rain_con |
---|
[2692] | 3123 | ELSE |
---|
[2469] | 3124 | ! print*,'calcul de la pseudo precip ' |
---|
| 3125 | rain_tiedtke=0. |
---|
| 3126 | ! print*,'calcul de la pseudo precip 0' |
---|
[2692] | 3127 | DO k=1,klev |
---|
| 3128 | DO i=1,klon |
---|
| 3129 | IF (d_q_con(i,k).lt.0.) THEN |
---|
[2469] | 3130 | rain_tiedtke(i)=rain_tiedtke(i)-d_q_con(i,k)/pdtphys & |
---|
| 3131 | *(paprs(i,k)-paprs(i,k+1))/rg |
---|
[2692] | 3132 | ENDIF |
---|
| 3133 | ENDDO |
---|
| 3134 | ENDDO |
---|
| 3135 | ENDIF |
---|
[2469] | 3136 | ! |
---|
| 3137 | ! call dump2d(iim,jjm,rain_tiedtke(2:klon-1),'PSEUDO PRECIP ') |
---|
| 3138 | ! |
---|
[524] | 3139 | |
---|
[2469] | 3140 | ! Nuages diagnostiques pour Tiedtke |
---|
| 3141 | CALL diagcld1(paprs,pplay, & |
---|
| 3142 | !IM cf FH. rain_con,snow_con,ibas_con,itop_con, |
---|
| 3143 | rain_tiedtke,snow_tiedtke,ibas_con,itop_con, & |
---|
| 3144 | diafra,dialiq) |
---|
| 3145 | DO k = 1, klev |
---|
| 3146 | DO i = 1, klon |
---|
| 3147 | IF (diafra(i,k).GT.cldfra(i,k)) THEN |
---|
| 3148 | cldliq(i,k) = dialiq(i,k) |
---|
| 3149 | cldfra(i,k) = diafra(i,k) |
---|
| 3150 | ENDIF |
---|
| 3151 | ENDDO |
---|
| 3152 | ENDDO |
---|
[524] | 3153 | |
---|
[2469] | 3154 | ELSE IF (iflag_cld_th.ge.3) THEN |
---|
| 3155 | ! On prend pour les nuages convectifs le max du calcul de la |
---|
| 3156 | ! convection et du calcul du pas de temps precedent diminue d'un facteur |
---|
| 3157 | ! facttemps |
---|
| 3158 | facteur = pdtphys *facttemps |
---|
[2692] | 3159 | DO k=1,klev |
---|
| 3160 | DO i=1,klon |
---|
[2469] | 3161 | rnebcon(i,k)=rnebcon(i,k)*facteur |
---|
[2692] | 3162 | IF (rnebcon0(i,k)*clwcon0(i,k).GT.rnebcon(i,k)*clwcon(i,k)) THEN |
---|
[2469] | 3163 | rnebcon(i,k)=rnebcon0(i,k) |
---|
| 3164 | clwcon(i,k)=clwcon0(i,k) |
---|
[2692] | 3165 | ENDIF |
---|
| 3166 | ENDDO |
---|
| 3167 | ENDDO |
---|
[2469] | 3168 | |
---|
| 3169 | ! On prend la somme des fractions nuageuses et des contenus en eau |
---|
[524] | 3170 | |
---|
[2692] | 3171 | IF (iflag_cld_th>=5) THEN |
---|
[1411] | 3172 | |
---|
[2692] | 3173 | DO k=1,klev |
---|
[2469] | 3174 | ptconvth(:,k)=fm_therm(:,k+1)>0. |
---|
[2692] | 3175 | ENDDO |
---|
[1496] | 3176 | |
---|
[2692] | 3177 | IF (iflag_coupl==4) THEN |
---|
[1496] | 3178 | |
---|
[2469] | 3179 | ! Dans le cas iflag_coupl==4, on prend la somme des convertures |
---|
| 3180 | ! convectives et lsc dans la partie des thermiques |
---|
| 3181 | ! Le controle par iflag_coupl est peut etre provisoire. |
---|
[2692] | 3182 | DO k=1,klev |
---|
| 3183 | DO i=1,klon |
---|
| 3184 | IF (ptconv(i,k).AND.ptconvth(i,k)) THEN |
---|
[2469] | 3185 | cldliq(i,k)=cldliq(i,k)+rnebcon(i,k)*clwcon(i,k) |
---|
| 3186 | cldfra(i,k)=min(cldfra(i,k)+rnebcon(i,k),1.) |
---|
[2692] | 3187 | ELSE IF (ptconv(i,k)) THEN |
---|
[2469] | 3188 | cldfra(i,k)=rnebcon(i,k) |
---|
| 3189 | cldliq(i,k)=rnebcon(i,k)*clwcon(i,k) |
---|
[2692] | 3190 | ENDIF |
---|
| 3191 | ENDDO |
---|
| 3192 | ENDDO |
---|
[1496] | 3193 | |
---|
[2692] | 3194 | ELSE IF (iflag_coupl==5) THEN |
---|
| 3195 | DO k=1,klev |
---|
| 3196 | DO i=1,klon |
---|
[2469] | 3197 | cldfra(i,k)=min(cldfra(i,k)+rnebcon(i,k),1.) |
---|
| 3198 | cldliq(i,k)=cldliq(i,k)+rnebcon(i,k)*clwcon(i,k) |
---|
[2692] | 3199 | ENDDO |
---|
| 3200 | ENDDO |
---|
[1525] | 3201 | |
---|
[2692] | 3202 | ELSE |
---|
[1525] | 3203 | |
---|
[2469] | 3204 | ! Si on est sur un point touche par la convection |
---|
| 3205 | ! profonde et pas par les thermiques, on prend la |
---|
| 3206 | ! couverture nuageuse et l'eau nuageuse de la convection |
---|
| 3207 | ! profonde. |
---|
[1411] | 3208 | |
---|
[2469] | 3209 | !IM/FH: 2011/02/23 |
---|
| 3210 | ! definition des points sur lesquels ls thermiques sont actifs |
---|
[1496] | 3211 | |
---|
[2692] | 3212 | DO k=1,klev |
---|
| 3213 | DO i=1,klon |
---|
| 3214 | IF (ptconv(i,k).AND. .NOT.ptconvth(i,k)) THEN |
---|
[2469] | 3215 | cldfra(i,k)=rnebcon(i,k) |
---|
| 3216 | cldliq(i,k)=rnebcon(i,k)*clwcon(i,k) |
---|
[2692] | 3217 | ENDIF |
---|
| 3218 | ENDDO |
---|
| 3219 | ENDDO |
---|
[1496] | 3220 | |
---|
[2692] | 3221 | ENDIF |
---|
[1496] | 3222 | |
---|
[2692] | 3223 | ELSE |
---|
[1496] | 3224 | |
---|
[2469] | 3225 | ! Ancienne version |
---|
| 3226 | cldfra(:,:)=min(max(cldfra(:,:),rnebcon(:,:)),1.) |
---|
| 3227 | cldliq(:,:)=cldliq(:,:)+rnebcon(:,:)*clwcon(:,:) |
---|
[2692] | 3228 | ENDIF |
---|
[1411] | 3229 | |
---|
[2469] | 3230 | ENDIF |
---|
[1507] | 3231 | |
---|
[2469] | 3232 | ! plulsc(:)=0. |
---|
| 3233 | ! do k=1,klev,-1 |
---|
| 3234 | ! do i=1,klon |
---|
| 3235 | ! zzz=prfl(:,k)+psfl(:,k) |
---|
| 3236 | ! if (.not.ptconvth.zzz.gt.0.) |
---|
| 3237 | ! enddo prfl, psfl, |
---|
| 3238 | ! enddo |
---|
| 3239 | ! |
---|
| 3240 | ! 2. NUAGES STARTIFORMES |
---|
| 3241 | ! |
---|
| 3242 | IF (ok_stratus) THEN |
---|
| 3243 | CALL diagcld2(paprs,pplay,t_seri,q_seri, diafra,dialiq) |
---|
| 3244 | DO k = 1, klev |
---|
| 3245 | DO i = 1, klon |
---|
| 3246 | IF (diafra(i,k).GT.cldfra(i,k)) THEN |
---|
| 3247 | cldliq(i,k) = dialiq(i,k) |
---|
| 3248 | cldfra(i,k) = diafra(i,k) |
---|
| 3249 | ENDIF |
---|
| 3250 | ENDDO |
---|
| 3251 | ENDDO |
---|
| 3252 | ENDIF |
---|
| 3253 | ! |
---|
| 3254 | ! Precipitation totale |
---|
| 3255 | ! |
---|
| 3256 | DO i = 1, klon |
---|
| 3257 | rain_fall(i) = rain_con(i) + rain_lsc(i) |
---|
| 3258 | snow_fall(i) = snow_con(i) + snow_lsc(i) |
---|
| 3259 | ENDDO |
---|
| 3260 | ! |
---|
| 3261 | ! Calculer l'humidite relative pour diagnostique |
---|
| 3262 | ! |
---|
| 3263 | DO k = 1, klev |
---|
| 3264 | DO i = 1, klon |
---|
| 3265 | zx_t = t_seri(i,k) |
---|
| 3266 | IF (thermcep) THEN |
---|
| 3267 | !! if (iflag_ice_thermo.eq.0) then !jyg |
---|
| 3268 | zdelta = MAX(0.,SIGN(1.,rtt-zx_t)) |
---|
| 3269 | !! else !jyg |
---|
| 3270 | !! zdelta = MAX(0.,SIGN(1.,t_glace_min-zx_t)) !jyg |
---|
| 3271 | !! endif !jyg |
---|
| 3272 | zx_qs = r2es * FOEEW(zx_t,zdelta)/pplay(i,k) |
---|
| 3273 | zx_qs = MIN(0.5,zx_qs) |
---|
| 3274 | zcor = 1./(1.-retv*zx_qs) |
---|
| 3275 | zx_qs = zx_qs*zcor |
---|
| 3276 | ELSE |
---|
| 3277 | !! IF (zx_t.LT.t_coup) THEN !jyg |
---|
| 3278 | IF (zx_t.LT.rtt) THEN !jyg |
---|
| 3279 | zx_qs = qsats(zx_t)/pplay(i,k) |
---|
| 3280 | ELSE |
---|
| 3281 | zx_qs = qsatl(zx_t)/pplay(i,k) |
---|
| 3282 | ENDIF |
---|
| 3283 | ENDIF |
---|
| 3284 | zx_rh(i,k) = q_seri(i,k)/zx_qs |
---|
| 3285 | zqsat(i,k)=zx_qs |
---|
| 3286 | ENDDO |
---|
| 3287 | ENDDO |
---|
[782] | 3288 | |
---|
[2469] | 3289 | !IM Calcul temp.potentielle a 2m (tpot) et temp. potentielle |
---|
| 3290 | ! equivalente a 2m (tpote) pour diagnostique |
---|
| 3291 | ! |
---|
| 3292 | DO i = 1, klon |
---|
| 3293 | tpot(i)=zt2m(i)*(100000./paprs(i,1))**RKAPPA |
---|
| 3294 | IF (thermcep) THEN |
---|
| 3295 | IF(zt2m(i).LT.RTT) then |
---|
| 3296 | Lheat=RLSTT |
---|
| 3297 | ELSE |
---|
| 3298 | Lheat=RLVTT |
---|
| 3299 | ENDIF |
---|
| 3300 | ELSE |
---|
| 3301 | IF (zt2m(i).LT.RTT) THEN |
---|
| 3302 | Lheat=RLSTT |
---|
| 3303 | ELSE |
---|
| 3304 | Lheat=RLVTT |
---|
| 3305 | ENDIF |
---|
| 3306 | ENDIF |
---|
| 3307 | tpote(i) = tpot(i)* & |
---|
| 3308 | EXP((Lheat *qsat2m(i))/(RCPD*zt2m(i))) |
---|
| 3309 | ENDDO |
---|
[524] | 3310 | |
---|
[2469] | 3311 | IF (type_trac == 'inca') THEN |
---|
[524] | 3312 | #ifdef INCA |
---|
[2469] | 3313 | CALL VTe(VTphysiq) |
---|
| 3314 | CALL VTb(VTinca) |
---|
| 3315 | calday = REAL(days_elapsed + 1) + jH_cur |
---|
[524] | 3316 | |
---|
[2692] | 3317 | CALL chemtime(itap+itau_phy-1, date0, dtime, itap) |
---|
[2469] | 3318 | IF (config_inca == 'aero' .OR. config_inca == 'aeNP') THEN |
---|
| 3319 | CALL AEROSOL_METEO_CALC( & |
---|
| 3320 | calday,pdtphys,pplay,paprs,t,pmflxr,pmflxs, & |
---|
| 3321 | prfl,psfl,pctsrf,cell_area, & |
---|
| 3322 | latitude_deg,longitude_deg,u10m,v10m) |
---|
[2692] | 3323 | ENDIF |
---|
[524] | 3324 | |
---|
[2469] | 3325 | zxsnow_dummy(:) = 0.0 |
---|
[625] | 3326 | |
---|
[2469] | 3327 | CALL chemhook_begin (calday, & |
---|
| 3328 | days_elapsed+1, & |
---|
| 3329 | jH_cur, & |
---|
| 3330 | pctsrf(1,1), & |
---|
| 3331 | latitude_deg, & |
---|
| 3332 | longitude_deg, & |
---|
| 3333 | cell_area, & |
---|
| 3334 | paprs, & |
---|
| 3335 | pplay, & |
---|
| 3336 | coefh(1:klon,1:klev,is_ave), & |
---|
| 3337 | pphi, & |
---|
| 3338 | t_seri, & |
---|
| 3339 | u, & |
---|
| 3340 | v, & |
---|
| 3341 | wo(:, :, 1), & |
---|
| 3342 | q_seri, & |
---|
| 3343 | zxtsol, & |
---|
| 3344 | zxsnow_dummy, & |
---|
| 3345 | solsw, & |
---|
| 3346 | albsol1, & |
---|
| 3347 | rain_fall, & |
---|
| 3348 | snow_fall, & |
---|
| 3349 | itop_con, & |
---|
| 3350 | ibas_con, & |
---|
| 3351 | cldfra, & |
---|
| 3352 | nbp_lon, & |
---|
| 3353 | nbp_lat-1, & |
---|
| 3354 | tr_seri, & |
---|
| 3355 | ftsol, & |
---|
| 3356 | paprs, & |
---|
| 3357 | cdragh, & |
---|
| 3358 | cdragm, & |
---|
| 3359 | pctsrf, & |
---|
| 3360 | pdtphys, & |
---|
| 3361 | itap) |
---|
[616] | 3362 | |
---|
[2469] | 3363 | CALL VTe(VTinca) |
---|
| 3364 | CALL VTb(VTphysiq) |
---|
[959] | 3365 | #endif |
---|
[2692] | 3366 | ENDIF !type_trac = inca |
---|
[2618] | 3367 | |
---|
| 3368 | |
---|
[2469] | 3369 | ! |
---|
[2618] | 3370 | ! Appeler le rayonnement mais calculer tout d'abord l'albedo du sol. |
---|
| 3371 | ! |
---|
| 3372 | IF (MOD(itaprad,radpas).EQ.0) THEN |
---|
[959] | 3373 | |
---|
[2618] | 3374 | ! |
---|
| 3375 | !jq - introduce the aerosol direct and first indirect radiative forcings |
---|
| 3376 | !jq - Johannes Quaas, 27/11/2003 (quaas@lmd.jussieu.fr) |
---|
[2738] | 3377 | IF (flag_aerosol .GT. 0) THEN |
---|
[2618] | 3378 | IF (iflag_rrtm .EQ. 0) THEN !--old radiation |
---|
| 3379 | IF (.NOT. aerosol_couple) THEN |
---|
| 3380 | ! |
---|
| 3381 | CALL readaerosol_optic( & |
---|
| 3382 | debut, new_aod, flag_aerosol, itap, jD_cur-jD_ref, & |
---|
| 3383 | pdtphys, pplay, paprs, t_seri, rhcl, presnivs, & |
---|
| 3384 | mass_solu_aero, mass_solu_aero_pi, & |
---|
| 3385 | tau_aero, piz_aero, cg_aero, & |
---|
| 3386 | tausum_aero, tau3d_aero) |
---|
| 3387 | ENDIF |
---|
| 3388 | ELSE ! RRTM radiation |
---|
| 3389 | IF (aerosol_couple .AND. config_inca == 'aero' ) THEN |
---|
| 3390 | abort_message='config_inca=aero et rrtm=1 impossible' |
---|
[2692] | 3391 | CALL abort_physic(modname,abort_message,1) |
---|
[2618] | 3392 | ELSE |
---|
| 3393 | ! |
---|
| 3394 | #ifdef CPP_RRTM |
---|
| 3395 | IF (NSW.EQ.6) THEN |
---|
[2738] | 3396 | !--new aerosol properties SW and LW |
---|
[2618] | 3397 | ! |
---|
[2753] | 3398 | #ifdef CPP_Dust |
---|
| 3399 | !--SPL aerosol model |
---|
| 3400 | CALL splaerosol_optic_rrtm( ok_alw, pplay, paprs, t_seri, rhcl, & |
---|
| 3401 | tr_seri, mass_solu_aero, mass_solu_aero_pi, & |
---|
| 3402 | tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm, & |
---|
| 3403 | tausum_aero, tau3d_aero) |
---|
| 3404 | #else |
---|
| 3405 | !--climatologies or INCA aerosols |
---|
[2738] | 3406 | CALL readaerosol_optic_rrtm( debut, aerosol_couple, ok_alw, & |
---|
[2644] | 3407 | new_aod, flag_aerosol, flag_bc_internal_mixture, itap, jD_cur-jD_ref, & |
---|
[2618] | 3408 | pdtphys, pplay, paprs, t_seri, rhcl, presnivs, & |
---|
| 3409 | tr_seri, mass_solu_aero, mass_solu_aero_pi, & |
---|
| 3410 | tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm, & |
---|
[2854] | 3411 | tausum_aero, drytausum_aero, tau3d_aero) |
---|
[2753] | 3412 | #endif |
---|
[2738] | 3413 | ! |
---|
[2618] | 3414 | ELSE IF (NSW.EQ.2) THEN |
---|
| 3415 | !--for now we use the old aerosol properties |
---|
| 3416 | ! |
---|
| 3417 | CALL readaerosol_optic( & |
---|
| 3418 | debut, new_aod, flag_aerosol, itap, jD_cur-jD_ref, & |
---|
| 3419 | pdtphys, pplay, paprs, t_seri, rhcl, presnivs, & |
---|
| 3420 | mass_solu_aero, mass_solu_aero_pi, & |
---|
| 3421 | tau_aero, piz_aero, cg_aero, & |
---|
| 3422 | tausum_aero, tau3d_aero) |
---|
| 3423 | ! |
---|
| 3424 | !--natural aerosols |
---|
| 3425 | tau_aero_sw_rrtm(:,:,1,:)=tau_aero(:,:,3,:) |
---|
| 3426 | piz_aero_sw_rrtm(:,:,1,:)=piz_aero(:,:,3,:) |
---|
| 3427 | cg_aero_sw_rrtm (:,:,1,:)=cg_aero (:,:,3,:) |
---|
| 3428 | !--all aerosols |
---|
| 3429 | tau_aero_sw_rrtm(:,:,2,:)=tau_aero(:,:,2,:) |
---|
| 3430 | piz_aero_sw_rrtm(:,:,2,:)=piz_aero(:,:,2,:) |
---|
| 3431 | cg_aero_sw_rrtm (:,:,2,:)=cg_aero (:,:,2,:) |
---|
[2738] | 3432 | ! |
---|
| 3433 | !--no LW optics |
---|
| 3434 | tau_aero_lw_rrtm(:,:,:,:) = 1.e-15 |
---|
| 3435 | ! |
---|
[2618] | 3436 | ELSE |
---|
| 3437 | abort_message='Only NSW=2 or 6 are possible with ' & |
---|
| 3438 | // 'aerosols and iflag_rrtm=1' |
---|
[2692] | 3439 | CALL abort_physic(modname,abort_message,1) |
---|
[2618] | 3440 | ENDIF |
---|
| 3441 | #else |
---|
| 3442 | abort_message='You should compile with -rrtm if running ' & |
---|
| 3443 | // 'with iflag_rrtm=1' |
---|
[2692] | 3444 | CALL abort_physic(modname,abort_message,1) |
---|
[2618] | 3445 | #endif |
---|
| 3446 | ! |
---|
| 3447 | ENDIF |
---|
| 3448 | ENDIF |
---|
[2738] | 3449 | ELSE !--flag_aerosol = 0 |
---|
[2618] | 3450 | tausum_aero(:,:,:) = 0. |
---|
[2854] | 3451 | drytausum_aero(:,:) = 0. |
---|
[2640] | 3452 | mass_solu_aero(:,:) = 0. |
---|
| 3453 | mass_solu_aero_pi(:,:) = 0. |
---|
[2618] | 3454 | IF (iflag_rrtm .EQ. 0) THEN !--old radiation |
---|
| 3455 | tau_aero(:,:,:,:) = 1.e-15 |
---|
| 3456 | piz_aero(:,:,:,:) = 1. |
---|
| 3457 | cg_aero(:,:,:,:) = 0. |
---|
| 3458 | ELSE |
---|
| 3459 | tau_aero_sw_rrtm(:,:,:,:) = 1.e-15 |
---|
| 3460 | tau_aero_lw_rrtm(:,:,:,:) = 1.e-15 |
---|
| 3461 | piz_aero_sw_rrtm(:,:,:,:) = 1.0 |
---|
| 3462 | cg_aero_sw_rrtm(:,:,:,:) = 0.0 |
---|
| 3463 | ENDIF |
---|
| 3464 | ENDIF |
---|
| 3465 | ! |
---|
| 3466 | !--STRAT AEROSOL |
---|
| 3467 | !--updates tausum_aero,tau_aero,piz_aero,cg_aero |
---|
| 3468 | IF (flag_aerosol_strat.GT.0) THEN |
---|
| 3469 | IF (prt_level .GE.10) THEN |
---|
| 3470 | PRINT *,'appel a readaerosolstrat', mth_cur |
---|
| 3471 | ENDIF |
---|
| 3472 | IF (iflag_rrtm.EQ.0) THEN |
---|
| 3473 | IF (flag_aerosol_strat.EQ.1) THEN |
---|
| 3474 | CALL readaerosolstrato(debut) |
---|
| 3475 | ELSE |
---|
| 3476 | abort_message='flag_aerosol_strat must equal 1 for rrtm=0' |
---|
| 3477 | CALL abort_physic(modname,abort_message,1) |
---|
| 3478 | ENDIF |
---|
| 3479 | ELSE |
---|
[2009] | 3480 | #ifdef CPP_RRTM |
---|
[2690] | 3481 | #ifndef CPP_StratAer |
---|
| 3482 | !--prescribed strat aerosols |
---|
| 3483 | !--only in the case of non-interactive strat aerosols |
---|
[2618] | 3484 | IF (flag_aerosol_strat.EQ.1) THEN |
---|
| 3485 | CALL readaerosolstrato1_rrtm(debut) |
---|
| 3486 | ELSEIF (flag_aerosol_strat.EQ.2) THEN |
---|
| 3487 | CALL stratosphere_mask(t_seri, pplay, latitude_deg) |
---|
| 3488 | CALL readaerosolstrato2_rrtm(debut) |
---|
| 3489 | ELSE |
---|
| 3490 | abort_message='flag_aerosol_strat must equal 1 or 2 for rrtm=1' |
---|
| 3491 | CALL abort_physic(modname,abort_message,1) |
---|
| 3492 | ENDIF |
---|
[2690] | 3493 | #endif |
---|
[2618] | 3494 | #else |
---|
| 3495 | abort_message='You should compile with -rrtm if running ' & |
---|
| 3496 | // 'with iflag_rrtm=1' |
---|
| 3497 | CALL abort_physic(modname,abort_message,1) |
---|
| 3498 | #endif |
---|
| 3499 | ENDIF |
---|
| 3500 | ENDIF |
---|
[2690] | 3501 | ! |
---|
| 3502 | #ifdef CPP_RRTM |
---|
| 3503 | #ifdef CPP_StratAer |
---|
[2692] | 3504 | !--compute stratospheric mask |
---|
| 3505 | CALL stratosphere_mask(t_seri, pplay, latitude_deg) |
---|
[2690] | 3506 | !--interactive strat aerosols |
---|
| 3507 | CALL calcaerosolstrato_rrtm(pplay,t_seri,paprs,debut) |
---|
| 3508 | #endif |
---|
| 3509 | #endif |
---|
[2618] | 3510 | !--fin STRAT AEROSOL |
---|
| 3511 | ! |
---|
| 3512 | |
---|
| 3513 | ! Calculer les parametres optiques des nuages et quelques |
---|
| 3514 | ! parametres pour diagnostiques: |
---|
| 3515 | ! |
---|
| 3516 | IF (aerosol_couple.AND.config_inca=='aero') THEN |
---|
| 3517 | mass_solu_aero(:,:) = ccm(:,:,1) |
---|
| 3518 | mass_solu_aero_pi(:,:) = ccm(:,:,2) |
---|
[2692] | 3519 | ENDIF |
---|
[2618] | 3520 | |
---|
| 3521 | IF (ok_newmicro) then |
---|
| 3522 | IF (iflag_rrtm.NE.0) THEN |
---|
| 3523 | #ifdef CPP_RRTM |
---|
| 3524 | IF (ok_cdnc.AND.NRADLP.NE.3) THEN |
---|
[2469] | 3525 | abort_message='RRTM choix incoherent NRADLP doit etre egal a 3 ' & |
---|
| 3526 | // 'pour ok_cdnc' |
---|
[2618] | 3527 | CALL abort_physic(modname,abort_message,1) |
---|
| 3528 | ENDIF |
---|
[2009] | 3529 | #else |
---|
| 3530 | |
---|
[2618] | 3531 | abort_message='You should compile with -rrtm if running with '//'iflag_rrtm=1' |
---|
| 3532 | CALL abort_physic(modname,abort_message,1) |
---|
[2009] | 3533 | #endif |
---|
[2618] | 3534 | ENDIF |
---|
| 3535 | CALL newmicro (ok_cdnc, bl95_b0, bl95_b1, & |
---|
| 3536 | paprs, pplay, t_seri, cldliq, cldfra, & |
---|
| 3537 | cldtau, cldemi, cldh, cldl, cldm, cldt, cldq, & |
---|
| 3538 | flwp, fiwp, flwc, fiwc, & |
---|
| 3539 | mass_solu_aero, mass_solu_aero_pi, & |
---|
| 3540 | cldtaupi, re, fl, ref_liq, ref_ice, & |
---|
| 3541 | ref_liq_pi, ref_ice_pi) |
---|
| 3542 | ELSE |
---|
| 3543 | CALL nuage (paprs, pplay, & |
---|
| 3544 | t_seri, cldliq, cldfra, cldtau, cldemi, & |
---|
| 3545 | cldh, cldl, cldm, cldt, cldq, & |
---|
| 3546 | ok_aie, & |
---|
| 3547 | mass_solu_aero, mass_solu_aero_pi, & |
---|
| 3548 | bl95_b0, bl95_b1, & |
---|
| 3549 | cldtaupi, re, fl) |
---|
[2469] | 3550 | ENDIF |
---|
| 3551 | ! |
---|
[2618] | 3552 | !IM betaCRF |
---|
[2469] | 3553 | ! |
---|
[2618] | 3554 | cldtaurad = cldtau |
---|
| 3555 | cldtaupirad = cldtaupi |
---|
| 3556 | cldemirad = cldemi |
---|
| 3557 | cldfrarad = cldfra |
---|
| 3558 | |
---|
[2469] | 3559 | ! |
---|
[2618] | 3560 | IF (lon1_beta.EQ.-180..AND.lon2_beta.EQ.180..AND. & |
---|
| 3561 | lat1_beta.EQ.90..AND.lat2_beta.EQ.-90.) THEN |
---|
| 3562 | ! |
---|
| 3563 | ! global |
---|
| 3564 | ! |
---|
| 3565 | DO k=1, klev |
---|
| 3566 | DO i=1, klon |
---|
| 3567 | IF (pplay(i,k).GE.pfree) THEN |
---|
[2469] | 3568 | beta(i,k) = beta_pbl |
---|
[2618] | 3569 | ELSE |
---|
[2469] | 3570 | beta(i,k) = beta_free |
---|
[2618] | 3571 | ENDIF |
---|
| 3572 | IF (mskocean_beta) THEN |
---|
[2469] | 3573 | beta(i,k) = beta(i,k) * pctsrf(i,is_oce) |
---|
[2618] | 3574 | ENDIF |
---|
[2469] | 3575 | cldtaurad(i,k) = cldtau(i,k) * beta(i,k) |
---|
| 3576 | cldtaupirad(i,k) = cldtaupi(i,k) * beta(i,k) |
---|
| 3577 | cldemirad(i,k) = cldemi(i,k) * beta(i,k) |
---|
| 3578 | cldfrarad(i,k) = cldfra(i,k) * beta(i,k) |
---|
[2618] | 3579 | ENDDO |
---|
| 3580 | ENDDO |
---|
| 3581 | ! |
---|
| 3582 | ELSE |
---|
| 3583 | ! |
---|
| 3584 | ! regional |
---|
| 3585 | ! |
---|
| 3586 | DO k=1, klev |
---|
| 3587 | DO i=1,klon |
---|
| 3588 | ! |
---|
| 3589 | IF (longitude_deg(i).ge.lon1_beta.AND. & |
---|
| 3590 | longitude_deg(i).le.lon2_beta.AND. & |
---|
| 3591 | latitude_deg(i).le.lat1_beta.AND. & |
---|
| 3592 | latitude_deg(i).ge.lat2_beta) THEN |
---|
| 3593 | IF (pplay(i,k).GE.pfree) THEN |
---|
| 3594 | beta(i,k) = beta_pbl |
---|
| 3595 | ELSE |
---|
| 3596 | beta(i,k) = beta_free |
---|
| 3597 | ENDIF |
---|
| 3598 | IF (mskocean_beta) THEN |
---|
| 3599 | beta(i,k) = beta(i,k) * pctsrf(i,is_oce) |
---|
| 3600 | ENDIF |
---|
| 3601 | cldtaurad(i,k) = cldtau(i,k) * beta(i,k) |
---|
| 3602 | cldtaupirad(i,k) = cldtaupi(i,k) * beta(i,k) |
---|
| 3603 | cldemirad(i,k) = cldemi(i,k) * beta(i,k) |
---|
| 3604 | cldfrarad(i,k) = cldfra(i,k) * beta(i,k) |
---|
| 3605 | ENDIF |
---|
[2469] | 3606 | ! |
---|
[2618] | 3607 | ENDDO |
---|
[2469] | 3608 | ENDDO |
---|
| 3609 | ! |
---|
[2618] | 3610 | ENDIF |
---|
[766] | 3611 | |
---|
[2618] | 3612 | !lecture de la chlorophylle pour le nouvel albedo de Sunghye Baek |
---|
| 3613 | IF (ok_chlorophyll) THEN |
---|
[2469] | 3614 | print*,"-- reading chlorophyll" |
---|
[2618] | 3615 | CALL readchlorophyll(debut) |
---|
| 3616 | ENDIF |
---|
[1863] | 3617 | |
---|
[2524] | 3618 | !--if ok_suntime_rrtm we use ancillay data for RSUN |
---|
| 3619 | !--previous values are therefore overwritten |
---|
| 3620 | !--this is needed for CMIP6 runs |
---|
| 3621 | !--and only possible for new radiation scheme |
---|
| 3622 | IF (iflag_rrtm.EQ.1.AND.ok_suntime_rrtm) THEN |
---|
[2525] | 3623 | #ifdef CPP_RRTM |
---|
[2524] | 3624 | CALL read_rsun_rrtm(debut) |
---|
[2525] | 3625 | #endif |
---|
[2524] | 3626 | ENDIF |
---|
| 3627 | |
---|
[2692] | 3628 | IF (mydebug) THEN |
---|
| 3629 | CALL writefield_phy('u_seri',u_seri,nbp_lev) |
---|
| 3630 | CALL writefield_phy('v_seri',v_seri,nbp_lev) |
---|
| 3631 | CALL writefield_phy('t_seri',t_seri,nbp_lev) |
---|
| 3632 | CALL writefield_phy('q_seri',q_seri,nbp_lev) |
---|
| 3633 | ENDIF |
---|
[2524] | 3634 | |
---|
[2469] | 3635 | ! |
---|
| 3636 | !sonia : If Iflag_radia >=2, pertubation of some variables |
---|
| 3637 | !input to radiation (DICE) |
---|
| 3638 | ! |
---|
| 3639 | IF (iflag_radia .ge. 2) THEN |
---|
| 3640 | zsav_tsol (:) = zxtsol(:) |
---|
[2692] | 3641 | CALL perturb_radlwsw(zxtsol,iflag_radia) |
---|
[2469] | 3642 | ENDIF |
---|
[2328] | 3643 | |
---|
[2469] | 3644 | IF (aerosol_couple.AND.config_inca=='aero') THEN |
---|
[959] | 3645 | #ifdef INCA |
---|
[2469] | 3646 | CALL radlwsw_inca & |
---|
| 3647 | (kdlon,kflev,dist, rmu0, fract, solaire, & |
---|
| 3648 | paprs, pplay,zxtsol,albsol1, albsol2, t_seri,q_seri, & |
---|
[2684] | 3649 | size(wo,3), wo, & |
---|
[2469] | 3650 | cldfrarad, cldemirad, cldtaurad, & |
---|
| 3651 | heat,heat0,cool,cool0,albpla, & |
---|
| 3652 | topsw,toplw,solsw,sollw, & |
---|
| 3653 | sollwdown, & |
---|
| 3654 | topsw0,toplw0,solsw0,sollw0, & |
---|
| 3655 | lwdn0, lwdn, lwup0, lwup, & |
---|
| 3656 | swdn0, swdn, swup0, swup, & |
---|
| 3657 | ok_ade, ok_aie, & |
---|
| 3658 | tau_aero, piz_aero, cg_aero, & |
---|
| 3659 | topswad_aero, solswad_aero, & |
---|
| 3660 | topswad0_aero, solswad0_aero, & |
---|
| 3661 | topsw_aero, topsw0_aero, & |
---|
| 3662 | solsw_aero, solsw0_aero, & |
---|
| 3663 | cldtaupirad, & |
---|
| 3664 | topswai_aero, solswai_aero) |
---|
[955] | 3665 | #endif |
---|
[2469] | 3666 | ELSE |
---|
| 3667 | ! |
---|
| 3668 | !IM calcul radiatif pour le cas actuel |
---|
| 3669 | ! |
---|
| 3670 | RCO2 = RCO2_act |
---|
| 3671 | RCH4 = RCH4_act |
---|
| 3672 | RN2O = RN2O_act |
---|
| 3673 | RCFC11 = RCFC11_act |
---|
| 3674 | RCFC12 = RCFC12_act |
---|
| 3675 | ! |
---|
| 3676 | IF (prt_level .GE.10) THEN |
---|
| 3677 | print *,' ->radlwsw, number 1 ' |
---|
| 3678 | ENDIF |
---|
| 3679 | ! |
---|
| 3680 | CALL radlwsw & |
---|
| 3681 | (dist, rmu0, fract, & |
---|
| 3682 | !albedo SB >>> |
---|
| 3683 | ! paprs, pplay,zxtsol,albsol1, albsol2, & |
---|
| 3684 | paprs, pplay,zxtsol,SFRWL,albsol_dir, albsol_dif, & |
---|
| 3685 | !albedo SB <<< |
---|
| 3686 | t_seri,q_seri,wo, & |
---|
| 3687 | cldfrarad, cldemirad, cldtaurad, & |
---|
[2530] | 3688 | ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, flag_aerosol, & |
---|
[2469] | 3689 | flag_aerosol_strat, & |
---|
| 3690 | tau_aero, piz_aero, cg_aero, & |
---|
| 3691 | tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm, & |
---|
| 3692 | ! Rajoute par OB pour RRTM |
---|
| 3693 | tau_aero_lw_rrtm, & |
---|
| 3694 | cldtaupirad,new_aod, & |
---|
| 3695 | zqsat, flwc, fiwc, & |
---|
| 3696 | ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, & |
---|
| 3697 | heat,heat0,cool,cool0,albpla, & |
---|
| 3698 | topsw,toplw,solsw,sollw, & |
---|
| 3699 | sollwdown, & |
---|
| 3700 | topsw0,toplw0,solsw0,sollw0, & |
---|
| 3701 | lwdn0, lwdn, lwup0, lwup, & |
---|
| 3702 | swdn0, swdn, swup0, swup, & |
---|
| 3703 | topswad_aero, solswad_aero, & |
---|
| 3704 | topswai_aero, solswai_aero, & |
---|
| 3705 | topswad0_aero, solswad0_aero, & |
---|
| 3706 | topsw_aero, topsw0_aero, & |
---|
| 3707 | solsw_aero, solsw0_aero, & |
---|
| 3708 | topswcf_aero, solswcf_aero, & |
---|
| 3709 | !-C. Kleinschmitt for LW diagnostics |
---|
| 3710 | toplwad_aero, sollwad_aero,& |
---|
| 3711 | toplwai_aero, sollwai_aero, & |
---|
| 3712 | toplwad0_aero, sollwad0_aero,& |
---|
| 3713 | !-end |
---|
| 3714 | ZLWFT0_i, ZFLDN0, ZFLUP0, & |
---|
| 3715 | ZSWFT0_i, ZFSDN0, ZFSUP0) |
---|
[879] | 3716 | |
---|
[2679] | 3717 | #ifndef CPP_XIOS |
---|
| 3718 | !--OB 30/05/2016 modified 21/10/2016 |
---|
[2854] | 3719 | !--here we return swaero_diag and dryaod_diag to FALSE |
---|
[2529] | 3720 | !--and histdef will switch it back to TRUE if necessary |
---|
| 3721 | !--this is necessary to get the right swaero at first step |
---|
[2679] | 3722 | !--but only in the case of no XIOS as XIOS is covered elsewhere |
---|
[2529] | 3723 | IF (debut) swaero_diag = .FALSE. |
---|
[2854] | 3724 | IF (debut) dryaod_diag = .FALSE. |
---|
[2679] | 3725 | #endif |
---|
[2469] | 3726 | ! |
---|
| 3727 | !IM 2eme calcul radiatif pour le cas perturbe ou au moins un |
---|
| 3728 | !IM des taux doit etre different du taux actuel |
---|
| 3729 | !IM Par defaut on a les taux perturbes egaux aux taux actuels |
---|
| 3730 | ! |
---|
[2692] | 3731 | IF (ok_4xCO2atm) THEN |
---|
| 3732 | IF (RCO2_per.NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR. & |
---|
| 3733 | RN2O_per.NE.RN2O_act.OR.RCFC11_per.NE.RCFC11_act.OR. & |
---|
| 3734 | RCFC12_per.NE.RCFC12_act) THEN |
---|
[2469] | 3735 | ! |
---|
| 3736 | RCO2 = RCO2_per |
---|
| 3737 | RCH4 = RCH4_per |
---|
| 3738 | RN2O = RN2O_per |
---|
| 3739 | RCFC11 = RCFC11_per |
---|
| 3740 | RCFC12 = RCFC12_per |
---|
| 3741 | ! |
---|
| 3742 | IF (prt_level .GE.10) THEN |
---|
| 3743 | print *,' ->radlwsw, number 2 ' |
---|
| 3744 | ENDIF |
---|
| 3745 | ! |
---|
| 3746 | CALL radlwsw & |
---|
| 3747 | (dist, rmu0, fract, & |
---|
| 3748 | !albedo SB >>> |
---|
| 3749 | ! paprs, pplay,zxtsol,albsol1, albsol2, & |
---|
| 3750 | paprs, pplay,zxtsol,SFRWL,albsol_dir, albsol_dif, & |
---|
| 3751 | !albedo SB <<< |
---|
| 3752 | t_seri,q_seri,wo, & |
---|
[2640] | 3753 | cldfrarad, cldemirad, cldtaurad, & |
---|
[2530] | 3754 | ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, flag_aerosol, & |
---|
[2469] | 3755 | flag_aerosol_strat, & |
---|
| 3756 | tau_aero, piz_aero, cg_aero, & |
---|
| 3757 | tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm, & |
---|
| 3758 | ! Rajoute par OB pour RRTM |
---|
| 3759 | tau_aero_lw_rrtm, & |
---|
| 3760 | cldtaupi,new_aod, & |
---|
| 3761 | zqsat, flwc, fiwc, & |
---|
| 3762 | ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, & |
---|
| 3763 | heatp,heat0p,coolp,cool0p,albplap, & |
---|
| 3764 | topswp,toplwp,solswp,sollwp, & |
---|
| 3765 | sollwdownp, & |
---|
| 3766 | topsw0p,toplw0p,solsw0p,sollw0p, & |
---|
| 3767 | lwdn0p, lwdnp, lwup0p, lwupp, & |
---|
| 3768 | swdn0p, swdnp, swup0p, swupp, & |
---|
| 3769 | topswad_aerop, solswad_aerop, & |
---|
| 3770 | topswai_aerop, solswai_aerop, & |
---|
| 3771 | topswad0_aerop, solswad0_aerop, & |
---|
| 3772 | topsw_aerop, topsw0_aerop, & |
---|
| 3773 | solsw_aerop, solsw0_aerop, & |
---|
| 3774 | topswcf_aerop, solswcf_aerop, & |
---|
| 3775 | !-C. Kleinschmitt for LW diagnostics |
---|
| 3776 | toplwad_aerop, sollwad_aerop,& |
---|
| 3777 | toplwai_aerop, sollwai_aerop, & |
---|
| 3778 | toplwad0_aerop, sollwad0_aerop,& |
---|
| 3779 | !-end |
---|
| 3780 | ZLWFT0_i, ZFLDN0, ZFLUP0, & |
---|
| 3781 | ZSWFT0_i, ZFSDN0, ZFSUP0) |
---|
| 3782 | endif |
---|
| 3783 | endif |
---|
| 3784 | ! |
---|
| 3785 | ENDIF ! aerosol_couple |
---|
| 3786 | itaprad = 0 |
---|
| 3787 | ! |
---|
| 3788 | ! If Iflag_radia >=2, reset pertubed variables |
---|
| 3789 | ! |
---|
| 3790 | IF (iflag_radia .ge. 2) THEN |
---|
| 3791 | zxtsol(:) = zsav_tsol (:) |
---|
| 3792 | ENDIF |
---|
| 3793 | ENDIF ! MOD(itaprad,radpas) |
---|
| 3794 | itaprad = itaprad + 1 |
---|
[879] | 3795 | |
---|
[2469] | 3796 | IF (iflag_radia.eq.0) THEN |
---|
| 3797 | IF (prt_level.ge.9) THEN |
---|
| 3798 | PRINT *,'--------------------------------------------------' |
---|
| 3799 | PRINT *,'>>>> ATTENTION rayonnement desactive pour ce cas' |
---|
| 3800 | PRINT *,'>>>> heat et cool mis a zero ' |
---|
| 3801 | PRINT *,'--------------------------------------------------' |
---|
[2692] | 3802 | ENDIF |
---|
[2469] | 3803 | heat=0. |
---|
| 3804 | cool=0. |
---|
| 3805 | sollw=0. ! MPL 01032011 |
---|
| 3806 | solsw=0. |
---|
| 3807 | radsol=0. |
---|
| 3808 | swup=0. ! MPL 27102011 pour les fichiers AMMA_profiles et AMMA_scalars |
---|
| 3809 | swup0=0. |
---|
| 3810 | lwup=0. |
---|
| 3811 | lwup0=0. |
---|
| 3812 | lwdn=0. |
---|
| 3813 | lwdn0=0. |
---|
[2692] | 3814 | ENDIF |
---|
[782] | 3815 | |
---|
[2469] | 3816 | ! |
---|
| 3817 | ! Calculer radsol a l'exterieur de radlwsw |
---|
| 3818 | ! pour prendre en compte le cycle diurne |
---|
| 3819 | ! recode par Olivier Boucher en sept 2015 |
---|
| 3820 | ! |
---|
| 3821 | radsol=solsw*swradcorr+sollw |
---|
[2618] | 3822 | |
---|
[2692] | 3823 | IF (ok_4xCO2atm) THEN |
---|
[2469] | 3824 | radsolp=solswp*swradcorr+sollwp |
---|
[2692] | 3825 | ENDIF |
---|
[2359] | 3826 | |
---|
[2469] | 3827 | ! |
---|
| 3828 | ! Ajouter la tendance des rayonnements (tous les pas) |
---|
| 3829 | ! avec une correction pour le cycle diurne dans le SW |
---|
| 3830 | ! |
---|
[2359] | 3831 | |
---|
[2469] | 3832 | DO k=1, klev |
---|
| 3833 | d_t_swr(:,k)=swradcorr(:)*heat(:,k)*dtime/RDAY |
---|
| 3834 | d_t_sw0(:,k)=swradcorr(:)*heat0(:,k)*dtime/RDAY |
---|
| 3835 | d_t_lwr(:,k)=-cool(:,k)*dtime/RDAY |
---|
| 3836 | d_t_lw0(:,k)=-cool0(:,k)*dtime/RDAY |
---|
| 3837 | ENDDO |
---|
[2194] | 3838 | |
---|
[2812] | 3839 | CALL add_phys_tend(du0,dv0,d_t_swr,dq0,dql0,dqi0,paprs,'SW',abortphy,flag_inhib_tend,itap,0) |
---|
[2799] | 3840 | call prt_enerbil('SW',itap) |
---|
[2812] | 3841 | CALL add_phys_tend(du0,dv0,d_t_lwr,dq0,dql0,dqi0,paprs,'LW',abortphy,flag_inhib_tend,itap,0) |
---|
[2799] | 3842 | call prt_enerbil('LW',itap) |
---|
[1863] | 3843 | |
---|
[2469] | 3844 | ! |
---|
[2692] | 3845 | IF (mydebug) THEN |
---|
| 3846 | CALL writefield_phy('u_seri',u_seri,nbp_lev) |
---|
| 3847 | CALL writefield_phy('v_seri',v_seri,nbp_lev) |
---|
| 3848 | CALL writefield_phy('t_seri',t_seri,nbp_lev) |
---|
| 3849 | CALL writefield_phy('q_seri',q_seri,nbp_lev) |
---|
| 3850 | ENDIF |
---|
[1863] | 3851 | |
---|
[2469] | 3852 | ! Calculer l'hydrologie de la surface |
---|
| 3853 | ! |
---|
| 3854 | ! CALL hydrol(dtime,pctsrf,rain_fall, snow_fall, zxevap, |
---|
| 3855 | ! . agesno, ftsol,fqsurf,fsnow, ruis) |
---|
| 3856 | ! |
---|
[1001] | 3857 | |
---|
[2469] | 3858 | ! |
---|
| 3859 | ! Calculer le bilan du sol et la derive de temperature (couplage) |
---|
| 3860 | ! |
---|
| 3861 | DO i = 1, klon |
---|
| 3862 | ! bils(i) = radsol(i) - sens(i) - evap(i)*RLVTT |
---|
| 3863 | ! a la demande de JLD |
---|
| 3864 | bils(i) = radsol(i) - sens(i) + zxfluxlat(i) |
---|
| 3865 | ENDDO |
---|
| 3866 | ! |
---|
| 3867 | !moddeblott(jan95) |
---|
| 3868 | ! Appeler le programme de parametrisation de l'orographie |
---|
| 3869 | ! a l'echelle sous-maille: |
---|
| 3870 | ! |
---|
| 3871 | IF (prt_level .GE.10) THEN |
---|
| 3872 | print *,' call orography ? ', ok_orodr |
---|
| 3873 | ENDIF |
---|
| 3874 | ! |
---|
| 3875 | IF (ok_orodr) THEN |
---|
| 3876 | ! |
---|
| 3877 | ! selection des points pour lesquels le shema est actif: |
---|
| 3878 | igwd=0 |
---|
| 3879 | DO i=1,klon |
---|
| 3880 | itest(i)=0 |
---|
| 3881 | ! IF ((zstd(i).gt.10.0)) THEN |
---|
| 3882 | IF (((zpic(i)-zmea(i)).GT.100.).AND.(zstd(i).GT.10.0)) THEN |
---|
| 3883 | itest(i)=1 |
---|
| 3884 | igwd=igwd+1 |
---|
| 3885 | idx(igwd)=i |
---|
| 3886 | ENDIF |
---|
| 3887 | ENDDO |
---|
| 3888 | ! igwdim=MAX(1,igwd) |
---|
| 3889 | ! |
---|
| 3890 | IF (ok_strato) THEN |
---|
[1863] | 3891 | |
---|
[2897] | 3892 | CALL drag_noro_strato(0,klon,klev,dtime,paprs,pplay, & |
---|
[2469] | 3893 | zmea,zstd, zsig, zgam, zthe,zpic,zval, & |
---|
| 3894 | igwd,idx,itest, & |
---|
| 3895 | t_seri, u_seri, v_seri, & |
---|
| 3896 | zulow, zvlow, zustrdr, zvstrdr, & |
---|
| 3897 | d_t_oro, d_u_oro, d_v_oro) |
---|
[1863] | 3898 | |
---|
[2469] | 3899 | ELSE |
---|
| 3900 | CALL drag_noro(klon,klev,dtime,paprs,pplay, & |
---|
| 3901 | zmea,zstd, zsig, zgam, zthe,zpic,zval, & |
---|
| 3902 | igwd,idx,itest, & |
---|
| 3903 | t_seri, u_seri, v_seri, & |
---|
| 3904 | zulow, zvlow, zustrdr, zvstrdr, & |
---|
| 3905 | d_t_oro, d_u_oro, d_v_oro) |
---|
| 3906 | ENDIF |
---|
| 3907 | ! |
---|
| 3908 | ! ajout des tendances |
---|
| 3909 | !----------------------------------------------------------------------- |
---|
| 3910 | ! ajout des tendances de la trainee de l'orographie |
---|
| 3911 | CALL add_phys_tend(d_u_oro,d_v_oro,d_t_oro,dq0,dql0,dqi0,paprs,'oro', & |
---|
[2812] | 3912 | abortphy,flag_inhib_tend,itap,0) |
---|
[2799] | 3913 | call prt_enerbil('oro',itap) |
---|
[2469] | 3914 | !---------------------------------------------------------------------- |
---|
| 3915 | ! |
---|
| 3916 | ENDIF ! fin de test sur ok_orodr |
---|
| 3917 | ! |
---|
[2692] | 3918 | IF (mydebug) THEN |
---|
| 3919 | CALL writefield_phy('u_seri',u_seri,nbp_lev) |
---|
| 3920 | CALL writefield_phy('v_seri',v_seri,nbp_lev) |
---|
| 3921 | CALL writefield_phy('t_seri',t_seri,nbp_lev) |
---|
| 3922 | CALL writefield_phy('q_seri',q_seri,nbp_lev) |
---|
| 3923 | ENDIF |
---|
[1001] | 3924 | |
---|
[2469] | 3925 | IF (ok_orolf) THEN |
---|
| 3926 | ! |
---|
| 3927 | ! selection des points pour lesquels le shema est actif: |
---|
| 3928 | igwd=0 |
---|
| 3929 | DO i=1,klon |
---|
| 3930 | itest(i)=0 |
---|
| 3931 | IF ((zpic(i)-zmea(i)).GT.100.) THEN |
---|
| 3932 | itest(i)=1 |
---|
| 3933 | igwd=igwd+1 |
---|
| 3934 | idx(igwd)=i |
---|
| 3935 | ENDIF |
---|
| 3936 | ENDDO |
---|
| 3937 | ! igwdim=MAX(1,igwd) |
---|
| 3938 | ! |
---|
| 3939 | IF (ok_strato) THEN |
---|
[1001] | 3940 | |
---|
[2469] | 3941 | CALL lift_noro_strato(klon,klev,dtime,paprs,pplay, & |
---|
| 3942 | latitude_deg,zmea,zstd,zpic,zgam,zthe,zpic,zval, & |
---|
| 3943 | igwd,idx,itest, & |
---|
| 3944 | t_seri, u_seri, v_seri, & |
---|
| 3945 | zulow, zvlow, zustrli, zvstrli, & |
---|
| 3946 | d_t_lif, d_u_lif, d_v_lif ) |
---|
[2333] | 3947 | |
---|
[2469] | 3948 | ELSE |
---|
| 3949 | CALL lift_noro(klon,klev,dtime,paprs,pplay, & |
---|
| 3950 | latitude_deg,zmea,zstd,zpic, & |
---|
| 3951 | itest, & |
---|
| 3952 | t_seri, u_seri, v_seri, & |
---|
| 3953 | zulow, zvlow, zustrli, zvstrli, & |
---|
| 3954 | d_t_lif, d_u_lif, d_v_lif) |
---|
| 3955 | ENDIF |
---|
[1638] | 3956 | |
---|
[2469] | 3957 | ! ajout des tendances de la portance de l'orographie |
---|
| 3958 | CALL add_phys_tend(d_u_lif, d_v_lif, d_t_lif, dq0, dql0, dqi0, paprs, & |
---|
[2812] | 3959 | 'lif', abortphy,flag_inhib_tend,itap,0) |
---|
[2799] | 3960 | call prt_enerbil('lif',itap) |
---|
[2469] | 3961 | ENDIF ! fin de test sur ok_orolf |
---|
[1638] | 3962 | |
---|
[2469] | 3963 | IF (ok_hines) then |
---|
| 3964 | ! HINES GWD PARAMETRIZATION |
---|
| 3965 | east_gwstress=0. |
---|
| 3966 | west_gwstress=0. |
---|
| 3967 | du_gwd_hines=0. |
---|
| 3968 | dv_gwd_hines=0. |
---|
| 3969 | CALL hines_gwd(klon, klev, dtime, paprs, pplay, latitude_deg, t_seri, & |
---|
| 3970 | u_seri, v_seri, zustr_gwd_hines, zvstr_gwd_hines, d_t_hin, & |
---|
| 3971 | du_gwd_hines, dv_gwd_hines) |
---|
| 3972 | zustr_gwd_hines=0. |
---|
| 3973 | zvstr_gwd_hines=0. |
---|
| 3974 | DO k = 1, klev |
---|
| 3975 | zustr_gwd_hines(:)=zustr_gwd_hines(:)+ du_gwd_hines(:, k)/dtime & |
---|
| 3976 | * (paprs(:, k)-paprs(:, k+1))/rg |
---|
| 3977 | zvstr_gwd_hines(:)=zvstr_gwd_hines(:)+ dv_gwd_hines(:, k)/dtime & |
---|
| 3978 | * (paprs(:, k)-paprs(:, k+1))/rg |
---|
| 3979 | ENDDO |
---|
[1001] | 3980 | |
---|
[2469] | 3981 | d_t_hin(:, :)=0. |
---|
| 3982 | CALL add_phys_tend(du_gwd_hines, dv_gwd_hines, d_t_hin, dq0, dql0, & |
---|
[2812] | 3983 | dqi0, paprs, 'hin', abortphy,flag_inhib_tend,itap,0) |
---|
[2799] | 3984 | call prt_enerbil('hin',itap) |
---|
[2469] | 3985 | ENDIF |
---|
[2333] | 3986 | |
---|
[2469] | 3987 | IF (.not. ok_hines .and. ok_gwd_rando) then |
---|
| 3988 | CALL acama_GWD_rando(DTIME, pplay, latitude_deg, t_seri, u_seri, & |
---|
| 3989 | v_seri, rot, zustr_gwd_front, zvstr_gwd_front, du_gwd_front, & |
---|
| 3990 | dv_gwd_front, east_gwstress, west_gwstress) |
---|
| 3991 | zustr_gwd_front=0. |
---|
| 3992 | zvstr_gwd_front=0. |
---|
| 3993 | DO k = 1, klev |
---|
| 3994 | zustr_gwd_front(:)=zustr_gwd_front(:)+ du_gwd_front(:, k)/dtime & |
---|
| 3995 | * (paprs(:, k)-paprs(:, k+1))/rg |
---|
| 3996 | zvstr_gwd_front(:)=zvstr_gwd_front(:)+ dv_gwd_front(:, k)/dtime & |
---|
| 3997 | * (paprs(:, k)-paprs(:, k+1))/rg |
---|
| 3998 | ENDDO |
---|
[644] | 3999 | |
---|
[2469] | 4000 | CALL add_phys_tend(du_gwd_front, dv_gwd_front, dt0, dq0, dql0, dqi0, & |
---|
[2812] | 4001 | paprs, 'front_gwd_rando', abortphy,flag_inhib_tend,itap,0) |
---|
[2799] | 4002 | call prt_enerbil('front_gwd_rando',itap) |
---|
[2469] | 4003 | ENDIF |
---|
[1938] | 4004 | |
---|
[2692] | 4005 | IF (ok_gwd_rando) THEN |
---|
| 4006 | CALL FLOTT_GWD_rando(DTIME, pplay, t_seri, u_seri, v_seri, & |
---|
[2469] | 4007 | rain_fall + snow_fall, zustr_gwd_rando, zvstr_gwd_rando, & |
---|
| 4008 | du_gwd_rando, dv_gwd_rando, east_gwstress, west_gwstress) |
---|
| 4009 | CALL add_phys_tend(du_gwd_rando, dv_gwd_rando, dt0, dq0, dql0, dqi0, & |
---|
[2812] | 4010 | paprs, 'flott_gwd_rando', abortphy,flag_inhib_tend,itap,0) |
---|
[2799] | 4011 | call prt_enerbil('flott_gwd_rando',itap) |
---|
[2469] | 4012 | zustr_gwd_rando=0. |
---|
| 4013 | zvstr_gwd_rando=0. |
---|
| 4014 | DO k = 1, klev |
---|
| 4015 | zustr_gwd_rando(:)=zustr_gwd_rando(:)+ du_gwd_rando(:, k)/dtime & |
---|
| 4016 | * (paprs(:, k)-paprs(:, k+1))/rg |
---|
| 4017 | zvstr_gwd_rando(:)=zvstr_gwd_rando(:)+ dv_gwd_rando(:, k)/dtime & |
---|
| 4018 | * (paprs(:, k)-paprs(:, k+1))/rg |
---|
| 4019 | ENDDO |
---|
[2692] | 4020 | ENDIF |
---|
[766] | 4021 | |
---|
[2469] | 4022 | ! STRESS NECESSAIRES: TOUTE LA PHYSIQUE |
---|
[1279] | 4023 | |
---|
[2692] | 4024 | IF (mydebug) THEN |
---|
| 4025 | CALL writefield_phy('u_seri',u_seri,nbp_lev) |
---|
| 4026 | CALL writefield_phy('v_seri',v_seri,nbp_lev) |
---|
| 4027 | CALL writefield_phy('t_seri',t_seri,nbp_lev) |
---|
| 4028 | CALL writefield_phy('q_seri',q_seri,nbp_lev) |
---|
| 4029 | ENDIF |
---|
[2136] | 4030 | |
---|
[2469] | 4031 | DO i = 1, klon |
---|
| 4032 | zustrph(i)=0. |
---|
| 4033 | zvstrph(i)=0. |
---|
| 4034 | ENDDO |
---|
| 4035 | DO k = 1, klev |
---|
| 4036 | DO i = 1, klon |
---|
| 4037 | zustrph(i)=zustrph(i)+(u_seri(i,k)-u(i,k))/dtime* & |
---|
| 4038 | (paprs(i,k)-paprs(i,k+1))/rg |
---|
| 4039 | zvstrph(i)=zvstrph(i)+(v_seri(i,k)-v(i,k))/dtime* & |
---|
| 4040 | (paprs(i,k)-paprs(i,k+1))/rg |
---|
| 4041 | ENDDO |
---|
| 4042 | ENDDO |
---|
| 4043 | ! |
---|
| 4044 | !IM calcul composantes axiales du moment angulaire et couple des montagnes |
---|
| 4045 | ! |
---|
| 4046 | IF (is_sequential .and. ok_orodr) THEN |
---|
| 4047 | CALL aaam_bud (27,klon,klev,jD_cur-jD_ref,jH_cur, & |
---|
| 4048 | ra,rg,romega, & |
---|
| 4049 | latitude_deg,longitude_deg,pphis, & |
---|
| 4050 | zustrdr,zustrli,zustrph, & |
---|
| 4051 | zvstrdr,zvstrli,zvstrph, & |
---|
| 4052 | paprs,u,v, & |
---|
| 4053 | aam, torsfc) |
---|
| 4054 | ENDIF |
---|
| 4055 | !IM cf. FLott END |
---|
| 4056 | !DC Calcul de la tendance due au methane |
---|
| 4057 | IF(ok_qch4) THEN |
---|
| 4058 | CALL METHOX(1,klon,klon,klev,q_seri,d_q_ch4,pplay) |
---|
| 4059 | ! ajout de la tendance d'humidite due au methane |
---|
[2801] | 4060 | d_q_ch4_dtime(:,:) = d_q_ch4(:,:)*dtime |
---|
| 4061 | CALL add_phys_tend(du0, dv0, dt0, d_q_ch4_dtime, dql0, dqi0, paprs, & |
---|
[2812] | 4062 | 'q_ch4', abortphy,flag_inhib_tend,itap,0) |
---|
[2801] | 4063 | d_q_ch4(:,:) = d_q_ch4_dtime(:,:)/dtime |
---|
[2692] | 4064 | ENDIF |
---|
[2469] | 4065 | ! |
---|
| 4066 | ! |
---|
[2897] | 4067 | |
---|
| 4068 | !=============================================================== |
---|
| 4069 | ! Additional tendency of TKE due to orography |
---|
| 4070 | !=============================================================== |
---|
| 4071 | ! |
---|
| 4072 | ! Inititialization |
---|
| 4073 | !------------------ |
---|
| 4074 | |
---|
| 4075 | |
---|
| 4076 | |
---|
| 4077 | addtkeoro=0 |
---|
| 4078 | CALL getin_p('addtkeoro',addtkeoro) |
---|
| 4079 | |
---|
| 4080 | IF (prt_level.ge.5) & |
---|
| 4081 | print*,'addtkeoro', addtkeoro |
---|
| 4082 | |
---|
| 4083 | alphatkeoro=1. |
---|
| 4084 | CALL getin_p('alphatkeoro',alphatkeoro) |
---|
| 4085 | alphatkeoro=min(max(0.,alphatkeoro),1.) |
---|
| 4086 | |
---|
| 4087 | smallscales_tkeoro=.false. |
---|
| 4088 | CALL getin_p('smallscales_tkeoro',smallscales_tkeoro) |
---|
| 4089 | |
---|
| 4090 | |
---|
| 4091 | dtadd(:,:)=0. |
---|
| 4092 | duadd(:,:)=0. |
---|
| 4093 | dvadd(:,:)=0. |
---|
| 4094 | |
---|
| 4095 | |
---|
| 4096 | |
---|
| 4097 | ! Choices for addtkeoro: |
---|
| 4098 | ! ** 0 no TKE tendency from orography |
---|
| 4099 | ! ** 1 we include a fraction alphatkeoro of the whole tendency duoro |
---|
| 4100 | ! ** 2 we include a fraction alphatkeoro of the gravity wave part of duoro |
---|
| 4101 | ! |
---|
| 4102 | |
---|
| 4103 | IF (addtkeoro .GT. 0 .AND. ok_orodr ) THEN |
---|
| 4104 | ! ------------------------------------------- |
---|
| 4105 | |
---|
| 4106 | |
---|
| 4107 | ! selection des points pour lesquels le schema est actif: |
---|
| 4108 | |
---|
| 4109 | |
---|
| 4110 | |
---|
| 4111 | IF (addtkeoro .EQ. 1 ) THEN |
---|
| 4112 | |
---|
| 4113 | duadd(:,:)=alphatkeoro*d_u_oro(:,:) |
---|
| 4114 | dvadd(:,:)=alphatkeoro*d_v_oro(:,:) |
---|
| 4115 | |
---|
| 4116 | ELSE IF (addtkeoro .EQ. 2) THEN |
---|
| 4117 | |
---|
| 4118 | |
---|
| 4119 | |
---|
| 4120 | IF (smallscales_tkeoro) THEN |
---|
| 4121 | igwd=0 |
---|
| 4122 | DO i=1,klon |
---|
| 4123 | itest(i)=0 |
---|
| 4124 | ! Etienne: ici je prends en compte plus de relief que la routine drag_noro_strato |
---|
| 4125 | ! car on peut s'attendre a ce que les petites echelles produisent aussi de la TKE |
---|
| 4126 | ! Mais attention, cela ne va pas dans le sens de la conservation de l'energie! |
---|
| 4127 | IF (zstd(i).GT.1.0) THEN |
---|
| 4128 | itest(i)=1 |
---|
| 4129 | igwd=igwd+1 |
---|
| 4130 | idx(igwd)=i |
---|
| 4131 | ENDIF |
---|
| 4132 | ENDDO |
---|
| 4133 | |
---|
| 4134 | ELSE |
---|
| 4135 | |
---|
| 4136 | igwd=0 |
---|
| 4137 | DO i=1,klon |
---|
| 4138 | itest(i)=0 |
---|
| 4139 | IF (((zpic(i)-zmea(i)).GT.100.).AND.(zstd(i).GT.10.0)) THEN |
---|
| 4140 | itest(i)=1 |
---|
| 4141 | igwd=igwd+1 |
---|
| 4142 | idx(igwd)=i |
---|
| 4143 | ENDIF |
---|
| 4144 | ENDDO |
---|
| 4145 | |
---|
| 4146 | END IF |
---|
| 4147 | |
---|
| 4148 | |
---|
| 4149 | |
---|
| 4150 | |
---|
| 4151 | CALL drag_noro_strato(addtkeoro,klon,klev,dtime,paprs,pplay, & |
---|
| 4152 | zmea,zstd, zsig, zgam, zthe,zpic,zval, & |
---|
| 4153 | igwd,idx,itest, & |
---|
| 4154 | t_seri, u_seri, v_seri, & |
---|
| 4155 | zulow, zvlow, zustrdr, zvstrdr, & |
---|
| 4156 | d_t_oro_gw, d_u_oro_gw, d_v_oro_gw) |
---|
| 4157 | |
---|
| 4158 | zustrdr(:)=0. |
---|
| 4159 | zvstrdr(:)=0. |
---|
| 4160 | zulow(:)=0. |
---|
| 4161 | zvlow(:)=0. |
---|
| 4162 | |
---|
| 4163 | duadd(:,:)=alphatkeoro*d_u_oro_gw(:,:) |
---|
| 4164 | dvadd(:,:)=alphatkeoro*d_v_oro_gw(:,:) |
---|
| 4165 | END IF |
---|
| 4166 | |
---|
| 4167 | |
---|
| 4168 | |
---|
| 4169 | ! TKE update from subgrid temperature and wind tendencies |
---|
| 4170 | !---------------------------------------------------------- |
---|
| 4171 | forall (k=1: nbp_lev) exner(:, k) = (pplay(:, k)/paprs(:,1))**RKAPPA |
---|
| 4172 | |
---|
| 4173 | |
---|
| 4174 | CALL tend_to_tke(pdtphys,paprs,exner,t_seri,u_seri,v_seri,dtadd,duadd,dvadd,pbl_tke) |
---|
| 4175 | |
---|
| 4176 | |
---|
| 4177 | |
---|
| 4178 | ENDIF |
---|
| 4179 | ! ----- |
---|
| 4180 | !=============================================================== |
---|
| 4181 | |
---|
| 4182 | |
---|
| 4183 | |
---|
[2469] | 4184 | !==================================================================== |
---|
| 4185 | ! Interface Simulateur COSP (Calipso, ISCCP, MISR, ..) |
---|
| 4186 | !==================================================================== |
---|
| 4187 | ! Abderrahmane 24.08.09 |
---|
| 4188 | |
---|
| 4189 | IF (ok_cosp) THEN |
---|
| 4190 | ! adeclarer |
---|
[1279] | 4191 | #ifdef CPP_COSP |
---|
[2469] | 4192 | IF (itap.eq.1.or.MOD(itap,NINT(freq_cosp/dtime)).EQ.0) THEN |
---|
[1279] | 4193 | |
---|
[2469] | 4194 | IF (prt_level .GE.10) THEN |
---|
| 4195 | print*,'freq_cosp',freq_cosp |
---|
| 4196 | ENDIF |
---|
| 4197 | mr_ozone=wo(:, :, 1) * dobson_u * 1e3 / zmasse |
---|
| 4198 | ! print*,'Dans physiq.F avant appel cosp ref_liq,ref_ice=', |
---|
| 4199 | ! s ref_liq,ref_ice |
---|
[2692] | 4200 | CALL phys_cosp(itap,dtime,freq_cosp, & |
---|
[2469] | 4201 | ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, & |
---|
[2794] | 4202 | ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, missing_val, & |
---|
[2469] | 4203 | klon,klev,longitude_deg,latitude_deg,presnivs,overlap, & |
---|
| 4204 | JrNt,ref_liq,ref_ice, & |
---|
| 4205 | pctsrf(:,is_ter)+pctsrf(:,is_lic), & |
---|
| 4206 | zu10m,zv10m,pphis, & |
---|
| 4207 | zphi,paprs(:,1:klev),pplay,zxtsol,t_seri, & |
---|
| 4208 | qx(:,:,ivap),zx_rh,cldfra,rnebcon,flwc,fiwc, & |
---|
| 4209 | prfl(:,1:klev),psfl(:,1:klev), & |
---|
| 4210 | pmflxr(:,1:klev),pmflxs(:,1:klev), & |
---|
| 4211 | mr_ozone,cldtau, cldemi) |
---|
[1412] | 4212 | |
---|
[2469] | 4213 | ! L calipso2D,calipso3D,cfadlidar,parasolrefl,atb,betamol, |
---|
| 4214 | ! L cfaddbze,clcalipso2,dbze,cltlidarradar, |
---|
| 4215 | ! M clMISR, |
---|
| 4216 | ! R clisccp2,boxtauisccp,boxptopisccp,tclisccp,ctpisccp, |
---|
| 4217 | ! I tauisccp,albisccp,meantbisccp,meantbclrisccp) |
---|
[1279] | 4218 | |
---|
[2469] | 4219 | ENDIF |
---|
[1279] | 4220 | |
---|
| 4221 | #endif |
---|
[2469] | 4222 | ENDIF !ok_cosp |
---|
[2580] | 4223 | |
---|
| 4224 | |
---|
| 4225 | ! Marine |
---|
| 4226 | |
---|
| 4227 | IF (ok_airs) then |
---|
| 4228 | |
---|
| 4229 | IF (itap.eq.1.or.MOD(itap,NINT(freq_airs/dtime)).EQ.0) THEN |
---|
[2692] | 4230 | write(*,*) 'je vais appeler simu_airs, ok_airs, freq_airs=', ok_airs, freq_airs |
---|
| 4231 | CALL simu_airs(itap,rneb, t_seri, cldemi, fiwc, ref_ice, pphi, pplay, paprs,& |
---|
| 4232 | & map_prop_hc,map_prop_hist,& |
---|
| 4233 | & map_emis_hc,map_iwp_hc,map_deltaz_hc,map_pcld_hc,map_tcld_hc,& |
---|
| 4234 | & map_emis_Cb,map_pcld_Cb,map_tcld_Cb,& |
---|
| 4235 | & map_emis_ThCi,map_pcld_ThCi,map_tcld_ThCi,& |
---|
| 4236 | & map_emis_Anv,map_pcld_Anv,map_tcld_Anv,& |
---|
| 4237 | & map_emis_hist,map_iwp_hist,map_deltaz_hist,map_rad_hist,& |
---|
| 4238 | & map_ntot,map_hc,map_hist,& |
---|
| 4239 | & map_Cb,map_ThCi,map_Anv,& |
---|
| 4240 | & alt_tropo ) |
---|
[2580] | 4241 | ENDIF |
---|
| 4242 | |
---|
| 4243 | ENDIF ! ok_airs |
---|
| 4244 | |
---|
| 4245 | |
---|
[2469] | 4246 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 4247 | !AA |
---|
| 4248 | !AA Installation de l'interface online-offline pour traceurs |
---|
| 4249 | !AA |
---|
| 4250 | !==================================================================== |
---|
| 4251 | ! Calcul des tendances traceurs |
---|
| 4252 | !==================================================================== |
---|
| 4253 | ! |
---|
[959] | 4254 | |
---|
[2469] | 4255 | IF (type_trac=='repr') THEN |
---|
| 4256 | sh_in(:,:) = q_seri(:,:) |
---|
| 4257 | ELSE |
---|
| 4258 | sh_in(:,:) = qx(:,:,ivap) |
---|
[2784] | 4259 | ch_in(:,:) = qx(:,:,iliq) |
---|
[2692] | 4260 | ENDIF |
---|
[1565] | 4261 | |
---|
[2630] | 4262 | #ifdef CPP_Dust |
---|
| 4263 | CALL phytracr_spl ( debut,lafin , jD_cur,jH_cur,iflag_con, & ! I |
---|
| 4264 | pdtphys,ftsol, & ! I |
---|
| 4265 | t,q_seri,paprs,pplay,RHcl, & ! I |
---|
| 4266 | pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, & ! I |
---|
| 4267 | coefh(1:klon,1:klev,is_ave), cdragh, cdragm, u1, v1, & ! I |
---|
| 4268 | u_seri, v_seri, latitude_deg, longitude_deg, & |
---|
| 4269 | pphis,pctsrf,pmflxr,pmflxs,prfl,psfl, & ! I |
---|
| 4270 | da,phi,phi2,d1a,dam,mp,ep,sigd,sij,clw,elij, & ! I |
---|
| 4271 | epmlmMm,eplaMm,upwd,dnwd,itop_con,ibas_con, & ! I |
---|
| 4272 | ev,wdtrainA, wdtrainM,wght_cvfd, & ! I |
---|
| 4273 | fm_therm, entr_therm, rneb, & ! I |
---|
| 4274 | beta_prec_fisrt,beta_prec, & !I |
---|
| 4275 | zu10m,zv10m,wstar,ale_bl,ale_wake, & ! I |
---|
| 4276 | d_tr_dyn,tr_seri) |
---|
| 4277 | |
---|
| 4278 | #else |
---|
| 4279 | |
---|
[2692] | 4280 | CALL phytrac ( & |
---|
[2469] | 4281 | itap, days_elapsed+1, jH_cur, debut, & |
---|
| 4282 | lafin, dtime, u, v, t, & |
---|
| 4283 | paprs, pplay, pmfu, pmfd, & |
---|
| 4284 | pen_u, pde_u, pen_d, pde_d, & |
---|
| 4285 | cdragh, coefh(1:klon,1:klev,is_ave), fm_therm, entr_therm, & |
---|
| 4286 | u1, v1, ftsol, pctsrf, & |
---|
| 4287 | zustar, zu10m, zv10m, & |
---|
| 4288 | wstar(:,is_ave), ale_bl, ale_wake, & |
---|
| 4289 | latitude_deg, longitude_deg, & |
---|
| 4290 | frac_impa,frac_nucl, beta_prec_fisrt,beta_prec, & |
---|
| 4291 | presnivs, pphis, pphi, albsol1, & |
---|
[2784] | 4292 | sh_in, ch_in, rhcl, cldfra, rneb, & |
---|
[2469] | 4293 | diafra, cldliq, itop_con, ibas_con, & |
---|
| 4294 | pmflxr, pmflxs, prfl, psfl, & |
---|
| 4295 | da, phi, mp, upwd, & |
---|
| 4296 | phi2, d1a, dam, sij, wght_cvfd, & !<<RomP+RL |
---|
| 4297 | wdtrainA, wdtrainM, sigd, clw,elij, & !<<RomP |
---|
| 4298 | ev, ep, epmlmMm, eplaMm, & !<<RomP |
---|
| 4299 | dnwd, aerosol_couple, flxmass_w, & |
---|
| 4300 | tau_aero, piz_aero, cg_aero, ccm, & |
---|
| 4301 | rfname, & |
---|
| 4302 | d_tr_dyn, & !<<RomP |
---|
| 4303 | tr_seri) |
---|
[2630] | 4304 | #endif |
---|
[524] | 4305 | |
---|
[2469] | 4306 | IF (offline) THEN |
---|
[524] | 4307 | |
---|
[2469] | 4308 | IF (prt_level.ge.9) & |
---|
| 4309 | print*,'Attention on met a 0 les thermiques pour phystoke' |
---|
[2692] | 4310 | CALL phystokenc ( & |
---|
[2469] | 4311 | nlon,klev,pdtphys,longitude_deg,latitude_deg, & |
---|
| 4312 | t,pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, & |
---|
| 4313 | fm_therm,entr_therm, & |
---|
| 4314 | cdragh,coefh(1:klon,1:klev,is_ave),u1,v1,ftsol,pctsrf, & |
---|
| 4315 | frac_impa, frac_nucl, & |
---|
| 4316 | pphis,cell_area,dtime,itap, & |
---|
| 4317 | qx(:,:,ivap),da,phi,mp,upwd,dnwd) |
---|
[524] | 4318 | |
---|
| 4319 | |
---|
[2469] | 4320 | ENDIF |
---|
[524] | 4321 | |
---|
[2469] | 4322 | ! |
---|
| 4323 | ! Calculer le transport de l'eau et de l'energie (diagnostique) |
---|
| 4324 | ! |
---|
| 4325 | CALL transp (paprs,zxtsol, & |
---|
| 4326 | t_seri, q_seri, u_seri, v_seri, zphi, & |
---|
| 4327 | ve, vq, ue, uq) |
---|
| 4328 | ! |
---|
| 4329 | !IM global posePB BEG |
---|
| 4330 | IF(1.EQ.0) THEN |
---|
| 4331 | ! |
---|
| 4332 | CALL transp_lay (paprs,zxtsol, & |
---|
| 4333 | t_seri, q_seri, u_seri, v_seri, zphi, & |
---|
| 4334 | ve_lay, vq_lay, ue_lay, uq_lay) |
---|
| 4335 | ! |
---|
| 4336 | ENDIF !(1.EQ.0) THEN |
---|
| 4337 | !IM global posePB END |
---|
| 4338 | ! Accumuler les variables a stocker dans les fichiers histoire: |
---|
| 4339 | ! |
---|
[1279] | 4340 | |
---|
[2469] | 4341 | !================================================================ |
---|
| 4342 | ! Conversion of kinetic and potential energy into heat, for |
---|
| 4343 | ! parameterisation of subgrid-scale motions |
---|
| 4344 | !================================================================ |
---|
[1753] | 4345 | |
---|
[2469] | 4346 | d_t_ec(:,:)=0. |
---|
| 4347 | forall (k=1: nbp_lev) exner(:, k) = (pplay(:, k)/paprs(:,1))**RKAPPA |
---|
[2851] | 4348 | CALL ener_conserv(klon,klev,pdtphys,u,v,t,qx(:,:,ivap),qx(:,:,iliq),qx(:,:,isol), & |
---|
| 4349 | u_seri,v_seri,t_seri,q_seri,ql_seri,qs_seri,pbl_tke(:,:,is_ave)-tke0(:,:), & |
---|
[2469] | 4350 | zmasse,exner,d_t_ec) |
---|
| 4351 | t_seri(:,:)=t_seri(:,:)+d_t_ec(:,:) |
---|
[1753] | 4352 | |
---|
[2469] | 4353 | !======================================================================= |
---|
| 4354 | ! SORTIES |
---|
| 4355 | !======================================================================= |
---|
| 4356 | ! |
---|
| 4357 | !IM initialisation + calculs divers diag AMIP2 |
---|
| 4358 | ! |
---|
| 4359 | include "calcul_divers.h" |
---|
| 4360 | ! |
---|
| 4361 | !IM Interpolation sur les niveaux de pression du NMC |
---|
| 4362 | ! ------------------------------------------------- |
---|
[2271] | 4363 | #ifdef CPP_XIOS |
---|
[2469] | 4364 | !$OMP MASTER |
---|
| 4365 | !On recupere la valeur de la missing value donnee dans le xml |
---|
| 4366 | CALL xios_get_field_attr("t850",default_value=missing_val_omp) |
---|
| 4367 | ! PRINT *,"ARNAUD value missing ",missing_val_omp |
---|
| 4368 | !$OMP END MASTER |
---|
| 4369 | !$OMP BARRIER |
---|
| 4370 | missing_val=missing_val_omp |
---|
[2271] | 4371 | #endif |
---|
| 4372 | #ifndef CPP_XIOS |
---|
[2469] | 4373 | missing_val=missing_val_nf90 |
---|
[2271] | 4374 | #endif |
---|
[2469] | 4375 | ! |
---|
| 4376 | include "calcul_STDlev.h" |
---|
| 4377 | ! |
---|
| 4378 | ! slp sea level pressure derived from Arpege-IFS : CALL ctstar + CALL pppmer |
---|
| 4379 | CALL diag_slp(klon,t_seri,paprs,pplay,pphis,ptstar,pt0,slp) |
---|
| 4380 | ! |
---|
[2496] | 4381 | !cc prw = eau precipitable |
---|
| 4382 | ! prlw = colonne eau liquide |
---|
| 4383 | ! prlw = colonne eau solide |
---|
[2499] | 4384 | prw(:) = 0. |
---|
| 4385 | prlw(:) = 0. |
---|
| 4386 | prsw(:) = 0. |
---|
| 4387 | DO k = 1, klev |
---|
| 4388 | prw(:) = prw(:) + q_seri(:,k)*zmasse(:,k) |
---|
| 4389 | prlw(:) = prlw(:) + ql_seri(:,k)*zmasse(:,k) |
---|
| 4390 | prsw(:) = prsw(:) + qs_seri(:,k)*zmasse(:,k) |
---|
[2469] | 4391 | ENDDO |
---|
| 4392 | ! |
---|
| 4393 | IF (type_trac == 'inca') THEN |
---|
[655] | 4394 | #ifdef INCA |
---|
[2469] | 4395 | CALL VTe(VTphysiq) |
---|
| 4396 | CALL VTb(VTinca) |
---|
[959] | 4397 | |
---|
[2469] | 4398 | CALL chemhook_end ( & |
---|
| 4399 | dtime, & |
---|
| 4400 | pplay, & |
---|
| 4401 | t_seri, & |
---|
| 4402 | tr_seri, & |
---|
| 4403 | nbtr, & |
---|
| 4404 | paprs, & |
---|
| 4405 | q_seri, & |
---|
| 4406 | cell_area, & |
---|
| 4407 | pphi, & |
---|
| 4408 | pphis, & |
---|
[2832] | 4409 | zx_rh, & |
---|
| 4410 | aps, bps) |
---|
[959] | 4411 | |
---|
[2469] | 4412 | CALL VTe(VTinca) |
---|
| 4413 | CALL VTb(VTphysiq) |
---|
[655] | 4414 | #endif |
---|
[2692] | 4415 | ENDIF |
---|
[655] | 4416 | |
---|
[1753] | 4417 | |
---|
[2469] | 4418 | ! |
---|
| 4419 | ! Convertir les incrementations en tendances |
---|
| 4420 | ! |
---|
| 4421 | IF (prt_level .GE.10) THEN |
---|
| 4422 | print *,'Convertir les incrementations en tendances ' |
---|
| 4423 | ENDIF |
---|
| 4424 | ! |
---|
[2692] | 4425 | IF (mydebug) THEN |
---|
| 4426 | CALL writefield_phy('u_seri',u_seri,nbp_lev) |
---|
| 4427 | CALL writefield_phy('v_seri',v_seri,nbp_lev) |
---|
| 4428 | CALL writefield_phy('t_seri',t_seri,nbp_lev) |
---|
| 4429 | CALL writefield_phy('q_seri',q_seri,nbp_lev) |
---|
| 4430 | ENDIF |
---|
[766] | 4431 | |
---|
[2469] | 4432 | DO k = 1, klev |
---|
| 4433 | DO i = 1, klon |
---|
| 4434 | d_u(i,k) = ( u_seri(i,k) - u(i,k) ) / dtime |
---|
| 4435 | d_v(i,k) = ( v_seri(i,k) - v(i,k) ) / dtime |
---|
| 4436 | d_t(i,k) = ( t_seri(i,k)-t(i,k) ) / dtime |
---|
| 4437 | d_qx(i,k,ivap) = ( q_seri(i,k) - qx(i,k,ivap) ) / dtime |
---|
| 4438 | d_qx(i,k,iliq) = ( ql_seri(i,k) - qx(i,k,iliq) ) / dtime |
---|
| 4439 | !CR: on ajoute le contenu en glace |
---|
[2692] | 4440 | IF (nqo.eq.3) THEN |
---|
[2469] | 4441 | d_qx(i,k,isol) = ( qs_seri(i,k) - qx(i,k,isol) ) / dtime |
---|
[2692] | 4442 | ENDIF |
---|
[2469] | 4443 | ENDDO |
---|
| 4444 | ENDDO |
---|
| 4445 | ! |
---|
| 4446 | !CR: nb de traceurs eau: nqo |
---|
| 4447 | ! IF (nqtot.GE.3) THEN |
---|
| 4448 | IF (nqtot.GE.(nqo+1)) THEN |
---|
| 4449 | ! DO iq = 3, nqtot |
---|
| 4450 | DO iq = nqo+1, nqtot |
---|
| 4451 | DO k = 1, klev |
---|
| 4452 | DO i = 1, klon |
---|
| 4453 | ! d_qx(i,k,iq) = ( tr_seri(i,k,iq-2) - qx(i,k,iq) ) / dtime |
---|
| 4454 | d_qx(i,k,iq) = ( tr_seri(i,k,iq-nqo) - qx(i,k,iq) ) / dtime |
---|
| 4455 | ENDDO |
---|
| 4456 | ENDDO |
---|
| 4457 | ENDDO |
---|
| 4458 | ENDIF |
---|
| 4459 | ! |
---|
| 4460 | !IM rajout diagnostiques bilan KP pour analyse MJO par Jun-Ichi Yano |
---|
| 4461 | !IM global posePB include "write_bilKP_ins.h" |
---|
| 4462 | !IM global posePB include "write_bilKP_ave.h" |
---|
| 4463 | ! |
---|
[1412] | 4464 | |
---|
[2489] | 4465 | !--OB mass fixer |
---|
| 4466 | !--profile is corrected to force mass conservation of water |
---|
| 4467 | IF (mass_fixer) THEN |
---|
| 4468 | qql2(:)=0.0 |
---|
[2499] | 4469 | DO k = 1, klev |
---|
| 4470 | qql2(:)=qql2(:)+(q_seri(:,k)+ql_seri(:,k)+qs_seri(:,k))*zmasse(:,k) |
---|
[2489] | 4471 | ENDDO |
---|
| 4472 | DO i = 1, klon |
---|
| 4473 | !--compute ratio of what q+ql should be with conservation to what it is |
---|
| 4474 | corrqql=(qql1(i)+(evap(i)-rain_fall(i)-snow_fall(i))*pdtphys)/qql2(i) |
---|
| 4475 | DO k = 1, klev |
---|
| 4476 | q_seri(i,k) =q_seri(i,k)*corrqql |
---|
| 4477 | ql_seri(i,k)=ql_seri(i,k)*corrqql |
---|
| 4478 | ENDDO |
---|
| 4479 | ENDDO |
---|
| 4480 | ENDIF |
---|
| 4481 | !--fin mass fixer |
---|
| 4482 | |
---|
[2469] | 4483 | ! Sauvegarder les valeurs de t et q a la fin de la physique: |
---|
| 4484 | ! |
---|
[2499] | 4485 | u_ancien(:,:) = u_seri(:,:) |
---|
| 4486 | v_ancien(:,:) = v_seri(:,:) |
---|
| 4487 | t_ancien(:,:) = t_seri(:,:) |
---|
| 4488 | q_ancien(:,:) = q_seri(:,:) |
---|
| 4489 | ql_ancien(:,:) = ql_seri(:,:) |
---|
| 4490 | qs_ancien(:,:) = qs_seri(:,:) |
---|
| 4491 | CALL water_int(klon,klev,q_ancien,zmasse,prw_ancien) |
---|
| 4492 | CALL water_int(klon,klev,ql_ancien,zmasse,prlw_ancien) |
---|
| 4493 | CALL water_int(klon,klev,qs_ancien,zmasse,prsw_ancien) |
---|
[2469] | 4494 | ! !! RomP >>> |
---|
| 4495 | !CR: nb de traceurs eau: nqo |
---|
[2499] | 4496 | IF (nqtot.GT.nqo) THEN |
---|
[2469] | 4497 | DO iq = nqo+1, nqtot |
---|
[2499] | 4498 | tr_ancien(:,:,iq-nqo) = tr_seri(:,:,iq-nqo) |
---|
[2469] | 4499 | ENDDO |
---|
| 4500 | ENDIF |
---|
| 4501 | ! !! RomP <<< |
---|
| 4502 | !========================================================================== |
---|
| 4503 | ! Sorties des tendances pour un point particulier |
---|
| 4504 | ! a utiliser en 1D, avec igout=1 ou en 3D sur un point particulier |
---|
| 4505 | ! pour le debug |
---|
| 4506 | ! La valeur de igout est attribuee plus haut dans le programme |
---|
| 4507 | !========================================================================== |
---|
[879] | 4508 | |
---|
[2692] | 4509 | IF (prt_level.ge.1) THEN |
---|
[2469] | 4510 | write(lunout,*) 'FIN DE PHYSIQ !!!!!!!!!!!!!!!!!!!!' |
---|
| 4511 | write(lunout,*) & |
---|
| 4512 | 'nlon,klev,nqtot,debut,lafin,jD_cur, jH_cur, pdtphys pct tlos' |
---|
| 4513 | write(lunout,*) & |
---|
| 4514 | nlon,klev,nqtot,debut,lafin, jD_cur, jH_cur ,pdtphys, & |
---|
| 4515 | pctsrf(igout,is_ter), pctsrf(igout,is_lic),pctsrf(igout,is_oce), & |
---|
| 4516 | pctsrf(igout,is_sic) |
---|
| 4517 | write(lunout,*) 'd_t_dyn,d_t_con,d_t_lsc,d_t_ajsb,d_t_ajs,d_t_eva' |
---|
[2692] | 4518 | DO k=1,klev |
---|
[2469] | 4519 | write(lunout,*) d_t_dyn(igout,k),d_t_con(igout,k), & |
---|
| 4520 | d_t_lsc(igout,k),d_t_ajsb(igout,k),d_t_ajs(igout,k), & |
---|
| 4521 | d_t_eva(igout,k) |
---|
[2692] | 4522 | ENDDO |
---|
[2469] | 4523 | write(lunout,*) 'cool,heat' |
---|
[2692] | 4524 | DO k=1,klev |
---|
[2469] | 4525 | write(lunout,*) cool(igout,k),heat(igout,k) |
---|
[2692] | 4526 | ENDDO |
---|
[879] | 4527 | |
---|
[2469] | 4528 | !jyg< (En attendant de statuer sur le sort de d_t_oli) |
---|
| 4529 | !jyg! write(lunout,*) 'd_t_oli,d_t_vdf,d_t_oro,d_t_lif,d_t_ec' |
---|
| 4530 | !jyg! do k=1,klev |
---|
| 4531 | !jyg! write(lunout,*) d_t_oli(igout,k),d_t_vdf(igout,k), & |
---|
| 4532 | !jyg! d_t_oro(igout,k),d_t_lif(igout,k),d_t_ec(igout,k) |
---|
| 4533 | !jyg! enddo |
---|
| 4534 | write(lunout,*) 'd_t_vdf,d_t_oro,d_t_lif,d_t_ec' |
---|
[2692] | 4535 | DO k=1,klev |
---|
[2469] | 4536 | write(lunout,*) d_t_vdf(igout,k), & |
---|
| 4537 | d_t_oro(igout,k),d_t_lif(igout,k),d_t_ec(igout,k) |
---|
[2692] | 4538 | ENDDO |
---|
[2469] | 4539 | !>jyg |
---|
[879] | 4540 | |
---|
[2469] | 4541 | write(lunout,*) 'd_ps ',d_ps(igout) |
---|
| 4542 | write(lunout,*) 'd_u, d_v, d_t, d_qx1, d_qx2 ' |
---|
[2692] | 4543 | DO k=1,klev |
---|
[2469] | 4544 | write(lunout,*) d_u(igout,k),d_v(igout,k),d_t(igout,k), & |
---|
| 4545 | d_qx(igout,k,1),d_qx(igout,k,2) |
---|
[2692] | 4546 | ENDDO |
---|
| 4547 | ENDIF |
---|
[879] | 4548 | |
---|
[2469] | 4549 | !============================================================ |
---|
| 4550 | ! Calcul de la temperature potentielle |
---|
| 4551 | !============================================================ |
---|
| 4552 | DO k = 1, klev |
---|
| 4553 | DO i = 1, klon |
---|
| 4554 | !JYG/IM theta en debut du pas de temps |
---|
| 4555 | !JYG/IM theta(i,k)=t(i,k)*(100000./pplay(i,k))**(RD/RCPD) |
---|
| 4556 | !JYG/IM theta en fin de pas de temps de physique |
---|
| 4557 | theta(i,k)=t_seri(i,k)*(100000./pplay(i,k))**(RD/RCPD) |
---|
| 4558 | ! thetal: 2 lignes suivantes a decommenter si vous avez les fichiers |
---|
| 4559 | ! MPL 20130625 |
---|
| 4560 | ! fth_fonctions.F90 et parkind1.F90 |
---|
| 4561 | ! sinon thetal=theta |
---|
| 4562 | ! thetal(i,k)=fth_thetal(pplay(i,k),t_seri(i,k),q_seri(i,k), |
---|
| 4563 | ! : ql_seri(i,k)) |
---|
| 4564 | thetal(i,k)=theta(i,k) |
---|
| 4565 | ENDDO |
---|
| 4566 | ENDDO |
---|
| 4567 | ! |
---|
[879] | 4568 | |
---|
[2469] | 4569 | ! 22.03.04 BEG |
---|
| 4570 | !============================================================= |
---|
| 4571 | ! Ecriture des sorties |
---|
| 4572 | !============================================================= |
---|
[524] | 4573 | #ifdef CPP_IOIPSL |
---|
| 4574 | |
---|
[2469] | 4575 | ! Recupere des varibles calcule dans differents modules |
---|
| 4576 | ! pour ecriture dans histxxx.nc |
---|
[782] | 4577 | |
---|
[2469] | 4578 | ! Get some variables from module fonte_neige_mod |
---|
| 4579 | CALL fonte_neige_get_vars(pctsrf, & |
---|
[2517] | 4580 | zxfqcalving, zxfqfonte, zxffonte, zxrunofflic) |
---|
[782] | 4581 | |
---|
[1507] | 4582 | |
---|
[2469] | 4583 | !============================================================= |
---|
| 4584 | ! Separation entre thermiques et non thermiques dans les sorties |
---|
| 4585 | ! de fisrtilp |
---|
| 4586 | !============================================================= |
---|
[1507] | 4587 | |
---|
[2692] | 4588 | IF (iflag_thermals>=1) THEN |
---|
[2469] | 4589 | d_t_lscth=0. |
---|
| 4590 | d_t_lscst=0. |
---|
| 4591 | d_q_lscth=0. |
---|
| 4592 | d_q_lscst=0. |
---|
[2692] | 4593 | DO k=1,klev |
---|
| 4594 | DO i=1,klon |
---|
| 4595 | IF (ptconvth(i,k)) THEN |
---|
[2469] | 4596 | d_t_lscth(i,k)=d_t_eva(i,k)+d_t_lsc(i,k) |
---|
| 4597 | d_q_lscth(i,k)=d_q_eva(i,k)+d_q_lsc(i,k) |
---|
[2692] | 4598 | ELSE |
---|
[2469] | 4599 | d_t_lscst(i,k)=d_t_eva(i,k)+d_t_lsc(i,k) |
---|
| 4600 | d_q_lscst(i,k)=d_q_eva(i,k)+d_q_lsc(i,k) |
---|
[2692] | 4601 | ENDIF |
---|
| 4602 | ENDDO |
---|
| 4603 | ENDDO |
---|
[1507] | 4604 | |
---|
[2692] | 4605 | DO i=1,klon |
---|
[2469] | 4606 | plul_st(i)=prfl(i,lmax_th(i)+1)+psfl(i,lmax_th(i)+1) |
---|
| 4607 | plul_th(i)=prfl(i,1)+psfl(i,1) |
---|
[2692] | 4608 | ENDDO |
---|
| 4609 | ENDIF |
---|
[909] | 4610 | |
---|
[2469] | 4611 | !On effectue les sorties: |
---|
[1791] | 4612 | |
---|
[2630] | 4613 | #ifdef CPP_Dust |
---|
| 4614 | CALL phys_output_write_spl(itap, pdtphys, paprs, pphis, & |
---|
| 4615 | pplay, lmax_th, aerosol_couple, & |
---|
| 4616 | ok_ade, ok_aie, ivap, new_aod, ok_sync, & |
---|
| 4617 | ptconv, read_climoz, clevSTD, & |
---|
| 4618 | ptconvth, d_t, qx, d_qx, d_tr_dyn, zmasse, & |
---|
| 4619 | flag_aerosol, flag_aerosol_strat, ok_cdnc) |
---|
| 4620 | #else |
---|
[2469] | 4621 | CALL phys_output_write(itap, pdtphys, paprs, pphis, & |
---|
| 4622 | pplay, lmax_th, aerosol_couple, & |
---|
[2496] | 4623 | ok_ade, ok_aie, ivap, iliq, isol, new_aod, & |
---|
| 4624 | ok_sync, ptconv, read_climoz, clevSTD, & |
---|
[2665] | 4625 | ptconvth, d_u, d_t, qx, d_qx, zmasse, & |
---|
[2469] | 4626 | flag_aerosol, flag_aerosol_strat, ok_cdnc) |
---|
[2630] | 4627 | #endif |
---|
[1791] | 4628 | |
---|
[2651] | 4629 | #ifndef CPP_XIOS |
---|
[2590] | 4630 | CALL write_paramLMDZ_phy(itap,nid_ctesGCM,ok_sync) |
---|
[2651] | 4631 | #endif |
---|
[687] | 4632 | |
---|
[524] | 4633 | #endif |
---|
| 4634 | |
---|
[2235] | 4635 | |
---|
[2469] | 4636 | !==================================================================== |
---|
| 4637 | ! Arret du modele apres hgardfou en cas de detection d'un |
---|
| 4638 | ! plantage par hgardfou |
---|
| 4639 | !==================================================================== |
---|
[2235] | 4640 | |
---|
| 4641 | IF (abortphy==1) THEN |
---|
| 4642 | abort_message ='Plantage hgardfou' |
---|
[2311] | 4643 | CALL abort_physic (modname,abort_message,1) |
---|
[2235] | 4644 | ENDIF |
---|
| 4645 | |
---|
[2469] | 4646 | ! 22.03.04 END |
---|
| 4647 | ! |
---|
| 4648 | !==================================================================== |
---|
| 4649 | ! Si c'est la fin, il faut conserver l'etat de redemarrage |
---|
| 4650 | !==================================================================== |
---|
| 4651 | ! |
---|
[782] | 4652 | |
---|
[2469] | 4653 | IF (lafin) THEN |
---|
| 4654 | itau_phy = itau_phy + itap |
---|
| 4655 | CALL phyredem ("restartphy.nc") |
---|
| 4656 | ! open(97,form="unformatted",file="finbin") |
---|
| 4657 | ! write(97) u_seri,v_seri,t_seri,q_seri |
---|
| 4658 | ! close(97) |
---|
| 4659 | !$OMP MASTER |
---|
[2692] | 4660 | IF (read_climoz >= 1) THEN |
---|
| 4661 | IF (is_mpi_root) THEN |
---|
| 4662 | CALL nf95_close(ncid_climoz) |
---|
| 4663 | ENDIF |
---|
[2788] | 4664 | DEALLOCATE(press_edg_climoz) ! pointer |
---|
| 4665 | DEALLOCATE(press_cen_climoz) ! pointer |
---|
[2692] | 4666 | ENDIF |
---|
[2469] | 4667 | !$OMP END MASTER |
---|
| 4668 | ENDIF |
---|
[1863] | 4669 | |
---|
[2469] | 4670 | ! first=.false. |
---|
[1863] | 4671 | |
---|
[2418] | 4672 | |
---|
[2469] | 4673 | END SUBROUTINE physiq |
---|
[2418] | 4674 | |
---|
[2924] | 4675 | END MODULE physiq_mod |
---|