Changeset 1403 for LMDZ4/trunk/libf/phylmd/physiq.F
- Timestamp:
- Jul 1, 2010, 11:02:53 AM (14 years ago)
- Location:
- LMDZ4/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk
- Property svn:mergeinfo changed
-
LMDZ4/trunk/libf/phylmd/physiq.F
r1398 r1403 41 41 use conf_phys_m, only: conf_phys 42 42 use radlwsw_m, only: radlwsw 43 USE control_mod 44 43 45 44 46 IMPLICIT none … … 99 101 #include "dimsoil.h" 100 102 #include "clesphys.h" 101 #include "control.h"102 103 #include "temps.h" 103 104 #include "iniprint.h" … … 216 217 REAL d_ps(klon) 217 218 real da(klon,klev),phi(klon,klev,klev),mp(klon,klev) 219 !IM definition dynamique o_trac dans phys_output_open 220 ! type(ctrl_out) :: o_trac(nqtot) 218 221 c 219 222 cIM Amip2 PV a theta constante … … 258 261 CHARACTER*4 bb2 259 262 CHARACTER*2 bb3 260 c 263 261 264 real twriteSTD(klon,nlevSTD,nfiles) 262 265 real qwriteSTD(klon,nlevSTD,nfiles) … … 473 476 c 474 477 c cnameisccp 475 CHARACTER *2 7cnameisccp(lmaxm1,kmaxm1)478 CHARACTER *29 cnameisccp(lmaxm1,kmaxm1) 476 479 cIM bad 151205 DATA cnameisccp/'pc< 50hPa, tau< 0.3', 477 480 DATA cnameisccp/'pc= 50-180hPa, tau< 0.3', … … 639 642 REAL q_undi(klon,klev) ! humidite moyenne dans la zone non perturbee 640 643 c 641 REAL wake_pe(klon) ! Wake potential energy - WAPE 644 cjyg 645 ccc REAL wake_pe(klon) ! Wake potential energy - WAPE 642 646 643 647 REAL wake_gfl(klon) ! Gust Front Length … … 655 659 REAL dt_a(klon,klev) 656 660 REAL dq_a(klon,klev) 661 REAL, SAVE :: alp_offset 662 c$OMP THREADPRIVATE(alp_offset) 663 657 664 c 658 665 cRR:fin declarations poches froides … … 660 667 661 668 REAL zw2(klon,klev+1) 662 REAL fraca(klon,klev+1) 669 REAL fraca(klon,klev+1) 670 REAL ztv(klon,klev) 671 REAL zpspsk(klon,klev) 672 REAL ztla(klon,klev) 673 REAL zthl(klon,klev) 663 674 664 675 c Variables locales pour la couche limite (al1): … … 1217 1228 . iflag_thermals_ed,iflag_thermals_optflux, 1218 1229 c nv flags pour la convection et les poches froides 1219 . iflag_coupl,iflag_clos,iflag_wake, read_climoz) 1230 . iflag_coupl,iflag_clos,iflag_wake, read_climoz, 1231 & alp_offset) 1220 1232 call phys_state_var_init(read_climoz) 1221 1233 call phys_output_var_init … … 1239 1251 c pmflxr=0. 1240 1252 c pmflxs=0. 1241 itau_con=0 1242 first=.false. 1253 1254 itau_con=0 1255 first=.false. 1243 1256 1244 1257 endif ! first … … 1263 1276 ! Gestion calendrier : mise a jour du module phys_cal_mod 1264 1277 ! 1265 c IMCALL phys_cal_update(jD_cur,jH_cur)1278 c CALL phys_cal_update(jD_cur,jH_cur) 1266 1279 1267 1280 c … … 1386 1399 ENDIF 1387 1400 c 1388 IF (dtime* FLOAT(radpas).GT.21600..AND.cycle_diurne) THEN1401 IF (dtime*REAL(radpas).GT.21600..AND.cycle_diurne) THEN 1389 1402 WRITE(lunout,*)'Nbre d appels au rayonnement insuffisant' 1390 1403 WRITE(lunout,*)"Au minimum 4 appels par jour si cycle diurne" … … 1496 1509 & type_ocean,iflag_pbl,ok_mensuel,ok_journe, 1497 1510 & ok_hf,ok_instan,ok_LES,ok_ade,ok_aie, 1498 & read_climoz, new_aod, aerosol_couple) 1511 & read_climoz, new_aod, aerosol_couple 1512 & ) 1499 1513 c$OMP END MASTER 1500 1514 c$OMP BARRIER … … 1558 1572 CALL VTb(VTinca) 1559 1573 ! iii = MOD(NINT(xjour),360) 1560 ! calday = FLOAT(iii) + jH_cur1561 calday = FLOAT(days_elapsed) + jH_cur1574 ! calday = REAL(iii) + jH_cur 1575 calday = REAL(days_elapsed) + jH_cur 1562 1576 WRITE(lunout,*) 'initial time chemini', days_elapsed, calday 1563 1577 … … 1841 1855 ! solarlong0 1842 1856 if (solarlong0<-999.) then 1843 CALL orbite( FLOAT(days_elapsed+1),zlongi,dist)1857 CALL orbite(REAL(days_elapsed+1),zlongi,dist) 1844 1858 else 1845 1859 zlongi=solarlong0 ! longitude solaire vraie … … 1852 1866 ! Avec ou sans cycle diurne 1853 1867 IF (cycle_diurne) THEN 1854 zdtime=dtime* FLOAT(radpas) ! pas de temps du rayonnement (s)1868 zdtime=dtime*REAL(radpas) ! pas de temps du rayonnement (s) 1855 1869 CALL zenang(zlongi,jH_cur,zdtime,rlat,rlon,rmu0,fract) 1856 1870 ELSE … … 1862 1876 call writefield_phy('v_seri',v_seri,llm) 1863 1877 call writefield_phy('t_seri',t_seri,llm) 1864 1878 call writefield_phy('q_seri',q_seri,llm) 1865 1879 endif 1866 1880 … … 1919 1933 call writefield_phy('v_seri',v_seri,llm) 1920 1934 call writefield_phy('t_seri',t_seri,llm) 1921 1935 call writefield_phy('q_seri',q_seri,llm) 1922 1936 endif 1923 1937 … … 2001 2015 2002 2016 IF (iflag_con.EQ.1) THEN 2003 stop'reactiver le call conlmd dans physiq.F' 2017 abort_message ='reactiver le call conlmd dans physiq.F' 2018 CALL abort_gcm (modname,abort_message,1) 2004 2019 c CALL conlmd (dtime, paprs, pplay, t_seri, q_seri, conv_q, 2005 2020 c . d_t_con, d_q_con, … … 2059 2074 c 2060 2075 ccalcul de ale_wake et alp_wake 2061 do i = 1,klon 2062 if (iflag_wake.eq.1) then 2063 ale_wake(i) = 0.5*wake_cstar(i)**2 2064 alp_wake(i) = wake_fip(i) 2065 else 2066 ale_wake(i) = 0. 2067 alp_wake(i) = 0. 2068 endif 2069 enddo 2076 if (iflag_wake.eq.1) then 2077 if (itap .le. it_wape_prescr) then 2078 do i = 1,klon 2079 ale_wake(i) = wape_prescr 2080 alp_wake(i) = fip_prescr 2081 enddo 2082 else 2083 do i = 1,klon 2084 cjyg ALE=WAPE au lieu de ALE = 1/2 Cstar**2 2085 ccc ale_wake(i) = 0.5*wake_cstar(i)**2 2086 ale_wake(i) = wake_pe(i) 2087 alp_wake(i) = wake_fip(i) 2088 enddo 2089 endif 2090 else 2091 do i = 1,klon 2092 ale_wake(i) = 0. 2093 alp_wake(i) = 0. 2094 enddo 2095 endif 2070 2096 ccombinaison avec ale et alp de couche limite: constantes si pas de couplage, valeurs calculees 2071 2097 cdans le thermique sinon 2072 2098 if (iflag_coupl.eq.0) then 2073 if (debut) print*,'ALE et ALP imposes' 2099 if (debut.and.prt_level.gt.9) 2100 $ WRITE(lunout,*)'ALE et ALP imposes' 2074 2101 do i = 1,klon 2075 2102 con ne couple que ale … … 2082 2109 else 2083 2110 IF(prt_level>9)WRITE(lunout,*)'ALE et ALP couples au thermique' 2084 do i = 1,klon 2085 ALE(i) = max(ale_wake(i),Ale_bl(i)) 2086 ALP(i) = alp_wake(i) + Alp_bl(i) 2087 c write(20,*)'ALE',ALE(i),Ale_bl(i),ale_wake(i) 2088 c write(21,*)'ALP',ALP(i),Alp_bl(i),alp_wake(i) 2089 enddo 2111 ! do i = 1,klon 2112 ! ALE(i) = max(ale_wake(i),Ale_bl(i)) 2113 ! avant ALP(i) = alp_wake(i) + Alp_bl(i) 2114 ! ALP(i) = alp_wake(i) + Alp_bl(i) + alp_offset ! modif sb 2115 ! write(20,*)'ALE',ALE(i),Ale_bl(i),ale_wake(i) 2116 ! write(21,*)'ALP',ALP(i),Alp_bl(i),alp_wake(i) 2117 ! enddo 2118 2119 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2120 ! Modif FH 2010/04/27. Sans doute temporaire. 2121 ! Deux options pour le alp_offset : constant si >Ã 0 ou proportionnel Ãa 2122 ! w si <0 2123 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2124 do i = 1,klon 2125 ALE(i) = max(ale_wake(i),Ale_bl(i)) 2126 if (alp_offset>=0.) then 2127 ALP(i) = alp_wake(i) + Alp_bl(i) + alp_offset ! modif sb 2128 else 2129 ALP(i)=alp_wake(i)+Alp_bl(i)+alp_offset*min(omega(i,6),0.) 2130 if (alp(i)<0.) then 2131 print*,'ALP ',alp(i),alp_wake(i) 2132 s ,Alp_bl(i),alp_offset*min(omega(i,6),0.) 2133 endif 2134 endif 2135 enddo 2136 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2137 2090 2138 endif 2091 2139 do i=1,klon … … 2224 2272 call writefield_phy('v_seri',v_seri,llm) 2225 2273 call writefield_phy('t_seri',t_seri,llm) 2226 2274 call writefield_phy('q_seri',q_seri,llm) 2227 2275 endif 2228 2276 … … 2246 2294 za = 0.0 2247 2295 DO i = 1, klon 2248 za = za + airephy(i)/ FLOAT(klon)2296 za = za + airephy(i)/REAL(klon) 2249 2297 zx_t = zx_t + (rain_con(i)+ 2250 . snow_con(i))*airephy(i)/ FLOAT(klon)2298 . snow_con(i))*airephy(i)/REAL(klon) 2251 2299 ENDDO 2252 2300 zx_t = zx_t/za*dtime … … 2328 2376 2329 2377 endif 2378 c 2379 c=================================================================== 2380 cJYG 2381 IF (ip_ebil_phy.ge.2) THEN 2382 ztit='after wake' 2383 CALL diagetpq(airephy,ztit,ip_ebil_phy,2,2,dtime 2384 e , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay 2385 s , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2386 call diagphy(airephy,ztit,ip_ebil_phy 2387 e , zero_v, zero_v, zero_v, zero_v, zero_v 2388 e , zero_v, zero_v, zero_v, ztsol 2389 e , d_h_vcol, d_qt, d_ec 2390 s , fs_bound, fq_bound ) 2391 END IF 2392 2330 2393 c print*,'apres callwake iflag_cldcon=', iflag_cldcon 2331 2394 c … … 2347 2410 clwcon0th(:,:)=0. 2348 2411 c 2349 fm_therm(:,:)=0.2350 entr_therm(:,:)=0.2351 detr_therm(:,:)=0.2412 c fm_therm(:,:)=0. 2413 c entr_therm(:,:)=0. 2414 c detr_therm(:,:)=0. 2352 2415 c 2353 2416 IF(prt_level>9)WRITE(lunout,*) … … 2377 2440 s ,ratqsdiff,zqsatth 2378 2441 con rajoute ale et alp, et les caracteristiques de la couche alim 2379 s ,Ale_bl,Alp_bl,lalim_conv,wght_th, zmax0, f0, zw2,fraca) 2442 s ,Ale_bl,Alp_bl,lalim_conv,wght_th, zmax0, f0, zw2,fraca 2443 s ,ztv,zpspsk,ztla,zthl) 2444 2445 ! ---------------------------------------------------------------------- 2446 ! Transport de la TKE par les panaches thermiques. 2447 ! FH : 2010/02/01 2448 if (iflag_pbl.eq.10) then 2449 call thermcell_dtke(klon,klev,nbsrf,pdtphys,fm_therm,entr_therm, 2450 s rg,paprs,pbl_tke) 2451 endif 2452 ! ---------------------------------------------------------------------- 2453 2380 2454 endif 2455 2381 2456 2382 2457 … … 2430 2505 e , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay 2431 2506 s , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2507 call diagphy(airephy,ztit,ip_ebil_phy 2508 e , zero_v, zero_v, zero_v, zero_v, zero_v 2509 e , zero_v, zero_v, zero_v, ztsol 2510 e , d_h_vcol, d_qt, d_ec 2511 s , fs_bound, fq_bound ) 2432 2512 END IF 2433 2513 … … 2478 2558 enddo 2479 2559 tau_overturning_th(:)=zmax_th(:)/max(0.5*wmax_th(:),0.1) 2480 print*,'TAU TH OK ',tau_overturning_th(1),detr_therm(1,3) 2560 if(prt_level.ge.9) 2561 & write(lunout,*)'TAU TH OK ', 2562 & tau_overturning_th(1),detr_therm(1,3) 2481 2563 2482 2564 c On impose que l'air autour de la fraction couverte par le thermique … … 2589 2671 2590 2672 ! les ratqs sont une combinaison de ratqss et ratqsc 2591 ! print*,'PHYLMD NOUVEAU TAU_RATQS ',tau_ratqs 2673 if(prt_level.ge.9) 2674 $ write(lunout,*)'PHYLMD NOUVEAU TAU_RATQS ',tau_ratqs 2592 2675 2593 2676 if (tau_ratqs>1.e-10) then … … 2620 2703 . pfrac_impa, pfrac_nucl, pfrac_1nucl, 2621 2704 . frac_impa, frac_nucl, 2622 . prfl, psfl, rhcl) 2705 . prfl, psfl, rhcl, 2706 . zqasc, fraca,ztv,zpspsk,ztla,zthl,iflag_cldcon ) 2623 2707 2624 2708 WHERE (rain_lsc < 0) rain_lsc = 0. … … 2640 2724 za = 0.0 2641 2725 DO i = 1, klon 2642 za = za + airephy(i)/ FLOAT(klon)2726 za = za + airephy(i)/REAL(klon) 2643 2727 zx_t = zx_t + (rain_lsc(i) 2644 . + snow_lsc(i))*airephy(i)/ FLOAT(klon)2728 . + snow_lsc(i))*airephy(i)/REAL(klon) 2645 2729 ENDDO 2646 2730 zx_t = zx_t/za*dtime … … 2664 2748 call writefield_phy('v_seri',v_seri,llm) 2665 2749 call writefield_phy('t_seri',t_seri,llm) 2666 2750 call writefield_phy('q_seri',q_seri,llm) 2667 2751 endif 2668 2752 … … 2741 2825 & tausum_aero, tau3d_aero) 2742 2826 ELSE 2827 cIM 170310 BEG 2828 tausum_aero(:,:,:) = 0. 2829 cIM 170310 END 2743 2830 tau_aero(:,:,:,:) = 0. 2744 2831 piz_aero(:,:,:,:) = 0. … … 2813 2900 e , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay 2814 2901 s , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2902 call diagphy(airephy,ztit,ip_ebil_phy 2903 e , zero_v, zero_v, zero_v, zero_v, zero_v 2904 e , zero_v, zero_v, zero_v, ztsol 2905 e , d_h_vcol, d_qt, d_ec 2906 s , fs_bound, fq_bound ) 2815 2907 END IF 2816 2908 c … … 2845 2937 IF (thermcep) THEN 2846 2938 IF(zt2m(i).LT.RTT) then 2847 2848 2849 2939 Lheat=RLSTT 2940 ELSE 2941 Lheat=RLVTT 2850 2942 ENDIF 2851 2943 ELSE … … 2853 2945 Lheat=RLSTT 2854 2946 ELSE 2855 2947 Lheat=RLVTT 2856 2948 ENDIF 2857 2949 ENDIF … … 2864 2956 CALL VTe(VTphysiq) 2865 2957 CALL VTb(VTinca) 2866 calday = FLOAT(days_elapsed + 1) + jH_cur2958 calday = REAL(days_elapsed + 1) + jH_cur 2867 2959 2868 2960 call chemtime(itap+itau_phy-1, date0, dtime) … … 2908 3000 $ cdragm, 2909 3001 $ pctsrf, 2910 $ 2911 $ 3002 $ pdtphys, 3003 $ itap) 2912 3004 2913 3005 CALL VTe(VTinca) … … 2964 3056 call writefield_phy('v_seri',v_seri,llm) 2965 3057 call writefield_phy('t_seri',t_seri,llm) 2966 3058 call writefield_phy('q_seri',q_seri,llm) 2967 3059 endif 2968 3060 … … 3020 3112 itaprad = itaprad + 1 3021 3113 3022 if (iflag_radia.eq.0 ) then3114 if (iflag_radia.eq.0 .and. prt_level.ge.9) then 3023 3115 print *,'--------------------------------------------------' 3024 3116 print *,'>>>> ATTENTION rayonnement desactive pour ce cas' … … 3043 3135 call writefield_phy('v_seri',v_seri,llm) 3044 3136 call writefield_phy('t_seri',t_seri,llm) 3045 3137 call writefield_phy('q_seri',q_seri,llm) 3046 3138 endif 3047 3139 … … 3124 3216 call writefield_phy('v_seri',v_seri,llm) 3125 3217 call writefield_phy('t_seri',t_seri,llm) 3126 3218 call writefield_phy('q_seri',q_seri,llm) 3127 3219 endif 3128 3220 … … 3188 3280 call writefield_phy('v_seri',v_seri,llm) 3189 3281 call writefield_phy('t_seri',t_seri,llm) 3190 3282 call writefield_phy('q_seri',q_seri,llm) 3191 3283 endif 3192 3284 … … 3223 3315 e , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay 3224 3316 s , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3317 call diagphy(airephy,ztit,ip_ebil_phy 3318 e , zero_v, zero_v, zero_v, zero_v, zero_v 3319 e , zero_v, zero_v, zero_v, ztsol 3320 e , d_h_vcol, d_qt, d_ec 3321 s , fs_bound, fq_bound ) 3225 3322 END IF 3226 3323 c … … 3292 3389 IF (offline) THEN 3293 3390 3294 print*,'Attention on met a 0 les thermiques pour phystoke' 3391 IF (prt_level.ge.9) 3392 $ print*,'Attention on met a 0 les thermiques pour phystoke' 3295 3393 call phystokenc ( 3296 3394 I nlon,klev,pdtphys,rlon,rlat, … … 3400 3498 c 3401 3499 cIM initialisation 5eme fichier de sortie 3500 cIM ajoute 5eme niveau 170310 BEG 3402 3501 twriteSTD(:,:,5)=tlevSTD(:,:) 3403 3502 qwriteSTD(:,:,5)=qlevSTD(:,:) … … 3484 3583 call writefield_phy('v_seri',v_seri,llm) 3485 3584 call writefield_phy('t_seri',t_seri,llm) 3486 3585 call writefield_phy('q_seri',q_seri,llm) 3487 3586 endif 3488 3587
Note: See TracChangeset
for help on using the changeset viewer.