[2952] | 1 | ! $Id$ |
---|
[5099] | 2 | |
---|
[5144] | 3 | SUBROUTINE freinage(knon, uu, vv, & |
---|
| 4 | tt, veget, lai, height, ypaprs, ypplay, drag_pro, d_u, d_v) |
---|
[2937] | 5 | |
---|
[5144] | 6 | !ONLINE: |
---|
| 7 | USE dimphy, ONLY: klon, klev |
---|
| 8 | USE lmdz_clesphys |
---|
| 9 | USE lmdz_compbl, ONLY: iflag_pbl, iflag_pbl_split, iflag_order2_sollw, ifl_pbltree |
---|
| 10 | USE lmdz_dimpft, ONLY: nvm_lmdz |
---|
| 11 | ! USE control, ONLY: nvm |
---|
| 12 | ! USE indice_sol_mod, ONLY: nvm_orch |
---|
| 13 | USE lmdz_YOEGWD, ONLY: GFRCRIT, GKWAKE, GRCRIT, GVCRIT, GKDRAG, GKLIFT, GHMAX, GRAHILO, GSIGCR, NKTOPG, NSTRA, GSSEC, GTSEC, GVSEC, & |
---|
[5143] | 14 | GWD_RANDO_RUWMAX, gwd_rando_sat, GWD_FRONT_RUWMAX, gwd_front_sat |
---|
[5144] | 15 | USE lmdz_yomcst |
---|
[2937] | 16 | |
---|
[5144] | 17 | IMPLICIT NONE |
---|
[2937] | 18 | |
---|
[5144] | 19 | ! 0. DECLARATIONS: |
---|
[3319] | 20 | |
---|
[5144] | 21 | ! 0.1 INPUTS |
---|
[2937] | 22 | |
---|
[5144] | 23 | REAL, DIMENSION(klon, klev), INTENT(IN) :: ypplay |
---|
| 24 | REAL, DIMENSION(klon, klev + 1), INTENT(IN) :: ypaprs |
---|
[2937] | 25 | |
---|
[5144] | 26 | REAL, DIMENSION(klon, klev), INTENT(IN) :: uu |
---|
| 27 | REAL, DIMENSION(klon, klev), INTENT(IN) :: vv |
---|
| 28 | REAL, DIMENSION(klon, klev), INTENT(IN) :: tt |
---|
| 29 | REAL, DIMENSION(klon, nvm_lmdz), INTENT(IN) :: veget, lai |
---|
| 30 | REAL, DIMENSION(klon, nvm_lmdz), INTENT(IN) :: height |
---|
[2937] | 31 | |
---|
[5144] | 32 | REAL, DIMENSION(klon, klev) :: wind |
---|
| 33 | REAL, DIMENSION(klon, klev) :: yzlay |
---|
| 34 | INTEGER knon |
---|
[2937] | 35 | |
---|
[5144] | 36 | ! 0.2 OUTPUTS |
---|
[2937] | 37 | |
---|
[5144] | 38 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: d_v ! change in v |
---|
| 39 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: d_u ! change in v |
---|
| 40 | !knon nombre de points concernes |
---|
| 41 | REAL, DIMENSION(klon, klev) :: sumveg ! change in v |
---|
[2937] | 42 | |
---|
[5144] | 43 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: drag_pro |
---|
| 44 | ! (KLON, KLEV) tendencies on winds |
---|
[2937] | 45 | |
---|
[5144] | 46 | INTEGER k, jv, i |
---|
[2937] | 47 | |
---|
| 48 | |
---|
[5144] | 49 | !FCCCC REAL Cd_frein |
---|
[2937] | 50 | |
---|
[5144] | 51 | ! 0.3.1 LOCAL VARIABLE |
---|
[2937] | 52 | |
---|
| 53 | |
---|
[5144] | 54 | !----------------------------------------------------------------- |
---|
[2937] | 55 | |
---|
[5144] | 56 | ! 1. INITIALISATIONS |
---|
[2937] | 57 | |
---|
| 58 | |
---|
[5144] | 59 | ! Cd_frein = 7.5E-2 ! (0.075) ! Drag from MASSON 2009 |
---|
| 60 | !FC ESSAI |
---|
| 61 | ! Cd_frein = 1.5E-2 ! (0.075) ! Drag from MASSON 2009 |
---|
| 62 | ! Cd_frein = 0.005 ! (0.075) ! Drag from MASSON 2009 |
---|
[2937] | 63 | |
---|
[5144] | 64 | ! initialisation |
---|
| 65 | d_u(:, :) = 0. |
---|
| 66 | d_v(:, :) = 0. |
---|
| 67 | drag_pro(:, :) = 0. |
---|
| 68 | sumveg(:, :) = 0. |
---|
| 69 | !! PRINT*, "Cd_frein" , Cd_frein |
---|
[2937] | 70 | |
---|
[5144] | 71 | wind(:, :) = sqrt(uu(:, :) * uu(:, :) + vv(:, :) * vv(:, :)) |
---|
[2937] | 72 | |
---|
[5144] | 73 | yzlay(1:knon, 1) = & |
---|
| 74 | RD * tt(1:knon, 1) / (0.5 * (ypaprs(1:knon, 1) + ypplay(1:knon, 1))) & |
---|
| 75 | * (ypaprs(1:knon, 1) - ypplay(1:knon, 1)) / RG |
---|
| 76 | DO k = 2, klev |
---|
| 77 | yzlay(1:knon, k) = & |
---|
| 78 | yzlay(1:knon, k - 1) + RD * 0.5 * (tt(1:knon, k - 1) + tt(1:knon, k)) & |
---|
| 79 | / ypaprs(1:knon, k) * (ypplay(1:knon, k - 1) - ypplay(1:knon, k)) / RG |
---|
| 80 | END DO |
---|
[2937] | 81 | |
---|
[5144] | 82 | ! verifier les indexes ..... |
---|
| 83 | !! PRINT*, " calcul de drag_pro FC " |
---|
[2937] | 84 | |
---|
[5158] | 85 | DO k = 1, klev |
---|
[2937] | 86 | |
---|
[5158] | 87 | DO jv = 2, nvm_lmdz ! (on peut faire 9 ?) |
---|
[2937] | 88 | |
---|
[5158] | 89 | DO i = 1, knon |
---|
[2937] | 90 | |
---|
[5144] | 91 | sumveg(i, k) = sumveg(i, k) + veget(i, jv) |
---|
[2937] | 92 | |
---|
[5144] | 93 | ! if ( (height(i,jv) .gt. yzlay(i,k)) .AND. (height(i,jv) .gt. 0.1) .AND. LAI(i,jv).gt.0. ) THEN |
---|
| 94 | IF ((height(i, jv) > yzlay(i, k)) .AND. (height(i, jv) > 0.1)) THEN |
---|
| 95 | !FC attention veut on le test sur le LAI ? |
---|
| 96 | IF (ifl_pbltree==1) THEN |
---|
| 97 | drag_pro(i, k) = drag_pro(i, k) + & |
---|
| 98 | veget(i, jv) |
---|
[5116] | 99 | elseif (ifl_pbltree==2) THEN |
---|
[5144] | 100 | drag_pro(i, k) = drag_pro(i, k) + & |
---|
| 101 | 6 * LAI(i, jv) * veget(i, jv) * (yzlay(i, k) * (height(i, jv) - yzlay(i, k)) / (height(i, jv) * height(i, jv) + 0.01)) |
---|
[5116] | 102 | elseif (ifl_pbltree==3) THEN |
---|
[5144] | 103 | drag_pro(i, k) = drag_pro(i, k) + & |
---|
| 104 | veget(i, jv) * (yzlay(i, k) * (height(i, jv) - yzlay(i, k)) / (height(i, jv) * height(i, jv) + 0.01)) |
---|
[5116] | 105 | elseif (ifl_pbltree==0) THEN |
---|
[5144] | 106 | drag_pro(i, k) = 0.0 |
---|
| 107 | endif |
---|
| 108 | else |
---|
| 109 | drag_pro(i, k) = drag_pro(i, k) |
---|
| 110 | endif |
---|
[2937] | 111 | |
---|
| 112 | enddo |
---|
[5144] | 113 | enddo |
---|
| 114 | enddo |
---|
[5158] | 115 | DO k = 1, klev |
---|
[5144] | 116 | where (sumveg(1:knon, k) > 0.05) |
---|
| 117 | ! drag_pro(1:knon,k)=Cd_frein*drag_pro(1:knon,k)/sumveg(1:knon,k) |
---|
| 118 | drag_pro(1:knon, k) = Cd_frein * drag_pro(1:knon, k) |
---|
| 119 | elsewhere |
---|
| 120 | drag_pro(1:knon, k) = 0.0 |
---|
| 121 | endwhere |
---|
| 122 | d_u(1:knon, k) = (-1) * drag_pro(1:knon, k) * uu(1:knon, k) * wind(1:knon, k) |
---|
| 123 | d_v(1:knon, k) = (-1) * drag_pro(1:knon, k) * vv(1:knon, k) * wind(1:knon, k) |
---|
| 124 | enddo |
---|
[2937] | 125 | |
---|
[5144] | 126 | END SUBROUTINE freinage |
---|
[5105] | 127 | |
---|