Changeset 2692 for LMDZ5/trunk
- Timestamp:
- Nov 1, 2016, 8:41:01 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/physiq_mod.F90
r2690 r2692 1090 1090 ! en imposant la valeur de igout. 1091 1091 !======================================================================d 1092 if (prt_level.ge.1) then1092 IF (prt_level.ge.1) THEN 1093 1093 igout=klon/2+1/klon 1094 1094 write(lunout,*) 'DEBUT DE PHYSIQ !!!!!!!!!!!!!!!!!!!!' … … 1101 1101 1102 1102 write(lunout,*) 'paprs, play, phi, u, v, t' 1103 dok=1,klev1103 DO k=1,klev 1104 1104 write(lunout,*) paprs(igout,k),pplay(igout,k),pphi(igout,k), & 1105 1105 u(igout,k),v(igout,k),t(igout,k) 1106 enddo1106 ENDDO 1107 1107 write(lunout,*) 'ovap (g/kg), oliq (g/kg)' 1108 dok=1,klev1108 DO k=1,klev 1109 1109 write(lunout,*) qx(igout,k,1)*1000,qx(igout,k,2)*1000. 1110 enddo1111 endif1110 ENDDO 1111 ENDIF 1112 1112 1113 1113 !====================================================================== 1114 1114 1115 if (first) then1115 IF (first) THEN 1116 1116 !CR:nvelles variables convection/poches froides 1117 1117 1118 1118 print*, '=================================================' 1119 1119 print*, 'Allocation des variables locales et sauvegardees' 1120 callphys_local_var_init1120 CALL phys_local_var_init 1121 1121 ! 1122 1122 pasphys=pdtphys 1123 1123 ! appel a la lecture du run.def physique 1124 callconf_phys(ok_journe, ok_mensuel, &1124 CALL conf_phys(ok_journe, ok_mensuel, & 1125 1125 ok_instan, ok_hf, & 1126 1126 ok_LES, & … … 1136 1136 read_climoz, & 1137 1137 alp_offset) 1138 callphys_state_var_init(read_climoz)1139 callphys_output_var_init1138 CALL phys_state_var_init(read_climoz) 1139 CALL phys_output_var_init 1140 1140 print*, '=================================================' 1141 1141 ! 1142 1142 !CR: check sur le nb de traceurs de l eau 1143 if ((iflag_ice_thermo.gt.0).and.(nqo==2)) then1143 IF ((iflag_ice_thermo.gt.0).and.(nqo==2)) THEN 1144 1144 WRITE (lunout, *) ' iflag_ice_thermo==1 requires 3 H2O tracers ', & 1145 1145 '(H2Ov, H2Ol, H2Oi) but nqo=', nqo, '. Might as well stop here.' 1146 1146 STOP 1147 endif1147 ENDIF 1148 1148 1149 1149 dnwd0=0.0 … … 1158 1158 first=.false. 1159 1159 1160 endif! first1160 ENDIF ! first 1161 1161 1162 1162 !ym => necessaire pour iflag_con != 2 … … 1180 1180 DO i=1,klon 1181 1181 zero_v(i)=0. 1182 END 1183 END 1182 ENDDO 1183 ENDIF 1184 1184 1185 1185 IF (debut) THEN … … 1195 1195 ENDIF 1196 1196 1197 if(prt_level.ge.1) print*,'CONVERGENCE PHYSIQUE THERM 1 '1197 IF (prt_level.ge.1) print *,'CONVERGENCE PHYSIQUE THERM 1 ' 1198 1198 1199 1199 … … 1239 1239 ELSE 1240 1240 config_inca='none' ! default 1241 END 1241 ENDIF 1242 1242 1243 1243 IF (aerosol_couple .AND. (config_inca /= "aero" & … … 1278 1278 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1279 1279 1280 if (iflag_pbl>1) then1280 IF (iflag_pbl>1) THEN 1281 1281 PRINT*, "Using method MELLOR&YAMADA" 1282 endif1282 ENDIF 1283 1283 1284 1284 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 1298 1298 abort_message='nbre de pas de temps physique n est pas multiple ' & 1299 1299 // 'de nbapp_rad' 1300 callabort_physic(modname,abort_message,1)1300 CALL abort_physic(modname,abort_message,1) 1301 1301 ENDIF 1302 1302 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 1320 1320 1321 1321 1322 1323 1322 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1324 1323 ! … … 1343 1342 klon 1344 1343 abort_message='nlon et klon ne sont pas coherents' 1345 callabort_physic(modname,abort_message,1)1344 CALL abort_physic(modname,abort_message,1) 1346 1345 ENDIF 1347 1346 IF (nlev .NE. klev) THEN … … 1349 1348 klev 1350 1349 abort_message='nlev et klev ne sont pas coherents' 1351 callabort_physic(modname,abort_message,1)1350 CALL abort_physic(modname,abort_message,1) 1352 1351 ENDIF 1353 1352 ! … … 1356 1355 WRITE(lunout,*)"Au minimum 4 appels par jour si cycle diurne" 1357 1356 abort_message='Nbre d appels au rayonnement insuffisant' 1358 callabort_physic(modname,abort_message,1)1357 CALL abort_physic(modname,abort_message,1) 1359 1358 ENDIF 1360 1359 WRITE(lunout,*)"Clef pour la convection, iflag_con=", iflag_con … … 1387 1386 !CR:04.12.07: initialisations poches froides 1388 1387 ! Controle de ALE et ALP pour la fermeture convective (jyg) 1389 if (iflag_wake>=1) then1388 IF (iflag_wake>=1) THEN 1390 1389 CALL ini_wake(0.,0.,it_wape_prescr,wape_prescr,fip_prescr & 1391 1390 ,alp_bl_prescr, ale_bl_prescr) … … 1407 1406 d_s_wk(:) = 0. 1408 1407 d_dens_wk(:) = 0. 1409 endif1408 ENDIF 1410 1409 1411 1410 ! do i = 1,klon … … 1419 1418 OPEN(98,file='npCFMIP_param.data',status='old', & 1420 1419 form='formatted',iostat=iostat) 1421 if (iostat == 0) then1420 IF (iostat == 0) THEN 1422 1421 READ(98,*,end=998) nCFMIP 1423 1422 998 CONTINUE … … 1426 1425 IF(nCFMIP.GT.npCFMIP) THEN 1427 1426 print*,'nCFMIP > npCFMIP : augmenter npCFMIP et recompiler' 1428 callabort_physic("physiq", "", 1)1429 else1427 CALL abort_physic("physiq", "", 1) 1428 ELSE 1430 1429 print*,'physiq npCFMIP=',npCFMIP,'nCFMIP=',nCFMIP 1431 1430 ENDIF … … 1454 1453 tabijGCM, lonGCM, latGCM, iGCM, jGCM) 1455 1454 ! 1456 else1455 ELSE 1457 1456 ALLOCATE(tabijGCM(0)) 1458 1457 ALLOCATE(lonGCM(0), latGCM(0)) 1459 1458 ALLOCATE(iGCM(0), jGCM(0)) 1460 end if1461 else1459 ENDIF 1460 ELSE 1462 1461 ALLOCATE(tabijGCM(0)) 1463 1462 ALLOCATE(lonGCM(0), latGCM(0)) … … 1490 1489 zuthe(i)=0. 1491 1490 zvthe(i)=0. 1492 if(zstd(i).gt.10.)then1491 IF (zstd(i).gt.10.) THEN 1493 1492 zuthe(i)=(1.-zgam(i))*cos(zthe(i)) 1494 1493 zvthe(i)=(1.-zgam(i))*sin(zthe(i)) 1495 endif1494 ENDIF 1496 1495 ENDDO 1497 1496 ENDIF … … 1534 1533 ok_sync_omp=.false. 1535 1534 CALL getin('ok_sync',ok_sync_omp) 1536 callphys_output_open(longitude_deg,latitude_deg,nCFMIP,tabijGCM, &1535 CALL phys_output_open(longitude_deg,latitude_deg,nCFMIP,tabijGCM, & 1537 1536 iGCM,jGCM,lonGCM,latGCM, & 1538 1537 jjmp1,nlevSTD,clevSTD,rlevSTD, dtime,ok_veget, & … … 1608 1607 CALL VTb(VTphysiq) 1609 1608 #endif 1610 END 1609 ENDIF 1611 1610 ! 1612 1611 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 1614 1613 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1615 1614 1616 calliniradia(klon,klev,paprs(1,1:klev+1))1615 CALL iniradia(klon,klev,paprs(1,1:klev+1)) 1617 1616 1618 1617 !$omp single 1619 if (read_climoz >= 1) then1620 callopen_climoz(ncid_climoz, press_climoz)1621 END 1618 IF (read_climoz >= 1) THEN 1619 CALL open_climoz(ncid_climoz, press_climoz) 1620 ENDIF 1622 1621 !$omp end single 1623 1622 ! … … 1700 1699 CALL Rtime(debut) 1701 1700 #endif 1702 END 1701 ENDIF 1703 1702 1704 1703 … … 1760 1759 ql_seri(i,k) = qx(i,k,iliq) 1761 1760 !CR: ATTENTION, on rajoute la variable glace 1762 if (nqo.eq.2) then1761 IF (nqo.eq.2) THEN 1763 1762 qs_seri(i,k) = 0. 1764 else if (nqo.eq.3) then1763 ELSE IF (nqo.eq.3) THEN 1765 1764 qs_seri(i,k) = qx(i,k,isol) 1766 endif1765 ENDIF 1767 1766 ENDDO 1768 1767 ENDDO … … 1808 1807 ENDDO 1809 1808 ! Initialize variables used for diagnostic purpose 1810 if (flag_inhib_tend .ne. 0) callinit_cmp_seri1809 IF (flag_inhib_tend .ne. 0) CALL init_cmp_seri 1811 1810 !IM 1812 1811 IF (ip_ebil_phy.ge.1) THEN … … 1819 1818 ! est egale a la variation de la physique au pas de temps precedent. 1820 1819 ! Donc la somme de ces 2 variations devrait etre nulle. 1821 calldiagphy(cell_area,ztit,ip_ebil_phy &1820 CALL diagphy(cell_area,ztit,ip_ebil_phy & 1822 1821 , zero_v, zero_v, zero_v, zero_v, zero_v & 1823 1822 , zero_v, zero_v, zero_v, ztsol & 1824 1823 , d_h_vcol+d_h_vcol_phy, d_qt, 0. & 1825 1824 , fs_bound, fq_bound ) 1826 END 1825 ENDIF 1827 1826 1828 1827 ! Diagnostiquer la tendance dynamique … … 1935 1934 ELSE 1936 1935 ro3i = int((days_elapsed + jh_cur - jh_1jan) / year_len * 360.) + 1 1937 if(ro3i == 361) ro3i = 3601938 if (read_climoz == 1) then1939 callregr_pr_av(ncid_climoz, (/"tro3"/), julien=ro3i, &1936 IF (ro3i == 361) ro3i = 360 1937 IF (read_climoz == 1) THEN 1938 CALL regr_pr_av(ncid_climoz, (/"tro3"/), julien=ro3i, & 1940 1939 press_in_edg=press_climoz, paprs=paprs, v3=wo) 1941 else1940 ELSE 1942 1941 ! read_climoz == 2 1943 callregr_pr_av(ncid_climoz, (/"tro3 ", &1942 CALL regr_pr_av(ncid_climoz, (/"tro3 ", & 1944 1943 "tro3_daylight"/), julien=ro3i, press_in_edg=press_climoz, & 1945 1944 paprs=paprs, v3=wo) 1946 end if1945 ENDIF 1947 1946 ! Convert from mole fraction of ozone to column density of ozone in a 1948 1947 ! cell, in kDU: 1949 forall(l = 1: read_climoz) wo(:, :, l) = wo(:, :, l) * rmo3 / rmd &1948 FORALL (l = 1: read_climoz) wo(:, :, l) = wo(:, :, l) * rmo3 / rmd & 1950 1949 * zmasse / dobson_u / 1e3 1951 1950 ! (By regridding ozone values for LMDZ only once every 360th of … … 1971 1970 !>jyg 1972 1971 1973 if (iflag_ice_thermo.eq.0) then1972 IF (iflag_ice_thermo.eq.0) THEN 1974 1973 !pas necessaire a priori 1975 1974 … … 1984 1983 d_q_eva(i,k) = zb 1985 1984 1986 else1985 ELSE 1987 1986 1988 1987 !CR: on r\'e-\'evapore eau liquide et glace … … 2002 2001 d_t_eva(i,k) = za 2003 2002 d_q_eva(i,k) = zb 2004 endif2003 ENDIF 2005 2004 2006 2005 ENDDO … … 2012 2011 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2013 2012 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2014 calldiagphy(cell_area,ztit,ip_ebil_phy &2013 CALL diagphy(cell_area,ztit,ip_ebil_phy & 2015 2014 , zero_v, zero_v, zero_v, zero_v, zero_v & 2016 2015 , zero_v, zero_v, zero_v, ztsol & … … 2018 2017 , fs_bound, fq_bound ) 2019 2018 ! 2020 END 2019 ENDIF 2021 2020 2022 2021 ! … … 2027 2026 2028 2027 ! !! jyg 17 Sep 2010 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2029 callymds2ju(year_cur, mth_eq, day_eq,0., jD_eq)2028 CALL ymds2ju(year_cur, mth_eq, day_eq,0., jD_eq) 2030 2029 day_since_equinox = (jD_cur + jH_cur) - jD_eq 2031 2030 ! 2032 2031 ! choix entre calcul de la longitude solaire vraie ou valeur fixee a 2033 2032 ! solarlong0 2034 if (solarlong0<-999.) then2035 if (new_orbit) then2033 IF (solarlong0<-999.) THEN 2034 IF (new_orbit) THEN 2036 2035 ! calcul selon la routine utilisee pour les planetes 2037 callsolarlong(day_since_equinox, zlongi, dist)2038 else2036 CALL solarlong(day_since_equinox, zlongi, dist) 2037 ELSE 2039 2038 ! calcul selon la routine utilisee pour l'AR4 2040 2039 CALL orbite(REAL(days_elapsed+1),zlongi,dist) 2041 endif2042 else2040 ENDIF 2041 ELSE 2043 2042 zlongi=solarlong0 ! longitude solaire vraie 2044 2043 dist=1. ! distance au soleil / moyenne 2045 endif2046 if(prt_level.ge.1) & 2047 2044 ENDIF 2045 2046 IF (prt_level.ge.1) write(lunout,*)'Longitude solaire ',zlongi,solarlong0,dist 2048 2047 2049 2048 … … 2055 2054 ! Cet ensoleillement est sym\'etrique autour de l'\'equateur et 2056 2055 ! non nul aux poles. 2057 IF (abs(solarlong0-1000.)<1.e-4) then2058 callzenang_an(iflag_cycle_diurne.GE.1,jH_cur, &2056 IF (abs(solarlong0-1000.)<1.e-4) THEN 2057 CALL zenang_an(iflag_cycle_diurne.GE.1,jH_cur, & 2059 2058 latitude_deg,longitude_deg,rmu0,fract) 2060 2059 JrNt = 1.0 … … 2109 2108 ENDIF 2110 2109 2111 if (mydebug) then2112 callwritefield_phy('u_seri',u_seri,nbp_lev)2113 callwritefield_phy('v_seri',v_seri,nbp_lev)2114 callwritefield_phy('t_seri',t_seri,nbp_lev)2115 callwritefield_phy('q_seri',q_seri,nbp_lev)2116 endif2110 IF (mydebug) THEN 2111 CALL writefield_phy('u_seri',u_seri,nbp_lev) 2112 CALL writefield_phy('v_seri',v_seri,nbp_lev) 2113 CALL writefield_phy('t_seri',t_seri,nbp_lev) 2114 CALL writefield_phy('q_seri',q_seri,nbp_lev) 2115 ENDIF 2117 2116 2118 2117 !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc … … 2140 2139 2141 2140 2142 if (iflag_pbl/=0) then2141 IF (iflag_pbl/=0) THEN 2143 2142 2144 2143 !jyg+nrlmd< … … 2249 2248 !-------------------------------------------------------------------- 2250 2249 2251 if (mydebug) then 2252 call writefield_phy('u_seri',u_seri,nbp_lev) 2253 call writefield_phy('v_seri',v_seri,nbp_lev) 2254 call writefield_phy('t_seri',t_seri,nbp_lev) 2255 call writefield_phy('q_seri',q_seri,nbp_lev) 2256 endif 2257 2250 IF (mydebug) THEN 2251 CALL writefield_phy('u_seri',u_seri,nbp_lev) 2252 CALL writefield_phy('v_seri',v_seri,nbp_lev) 2253 CALL writefield_phy('t_seri',t_seri,nbp_lev) 2254 CALL writefield_phy('q_seri',q_seri,nbp_lev) 2255 ENDIF 2258 2256 2259 2257 !albedo SB >>> … … 2262 2260 falb1=0. 2263 2261 falb2=0. 2264 select case(nsw)2265 case(2)2262 SELECT CASE(nsw) 2263 CASE(2) 2266 2264 albsol1=albsol_dir(:,1) 2267 2265 albsol2=albsol_dir(:,2) 2268 2266 falb1=falb_dir(:,1,:) 2269 2267 falb2=falb_dir(:,2,:) 2270 case(4)2268 CASE(4) 2271 2269 albsol1=albsol_dir(:,1) 2272 2270 albsol2=albsol_dir(:,2)*SFRWL(2)+albsol_dir(:,3)*SFRWL(3) & … … 2277 2275 +falb_dir(:,4,:)*SFRWL(4) 2278 2276 falb2=falb2/(SFRWL(2)+SFRWL(3)+SFRWL(4)) 2279 case(6)2277 CASE(6) 2280 2278 albsol1=albsol_dir(:,1)*SFRWL(1)+albsol_dir(:,2)*SFRWL(2) & 2281 2279 +albsol_dir(:,3)*SFRWL(3) … … 2290 2288 +falb_dir(:,6,:)*SFRWL(6) 2291 2289 falb2=falb2/(SFRWL(4)+SFRWL(5)+SFRWL(6)) 2292 end select2290 END SELECt 2293 2291 !albedo SB <<< 2294 2292 … … 2303 2301 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2304 2302 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2305 calldiagphy(cell_area,ztit,ip_ebil_phy &2303 CALL diagphy(cell_area,ztit,ip_ebil_phy & 2306 2304 , zero_v, zero_v, zero_v, zero_v, sens & 2307 2305 , evap , zero_v, zero_v, ztsol & 2308 2306 , d_h_vcol, d_qt, d_ec & 2309 2307 , fs_bound, fq_bound ) 2310 END 2308 ENDIF 2311 2309 2312 2310 ENDIF … … 2335 2333 ENDDO 2336 2334 2337 if (prt_level.ge.1) then2335 IF (prt_level.ge.1) THEN 2338 2336 write(lunout,*) 'L qsat (g/kg) avant clouds_gno' 2339 2337 write(lunout,'(i4,f15.4)') (k,1000.*zqsat(igout,k),k=1,klev) 2340 endif2338 ENDIF 2341 2339 ! 2342 2340 ! Appeler la convection (au choix) … … 2372 2370 DO i = 1, klon 2373 2371 omega(i,k) = RG*flxmass_w(i,k) / cell_area(i) 2374 END DO 2375 END DO 2376 if (prt_level.ge.1) write(lunout,*) 'omega(igout, :) = ', & 2372 ENDDO 2373 ENDDO 2374 2375 IF (prt_level.ge.1) write(lunout,*) 'omega(igout, :) = ', & 2377 2376 omega(igout, :) 2378 2377 … … 2408 2407 !ajout pour la parametrisation des poches froides: calcul de 2409 2408 !t_w et t_x: si pas de poches froides, t_w=t_x=t_seri 2410 if (iflag_wake>=1) then 2411 do k=1,klev 2412 do i=1,klon 2413 t_w(i,k) = t_seri(i,k) & 2414 +(1-wake_s(i))*wake_deltat(i,k) 2415 q_w(i,k) = q_seri(i,k) & 2416 +(1-wake_s(i))*wake_deltaq(i,k) 2417 t_x(i,k) = t_seri(i,k) & 2418 -wake_s(i)*wake_deltat(i,k) 2419 q_x(i,k) = q_seri(i,k) & 2420 -wake_s(i)*wake_deltaq(i,k) 2421 enddo 2422 enddo 2423 else 2424 t_w(:,:) = t_seri(:,:) 2409 IF (iflag_wake>=1) THEN 2410 DO k=1,klev 2411 DO i=1,klon 2412 t_w(i,k) = t_seri(i,k) + (1-wake_s(i))*wake_deltat(i,k) 2413 q_w(i,k) = q_seri(i,k) + (1-wake_s(i))*wake_deltaq(i,k) 2414 t_x(i,k) = t_seri(i,k) - wake_s(i)*wake_deltat(i,k) 2415 q_x(i,k) = q_seri(i,k) - wake_s(i)*wake_deltaq(i,k) 2416 ENDDO 2417 ENDDO 2418 ELSE 2419 t_w(:,:) = t_seri(:,:) 2425 2420 q_w(:,:) = q_seri(:,:) 2426 2421 t_x(:,:) = t_seri(:,:) 2427 2422 q_x(:,:) = q_seri(:,:) 2428 endif2423 ENDIF 2429 2424 ! 2430 2425 !jyg< … … 2495 2490 ELSE 2496 2491 nbtr_tmp=nbtr 2497 END 2492 ENDIF 2498 2493 !jyg iflag_con est dans clesphys 2499 2494 !c CALL concvl (iflag_con,iflag_clos, … … 2528 2523 pmfu(:,:)=upwd(:,:)+dnwd(:,:) 2529 2524 2530 doi = 1, klon2531 if(iflagctrl(i).le.1) itau_con(i)=itau_con(i)+12532 enddo2525 DO i = 1, klon 2526 IF (iflagctrl(i).le.1) itau_con(i)=itau_con(i)+1 2527 ENDDO 2533 2528 ! 2534 2529 !jyg< … … 2582 2577 clwcon0(:,:)=fact_cldcon*clwcon0(:,:) 2583 2578 IF (iflag_cld_cv == 0) THEN 2584 callclouds_gno &2579 CALL clouds_gno & 2585 2580 (klon,klev,q_seri,zqsat,clwcon0,ptconv,ratqsc,rnebcon0) 2586 2581 ELSE 2587 callclouds_bigauss &2582 CALL clouds_bigauss & 2588 2583 (klon,klev,q_seri,zqsat,qtc_cv,sigt_cv,ptconv,ratqsc,rnebcon0) 2589 2584 ENDIF … … 2605 2600 ema_pct(i) = paprs(i,itop_con(i)+1) 2606 2601 2607 if (itop_con(i).gt.klev-3) then2608 if(prt_level >= 9) then2602 IF (itop_con(i).gt.klev-3) THEN 2603 IF (prt_level >= 9) THEN 2609 2604 write(lunout,*)'La convection monte trop haut ' 2610 2605 write(lunout,*)'itop_con(,',i,',)=',itop_con(i) 2611 endif2612 endif2606 ENDIF 2607 ENDIF 2613 2608 ENDDO 2614 2609 ELSE IF (iflag_con.eq.0) THEN … … 2626 2621 ELSE 2627 2622 WRITE(lunout,*) "iflag_con non-prevu", iflag_con 2628 callabort_physic("physiq", "", 1)2623 CALL abort_physic("physiq", "", 1) 2629 2624 ENDIF 2630 2625 … … 2637 2632 !------------------------------------------------------------------------- 2638 2633 2639 if (mydebug) then2640 callwritefield_phy('u_seri',u_seri,nbp_lev)2641 callwritefield_phy('v_seri',v_seri,nbp_lev)2642 callwritefield_phy('t_seri',t_seri,nbp_lev)2643 callwritefield_phy('q_seri',q_seri,nbp_lev)2644 endif2634 IF (mydebug) THEN 2635 CALL writefield_phy('u_seri',u_seri,nbp_lev) 2636 CALL writefield_phy('v_seri',v_seri,nbp_lev) 2637 CALL writefield_phy('t_seri',t_seri,nbp_lev) 2638 CALL writefield_phy('q_seri',q_seri,nbp_lev) 2639 ENDIF 2645 2640 2646 2641 !IM … … 2650 2645 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2651 2646 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2652 calldiagphy(cell_area,ztit,ip_ebil_phy &2647 CALL diagphy(cell_area,ztit,ip_ebil_phy & 2653 2648 , zero_v, zero_v, zero_v, zero_v, zero_v & 2654 2649 , zero_v, rain_con, snow_con, ztsol & 2655 2650 , d_h_vcol, d_qt, d_ec & 2656 2651 , fs_bound, fq_bound ) 2657 END 2652 ENDIF 2658 2653 ! 2659 2654 IF (check) THEN … … 2705 2700 ! froides 2706 2701 ! 2707 if (iflag_wake>=1) then2702 IF (iflag_wake>=1) THEN 2708 2703 DO k=1,klev 2709 2704 DO i=1,klon … … 2744 2739 ! 2745 2740 !calcul caracteristiques de la poche froide 2746 callcalWAKE (iflag_wake_tend, paprs, pplay, dtime, &2741 CALL calWAKE (iflag_wake_tend, paprs, pplay, dtime, & 2747 2742 t_seri, q_seri, omega, & 2748 2743 dt_dwn, dq_dwn, M_dwn, M_up, & … … 2775 2770 ENDIF ! (iflag_wake_tend .GT. 0.) 2776 2771 2777 endif! (iflag_wake>=1)2772 ENDIF ! (iflag_wake>=1) 2778 2773 ! 2779 2774 !=================================================================== … … 2784 2779 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2785 2780 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2786 calldiagphy(cell_area,ztit,ip_ebil_phy &2781 CALL diagphy(cell_area,ztit,ip_ebil_phy & 2787 2782 , zero_v, zero_v, zero_v, zero_v, zero_v & 2788 2783 , zero_v, zero_v, zero_v, ztsol & 2789 2784 , d_h_vcol, d_qt, d_ec & 2790 2785 , fs_bound, fq_bound ) 2791 END 2786 ENDIF 2792 2787 2793 2788 ! print*,'apres callwake iflag_cld_th=', iflag_cld_th … … 2797 2792 !=================================================================== 2798 2793 ! 2799 callstratocu_if(klon,klev,pctsrf,paprs, pplay,t_seri &2794 CALL stratocu_if(klon,klev,pctsrf,paprs, pplay,t_seri & 2800 2795 ,seuil_inversion,weak_inversion,dthmin) 2801 2796 … … 2814 2809 ! detr_therm(:,:)=0. 2815 2810 ! 2816 IF (prt_level>9)WRITE(lunout,*) &2811 IF (prt_level>9) WRITE(lunout,*) & 2817 2812 'AVANT LA CONVECTION SECHE , iflag_thermals=' & 2818 2813 ,iflag_thermals,' nsplit_thermals=',nsplit_thermals 2819 if(iflag_thermals<0) then2814 IF (iflag_thermals<0) THEN 2820 2815 ! Rien 2821 2816 ! ==== 2822 IF (prt_level>9)WRITE(lunout,*)'pas de convection seche'2823 2824 2825 else2817 IF (prt_level>9) WRITE(lunout,*)'pas de convection seche' 2818 2819 2820 ELSE 2826 2821 2827 2822 ! Thermiques 2828 2823 ! ========== 2829 IF (prt_level>9)WRITE(lunout,*)'JUSTE AVANT , iflag_thermals=' &2824 IF (prt_level>9) WRITE(lunout,*)'JUSTE AVANT , iflag_thermals=' & 2830 2825 ,iflag_thermals,' nsplit_thermals=',nsplit_thermals 2831 2826 … … 2842 2837 !cc fin nrlmd le 10/04/2012 2843 2838 2844 if (iflag_thermals>=1) then2839 IF (iflag_thermals>=1) THEN 2845 2840 !jyg< 2846 2841 IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN … … 2866 2861 ENDIF 2867 2862 !>jyg 2868 callcalltherm(pdtphys &2863 CALL calltherm(pdtphys & 2869 2864 ,pplay,paprs,pphi,weak_inversion & 2870 2865 ! ,u_seri,v_seri,t_seri,q_seri,zqsat,debut & !jyg … … 2932 2927 ! ------------------------------------------------------------------- 2933 2928 2934 doi=1,klon2929 DO i=1,klon 2935 2930 ! zmax_th(i)=pphi(i,lmax_th(i))/rg 2936 2931 !CR:04/05/12:correction calcul zmax 2937 2932 zmax_th(i)=zmax0(i) 2938 enddo 2939 2940 endif 2941 2933 ENDDO 2934 2935 ENDIF 2942 2936 2943 2937 ! Ajustement sec … … 2948 2942 ! Dans le cas contraire, on demarre au niveau 1. 2949 2943 2950 if (iflag_thermals>=13.or.iflag_thermals<=0) then2951 2952 if(iflag_thermals.eq.0) then2953 IF (prt_level>9)WRITE(lunout,*)'ajsec'2944 IF (iflag_thermals>=13.or.iflag_thermals<=0) THEN 2945 2946 IF (iflag_thermals.eq.0) THEN 2947 IF (prt_level>9) WRITE(lunout,*)'ajsec' 2954 2948 limbas(:)=1 2955 else2949 ELSE 2956 2950 limbas(:)=lmax_th(:) 2957 endif2951 ENDIF 2958 2952 2959 2953 ! Attention : le call ajsec_convV2 n'est maintenu que momentanneement … … 2963 2957 ! non nulles numeriquement pour des mailles non concernees. 2964 2958 2965 if (iflag_thermals==0) then2959 IF (iflag_thermals==0) THEN 2966 2960 ! Calling adjustment alone (but not the thermal plume model) 2967 2961 CALL ajsec_convV2(paprs, pplay, t_seri,q_seri & 2968 2962 , d_t_ajsb, d_q_ajsb) 2969 else if (iflag_thermals>0) then2963 ELSE IF (iflag_thermals>0) THEN 2970 2964 ! Calling adjustment above the top of thermal plumes 2971 2965 CALL ajsec(paprs, pplay, t_seri,q_seri,limbas & 2972 2966 , d_t_ajsb, d_q_ajsb) 2973 endif2967 ENDIF 2974 2968 2975 2969 !-------------------------------------------------------------------- … … 2982 2976 !--------------------------------------------------------------------- 2983 2977 2984 endif2985 2986 endif2978 ENDIF 2979 2980 ENDIF 2987 2981 ! 2988 2982 !=================================================================== … … 2993 2987 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2994 2988 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2995 calldiagphy(cell_area,ztit,ip_ebil_phy &2989 CALL diagphy(cell_area,ztit,ip_ebil_phy & 2996 2990 , zero_v, zero_v, zero_v, zero_v, zero_v & 2997 2991 , zero_v, zero_v, zero_v, ztsol & 2998 2992 , d_h_vcol, d_qt, d_ec & 2999 2993 , fs_bound, fq_bound ) 3000 END 2994 ENDIF 3001 2995 3002 2996 … … 3083 3077 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3084 3078 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3085 calldiagphy(cell_area,ztit,ip_ebil_phy &3079 CALL diagphy(cell_area,ztit,ip_ebil_phy & 3086 3080 , zero_v, zero_v, zero_v, zero_v, zero_v & 3087 3081 , zero_v, rain_lsc, snow_lsc, ztsol & 3088 3082 , d_h_vcol, d_qt, d_ec & 3089 3083 , fs_bound, fq_bound ) 3090 END 3091 3092 if (mydebug) then3093 callwritefield_phy('u_seri',u_seri,nbp_lev)3094 callwritefield_phy('v_seri',v_seri,nbp_lev)3095 callwritefield_phy('t_seri',t_seri,nbp_lev)3096 callwritefield_phy('q_seri',q_seri,nbp_lev)3097 endif3084 ENDIF 3085 3086 IF (mydebug) THEN 3087 CALL writefield_phy('u_seri',u_seri,nbp_lev) 3088 CALL writefield_phy('v_seri',v_seri,nbp_lev) 3089 CALL writefield_phy('t_seri',t_seri,nbp_lev) 3090 CALL writefield_phy('q_seri',q_seri,nbp_lev) 3091 ENDIF 3098 3092 3099 3093 ! … … 3110 3104 ! print*,'avant calcul de la pseudo precip ' 3111 3105 ! print*,'iflag_cld_th',iflag_cld_th 3112 if (iflag_cld_th.eq.-1) then3106 IF (iflag_cld_th.eq.-1) THEN 3113 3107 rain_tiedtke=rain_con 3114 else3108 ELSE 3115 3109 ! print*,'calcul de la pseudo precip ' 3116 3110 rain_tiedtke=0. 3117 3111 ! print*,'calcul de la pseudo precip 0' 3118 dok=1,klev3119 doi=1,klon3120 if (d_q_con(i,k).lt.0.) then3112 DO k=1,klev 3113 DO i=1,klon 3114 IF (d_q_con(i,k).lt.0.) THEN 3121 3115 rain_tiedtke(i)=rain_tiedtke(i)-d_q_con(i,k)/pdtphys & 3122 3116 *(paprs(i,k)-paprs(i,k+1))/rg 3123 endif3124 enddo3125 enddo3126 endif3117 ENDIF 3118 ENDDO 3119 ENDDO 3120 ENDIF 3127 3121 ! 3128 3122 ! call dump2d(iim,jjm,rain_tiedtke(2:klon-1),'PSEUDO PRECIP ') … … 3148 3142 ! facttemps 3149 3143 facteur = pdtphys *facttemps 3150 dok=1,klev3151 doi=1,klon3144 DO k=1,klev 3145 DO i=1,klon 3152 3146 rnebcon(i,k)=rnebcon(i,k)*facteur 3153 if (rnebcon0(i,k)*clwcon0(i,k).gt.rnebcon(i,k)*clwcon(i,k)) & 3154 then 3147 IF (rnebcon0(i,k)*clwcon0(i,k).GT.rnebcon(i,k)*clwcon(i,k)) THEN 3155 3148 rnebcon(i,k)=rnebcon0(i,k) 3156 3149 clwcon(i,k)=clwcon0(i,k) 3157 endif3158 enddo3159 enddo3150 ENDIF 3151 ENDDO 3152 ENDDO 3160 3153 3161 3154 ! On prend la somme des fractions nuageuses et des contenus en eau 3162 3155 3163 if (iflag_cld_th>=5) then3164 3165 dok=1,klev3156 IF (iflag_cld_th>=5) THEN 3157 3158 DO k=1,klev 3166 3159 ptconvth(:,k)=fm_therm(:,k+1)>0. 3167 enddo3168 3169 if (iflag_coupl==4) then3160 ENDDO 3161 3162 IF (iflag_coupl==4) THEN 3170 3163 3171 3164 ! Dans le cas iflag_coupl==4, on prend la somme des convertures 3172 3165 ! convectives et lsc dans la partie des thermiques 3173 3166 ! Le controle par iflag_coupl est peut etre provisoire. 3174 dok=1,klev3175 doi=1,klon3176 if (ptconv(i,k).and.ptconvth(i,k)) then3167 DO k=1,klev 3168 DO i=1,klon 3169 IF (ptconv(i,k).AND.ptconvth(i,k)) THEN 3177 3170 cldliq(i,k)=cldliq(i,k)+rnebcon(i,k)*clwcon(i,k) 3178 3171 cldfra(i,k)=min(cldfra(i,k)+rnebcon(i,k),1.) 3179 else if (ptconv(i,k)) then3172 ELSE IF (ptconv(i,k)) THEN 3180 3173 cldfra(i,k)=rnebcon(i,k) 3181 3174 cldliq(i,k)=rnebcon(i,k)*clwcon(i,k) 3182 endif3183 enddo3184 enddo3185 3186 else if (iflag_coupl==5) then3187 dok=1,klev3188 doi=1,klon3175 ENDIF 3176 ENDDO 3177 ENDDO 3178 3179 ELSE IF (iflag_coupl==5) THEN 3180 DO k=1,klev 3181 DO i=1,klon 3189 3182 cldfra(i,k)=min(cldfra(i,k)+rnebcon(i,k),1.) 3190 3183 cldliq(i,k)=cldliq(i,k)+rnebcon(i,k)*clwcon(i,k) 3191 enddo3192 enddo3193 3194 else3184 ENDDO 3185 ENDDO 3186 3187 ELSE 3195 3188 3196 3189 ! Si on est sur un point touche par la convection … … 3202 3195 ! definition des points sur lesquels ls thermiques sont actifs 3203 3196 3204 dok=1,klev3205 doi=1,klon3206 if (ptconv(i,k).and. .not. ptconvth(i,k)) then3197 DO k=1,klev 3198 DO i=1,klon 3199 IF (ptconv(i,k).AND. .NOT.ptconvth(i,k)) THEN 3207 3200 cldfra(i,k)=rnebcon(i,k) 3208 3201 cldliq(i,k)=rnebcon(i,k)*clwcon(i,k) 3209 endif3210 enddo3211 enddo3212 3213 endif3214 3215 else3202 ENDIF 3203 ENDDO 3204 ENDDO 3205 3206 ENDIF 3207 3208 ELSE 3216 3209 3217 3210 ! Ancienne version 3218 3211 cldfra(:,:)=min(max(cldfra(:,:),rnebcon(:,:)),1.) 3219 3212 cldliq(:,:)=cldliq(:,:)+rnebcon(:,:)*clwcon(:,:) 3220 endif3213 ENDIF 3221 3214 3222 3215 ENDIF … … 3256 3249 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3257 3250 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3258 calldiagphy(cell_area,ztit,ip_ebil_phy &3251 CALL diagphy(cell_area,ztit,ip_ebil_phy & 3259 3252 , zero_v, zero_v, zero_v, zero_v, zero_v & 3260 3253 , zero_v, zero_v, zero_v, ztsol & 3261 3254 , d_h_vcol, d_qt, d_ec & 3262 3255 , fs_bound, fq_bound ) 3263 END 3256 ENDIF 3264 3257 ! 3265 3258 ! Calculer l'humidite relative pour diagnostique … … 3319 3312 calday = REAL(days_elapsed + 1) + jH_cur 3320 3313 3321 callchemtime(itap+itau_phy-1, date0, dtime, itap)3314 CALL chemtime(itap+itau_phy-1, date0, dtime, itap) 3322 3315 IF (config_inca == 'aero' .OR. config_inca == 'aeNP') THEN 3323 3316 CALL AEROSOL_METEO_CALC( & … … 3325 3318 prfl,psfl,pctsrf,cell_area, & 3326 3319 latitude_deg,longitude_deg,u10m,v10m) 3327 END 3320 ENDIF 3328 3321 3329 3322 zxsnow_dummy(:) = 0.0 … … 3368 3361 CALL VTb(VTphysiq) 3369 3362 #endif 3370 END 3363 ENDIF !type_trac = inca 3371 3364 3372 3365 … … 3393 3386 IF (aerosol_couple .AND. config_inca == 'aero' ) THEN 3394 3387 abort_message='config_inca=aero et rrtm=1 impossible' 3395 callabort_physic(modname,abort_message,1)3388 CALL abort_physic(modname,abort_message,1) 3396 3389 ELSE 3397 3390 ! … … 3428 3421 abort_message='Only NSW=2 or 6 are possible with ' & 3429 3422 // 'aerosols and iflag_rrtm=1' 3430 callabort_physic(modname,abort_message,1)3423 CALL abort_physic(modname,abort_message,1) 3431 3424 ENDIF 3432 3425 … … 3438 3431 abort_message='You should compile with -rrtm if running ' & 3439 3432 // 'with iflag_rrtm=1' 3440 callabort_physic(modname,abort_message,1)3433 CALL abort_physic(modname,abort_message,1) 3441 3434 #endif 3442 3435 ! … … 3497 3490 #ifdef CPP_RRTM 3498 3491 #ifdef CPP_StratAer 3492 !--compute stratospheric mask 3493 CALL stratosphere_mask(t_seri, pplay, latitude_deg) 3499 3494 !--interactive strat aerosols 3500 3495 CALL calcaerosolstrato_rrtm(pplay,t_seri,paprs,debut) … … 3510 3505 mass_solu_aero(:,:) = ccm(:,:,1) 3511 3506 mass_solu_aero_pi(:,:) = ccm(:,:,2) 3512 END 3507 ENDIF 3513 3508 3514 3509 IF (ok_newmicro) then … … 3619 3614 ENDIF 3620 3615 3621 if (mydebug) then3622 callwritefield_phy('u_seri',u_seri,nbp_lev)3623 callwritefield_phy('v_seri',v_seri,nbp_lev)3624 callwritefield_phy('t_seri',t_seri,nbp_lev)3625 callwritefield_phy('q_seri',q_seri,nbp_lev)3626 endif3616 IF (mydebug) THEN 3617 CALL writefield_phy('u_seri',u_seri,nbp_lev) 3618 CALL writefield_phy('v_seri',v_seri,nbp_lev) 3619 CALL writefield_phy('t_seri',t_seri,nbp_lev) 3620 CALL writefield_phy('q_seri',q_seri,nbp_lev) 3621 ENDIF 3627 3622 3628 3623 ! … … 3632 3627 IF (iflag_radia .ge. 2) THEN 3633 3628 zsav_tsol (:) = zxtsol(:) 3634 callperturb_radlwsw(zxtsol,iflag_radia)3629 CALL perturb_radlwsw(zxtsol,iflag_radia) 3635 3630 ENDIF 3636 3631 … … 3721 3716 !IM Par defaut on a les taux perturbes egaux aux taux actuels 3722 3717 ! 3723 if (ok_4xCO2atm) then3724 if (RCO2_per.NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR.&3725 3726 3718 IF (ok_4xCO2atm) THEN 3719 IF (RCO2_per.NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR. & 3720 RN2O_per.NE.RN2O_act.OR.RCFC11_per.NE.RCFC11_act.OR. & 3721 RCFC12_per.NE.RCFC12_act) THEN 3727 3722 ! 3728 3723 RCO2 = RCO2_per … … 3792 3787 PRINT *,'>>>> heat et cool mis a zero ' 3793 3788 PRINT *,'--------------------------------------------------' 3794 END 3789 ENDIF 3795 3790 heat=0. 3796 3791 cool=0. … … 3804 3799 lwdn=0. 3805 3800 lwdn0=0. 3806 END 3801 ENDIF 3807 3802 3808 3803 ! … … 3813 3808 radsol=solsw*swradcorr+sollw 3814 3809 3815 if (ok_4xCO2atm) then3810 IF (ok_4xCO2atm) THEN 3816 3811 radsolp=solswp*swradcorr+sollwp 3817 endif3812 ENDIF 3818 3813 3819 3814 ! … … 3833 3828 3834 3829 ! 3835 if (mydebug) then3836 callwritefield_phy('u_seri',u_seri,nbp_lev)3837 callwritefield_phy('v_seri',v_seri,nbp_lev)3838 callwritefield_phy('t_seri',t_seri,nbp_lev)3839 callwritefield_phy('q_seri',q_seri,nbp_lev)3840 endif3830 IF (mydebug) THEN 3831 CALL writefield_phy('u_seri',u_seri,nbp_lev) 3832 CALL writefield_phy('v_seri',v_seri,nbp_lev) 3833 CALL writefield_phy('t_seri',t_seri,nbp_lev) 3834 CALL writefield_phy('q_seri',q_seri,nbp_lev) 3835 ENDIF 3841 3836 3842 3837 !IM … … 3846 3841 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3847 3842 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3848 calldiagphy(cell_area,ztit,ip_ebil_phy &3843 CALL diagphy(cell_area,ztit,ip_ebil_phy & 3849 3844 , topsw, toplw, solsw, sollw, zero_v & 3850 3845 , zero_v, zero_v, zero_v, ztsol & 3851 3846 , d_h_vcol, d_qt, d_ec & 3852 3847 , fs_bound, fq_bound ) 3853 END 3848 ENDIF 3854 3849 ! 3855 3850 ! … … 3919 3914 ENDIF ! fin de test sur ok_orodr 3920 3915 ! 3921 if (mydebug) then3922 callwritefield_phy('u_seri',u_seri,nbp_lev)3923 callwritefield_phy('v_seri',v_seri,nbp_lev)3924 callwritefield_phy('t_seri',t_seri,nbp_lev)3925 callwritefield_phy('q_seri',q_seri,nbp_lev)3926 endif3916 IF (mydebug) THEN 3917 CALL writefield_phy('u_seri',u_seri,nbp_lev) 3918 CALL writefield_phy('v_seri',v_seri,nbp_lev) 3919 CALL writefield_phy('t_seri',t_seri,nbp_lev) 3920 CALL writefield_phy('q_seri',q_seri,nbp_lev) 3921 ENDIF 3927 3922 3928 3923 IF (ok_orolf) THEN … … 4003 3998 ENDIF 4004 3999 4005 if (ok_gwd_rando) then4006 callFLOTT_GWD_rando(DTIME, pplay, t_seri, u_seri, v_seri, &4000 IF (ok_gwd_rando) THEN 4001 CALL FLOTT_GWD_rando(DTIME, pplay, t_seri, u_seri, v_seri, & 4007 4002 rain_fall + snow_fall, zustr_gwd_rando, zvstr_gwd_rando, & 4008 4003 du_gwd_rando, dv_gwd_rando, east_gwstress, west_gwstress) … … 4017 4012 * (paprs(:, k)-paprs(:, k+1))/rg 4018 4013 ENDDO 4019 end if4014 ENDIF 4020 4015 4021 4016 ! STRESS NECESSAIRES: TOUTE LA PHYSIQUE 4022 4017 4023 if (mydebug) then4024 callwritefield_phy('u_seri',u_seri,nbp_lev)4025 callwritefield_phy('v_seri',v_seri,nbp_lev)4026 callwritefield_phy('t_seri',t_seri,nbp_lev)4027 callwritefield_phy('q_seri',q_seri,nbp_lev)4028 endif4018 IF (mydebug) THEN 4019 CALL writefield_phy('u_seri',u_seri,nbp_lev) 4020 CALL writefield_phy('v_seri',v_seri,nbp_lev) 4021 CALL writefield_phy('t_seri',t_seri,nbp_lev) 4022 CALL writefield_phy('q_seri',q_seri,nbp_lev) 4023 ENDIF 4029 4024 4030 4025 DO i = 1, klon … … 4059 4054 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 4060 4055 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 4061 calldiagphy(cell_area,ztit,ip_ebil_phy &4056 CALL diagphy(cell_area,ztit,ip_ebil_phy & 4062 4057 , zero_v, zero_v, zero_v, zero_v, zero_v & 4063 4058 , zero_v, zero_v, zero_v, ztsol & 4064 4059 , d_h_vcol, d_qt, d_ec & 4065 4060 , fs_bound, fq_bound ) 4066 END 4061 ENDIF 4067 4062 4068 4063 !DC Calcul de la tendance due au methane … … 4072 4067 CALL add_phys_tend(du0, dv0, dt0, d_q_ch4*dtime, dql0, dqi0, paprs, & 4073 4068 'q_ch4', abortphy,flag_inhib_tend) 4074 END 4069 ENDIF 4075 4070 ! 4076 4071 ! … … 4091 4086 ! print*,'Dans physiq.F avant appel cosp ref_liq,ref_ice=', 4092 4087 ! s ref_liq,ref_ice 4093 callphys_cosp(itap,dtime,freq_cosp, &4088 CALL phys_cosp(itap,dtime,freq_cosp, & 4094 4089 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, & 4095 4090 ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, & … … 4121 4116 4122 4117 IF (itap.eq.1.or.MOD(itap,NINT(freq_airs/dtime)).EQ.0) THEN 4123 write(*,*) 'je vais appeler simu_airs, ok_airs, freq_airs=', & 4124 & ok_airs, freq_airs 4125 call simu_airs(itap,rneb, t_seri, cldemi, fiwc, ref_ice, pphi, pplay, paprs,& 4126 & map_prop_hc,map_prop_hist,& 4127 & map_emis_hc,map_iwp_hc,map_deltaz_hc,map_pcld_hc,map_tcld_hc,& 4128 & map_emis_Cb,map_pcld_Cb,map_tcld_Cb,& 4129 & map_emis_ThCi,map_pcld_ThCi,map_tcld_ThCi,& 4130 & map_emis_Anv,map_pcld_Anv,map_tcld_Anv,& 4131 & map_emis_hist,map_iwp_hist,map_deltaz_hist,map_rad_hist,& 4132 & map_ntot,map_hc,map_hist,& 4133 & map_Cb,map_ThCi,map_Anv,& 4134 & alt_tropo ) 4118 write(*,*) 'je vais appeler simu_airs, ok_airs, freq_airs=', ok_airs, freq_airs 4119 CALL simu_airs(itap,rneb, t_seri, cldemi, fiwc, ref_ice, pphi, pplay, paprs,& 4120 & map_prop_hc,map_prop_hist,& 4121 & map_emis_hc,map_iwp_hc,map_deltaz_hc,map_pcld_hc,map_tcld_hc,& 4122 & map_emis_Cb,map_pcld_Cb,map_tcld_Cb,& 4123 & map_emis_ThCi,map_pcld_ThCi,map_tcld_ThCi,& 4124 & map_emis_Anv,map_pcld_Anv,map_tcld_Anv,& 4125 & map_emis_hist,map_iwp_hist,map_deltaz_hist,map_rad_hist,& 4126 & map_ntot,map_hc,map_hist,& 4127 & map_Cb,map_ThCi,map_Anv,& 4128 & alt_tropo ) 4135 4129 ENDIF 4136 4130 … … 4151 4145 ELSE 4152 4146 sh_in(:,:) = qx(:,:,ivap) 4153 END 4147 ENDIF 4154 4148 4155 4149 #ifdef CPP_Dust … … 4171 4165 #else 4172 4166 4173 callphytrac ( &4167 CALL phytrac ( & 4174 4168 itap, days_elapsed+1, jH_cur, debut, & 4175 4169 lafin, dtime, u, v, t, & … … 4201 4195 IF (prt_level.ge.9) & 4202 4196 print*,'Attention on met a 0 les thermiques pour phystoke' 4203 callphystokenc ( &4197 CALL phystokenc ( & 4204 4198 nlon,klev,pdtphys,longitude_deg,latitude_deg, & 4205 4199 t,pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, & … … 4255 4249 ! Donc la somme de ces 2 variations devrait etre nulle. 4256 4250 4257 calldiagphy(cell_area,ztit,ip_ebil_phy &4251 CALL diagphy(cell_area,ztit,ip_ebil_phy & 4258 4252 , topsw, toplw, solsw, sollw, sens & 4259 4253 , evap, rain_fall, snow_fall, ztsol & … … 4263 4257 d_h_vcol_phy=d_h_vcol 4264 4258 ! 4265 END 4259 ENDIF 4266 4260 ! 4267 4261 !======================================================================= … … 4326 4320 CALL VTb(VTphysiq) 4327 4321 #endif 4328 END 4322 ENDIF 4329 4323 4330 4324 … … 4336 4330 ENDIF 4337 4331 ! 4338 if (mydebug) then4339 callwritefield_phy('u_seri',u_seri,nbp_lev)4340 callwritefield_phy('v_seri',v_seri,nbp_lev)4341 callwritefield_phy('t_seri',t_seri,nbp_lev)4342 callwritefield_phy('q_seri',q_seri,nbp_lev)4343 endif4332 IF (mydebug) THEN 4333 CALL writefield_phy('u_seri',u_seri,nbp_lev) 4334 CALL writefield_phy('v_seri',v_seri,nbp_lev) 4335 CALL writefield_phy('t_seri',t_seri,nbp_lev) 4336 CALL writefield_phy('q_seri',q_seri,nbp_lev) 4337 ENDIF 4344 4338 4345 4339 DO k = 1, klev … … 4351 4345 d_qx(i,k,iliq) = ( ql_seri(i,k) - qx(i,k,iliq) ) / dtime 4352 4346 !CR: on ajoute le contenu en glace 4353 if (nqo.eq.3) then4347 IF (nqo.eq.3) THEN 4354 4348 d_qx(i,k,isol) = ( qs_seri(i,k) - qx(i,k,isol) ) / dtime 4355 endif4349 ENDIF 4356 4350 ENDDO 4357 4351 ENDDO … … 4420 4414 !========================================================================== 4421 4415 4422 if (prt_level.ge.1) then4416 IF (prt_level.ge.1) THEN 4423 4417 write(lunout,*) 'FIN DE PHYSIQ !!!!!!!!!!!!!!!!!!!!' 4424 4418 write(lunout,*) & … … 4429 4423 pctsrf(igout,is_sic) 4430 4424 write(lunout,*) 'd_t_dyn,d_t_con,d_t_lsc,d_t_ajsb,d_t_ajs,d_t_eva' 4431 dok=1,klev4425 DO k=1,klev 4432 4426 write(lunout,*) d_t_dyn(igout,k),d_t_con(igout,k), & 4433 4427 d_t_lsc(igout,k),d_t_ajsb(igout,k),d_t_ajs(igout,k), & 4434 4428 d_t_eva(igout,k) 4435 enddo4429 ENDDO 4436 4430 write(lunout,*) 'cool,heat' 4437 dok=1,klev4431 DO k=1,klev 4438 4432 write(lunout,*) cool(igout,k),heat(igout,k) 4439 enddo4433 ENDDO 4440 4434 4441 4435 !jyg< (En attendant de statuer sur le sort de d_t_oli) … … 4446 4440 !jyg! enddo 4447 4441 write(lunout,*) 'd_t_vdf,d_t_oro,d_t_lif,d_t_ec' 4448 dok=1,klev4442 DO k=1,klev 4449 4443 write(lunout,*) d_t_vdf(igout,k), & 4450 4444 d_t_oro(igout,k),d_t_lif(igout,k),d_t_ec(igout,k) 4451 enddo4445 ENDDO 4452 4446 !>jyg 4453 4447 4454 4448 write(lunout,*) 'd_ps ',d_ps(igout) 4455 4449 write(lunout,*) 'd_u, d_v, d_t, d_qx1, d_qx2 ' 4456 dok=1,klev4450 DO k=1,klev 4457 4451 write(lunout,*) d_u(igout,k),d_v(igout,k),d_t(igout,k), & 4458 4452 d_qx(igout,k,1),d_qx(igout,k,2) 4459 enddo 4460 endif 4461 4462 !========================================================================== 4453 ENDDO 4454 ENDIF 4463 4455 4464 4456 !============================================================ … … 4501 4493 !============================================================= 4502 4494 4503 if (iflag_thermals>=1) then4495 IF (iflag_thermals>=1) THEN 4504 4496 d_t_lscth=0. 4505 4497 d_t_lscst=0. 4506 4498 d_q_lscth=0. 4507 4499 d_q_lscst=0. 4508 dok=1,klev4509 doi=1,klon4510 if (ptconvth(i,k)) then4500 DO k=1,klev 4501 DO i=1,klon 4502 IF (ptconvth(i,k)) THEN 4511 4503 d_t_lscth(i,k)=d_t_eva(i,k)+d_t_lsc(i,k) 4512 4504 d_q_lscth(i,k)=d_q_eva(i,k)+d_q_lsc(i,k) 4513 else4505 ELSE 4514 4506 d_t_lscst(i,k)=d_t_eva(i,k)+d_t_lsc(i,k) 4515 4507 d_q_lscst(i,k)=d_q_eva(i,k)+d_q_lsc(i,k) 4516 endif4517 enddo4518 enddo4519 4520 doi=1,klon4508 ENDIF 4509 ENDDO 4510 ENDDO 4511 4512 DO i=1,klon 4521 4513 plul_st(i)=prfl(i,lmax_th(i)+1)+psfl(i,lmax_th(i)+1) 4522 4514 plul_th(i)=prfl(i,1)+psfl(i,1) 4523 enddo 4524 endif 4525 4515 ENDDO 4516 ENDIF 4526 4517 4527 4518 !On effectue les sorties: … … 4543 4534 #endif 4544 4535 4545 4546 4536 #ifndef CPP_XIOS 4547 4537 CALL write_paramLMDZ_phy(itap,nid_ctesGCM,ok_sync) … … 4575 4565 ! close(97) 4576 4566 !$OMP MASTER 4577 if (read_climoz >= 1) then4578 if (is_mpi_root) then4579 callnf95_close(ncid_climoz)4580 end if4581 deallocate(press_climoz) ! pointer4582 end if4567 IF (read_climoz >= 1) THEN 4568 IF (is_mpi_root) THEN 4569 CALL nf95_close(ncid_climoz) 4570 ENDIF 4571 DEALLOCATE(press_climoz) ! pointer 4572 ENDIF 4583 4573 !$OMP END MASTER 4584 4574 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.