Changeset 4056 for LMDZ6/trunk/libf/phylmd/physiq_mod.F90
- Timestamp:
- Jan 12, 2022, 10:54:09 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r4009 r4056 39 39 USE ioipsl_getin_p_mod, ONLY : getin_p 40 40 USE indice_sol_mod 41 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, type_trac, nqCO2 41 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac, nqCO2 42 USE readTracFiles_mod, ONLY: phases_sep 43 USE strings_mod, ONLY: strIdx 42 44 USE iophy 43 45 USE limit_read_mod, ONLY : init_limit_read … … 146 148 ! 147 149 d_t_vdf,d_q_vdf,d_u_vdf,d_v_vdf,d_t_diss, & 150 d_t_vdf_x, d_t_vdf_w, & 151 d_q_vdf_x, d_q_vdf_w, & 148 152 d_ts, & 149 153 ! … … 218 222 zxfluxlat_x, zxfluxlat_w, & 219 223 ! 220 d_t_vdf_x, d_t_vdf_w, &221 d_q_vdf_x, d_q_vdf_w, &222 224 pbl_tke_input, tke_dissip, l_mix, wprime,& 223 225 t_therm, q_therm, u_therm, v_therm, & … … 356 358 LOGICAL, SAVE :: ok_volcan ! pour activer les diagnostics volcaniques 357 359 !$OMP THREADPRIVATE(ok_volcan) 358 INTEGER, SAVE :: flag_volc_surfstrat ! pour imposer le cool/heat rate à la surf ou dans la strato360 INTEGER, SAVE :: flag_volc_surfstrat ! pour imposer le cool/heat rate à la surf/strato 359 361 !$OMP THREADPRIVATE(flag_volc_surfstrat) 360 362 LOGICAL ok_cvl ! pour activer le nouveau driver pour convection KE … … 854 856 real zqsat(klon,klev) 855 857 ! 856 INTEGER i, k, iq, j, nsrf, ll, l 858 INTEGER i, k, iq, j, nsrf, ll, l, itr 857 859 ! 858 860 REAL t_coup … … 1035 1037 1036 1038 CHARACTER (LEN=20) :: modname='physiq_mod' 1037 CHARACTER*80 message,abort_message1039 CHARACTER*80 abort_message 1038 1040 LOGICAL, SAVE :: ok_sync, ok_sync_omp 1039 1041 !$OMP THREADPRIVATE(ok_sync) … … 1363 1365 iflag_phytrac = 1 1364 1366 ENDIF 1365 #endif 1367 #endif 1366 1368 nvm_lmdz = 13 1367 1369 CALL getin_p('NVM',nvm_lmdz) … … 2230 2232 2231 2233 tke0(:,:)=pbl_tke(:,:,is_ave) 2232 !CR:Nombre de traceurs de l'eau: nqo 2233 ! IF (nqtot.GE.3) THEN 2234 IF (nqtot.GE.(nqo+1)) THEN 2235 ! DO iq = 3, nqtot 2236 DO iq = nqo+1, nqtot 2234 IF (nqtot > nqo) THEN 2235 ! water isotopes are not included in tr_seri 2236 itr = 0 2237 DO iq = 1, nqtot 2238 IF(tracers(iq)%isH2Ofamily) CYCLE 2239 itr = itr+1 2237 2240 DO k = 1, klev 2238 2241 DO i = 1, klon 2239 ! tr_seri(i,k,iq-2) = qx(i,k,iq) 2240 tr_seri(i,k,iq-nqo) = qx(i,k,iq) 2242 tr_seri(i,k,itr) = qx(i,k,iq) 2241 2243 ENDDO 2242 2244 ENDDO 2243 2245 ENDDO 2244 2246 ELSE 2245 DO k = 1, klev 2246 DO i = 1, klon 2247 tr_seri(i,k,1) = 0.0 2248 ENDDO 2249 ENDDO 2247 ! DC: make sure the final "1" index was meant for 1st H2O phase (vapor) !!! 2248 ! tr_seri(:,:,strIdx(tracers(:)%name,'H2O'//phases_sep//'g')) = 0.0 2249 tr_seri(:,:,strIdx(tracers(:)%name,'H2Ov')) = 0.0 2250 2250 ENDIF 2251 2251 ! … … 2254 2254 IF (debut) THEN 2255 2255 WRITE(lunout,*)' WARNING: tr_ancien initialised to tr_seri' 2256 DO iq = nqo+1, nqtot 2257 tr_ancien(:,:,iq-nqo)=tr_seri(:,:,iq-nqo) 2258 ENDDO 2256 itr = 0 2257 do iq = 1, nqtot 2258 IF(tracers(iq)%isH2Ofamily) CYCLE 2259 itr = itr+1 2260 tr_ancien(:,:,itr)=tr_seri(:,:,itr) 2261 enddo 2259 2262 ENDIF 2260 2263 ! … … 2287 2290 d_qs_dyn2d(:)=(zx_tmp_fi2d(:)-prsw_ancien(:))/phys_tstep 2288 2291 ! !! RomP >>> td dyn traceur 2289 IF (nqtot.GT.nqo) THEN ! jyg 2290 DO iq = nqo+1, nqtot ! jyg 2291 d_tr_dyn(:,:,iq-nqo)=(tr_seri(:,:,iq-nqo)-tr_ancien(:,:,iq-nqo))/phys_tstep ! jyg 2292 ENDDO 2293 ENDIF 2292 IF (nqtot > nqo) d_tr_dyn(:,:,:)=(tr_seri(:,:,:)-tr_ancien(:,:,:))/phys_tstep 2294 2293 ! !! RomP <<< 2295 2294 ELSE … … 2304 2303 d_qs_dyn2d(:) = 0.0 2305 2304 ! !! RomP >>> td dyn traceur 2306 IF (nqtot.GT.nqo) THEN ! jyg 2307 DO iq = nqo+1, nqtot ! jyg 2308 d_tr_dyn(:,:,iq-nqo)= 0.0 ! jyg 2309 ENDDO 2310 ENDIF 2305 IF (nqtot > nqo) d_tr_dyn(:,:,:)= 0.0 2311 2306 ! !! RomP <<< 2312 2307 ancien_ok = .TRUE. … … 2589 2584 debut, lafin, & 2590 2585 longitude_deg, latitude_deg, rugoro, zrmu0, & 2591 2586 sollwdown, cldt, & 2592 2587 rain_fall, snow_fall, solsw, solswfdiff, sollw, & 2593 2588 gustiness, & … … 2857 2852 ENDDO 2858 2853 ELSE 2859 t_w(:,:) = t_seri(:,:)2854 t_w(:,:) = t_seri(:,:) 2860 2855 q_w(:,:) = q_seri(:,:) 2861 2856 t_x(:,:) = t_seri(:,:) … … 3073 3068 3074 3069 DO i = 1, klon 3075 ema_pcb(i) = paprs(i,ibas_con(i)) 3070 ! C Risi modif: pour éviter pb de dépassement d'indice dans les cas 3071 ! où i n'est pas un point convectif et donc ibas_con(i)=0 3072 ! c'est un pb indépendant des isotopes 3073 if (ibas_con(i) > 0) then 3074 ema_pcb(i) = paprs(i,ibas_con(i)) 3075 else 3076 ema_pcb(i) = 0.0 3077 endif 3076 3078 ENDDO 3077 3079 DO i = 1, klon … … 3504 3506 wprime_ave(:,:)=0. 3505 3507 3506 3507 3508 DO nsrf = 1, nbsrf 3508 3509 DO i = 1, klon … … 3512 3513 ENDDO 3513 3514 ENDDO 3514 3515 3515 3516 3516 CALL calcratqs(klon,klev,prt_level,lunout, & … … 3530 3530 print *,'itap, ->fisrtilp ',itap 3531 3531 ENDIF 3532 ! 3532 3533 3533 3534 picefra(:,:)=0. … … 3556 3557 iflag_ice_thermo) 3557 3558 ENDIF 3559 ! 3558 3560 WHERE (rain_lsc < 0) rain_lsc = 0. 3559 3561 WHERE (snow_lsc < 0) snow_lsc = 0. … … 4267 4269 4268 4270 #ifndef CPP_XIOS 4269 4271 !--OB 30/05/2016 modified 21/10/2016 4272 !--here we return swaero_diag and dryaod_diag to FALSE 4273 !--and histdef will switch it back to TRUE if necessary 4274 !--this is necessary to get the right swaero at first step 4275 !--but only in the case of no XIOS as XIOS is covered elsewhere 4276 IF (debut) swaerofree_diag = .FALSE. 4277 IF (debut) swaero_diag = .FALSE. 4278 IF (debut) dryaod_diag = .FALSE. 4279 !--IM 15/09/2017 here we return ok_4xCO2atm to FALSE 4280 !--as for swaero_diag, see above 4281 IF (debut) ok_4xCO2atm = .FALSE. 4282 4283 ! 4270 4284 !IM 2eme calcul radiatif pour le cas perturbe ou au moins un 4271 4285 !IM des taux doit etre different du taux actuel … … 5052 5066 ENDDO 5053 5067 ! 5054 !CR: nb de traceurs eau: nqo5055 ! IF (nqtot.GE.3) THEN5056 IF (nqtot.GE.(nqo+1)) THEN5057 ! DO iq = 3, nqtot5058 DO iq = nqo+1, nqtot5068 IF (nqtot > nqo+1) THEN 5069 itr = 0 5070 DO iq = 1, nqtot 5071 IF(tracers(iq)%isH2Ofamily) CYCLE 5072 itr = itr+1 5059 5073 DO k = 1, klev 5060 5074 DO i = 1, klon 5061 ! d_qx(i,k,iq) = ( tr_seri(i,k,iq-2) - qx(i,k,iq) ) / phys_tstep 5062 d_qx(i,k,iq) = ( tr_seri(i,k,iq-nqo) - qx(i,k,iq) ) / phys_tstep 5075 d_qx(i,k,iq) = ( tr_seri(i,k,itr) - qx(i,k,iq) ) / phys_tstep 5063 5076 ENDDO 5064 5077 ENDDO … … 5101 5114 CALL water_int(klon,klev,qs_ancien,zmasse,prsw_ancien) 5102 5115 ! !! RomP >>> 5103 !CR: nb de traceurs eau: nqo 5104 IF (nqtot.GT.nqo) THEN 5105 DO iq = nqo+1, nqtot 5106 tr_ancien(:,:,iq-nqo) = tr_seri(:,:,iq-nqo) 5107 ENDDO 5108 ENDIF 5116 IF (nqtot > nqo) tr_ancien(:,:,:) = tr_seri(:,:,:) 5109 5117 ! !! RomP <<< 5110 5118 !==========================================================================
Note: See TracChangeset
for help on using the changeset viewer.