Directory: | ./ |
---|---|
File: | phys/calbeta.f90 |
Date: | 2022-01-11 19:19:34 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 30 | 32 | 93.8% |
Branches: | 29 | 34 | 85.3% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | ! | ||
2 | ! $Header$ | ||
3 | ! | ||
4 | 1920 | SUBROUTINE calbeta(dtime,indice,knon,snow,qsol, & | |
5 | 1920 | vbeta,vcal,vdif) | |
6 | |||
7 | USE dimphy | ||
8 | USE indice_sol_mod | ||
9 | |||
10 | IMPLICIT none | ||
11 | |||
12 | ! | ||
13 | ! $Id: flux_arp.h 2010-08-04 17:02:56Z lahellec $ | ||
14 | ! Modif EV, 10/2020 | ||
15 | ! | ||
16 | logical :: ok_flux_surf | ||
17 | logical :: ok_prescr_ust !for prescribed ustar | ||
18 | logical :: ok_prescr_beta | ||
19 | logical :: ok_forc_tsurf | ||
20 | |||
21 | |||
22 | real :: fsens | ||
23 | real :: flat | ||
24 | real :: betaevap | ||
25 | real :: ust | ||
26 | real :: tg | ||
27 | |||
28 | common /flux_arp/fsens,flat,ust,tg,ok_flux_surf,ok_prescr_ust,ok_prescr_beta,betaevap,ok_forc_tsurf | ||
29 | |||
30 | !$OMP THREADPRIVATE(/flux_arp/) | ||
31 | |||
32 | |||
33 | |||
34 | |||
35 | |||
36 | !====================================================================== | ||
37 | ! Auteur(s): Z.X. Li (LMD/CNRS) (adaptation du GCM au LMD) | ||
38 | ! date: 19940414 | ||
39 | !====================================================================== | ||
40 | ! | ||
41 | ! Calculer quelques parametres pour appliquer la couche limite | ||
42 | ! ------------------------------------------------------------ | ||
43 | ! Variables d'entrees | ||
44 | !**************************************************************************************** | ||
45 | REAL, INTENT(IN) :: dtime | ||
46 | INTEGER, INTENT(IN) :: indice | ||
47 | INTEGER, INTENT(IN) :: knon | ||
48 | REAL, DIMENSION(klon), INTENT(IN) :: snow | ||
49 | REAL, DIMENSION(klon), INTENT(IN) :: qsol | ||
50 | |||
51 | |||
52 | ! Variables de sorties | ||
53 | !**************************************************************************************** | ||
54 | REAL, DIMENSION(klon), INTENT(OUT) :: vbeta | ||
55 | REAL, DIMENSION(klon), INTENT(OUT) :: vcal | ||
56 | REAL, DIMENSION(klon), INTENT(OUT) :: vdif | ||
57 | |||
58 | ! Variables locales | ||
59 | !**************************************************************************************** | ||
60 | REAL, PARAMETER :: tau_gl=86400.0*5.0 ! temps de relaxation pour la glace de mer | ||
61 | !cc PARAMETER (tau_gl=86400.0*30.0) | ||
62 | REAL, PARAMETER :: mx_eau_sol=150.0 | ||
63 | REAL, PARAMETER :: calsol=1.0/(2.5578E+06*0.15) | ||
64 | REAL, PARAMETER :: calsno=1.0/(2.3867E+06*0.15) | ||
65 | REAL, PARAMETER :: calice=1.0/(5.1444E+06*0.15) | ||
66 | |||
67 | INTEGER :: i | ||
68 | |||
69 | !**************************************************************************************** | ||
70 | |||
71 |
2/2✓ Branch 0 taken 1920 times.
✓ Branch 1 taken 1908480 times.
|
1910400 | vbeta(:) = 0.0 |
72 |
2/2✓ Branch 0 taken 1920 times.
✓ Branch 1 taken 1908480 times.
|
1910400 | vcal(:) = 0.0 |
73 |
2/2✓ Branch 0 taken 1908480 times.
✓ Branch 1 taken 1920 times.
|
1910400 | vdif(:) = 0.0 |
74 | |||
75 |
2/2✓ Branch 0 taken 480 times.
✓ Branch 1 taken 1440 times.
|
1920 | IF (indice.EQ.is_oce) THEN |
76 |
2/2✓ Branch 0 taken 362977 times.
✓ Branch 1 taken 480 times.
|
363457 | DO i = 1, knon |
77 | 362977 | vcal(i) = 0.0 | |
78 | 362977 | vbeta(i) = 1.0 | |
79 | 363457 | vdif(i) = 0.0 | |
80 | ENDDO | ||
81 | ENDIF | ||
82 | |||
83 |
2/2✓ Branch 0 taken 480 times.
✓ Branch 1 taken 1440 times.
|
1920 | IF (indice.EQ.is_sic) THEN |
84 |
2/2✓ Branch 0 taken 104835 times.
✓ Branch 1 taken 480 times.
|
105315 | DO i = 1, knon |
85 | 104835 | vcal(i) = calice | |
86 |
2/2✓ Branch 0 taken 76004 times.
✓ Branch 1 taken 28831 times.
|
104835 | IF (snow(i) .GT. 0.0) vcal(i) = calsno |
87 | 104835 | vbeta(i) = 1.0 | |
88 | 105315 | vdif(i) = 1.0/tau_gl | |
89 | ! vdif(i) = calice/tau_gl ! c'etait une erreur | ||
90 | ENDDO | ||
91 | ENDIF | ||
92 | |||
93 |
2/2✓ Branch 0 taken 480 times.
✓ Branch 1 taken 1440 times.
|
1920 | IF (indice.EQ.is_ter) THEN |
94 |
2/2✓ Branch 0 taken 247680 times.
✓ Branch 1 taken 480 times.
|
248160 | DO i = 1, knon |
95 | 247680 | vcal(i) = calsol | |
96 |
2/2✓ Branch 0 taken 76279 times.
✓ Branch 1 taken 171401 times.
|
247680 | IF (snow(i) .GT. 0.0) vcal(i) = calsno |
97 | 247680 | vbeta(i) = MIN(2.0*qsol(i)/mx_eau_sol, 1.0) | |
98 | 248160 | vdif(i) = 0.0 | |
99 | ENDDO | ||
100 | ENDIF | ||
101 | |||
102 |
2/2✓ Branch 0 taken 480 times.
✓ Branch 1 taken 1440 times.
|
1920 | IF (indice.EQ.is_lic) THEN |
103 |
2/2✓ Branch 0 taken 72960 times.
✓ Branch 1 taken 480 times.
|
73440 | DO i = 1, knon |
104 | 72960 | vcal(i) = calice | |
105 |
2/2✓ Branch 0 taken 55058 times.
✓ Branch 1 taken 17902 times.
|
72960 | IF (snow(i) .GT. 0.0) vcal(i) = calsno |
106 | 72960 | vbeta(i) = 1.0 | |
107 | 73440 | vdif(i) = 0.0 | |
108 | ENDDO | ||
109 | ENDIF | ||
110 | |||
111 | ! EV: when beta is prescribed for 1D cases: | ||
112 |
1/4✗ Branch 0 not taken.
✓ Branch 1 taken 1920 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
|
1920 | IF (knon.EQ.1 .AND. ok_prescr_beta) THEN |
113 | ✗ | DO i = 1, knon | |
114 | ✗ | vbeta(i)=betaevap | |
115 | ENDDO | ||
116 | ENDIF | ||
117 | |||
118 | 1920 | END SUBROUTINE calbeta | |
119 | |||
120 | |||
121 | |||
122 | |||
123 | |||
124 | |||
125 | |||
126 | |||
127 | |||
128 | |||
129 | |||
130 | |||
131 | |||
132 | |||
133 | |||
134 | |||
135 | |||
136 |