- Timestamp:
- Jul 22, 2024, 9:29:09 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/pbl_surface_mod.F90
r5088 r5099 1 ! 1 2 2 ! $Id$ 3 ! 3 4 4 MODULE pbl_surface_mod 5 ! 5 6 6 ! Planetary Boundary Layer and Surface module 7 ! 7 8 8 ! This module manages the calculation of turbulent diffusion in the boundary layer 9 9 ! and all interactions towards the differents sub-surfaces. 10 ! 11 ! 10 11 12 12 USE dimphy 13 13 USE mod_phys_lmdz_para, ONLY : mpi_size … … 73 73 74 74 CONTAINS 75 ! 76 !**************************************************************************************** 77 ! 75 76 !**************************************************************************************** 77 78 78 SUBROUTINE pbl_surface_init(fder_rst, snow_rst, qsurf_rst, ftsoil_rst) 79 79 … … 104 104 !**************************************************************************************** 105 105 ! Allocate and initialize module variables with fields read from restart file. 106 ! 106 107 107 !**************************************************************************************** 108 108 ALLOCATE(fder(klon), stat=ierr) … … 133 133 !**************************************************************************************** 134 134 ! Test for sub-surface indices 135 ! 135 136 136 !**************************************************************************************** 137 137 IF (is_ter /= 1) THEN … … 163 163 !**************************************************************************************** 164 164 ! Validation of ocean mode 165 ! 165 166 166 !**************************************************************************************** 167 167 … … 179 179 ! iflag_frein = 0 180 180 ! CALL getin_p('iflag_frein',iflag_frein) 181 ! 181 182 182 !jyg< 183 183 !**************************************************************************************** 184 184 ! Allocate variables for pbl splitting 185 ! 185 186 186 !**************************************************************************************** 187 187 … … 222 222 !**************************************************************************************** 223 223 ! Allocate and initialize module variables with fields read from restart file. 224 ! 224 225 225 !**************************************************************************************** 226 226 … … 255 255 #endif 256 256 257 ! 258 !**************************************************************************************** 259 ! 257 !**************************************************************************************** 260 258 261 259 SUBROUTINE pbl_surface( & … … 329 327 ! Auteur(s) Z.X. Li (LMD/CNRS) date: 19930818 330 328 ! Objet: interface de "couche limite" (diffusion verticale) 331 ! 329 332 330 !AA REM: 333 331 !AA----- … … 345 343 !AA il faudra sortir ces memes champs en leur ajoutant une dimension, 346 344 !AA c'est a dire nbsrf (nbre de subsurface). 347 ! 345 348 346 ! Arguments: 349 ! 347 350 348 ! dtime----input-R- interval du temps (secondes) 351 349 ! itap-----input-I- numero du pas de temps … … 367 365 ! cldt-----input-R- total cloud fraction 368 366 ! Martin 369 ! 367 370 368 ! d_t------output-R- le changement pour "t" 371 369 ! d_q------output-R- le changement pour "q" … … 392 390 ! pblT-----output-R- T au nveau HCL 393 391 ! treedrg--output-R- tree drag (m) 394 ! 392 395 393 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, carbon_cycle_tr, level_coupling_esm 396 394 USE carbon_cycle_mod, ONLY : co2_send, nbcf_out, fields_out, yfields_out, cfname_out … … 858 856 !!!jyg le 08/02/2012 859 857 REAL, DIMENSION(klon, nbsrf) :: windsp 860 ! 858 861 859 REAL, DIMENSION(klon, nbsrf) :: t2m_x 862 860 REAL, DIMENSION(klon, nbsrf) :: q2m_x … … 867 865 REAL, DIMENSION(klon, nbsrf) :: ustar_x 868 866 REAL, DIMENSION(klon, nbsrf) :: wstar_x 869 ! 867 870 868 REAL, DIMENSION(klon, nbsrf) :: pblh_x 871 869 REAL, DIMENSION(klon, nbsrf) :: plcl_x … … 878 876 REAL, DIMENSION(klon, nbsrf) :: trmb2_x 879 877 REAL, DIMENSION(klon, nbsrf) :: trmb3_x 880 ! 878 881 879 REAL, DIMENSION(klon, nbsrf) :: t2m_w 882 880 REAL, DIMENSION(klon, nbsrf) :: q2m_w … … 887 885 REAL, DIMENSION(klon, nbsrf) :: ustar_w 888 886 REAL, DIMENSION(klon, nbsrf) :: wstar_w 889 ! 887 890 888 REAL, DIMENSION(klon, nbsrf) :: pblh_w 891 889 REAL, DIMENSION(klon, nbsrf) :: plcl_w … … 898 896 REAL, DIMENSION(klon, nbsrf) :: trmb2_w 899 897 REAL, DIMENSION(klon, nbsrf) :: trmb3_w 900 ! 898 901 899 REAL, DIMENSION(klon) :: yt2m_x 902 900 REAL, DIMENSION(klon) :: yq2m_x … … 907 905 REAL, DIMENSION(klon) :: yustar_x 908 906 REAL, DIMENSION(klon) :: ywstar_x 909 ! 907 910 908 REAL, DIMENSION(klon) :: ypblh_x 911 909 REAL, DIMENSION(klon) :: ylcl_x … … 918 916 REAL, DIMENSION(klon) :: ytrmb2_x 919 917 REAL, DIMENSION(klon) :: ytrmb3_x 920 ! 918 921 919 REAL, DIMENSION(klon) :: yt2m_w 922 920 REAL, DIMENSION(klon) :: yq2m_w … … 927 925 REAL, DIMENSION(klon) :: yustar_w 928 926 REAL, DIMENSION(klon) :: ywstar_w 929 ! 927 930 928 REAL, DIMENSION(klon) :: ypblh_w 931 929 REAL, DIMENSION(klon) :: ylcl_w … … 938 936 REAL, DIMENSION(klon) :: ytrmb2_w 939 937 REAL, DIMENSION(klon) :: ytrmb3_w 940 ! 938 941 939 REAL, DIMENSION(klon) :: uzon_x, vmer_x, speed_x, zri1_x, pref_x !speed_x, zri1_x, pref_x, added by Fuxing WANG, 04/03/2015 942 940 REAL, DIMENSION(klon) :: zgeo1_x, tair1_x, qair1_x, tairsol_x 943 ! 941 944 942 REAL, DIMENSION(klon) :: uzon_w, vmer_w, speed_w, zri1_w, pref_w !speed_w, zri1_w, pref_w, added by Fuxing WANG, 04/03/2015 945 943 REAL, DIMENSION(klon) :: zgeo1_w, tair1_w, qair1_w, tairsol_w … … 984 982 REAL, DIMENSION(klon) :: yGamma_dTs_phiT, yGamma_dQs_phiQ 985 983 REAL, DIMENSION(klon) :: ydTs_ins, ydqs_ins 986 ! 984 987 985 REAL, PARAMETER :: facteur=2./sqrt(3.14) 988 986 REAL, PARAMETER :: inertia=2000. … … 1010 1008 1011 1009 REAL :: vent 1012 ! 1010 1013 1011 ! For debugging with IOIPSL 1014 1012 INTEGER, DIMENSION(nbp_lon*nbp_lat) :: ndexbg … … 1072 1070 1073 1071 IF (prt_level >=10) print *,' -> pbl_surface, itap ',itap 1074 ! 1072 1075 1073 !!jyg iflag_split = mod(iflag_pbl_split,2) 1076 1074 !!jyg iflag_split = mod(iflag_pbl_split,10) 1077 ! 1075 1078 1076 ! Flags controlling the splitting of the turbulent boundary layer: 1079 1077 ! iflag_split_ref = 0 ==> no splitting … … 1131 1129 ! 1) Initialisation and validation tests 1132 1130 ! Only done first time entering this subroutine 1133 ! 1131 1134 1132 !**************************************************************************************** 1135 1133 … … 1208 1206 ! 2) Initialization to zero 1209 1207 !**************************************************************************************** 1210 ! 1208 1211 1209 ! 2a) Initialization of all argument variables with INTENT(OUT) 1212 1210 !**************************************************************************************** … … 1383 1381 flux_t_x(:,:,:)=0. ; flux_t_w(:,:,:)=0. 1384 1382 flux_q_x(:,:,:)=0. ; flux_q_w(:,:,:)=0. 1385 ! 1383 1386 1384 !jyg< 1387 1385 flux_u_x(:,:,:)=0. ; flux_u_w(:,:,:)=0. … … 1392 1390 flux_xt_x(:,:,:,:)=0. ; flux_xt_w(:,:,:,:)=0. 1393 1391 #endif 1394 ! 1392 1395 1393 !jyg< 1396 1394 ! pblh,plcl,capCL,cteiCL ... are meaningfull only over sub-surfaces 1397 1395 ! actually present in the grid cell ==> value set to 999999. 1398 ! 1396 1399 1397 !jyg< 1400 1398 ustar(:,:) = 999999. … … 1404 1402 v10m(:,:) = 999999. 1405 1403 !>jyg 1406 ! 1404 1407 1405 pblh(:,:) = 999999. ! Hauteur de couche limite 1408 1406 plcl(:,:) = 999999. ! Niveau de condensation de la CLA … … 1415 1413 trmb2(:,:) = 999999. ! inhibition 1416 1414 trmb3(:,:) = 999999. ! Point Omega 1417 ! 1415 1418 1416 t2m_x(:,:) = 999999. 1419 1417 q2m_x(:,:) = 999999. … … 1422 1420 u10m_x(:,:) = 999999. 1423 1421 v10m_x(:,:) = 999999. 1424 ! 1422 1425 1423 pblh_x(:,:) = 999999. ! Hauteur de couche limite 1426 1424 plcl_x(:,:) = 999999. ! Niveau de condensation de la CLA … … 1433 1431 trmb2_x(:,:) = 999999. ! inhibition 1434 1432 trmb3_x(:,:) = 999999. ! Point Omega 1435 ! 1433 1436 1434 t2m_w(:,:) = 999999. 1437 1435 q2m_w(:,:) = 999999. … … 1452 1450 trmb3_w(:,:) = 999999. ! Point Omega 1453 1451 !!! 1454 ! 1452 1455 1453 !!! 1456 1454 !**************************************************************************************** … … 1468 1466 !**************************************************************************************** 1469 1467 ! Test for rugos........ from physiq.. A la fin plutot??? 1470 ! 1468 1471 1469 !**************************************************************************************** 1472 1470 … … 1479 1477 1480 1478 ! Mean calculations of albedo 1481 ! 1479 1482 1480 ! * alb : mean albedo for whole SW interval 1483 ! 1481 1484 1482 ! Mean albedo for grid point 1485 1483 ! * alb_m : mean albedo at whole SW interval … … 1537 1535 ENDDO 1538 1536 ENDDO 1539 ! 1537 1540 1538 !<al1: second order corrections 1541 1539 !- net = dwn -up; up=sig( T4 + 4sum%T3T' + 6sum%T2T'2 +...) … … 1577 1575 !**************************************************************************************** 1578 1576 ! 4) Loop over different surfaces 1579 ! 1577 1580 1578 ! Only points containing a fraction of the sub surface will be treated. 1581 ! 1579 1582 1580 !**************************************************************************************** 1583 1581 !<<<<<<<<<<<<< … … 1585 1583 !<<<<<<<<<<<<< 1586 1584 IF (prt_level >=10) print *,' Loop nsrf ',nsrf 1587 ! 1585 1588 1586 IF (iflag_split_ref == 3) THEN 1589 1587 IF (nsrf == is_oce) THEN … … 1627 1625 !**************************************************************************************** 1628 1626 ! 5) Compress variables 1629 ! 1630 !**************************************************************************************** 1631 1632 ! 1627 1628 !**************************************************************************************** 1629 1633 1630 !jyg< (20190926) 1634 1631 ! Provisional : set ybeta to standard values … … 1646 1643 ENDIF ! (nsrf .NE. is_ter) 1647 1644 !>jyg 1648 ! 1645 1649 1646 DO j = 1, knon 1650 1647 i = ni(j) … … 1740 1737 ENDDO 1741 1738 ENDDO 1742 ! 1739 1743 1740 !!! jyg le 07/02/2012 et le 10/04/2013 1744 1741 DO k = 1, klev+1 … … 1767 1764 ENDDO 1768 1765 ENDDO 1769 ! 1766 1770 1767 IF (iflag_split>=1) THEN 1771 1768 !!! nrlmd le 02/05/2011 … … 1805 1802 !! ywake_dltke(j,k) = wake_dltke(i,k,nsrf) 1806 1803 !! ytke(j,k) = tke(i,k,nsrf) 1807 ! 1804 1808 1805 ytke_x(j,k) = tke_x(i,k,nsrf) 1809 1806 ytke(j,k) = tke_x(i,k,nsrf)+wake_s(i)*wake_dltke(i,k,nsrf) … … 1866 1863 !**************************************************************************************** 1867 1864 ! 6a) Calculate coefficients for turbulent diffusion at surface, cdragh et cdragm. 1868 ! 1865 1869 1866 !**************************************************************************************** 1870 1867 … … 1936 1933 ENDIF 1937 1934 IF (prt_level >=10) print *,'clcdrag -> ycdragh_x ', ycdragh_x(1:knon) 1938 ! 1935 1939 1936 ! Faire disparaitre les lignes commentees fin 2015 (le temps des tests) 1940 1937 ! CALL clcdrag( knon, nsrf, ypaprs, ypplay, & … … 1952 1949 yts_w, yqsurf_w, yz0m, yz0h, yri0, 0, & 1953 1950 ycdragm_w, ycdragh_w, zri1_w, pref_w, rain_f, zxtsol, ypplay(:,1) ) 1954 ! 1951 1955 1952 IF(ok_bug_zg_wk_pbl) THEN 1956 1953 zgeo1(1:knon) = wake_s(1:knon)*zgeo1_w(1:knon) + (1.-wake_s(1:knon))*zgeo1_x(1:knon) … … 1976 1973 !**************************************************************************************** 1977 1974 ! 6b) Calculate coefficients for turbulent diffusion in the atmosphere, ycoefh et ycoefm. 1978 ! 1975 1979 1976 !**************************************************************************************** 1980 1977 … … 2066 2063 2067 2064 IF (prt_level >=10) print *,'coef_diff_turb -> ycoefh_x ',ycoefh_x(1:knon,:) 2068 ! 2065 2069 2066 IF (prt_level >=10) THEN 2070 2067 print *,' args coef_diff_turb: yu_w ', yu_w(1:knon,:) … … 2122 2119 2123 2120 !**************************************************************************************** 2124 ! 2121 2125 2122 ! 8) "La descente" - "The downhill" 2126 ! 2123 2127 2124 ! climb_hq_down and climb_wind_down calculate the coefficients 2128 2125 ! Ccoef_X et Dcoef_X for X=[H, Q, U, V]. 2129 2126 ! Only the coefficients at surface for H and Q are returned. 2130 ! 2127 2131 2128 !**************************************************************************************** 2132 2129 … … 2166 2163 PRINT *,'pbl_surface (climb_hq_down.x->) BcoefQ_x ',BcoefQ_x 2167 2164 ENDIF 2168 ! 2165 2169 2166 CALL climb_hq_down(knon, ycoefh_w, ypaprs, ypplay, & 2170 2167 ydelp, yt_w, yq_w, dtime, & … … 2206 2203 !!! 2207 2204 AcoefU_x, AcoefV_x, BcoefU_x, BcoefV_x) 2208 ! 2205 2209 2206 CALL climb_wind_down(knon, dtime, ycoefm_w, ypplay, ypaprs, yt_w, ydelp, yu_w, yv_w, & 2210 2207 !!! nrlmd le 02/05/2011 … … 2236 2233 !**************************************************************************************** 2237 2234 ! 9) Small calculations 2238 ! 2235 2239 2236 !**************************************************************************************** 2240 2237 … … 2268 2265 #endif 2269 2266 2270 !2271 2267 ! Cdragq computation 2272 2268 ! ------------------ … … 2278 2274 ! pbl_surface of an independant cdragq variable. 2279 2275 !****************************************************************************** 2280 ! 2276 2281 2277 IF ( f_z0qh_oce /= 1. .and. nsrf ==is_oce) THEN 2282 2278 ! Si on suit les formulations par exemple de Tessel, on … … 2286 2282 !! ycdragq_w(1:knon)=ycdragh_w(1:knon)* & 2287 2283 !! log(z1lay(1:knon)/yz0h(1:knon))/log(z1lay(1:knon)/(f_z0qh_oce*yz0h(1:knon))) 2288 ! 2284 2289 2285 DO j = 1,knon 2290 2286 z1lay = zgeo1(j)/RG … … 2294 2290 !! Print *,'YYYYpbl0: fact_cdrag ', fact_cdrag 2295 2291 ENDDO ! j = 1,knon 2296 ! 2292 2297 2293 !! Print *,'YYYYpbl0: z1lay, yz0h, f_z0qh_oce, ycdragh_w, ycdragq_w ', & 2298 2294 !! z1lay, yz0h(1:knon), f_z0qh_oce, ycdragh_w(1:knon), ycdragq_w(1:knon) … … 2301 2297 ycdragq_w(1:knon)=ycdragh_w(1:knon) 2302 2298 ENDIF ! ( f_z0qh_oce .ne. 1. .and. nsrf .eq.is_oce) 2303 ! 2299 2304 2300 CALL wx_pbl_prelim_0(knon, nsrf, dtime, ypplay, ypaprs, ywake_s, & 2305 2301 yts, y_delta_tsurf, ygustiness, & … … 2375 2371 ! Save initial value of z0h for use in evappot (z0h wiil be computed again in the surface models) 2376 2372 yz0h_old(1:knon) = yz0h(1:knon) 2377 ! 2378 !**************************************************************************************** 2379 ! 2373 2374 !**************************************************************************************** 2375 2380 2376 ! Calulate t2m and q2m for the case of calculation at land grid points 2381 2377 ! t2m and q2m are needed as input to ORCHIDEE 2382 ! 2378 2383 2379 !**************************************************************************************** 2384 2380 IF (nsrf == is_ter) THEN … … 2406 2402 2407 2403 !**************************************************************************************** 2408 ! 2404 2409 2405 ! 10) Switch according to current surface 2410 2406 ! It is necessary to start with the continental surfaces because the ocean 2411 2407 ! needs their run-off. 2412 ! 2408 2413 2409 !**************************************************************************************** 2414 2410 SELECT CASE(nsrf) … … 2666 2662 !**************************************************************************************** 2667 2663 ! 11) - Calcul the increment of surface temperature 2668 ! 2664 2669 2665 !**************************************************************************************** 2670 2666 … … 2677 2673 2678 2674 !**************************************************************************************** 2679 ! 2675 2680 2676 ! 12) "La remontee" - "The uphill" 2681 ! 2677 2682 2678 ! The fluxes (y_flux_X) and tendancy (y_d_X) are calculated 2683 2679 ! for X=H, Q, U and V, for all vertical levels. 2684 ! 2680 2685 2681 !**************************************************************************************** 2686 2682 !! … … 2703 2699 y_flux_q1(:) = flat/RLVTT 2704 2700 yfluxlat(:) = flat 2705 ! 2701 2706 2702 !! Test sur iflag_split retire le 2/02/2018, sans vraiment comprendre la raison de ce test. (jyg) 2707 2703 !! IF (iflag_split .eq.0) THEN … … 2737 2733 ENDDO 2738 2734 ENDIF 2739 ! 2735 2740 2736 ! ------------------------------------------------------------------------------ 2741 2737 ! 12a) Splitting … … 2746 2742 call abort_gcm('pbl_surface_mod 2607','isos pas encore dans iflag_split=1',1) 2747 2743 #endif 2748 ! 2749 ! 2744 2745 2750 2746 IF (nsrf /= is_oce) THEN 2751 ! 2747 2752 2748 ! Compute potential evaporation and aridity factor (jyg, 20200328) 2753 2749 ybeta_prev(:) = ybeta(:) … … 2755 2751 yqa(j) = AcoefQ(j) - BcoefQ(j)*yevap(j)*dtime 2756 2752 ENDDO 2757 ! 2753 2758 2754 CALL wx_evappot(knon, yqa, yTsurf_new, yevap_pot) 2759 ! 2755 2760 2756 ybeta(1:knon) = min(yevap(1:knon)/yevap_pot(1:knon), 1.) 2761 2757 … … 2768 2764 ENDDO 2769 2765 ENDIF ! (prt_level >=10) 2770 ! 2766 2771 2767 ! Second call to wx_pbl0_merge and wx_pbl_dts_merge in order to take into account 2772 2768 ! the update of the aridity coeficient beta. 2773 ! 2769 2774 2770 CALL wx_pbl_prelim_beta(knon, dtime, ywake_s, ybeta, & 2775 2771 BcoefQ_x, BcoefQ_w & … … 2815 2811 ydqs_ins(:) = 0. 2816 2812 ENDIF ! (iflag_split .eq. 2) 2817 ! 2813 2818 2814 ELSE ! (nsrf .ne. is_oce) 2819 2815 ybeta(1:knon) = 1. … … 2830 2826 ydqs_ins(:) = 0. 2831 2827 ENDIF ! (nsrf .ne. is_oce) 2832 ! 2828 2833 2829 CALL wx_pbl_split(knon, nsrf, dtime, ywake_s, ybeta, iflag_split, & 2834 2830 yg_T, yg_Q, & … … 2846 2842 y_delta_tsurf_new, y_delta_qsurf & 2847 2843 ) 2848 ! 2844 2849 2845 CALL wx_pbl_check(knon, dtime, ypplay, ypaprs, ywake_s, ybeta, iflag_split, & 2850 2846 yTs, y_delta_tsurf, & … … 2858 2854 y_flux_t1_x, y_flux_t1_w, & 2859 2855 y_flux_q1_x, y_flux_q1_w) 2860 ! 2856 2861 2857 IF (nsrf /= is_oce) THEN 2862 2858 CALL wx_pbl_dts_check(knon, dtime, ypplay, ypaprs, ywake_s, ybeta, iflag_split, & … … 2877 2873 y_flux_q1_x, y_flux_q1_w ) 2878 2874 ENDIF ! (nsrf .ne. is_oce) 2879 ! 2875 2880 2876 ELSE ! (iflag_split .ge. 1) 2881 2877 ybeta(1:knon) = 1. 2882 2878 yevap_pot(1:knon) = yevap(1:knon) 2883 2879 ENDIF ! (iflag_split .ge. 1) 2884 ! 2880 2885 2881 IF (prt_level >= 10) THEN 2886 2882 print *,'pbl_surface, ybeta , yevap, yevap_pot ', & 2887 2883 ybeta(1:knon) , yevap(1:knon), yevap_pot(1:knon) 2888 2884 ENDIF ! (prt_level >= 10) 2889 ! 2885 2890 2886 !>jyg 2891 ! 2892 2887 2893 2888 !!jyg!! A reprendre apres reflexion =============================================== 2894 2889 !!jyg!! … … 2986 2981 #endif 2987 2982 ) 2988 ! 2983 2989 2984 CALL climb_hq_up(knon, dtime, yt_w, yq_w, & 2990 2985 y_flux_q1_w, y_flux_t1_w, ypaprs, ypplay, & … … 3032 3027 !!! 3033 3028 y_flux_u_x, y_flux_v_x, y_d_u_x, y_d_v_x) 3034 ! 3029 3035 3030 y_d_t_diss_x(:,:)=0. 3036 3031 IF (iflag_pbl>=20 .and. iflag_pbl<30) THEN … … 3058 3053 ENDIF 3059 3054 ! print*,'yamada_c OK' 3060 ! 3055 3061 3056 IF (prt_level >=10) THEN 3062 3057 print *, 'After climbing up, lfuxlat_x, fluxlat_w ', & 3063 3058 yfluxlat_x(1:knon), yfluxlat_w(1:knon) 3064 3059 ENDIF 3065 ! 3060 3066 3061 ENDIF ! (iflag_split .eq.0) 3067 3062 … … 3087 3082 ! - Multiply with pourcentage of current surface 3088 3083 ! - Cumulate in global variable 3089 ! 3084 3090 3085 !**************************************************************************************** 3091 3086 … … 3298 3293 !!jyg20210118 delta_tsurf(i,nsrf)=y_delta_tsurf(j) 3299 3294 delta_tsurf(i,nsrf)=y_delta_tsurf_new(j) 3300 ! 3295 3301 3296 delta_qsurf(i) = delta_qsurf(i) + y_delta_qsurf(j)*ypct(j) 3302 ! 3297 3303 3298 cdragh_x(i) = cdragh_x(i) + ycdragh_x(j)*ypct(j) 3304 3299 cdragh_w(i) = cdragh_w(i) + ycdragh_w(j)*ypct(j) … … 3434 3429 d_u_x(i,k) = d_u_x(i,k) + y_d_u_x(j,k) 3435 3430 d_v_x(i,k) = d_v_x(i,k) + y_d_v_x(j,k) 3436 ! 3431 3437 3432 d_t_diss_w(i,k) = d_t_diss_w(i,k) + y_d_t_diss_w(j,k) 3438 3433 d_t_w(i,k) = d_t_w(i,k) + y_d_t_w(j,k) … … 3447 3442 #endif 3448 3443 3449 !3450 3444 !! d_wake_dlt(i,k) = d_wake_dlt(i,k) + y_d_t_w(i,k)-y_d_t_x(i,k) 3451 3445 !! d_wake_dlq(i,k) = d_wake_dlq(i,k) + y_d_q_w(i,k)-y_d_q_x(i,k) … … 3542 3536 ! 14) Calculate the temperature and relative humidity at 2m and the wind at 10m 3543 3537 ! Call HBTM 3544 ! 3545 !**************************************************************************************** 3546 !!! 3547 ! 3538 3539 !**************************************************************************************** 3540 !!! 3541 3548 3542 #undef T2m 3549 3543 #define T2m … … 3662 3656 u10m(i,nsrf)=(yu10m(j) * uzon(j))/SQRT(uzon(j)**2+vmer(j)**2) 3663 3657 v10m(i,nsrf)=(yu10m(j) * vmer(j))/SQRT(uzon(j)**2+vmer(j)**2) 3664 ! 3658 3665 3659 DO k = 1, 6 3666 3660 n2mout(i,nsrf,k) = yn2mout(j,nsrf,k) 3667 3661 END DO 3668 ! 3662 3669 3663 ENDDO 3670 3664 ELSE !(iflag_split .eq.0) … … 3677 3671 u10m_x(i,nsrf)=(yu10m_x(j) * uzon_x(j))/SQRT(uzon_x(j)**2+vmer_x(j)**2) 3678 3672 v10m_x(i,nsrf)=(yu10m_x(j) * vmer_x(j))/SQRT(uzon_x(j)**2+vmer_x(j)**2) 3679 ! 3673 3680 3674 DO k = 1, 6 3681 3675 n2mout_x(i,nsrf,k) = yn2mout_x(j,nsrf,k) 3682 3676 END DO 3683 ! 3677 3684 3678 ENDDO 3685 3679 DO j=1, knon … … 3691 3685 u10m_w(i,nsrf)=(yu10m_w(j) * uzon_w(j))/SQRT(uzon_w(j)**2+vmer_w(j)**2) 3692 3686 v10m_w(i,nsrf)=(yu10m_w(j) * vmer_w(j))/SQRT(uzon_w(j)**2+vmer_w(j)**2) 3693 ! 3687 3694 3688 ustar(i,nsrf) = ustar_x(i,nsrf) + wake_s(i)*(ustar_w(i,nsrf)-ustar_x(i,nsrf)) 3695 3689 u10m(i,nsrf) = u10m_x(i,nsrf) + wake_s(i)*(u10m_w(i,nsrf)-u10m_x(i,nsrf)) 3696 3690 v10m(i,nsrf) = v10m_x(i,nsrf) + wake_s(i)*(v10m_w(i,nsrf)-v10m_x(i,nsrf)) 3697 ! 3691 3698 3692 DO k = 1, 6 3699 3693 n2mout_w(i,nsrf,k) = yn2mout_w(j,nsrf,k) 3700 3694 END DO 3701 ! 3695 3702 3696 ENDDO 3703 3697 !!! … … 3749 3743 !!! 3750 3744 ENDIF 3751 ! 3745 3752 3746 IF (prt_level >=10) THEN 3753 3747 print *, 'T2m, q2m, RH2m ', & … … 3756 3750 3757 3751 ! print*,'OK pbl 5' 3758 ! 3752 3759 3753 !!! jyg le 07/02/2012 3760 3754 IF (iflag_split ==0) THEN … … 3879 3873 !**************************************************************************************** 3880 3874 ! 15) End of loop over different surfaces 3881 ! 3875 3882 3876 !**************************************************************************************** 3883 3877 ENDDO loop_nbsrf 3884 ! 3878 3885 3879 !---------------------------------------------------------------------------------------- 3886 3880 ! Reset iflag_split 3887 ! 3881 3888 3882 iflag_split=iflag_split_ref 3889 3883 … … 3901 3895 !**************************************************************************************** 3902 3896 ! 16) Calculate the mean value over all sub-surfaces for some variables 3903 ! 3897 3904 3898 !**************************************************************************************** 3905 3899 … … 3939 3933 zxfluxu_x(i,k) = zxfluxu_x(i,k) + flux_u_x(i,k,nsrf) * pctsrf(i,nsrf) 3940 3934 zxfluxv_x(i,k) = zxfluxv_x(i,k) + flux_v_x(i,k,nsrf) * pctsrf(i,nsrf) 3941 ! 3935 3942 3936 zxfluxt_w(i,k) = zxfluxt_w(i,k) + flux_t_w(i,k,nsrf) * pctsrf(i,nsrf) 3943 3937 zxfluxq_w(i,k) = zxfluxq_w(i,k) + flux_q_w(i,k,nsrf) * pctsrf(i,nsrf) … … 4009 4003 !!! 4010 4004 4011 !4012 4005 ! Incrementer la temperature du sol 4013 ! 4006 4014 4007 zxtsol(:) = 0.0 ; zxfluxlat(:) = 0.0 4015 4008 zt2m(:) = 0.0 ; zq2m(:) = 0.0 ; zn2mout(:,:) = 0 … … 4045 4038 ENDDO 4046 4039 ENDDO 4047 ! 4040 4048 4041 !<al1 order 2 correction to zxtsol, for radiation computations (main atm effect of Ts) 4049 4042 IF (iflag_order2_sollw == 1) THEN … … 4064 4057 zt2m(i) = zt2m(i) + t2m(i,nsrf) * pctsrf(i,nsrf) 4065 4058 zq2m(i) = zq2m(i) + q2m(i,nsrf) * pctsrf(i,nsrf) 4066 ! 4059 4067 4060 DO k = 1, 6 4068 4061 zn2mout(i,k) = zn2mout(i,k) + n2mout(i,nsrf,k) * pctsrf(i,nsrf) 4069 4062 ENDDO 4070 ! 4063 4071 4064 zustar(i) = zustar(i) + ustar(i,nsrf) * pctsrf(i,nsrf) 4072 4065 wstar(i,is_ave)=wstar(i,is_ave)+wstar(i,nsrf)*pctsrf(i,nsrf) … … 4100 4093 zt2m(i) = zt2m(i) + (t2m_x(i,nsrf)+wake_s(i)*(t2m_w(i,nsrf)-t2m_x(i,nsrf))) * pctsrf(i,nsrf) 4101 4094 zq2m(i) = zq2m(i) + q2m_x(i,nsrf) * pctsrf(i,nsrf) 4102 ! 4095 4103 4096 DO k = 1, 6 4104 4097 zn2mout(i,k) = zn2mout(i,k) + n2mout_x(i,nsrf,k) * pctsrf(i,nsrf) 4105 4098 ENDDO 4106 ! 4099 4107 4100 zustar(i) = zustar(i) + ustar_x(i,nsrf) * pctsrf(i,nsrf) 4108 4101 wstar(i,is_ave)=wstar(i,is_ave)+wstar_x(i,nsrf)*pctsrf(i,nsrf) 4109 4102 zu10m(i) = zu10m(i) + u10m_x(i,nsrf) * pctsrf(i,nsrf) 4110 4103 zv10m(i) = zv10m(i) + v10m_x(i,nsrf) * pctsrf(i,nsrf) 4111 ! 4104 4112 4105 s_pblh(i) = s_pblh(i) + pblh_x(i,nsrf) * pctsrf(i,nsrf) 4113 4106 s_pblh_x(i) = s_pblh_x(i) + pblh_x(i,nsrf) * pctsrf(i,nsrf) 4114 4107 s_pblh_w(i) = s_pblh_w(i) + pblh_w(i,nsrf) * pctsrf(i,nsrf) 4115 ! 4108 4116 4109 s_plcl(i) = s_plcl(i) + plcl_x(i,nsrf) * pctsrf(i,nsrf) 4117 4110 s_plcl_x(i) = s_plcl_x(i) + plcl_x(i,nsrf) * pctsrf(i,nsrf) 4118 4111 s_plcl_w(i) = s_plcl_w(i) + plcl_w(i,nsrf) * pctsrf(i,nsrf) 4119 ! 4112 4120 4113 s_capCL(i) = s_capCL(i) + capCL_x(i,nsrf) * pctsrf(i,nsrf) 4121 4114 s_oliqCL(i) = s_oliqCL(i) + oliqCL_x(i,nsrf)* pctsrf(i,nsrf) … … 4202 4195 4203 4196 END SUBROUTINE pbl_surface 4204 ! 4205 !**************************************************************************************** 4206 ! 4197 4198 !**************************************************************************************** 4199 4207 4200 SUBROUTINE pbl_surface_final(fder_rst, snow_rst, qsurf_rst, ftsoil_rst & 4208 4201 #ifdef ISO … … 4235 4228 !**************************************************************************************** 4236 4229 ! Return module variables for writing to restart file 4237 ! 4230 4238 4231 !**************************************************************************************** 4239 4232 fder_rst(:) = fder(:) … … 4248 4241 !**************************************************************************************** 4249 4242 ! Deallocate module variables 4250 ! 4243 4251 4244 !**************************************************************************************** 4252 4245 ! DEALLOCATE(qsol, fder, snow, qsurf, evap, rugos, agesno, ftsoil) … … 4266 4259 !**************************************************************************************** 4267 4260 ! Deallocate variables for pbl splitting 4268 ! 4261 4269 4262 !**************************************************************************************** 4270 4263 … … 4273 4266 4274 4267 END SUBROUTINE pbl_surface_final 4275 ! 4276 !**************************************************************************************** 4277 ! 4268 4269 !**************************************************************************************** 4278 4270 4279 4271 !albedo SB >>> … … 4326 4318 INTEGER :: ixt 4327 4319 #endif 4328 ! 4320 4329 4321 ! All at once !! 4330 4322 !**************************************************************************************** … … 4460 4452 4461 4453 END SUBROUTINE pbl_surface_newfrac 4462 ! 4463 !**************************************************************************************** 4464 ! 4454 4455 !**************************************************************************************** 4456 4465 4457 END MODULE pbl_surface_mod
Note: See TracChangeset
for help on using the changeset viewer.