-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rico.jl
82 lines (74 loc) · 3.43 KB
/
Rico.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
""" [vanZanten2011](@cite) """
function Rico_u(::Type{FT}) where {FT}
return ZProfile(z -> FT(-9.9) + FT(2.0e-3) * z)
end
""" [vanZanten2011](@cite) """
function Rico_v(::Type{FT}) where {FT}
return ZProfile(z -> FT(-3.8))
end
""" [vanZanten2011](@cite) """
Rico_θ_liq_ice(::Type{FT}) where {FT} =
ZProfile(z -> if z <= 740.0
FT(297.9)
else
FT(297.9) + (317 - FT(297.9)) / (4000 - 740) * (z - 740)
end)
""" [vanZanten2011](@cite) """
Rico_q_tot(::Type{FT}) where {FT} =
ZProfile(z -> if z <= 740.0
(16 + (FT(13.8) - 16) / 740 * z) / 1000
elseif z > 740.0 && z <= 3260.0
(FT(13.8) + (FT(2.4) - FT(13.8)) / (3260 - 740) * (z - 740)) / 1000
else
(FT(2.4) + (FT(1.8) - FT(2.4)) / (4000 - 3260) * (z - 3260)) / 1000
end)
""" [vanZanten2011](@cite) """
function Rico_geostrophic_ug(::Type{FT}) where {FT}
return ZProfile(z -> FT(-9.9) + FT(2.0e-3) * z)
end
""" [vanZanten2011](@cite) """
function Rico_geostrophic_vg(::Type{FT}) where {FT}
return ZProfile(z -> FT(-3.8))
end
""" [vanZanten2011](@cite) """
function Rico_dTdt(::Type{FT}) where {FT}
return ΠZProfile((Π, z) -> (FT(-2.5) / (3600 * 24)) * Π)
end
""" [vanZanten2011](@cite) """
function Rico_dqtdt(::Type{FT}) where {FT}
return ZProfile(z -> if z <= 2980.0
(-1 + FT(1.3456) / FT(2980.0) * z) / FT(86400.0) / 1000 #kg/(kg * s)
else
FT(0.3456) / 86400 / 1000
end)
end
""" [vanZanten2011](@cite) """
function Rico_subsidence(::Type{FT}) where {FT}
return ZProfile(z -> if z <= 2260.0
-(FT(0.005) / FT(2260.0)) * z
else
FT(-0.005)
end)
end
""" TMP TKE profile for testing """
function Rico_tke_prescribed(::Type{FT}) where {FT}
z_in = FT[20.0, 60.0, 100.0, 140.0, 180.0, 220.0, 260.0, 300.0, 340.0, 380.0, 420.0, 460.0,
500.0, 540.0, 580.0, 620.0, 660.0, 700.0, 740.0, 780.0, 820.0, 860.0, 900.0, 940.0,
980.0, 1020.0, 1060.0, 1100.0, 1140.0, 1180.0, 1220.0, 1260.0, 1300.0, 1340.0, 1380.0,
1420.0, 1460.0, 1500.0, 1540.0, 1580.0, 1620.0, 1660.0, 1700.0, 1740.0, 1780.0, 1820.0,
1860.0, 1900.0, 1940.0, 1980.0, 2020.0, 2060.0, 2100.0, 2140.0, 2180.0, 2220.0, 2260.0,
2300.0, 2340.0, 2380.0, 2420.0, 2460.0, 2500.0, 2540.0, 2580.0, 2620.0, 2660.0, 2700.0,
2740.0, 2780.0, 2820.0, 2860.0, 2900.0, 2940.0, 2980.0, 3020.0, 3060.0, 3100.0, 3140.0,
3180.0, 3220.0, 3260.0, 3300.0, 3340.0, 3380.0, 3420.0, 3460.0, 3500.0, 3540.0, 3580.0,
3620.0, 3660.0, 3700.0, 3740.0, 3780.0, 3820.0, 3860.0, 3900.0, 3940.0, 3980.0]
tke_in = FT[0.0976, 0.2051, 0.2481, 0.2623, 0.2642, 0.2608, 0.2550, 0.2427, 0.2037, 0.1469,
0.1033, 0.0857, 0.0783, 0.0723, 0.0687, 0.0719, 0.0771, 0.0802, 0.0825, 0.0842,
0.0853, 0.0860, 0.0865, 0.0868, 0.0869, 0.0869, 0.0868, 0.0866, 0.0864, 0.0861,
0.0858, 0.0854, 0.0849, 0.0844, 0.0842, 0.0838, 0.0834, 0.0829, 0.0824, 0.0820,
0.0816, 0.0815, 0.0815, 0.0816, 0.0810, 0.0785, 0.0724, 0.0617, 0.0477, 0.0325,
0.0185, 0.0086, 0.0024, 0.0003, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0]
return ZProfile(linear_interp(z_in, tke_in))
end