Changeset 3826 for LMDZ6/branches
- Timestamp:
- Feb 5, 2021, 1:23:18 PM (4 years ago)
- Location:
- LMDZ6/branches/IPSLCM6.0.15/libf/phylmd
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/pbl_surface_mod.F90
r3200 r3826 23 23 USE climb_wind_mod, ONLY : climb_wind_down, climb_wind_up 24 24 USE coef_diff_turb_mod, ONLY : coef_diff_turb 25 25 USE ioipsl_getin_p_mod, ONLY : getin_p 26 USE cdrag_mod 27 USE stdlevvar_mod 26 28 27 29 IMPLICIT NONE … … 39 41 integer, save :: iflag_pbl_surface_t2m_bug 40 42 !$OMP THREADPRIVATE(iflag_pbl_surface_t2m_bug) 43 integer, save :: iflag_new_t2mq2m 44 !$OMP THREADPRIVATE(iflag_new_t2mq2m) 41 45 !FC 42 46 ! integer, save :: iflag_frein … … 168 172 alb_dir_m, alb_dif_m, zxsens, zxevap, & 169 173 alb3_lic, runoff, snowhgt, qsnow, to_ice, sissnow, & 170 zxtsol, zxfluxlat, zt2m, qsat2m, 174 zxtsol, zxfluxlat, zt2m, qsat2m, zn2mout, & 171 175 d_t, d_q, d_u, d_v, d_t_diss, & 172 176 !!! nrlmd+jyg le 02/05/2011 et le 20/02/2012 … … 382 386 REAL, DIMENSION(klon), INTENT(OUT) :: zxfluxlat ! latent flux, mean for each grid point 383 387 REAL, DIMENSION(klon), INTENT(OUT) :: zt2m ! temperature at 2m, mean for each grid point 388 INTEGER, DIMENSION(klon, 6), INTENT(OUT) :: zn2mout ! nb of times t2m is out of the [tsol,temp] 384 389 REAL, DIMENSION(klon), INTENT(OUT) :: qsat2m 385 390 REAL, DIMENSION(klon, klev), INTENT(OUT) :: d_t ! change in temperature … … 519 524 REAL, DIMENSION(klon) :: y_flux_u1, y_flux_v1 520 525 REAL, DIMENSION(klon) :: yt2m, yq2m, yu10m 526 INTEGER, DIMENSION(klon, nbsrf, 6) :: yn2mout, yn2mout_x, yn2mout_w 527 INTEGER, DIMENSION(klon, nbsrf, 6) :: n2mout, n2mout_x, n2mout_w 521 528 REAL, DIMENSION(klon) :: yustar 522 529 REAL, DIMENSION(klon) :: ywstar … … 819 826 820 827 IF (first_call) THEN 828 829 iflag_new_t2mq2m=0 830 CALL getin_p('iflag_new_t2mq2m',iflag_new_t2mq2m) 831 print*,'pbl_iflag_new_t2mq2m=',iflag_new_t2mq2m 832 821 833 print*,'PBL SURFACE AVEC GUSTINESS' 822 834 first_call=.FALSE. … … 880 892 zxfluxlat(:)=0. 881 893 zt2m(:)=0. ; zq2m(:)=0. ; qsat2m(:)=0. ; rh2m(:)=0. 894 zn2mout(:,:)=0 ; 882 895 d_t(:,:)=0. ; d_t_diss(:,:)=0. ; d_q(:,:)=0. ; d_u(:,:)=0. ; d_v(:,:)=0. 883 896 zxsens_x(:)=0. ; zxsens_w(:)=0. ; zxfluxlat_x(:)=0. ; zxfluxlat_w(:)=0. … … 1794 1807 1795 1808 ! Calculate the temperature et relative humidity at 2m and the wind at 10m 1809 IF (iflag_new_t2mq2m==1) THEN 1810 CALL stdlevvarn(klon, knon, is_ter, zxli, & 1811 yu(:,1), yv(:,1), yt(:,1), yq(:,1), zgeo1, & 1812 yts, yqsurf, yz0m, yz0h, ypaprs(:,1), ypplay(:,1), & 1813 yt2m, yq2m, yt10m, yq10m, yu10m, yn2mout(:, nsrf, :)) 1814 ELSE 1796 1815 CALL stdlevvar(klon, knon, is_ter, zxli, & 1797 1816 yu(:,1), yv(:,1), yt(:,1), yq(:,1), zgeo1, & 1798 1817 yts, yqsurf, yz0m, yz0h, ypaprs(:,1), ypplay(:,1), & 1799 1818 yt2m, yq2m, yt10m, yq10m, yu10m, yustar) 1800 1819 ENDIF 1801 1820 END IF 1802 1821 … … 2581 2600 !!! jyg le 07/02/2012 2582 2601 IF (iflag_split .eq.0) THEN 2602 IF (iflag_new_t2mq2m==1) THEN 2603 CALL stdlevvarn(klon, knon, nsrf, zxli, & 2604 uzon, vmer, tair1, qair1, zgeo1, & 2605 tairsol, qairsol, yz0m, yz0h_oupas, psfce, patm, & 2606 yt2m, yq2m, yt10m, yq10m, yu10m, yn2mout(:, nsrf, :)) 2607 ELSE 2583 2608 CALL stdlevvar(klon, knon, nsrf, zxli, & 2584 2609 uzon, vmer, tair1, qair1, zgeo1, & 2585 2610 tairsol, qairsol, yz0m, yz0h_oupas, psfce, patm, & 2586 2611 yt2m, yq2m, yt10m, yq10m, yu10m, yustar) 2612 ENDIF 2587 2613 ELSE !(iflag_split .eq.0) 2614 IF (iflag_new_t2mq2m==1) THEN 2615 CALL stdlevvarn(klon, knon, nsrf, zxli, & 2616 uzon_x, vmer_x, tair1_x, qair1_x, zgeo1_x, & 2617 tairsol_x, qairsol, yz0m, yz0h_oupas, psfce, patm, & 2618 yt2m_x, yq2m_x, yt10m_x, yq10m_x, yu10m_x, yn2mout_x(:, nsrf, :)) 2619 CALL stdlevvarn(klon, knon, nsrf, zxli, & 2620 uzon_w, vmer_w, tair1_w, qair1_w, zgeo1_w, & 2621 tairsol_w, qairsol, yz0m, yz0h_oupas, psfce, patm, & 2622 yt2m_w, yq2m_w, yt10m_w, yq10m_w, yu10m_w, yn2mout_w(:, nsrf, :)) 2623 ELSE 2588 2624 CALL stdlevvar(klon, knon, nsrf, zxli, & 2589 2625 uzon_x, vmer_x, tair1_x, qair1_x, zgeo1_x, & … … 2594 2630 tairsol_w, qairsol, yz0m, yz0h_oupas, psfce, patm, & 2595 2631 yt2m_w, yq2m_w, yt10m_w, yq10m_w, yu10m_w, yustar_w) 2632 ENDIF 2596 2633 !!! 2597 2634 ENDIF ! (iflag_split .eq.0) … … 2607 2644 u10m(i,nsrf)=(yu10m(j) * uzon(j))/SQRT(uzon(j)**2+vmer(j)**2) 2608 2645 v10m(i,nsrf)=(yu10m(j) * vmer(j))/SQRT(uzon(j)**2+vmer(j)**2) 2646 ! 2647 DO k = 1, 6 2648 n2mout(i,nsrf,k) = yn2mout(j,nsrf,k) 2649 END DO 2650 ! 2609 2651 END DO 2610 2652 ELSE !(iflag_split .eq.0) … … 2617 2659 u10m_x(i,nsrf)=(yu10m_x(j) * uzon_x(j))/SQRT(uzon_x(j)**2+vmer_x(j)**2) 2618 2660 v10m_x(i,nsrf)=(yu10m_x(j) * vmer_x(j))/SQRT(uzon_x(j)**2+vmer_x(j)**2) 2661 ! 2662 DO k = 1, 6 2663 n2mout_x(i,nsrf,k) = yn2mout_x(j,nsrf,k) 2664 END DO 2665 ! 2619 2666 END DO 2620 2667 DO j=1, knon … … 2630 2677 u10m(i,nsrf) = u10m_x(i,nsrf) + wake_s(i)*(u10m_w(i,nsrf)-u10m_x(i,nsrf)) 2631 2678 v10m(i,nsrf) = v10m_x(i,nsrf) + wake_s(i)*(v10m_w(i,nsrf)-v10m_x(i,nsrf)) 2679 ! 2680 DO k = 1, 6 2681 n2mout_w(i,nsrf,k) = yn2mout_w(j,nsrf,k) 2682 END DO 2683 ! 2632 2684 END DO 2633 2685 !!! … … 2886 2938 ! 2887 2939 zxtsol(:) = 0.0 ; zxfluxlat(:) = 0.0 2888 zt2m(:) = 0.0 ; zq2m(:) = 0.0 2940 zt2m(:) = 0.0 ; zq2m(:) = 0.0 ; zn2mout(:,:) = 0 2889 2941 zustar(:)=0.0 ; zu10m(:) = 0.0 ; zv10m(:) = 0.0 2890 2942 s_pblh(:) = 0.0 ; s_plcl(:) = 0.0 … … 2939 2991 zt2m(i) = zt2m(i) + t2m(i,nsrf) * pctsrf(i,nsrf) 2940 2992 zq2m(i) = zq2m(i) + q2m(i,nsrf) * pctsrf(i,nsrf) 2993 ! 2994 DO k = 1, 6 2995 zn2mout(i,k) = zn2mout(i,k) + n2mout(i,nsrf,k) * pctsrf(i,nsrf) 2996 ENDDO 2997 ! 2941 2998 zustar(i) = zustar(i) + ustar(i,nsrf) * pctsrf(i,nsrf) 2942 2999 wstar(i,is_ave)=wstar(i,is_ave)+wstar(i,nsrf)*pctsrf(i,nsrf) … … 2970 3027 zt2m(i) = zt2m(i) + (t2m_x(i,nsrf)+wake_s(i)*(t2m_w(i,nsrf)-t2m_x(i,nsrf))) * pctsrf(i,nsrf) 2971 3028 zq2m(i) = zq2m(i) + q2m_x(i,nsrf) * pctsrf(i,nsrf) 3029 ! 3030 DO k = 1, 6 3031 zn2mout(i,k) = zn2mout(i,k) + n2mout_x(i,nsrf,k) * pctsrf(i,nsrf) 3032 ENDDO 3033 ! 2972 3034 zustar(i) = zustar(i) + ustar_x(i,nsrf) * pctsrf(i,nsrf) 2973 3035 wstar(i,is_ave)=wstar(i,is_ave)+wstar_x(i,nsrf)*pctsrf(i,nsrf) … … 3048 3110 DO nsrf = 1, nbsrf 3049 3111 DO i = 1, klon 3050 zxqsurf(i) = zxqsurf(i) + qsurf(i,nsrf) * pctsrf(i,nsrf)3112 zxqsurf(i) = zxqsurf(i) + MAX(qsurf(i,nsrf),0.0) * pctsrf(i,nsrf) 3051 3113 zxsnow(i) = zxsnow(i) + snow(i,nsrf) * pctsrf(i,nsrf) 3052 3114 END DO -
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_local_var_mod.F90
r3665 r3826 376 376 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wbeff, convoccur, zmax_th, zq2m, zt2m 377 377 !$OMP THREADPRIVATE(wbeff, convoccur, zmax_th, zq2m, zt2m) 378 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zq2m_cor, zt2m_cor, zu10m_cor, zv10m_cor379 !$OMP THREADPRIVATE(zq2m_cor, zt2m_cor, zu10m_cor, zv10m_cor)380 378 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zt2m_min_mon, zt2m_max_mon 381 379 !$OMP THREADPRIVATE(zt2m_min_mon, zt2m_max_mon) … … 467 465 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: p_tropopause, z_tropopause, t_tropopause 468 466 !$OMP THREADPRIVATE(p_tropopause, z_tropopause, t_tropopause) 467 468 INTEGER,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zn2mout 469 !$OMP THREADPRIVATE(zn2mout) 469 470 470 471 #ifdef CPP_StratAer … … 743 744 ALLOCATE(wbeff(klon), convoccur(klon), zmax_th(klon)) 744 745 ALLOCATE(zq2m(klon), zt2m(klon), weak_inversion(klon)) 745 ALLOCATE(zq2m_cor(klon), zt2m_cor(klon), zu10m_cor(klon), zv10m_cor(klon))746 746 ALLOCATE(zt2m_min_mon(klon), zt2m_max_mon(klon)) 747 747 ALLOCATE(t2m_min_mon(klon), t2m_max_mon(klon)) … … 810 810 ALLOCATE (z_tropopause(klon)) 811 811 ALLOCATE (t_tropopause(klon)) 812 813 ALLOCATE(zn2mout(klon,6)) 812 814 813 815 #ifdef CPP_StratAer … … 1038 1040 DEALLOCATE(wbeff, convoccur, zmax_th) 1039 1041 DEALLOCATE(zq2m, zt2m, weak_inversion) 1040 DEALLOCATE(zq2m_cor, zt2m_cor, zu10m_cor, zv10m_cor)1041 1042 DEALLOCATE(zt2m_min_mon, zt2m_max_mon) 1042 1043 DEALLOCATE(t2m_min_mon, t2m_max_mon) … … 1099 1100 DEALLOCATE (z_tropopause) 1100 1101 DEALLOCATE (t_tropopause) 1102 1103 DEALLOCATE(zn2mout) 1101 1104 1102 1105 #ifdef CPP_StratAer -
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_ctrlout_mod.F90
r3616 r3826 273 273 ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/), & 274 274 't2m_sic', "Temp 2m "//clnsurf(4), "K", (/ ('', i=1, 10) /)) /) 275 276 TYPE(ctrl_out), SAVE :: o_nt2mout = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), & 277 'nt2mout', 'Nbt2m out of range complete computation', '-', (/ ('', i=1, 10) /)) 278 TYPE(ctrl_out), SAVE :: o_nq2mout = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), & 279 'nq2mout', 'Nbq2m out of range complete computation', '-', (/ ('', i=1, 10) /)) 280 TYPE(ctrl_out), SAVE :: o_nu2mout = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), & 281 'nu2mout', 'Nbu2m out of range complete computation', '-', (/ ('', i=1, 10) /)) 282 283 TYPE(ctrl_out), SAVE :: o_nt2moutfg = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), & 284 'nt2moutfg', 'Nbt2m out of range complete/fgRi1 computation', '-', (/ ('', i=1, 10) /)) 285 TYPE(ctrl_out), SAVE :: o_nq2moutfg = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), & 286 'nq2moutfg', 'Nbq2m out of range complete/fgRi1 computation', '-', (/ ('', i=1, 10) /)) 287 TYPE(ctrl_out), SAVE :: o_nu2moutfg = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), & 288 'nu2moutfg', 'Nbu2m out of range complete/fgRi1 computation', '-', (/ ('', i=1, 10) /)) 275 289 276 290 TYPE(ctrl_out), SAVE :: o_gusts = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), & -
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_write_mod.F90
r3616 r3826 38 38 o_t2m, o_t2m_min, o_t2m_max, & 39 39 o_t2m_min_mon, o_t2m_max_mon, & 40 o_nt2mout, o_nt2moutfg, & 41 o_nq2mout, o_nq2moutfg, & 42 o_nu2mout, o_nu2moutfg, & 40 43 o_q2m, o_ustar, o_u10m, o_v10m, & 41 44 o_wind10m, o_wind10max, o_wind100m, o_gusts, o_sicf, & … … 247 250 248 251 USE phys_local_var_mod, ONLY: zxfluxlat, slp, ptstar, pt0, zxtsol, zt2m, & 249 zt2m_cor,zq2m_cor,zu10m_cor,zv10m_cor, & 250 t2m_min_mon, t2m_max_mon, evap, & 252 zn2mout, t2m_min_mon, t2m_max_mon, evap, & 251 253 l_mixmin,l_mix, & 252 254 zu10m, zv10m, zq2m, zustar, zxqsurf, & … … 669 671 CALL histwrite_phy(o_slp, slp) 670 672 CALL histwrite_phy(o_tsol, zxtsol) 671 CALL histwrite_phy(o_t2m, zt2m _cor)672 CALL histwrite_phy(o_t2m_min, zt2m _cor)673 CALL histwrite_phy(o_t2m_max, zt2m _cor)673 CALL histwrite_phy(o_t2m, zt2m) 674 CALL histwrite_phy(o_t2m_min, zt2m) 675 CALL histwrite_phy(o_t2m_max, zt2m) 674 676 CALL histwrite_phy(o_t2m_max_mon, t2m_max_mon) 675 677 CALL histwrite_phy(o_t2m_min_mon, t2m_min_mon) … … 677 679 IF (vars_defined) THEN 678 680 DO i=1, klon 679 zx_tmp_fi2d(i)=SQRT(zu10m_cor(i)*zu10m_cor(i)+zv10m_cor(i)*zv10m_cor(i)) 681 zx_tmp_fi2d(i)=real(zn2mout(i,1)) 682 ENDDO 683 ENDIF 684 CALL histwrite_phy(o_nt2mout, zx_tmp_fi2d) 685 686 IF (vars_defined) THEN 687 DO i=1, klon 688 zx_tmp_fi2d(i)=real(zn2mout(i,2)) 689 ENDDO 690 ENDIF 691 CALL histwrite_phy(o_nt2moutfg, zx_tmp_fi2d) 692 693 IF (vars_defined) THEN 694 DO i=1, klon 695 zx_tmp_fi2d(i)=real(zn2mout(i,3)) 696 ENDDO 697 ENDIF 698 CALL histwrite_phy(o_nq2mout, zx_tmp_fi2d) 699 700 IF (vars_defined) THEN 701 DO i=1, klon 702 zx_tmp_fi2d(i)=real(zn2mout(i,4)) 703 ENDDO 704 ENDIF 705 CALL histwrite_phy(o_nq2moutfg, zx_tmp_fi2d) 706 707 IF (vars_defined) THEN 708 DO i=1, klon 709 zx_tmp_fi2d(i)=real(zn2mout(i,5)) 710 ENDDO 711 ENDIF 712 CALL histwrite_phy(o_nu2mout, zx_tmp_fi2d) 713 714 IF (vars_defined) THEN 715 DO i=1, klon 716 zx_tmp_fi2d(i)=real(zn2mout(i,6)) 717 ENDDO 718 ENDIF 719 CALL histwrite_phy(o_nu2moutfg, zx_tmp_fi2d) 720 721 IF (vars_defined) THEN 722 DO i=1, klon 723 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) 680 724 ENDDO 681 725 ENDIF … … 684 728 IF (vars_defined) THEN 685 729 DO i=1, klon 686 zx_tmp_fi2d(i)=SQRT(zu10m _cor(i)*zu10m_cor(i)+zv10m_cor(i)*zv10m_cor(i))730 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) 687 731 ENDDO 688 732 ENDIF … … 721 765 ENDIF 722 766 CALL histwrite_phy(o_sicf, zx_tmp_fi2d) 723 CALL histwrite_phy(o_q2m, zq2m_cor) 724 CALL histwrite_phy(o_ustar, zustar) 725 CALL histwrite_phy(o_u10m, zu10m_cor) 726 CALL histwrite_phy(o_v10m, zv10m_cor) 767 CALL histwrite_phy(o_q2m, zq2m) 768 IF (vars_defined) zx_tmp_fi2d = zustar 769 CALL histwrite_phy(o_ustar, zx_tmp_fi2d) 770 CALL histwrite_phy(o_u10m, zu10m) 771 CALL histwrite_phy(o_v10m, zv10m) 727 772 728 773 IF (vars_defined) THEN -
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/physiq_mod.F90
r3633 r3826 121 121 cdragm, cdragh, & 122 122 zustar, zu10m, zv10m, rh2m, qsat2m, & 123 zq2m, zt2m, weak_inversion, & 124 zq2m_cor,zt2m_cor,zu10m_cor,zv10m_cor, & ! pour corriger d'un bug 123 zq2m, zt2m, zn2mout, weak_inversion, & 125 124 zt2m_min_mon, zt2m_max_mon, & ! pour calcul_divers.h 126 125 t2m_min_mon, t2m_max_mon, & ! pour calcul_divers.h … … 601 600 ! gust-front in the grid cell. 602 601 !$OMP THREADPRIVATE(iflag_alp_wk_cond) 603 INTEGER, SAVE :: iflag_bug_t2m_ipslcm61=0 !604 !$OMP THREADPRIVATE(iflag_bug_t2m_ipslcm61)605 602 606 603 REAL t_w(klon,klev),q_w(klon,klev) ! temperature and moisture profiles in the wake region … … 1303 1300 tau_gl=86400.*tau_gl 1304 1301 print*,'debut physiq_mod tau_gl=',tau_gl 1305 iflag_bug_t2m_ipslcm61 = 11306 CALL getin_p('iflag_bug_t2m_ipslcm61', iflag_bug_t2m_ipslcm61)1307 1302 CALL getin_p('iflag_alp_wk_cond', iflag_alp_wk_cond) 1308 1303 CALL getin_p('random_notrig_max',random_notrig_max) … … 2342 2337 !albedo SB <<< 2343 2338 albsol3_lic,runoff, snowhgt, qsnow, to_ice, sissnow, & 2344 zxtsol, zxfluxlat, zt2m, qsat2m, &2339 zxtsol, zxfluxlat, zt2m, qsat2m, zn2mout, & 2345 2340 d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, d_t_diss, & 2346 2341 !nrlmd< … … 2389 2384 !>jyg 2390 2385 ENDIF 2391 if ( iflag_bug_t2m_ipslcm61 == 0 ) THEN2392 CALL borne_var_surf( klon,nbsrf, &2393 t_seri(:,1),q_seri(:,1),u_seri(:,1),v_seri(:,1), &2394 ftsol,pctsrf, &2395 t2m, q2m, u10m, v10m, &2396 zt2m_cor, zq2m_cor, zu10m_cor, zv10m_cor)2397 ELSE2398 zt2m_cor(:)=zt2m(:)2399 zq2m_cor(:)=zq2m(:)2400 zu10m_cor(:)=zu10m(:)2401 zv10m_cor(:)=zv10m(:)2402 ENDIF2403 2404 2405 2406 2407 2386 2408 2387 !---------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.