Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
NOCSurfaceProcesses
AirSeaFluxCode
Commits
4d78ffda
Commit
4d78ffda
authored
4 years ago
by
sbiri
Browse files
Options
Download
Email Patches
Plain Diff
added get_L function in flux_subs.py
parent
48a8e712
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
flux_subs.py
flux_subs.py
+32
-0
No files found.
flux_subs.py
View file @
4d78ffda
...
...
@@ -644,6 +644,38 @@ def get_gust(beta, Ta, usr, tsrv, zi, lat):
# ---------------------------------------------------------------------
def
get_L
(
L
,
lat
,
usr
,
tsr
,
qsr
,
t10n
,
tv10n
,
qair
,
h_in
,
T
,
Ta
,
th
,
tv
,
sst
,
dt
,
dq
,
wind
,
monob
,
meth
):
g
=
gc
(
lat
)
if
(
L
==
0
):
tsrv
=
tsr
+
0.61
*
t10n
*
qsr
monob
=
((
tv10n
*
np
.
power
(
usr
,
2
))
/
(
g
*
kappa
*
tsrv
))
monob
=
np
.
where
(
np
.
fabs
(
monob
)
<
1
,
np
.
where
(
monob
<
0
,
-
1
,
1
),
monob
)
elif
(
L
==
1
):
tsrv
=
tsr
*
(
1.
+
0.61
*
qair
)
+
0.61
*
th
*
qsr
monob
=
((
tv
*
np
.
power
(
usr
,
2
))
/
(
kappa
*
g
*
tsrv
))
elif
(
L
==
2
):
tsrv
=
tsr
+
0.61
*
t10n
*
qsr
Rb
=
((
g
*
h_in
[
0
]
*
((
2
*
dt
)
/
(
Ta
+
sst
-
g
*
h_in
[
0
])
+
0.61
*
dq
))
/
np
.
power
(
wind
,
2
))
zo
=
(
0.11
*
visc_air
(
Ta
)
/
usr
+
0.018
*
np
.
power
(
usr
,
2
)
/
g
)
zot
=
0.40
*
visc_air
(
Ta
)
/
usr
zol
=
(
Rb
*
(
np
.
power
(
np
.
log
((
h_in
[
0
]
+
zo
)
/
zo
)
-
psim_calc
((
h_in
[
0
]
+
zo
)
/
monob
,
meth
)
+
psim_calc
(
zo
/
monob
,
meth
),
2
)
/
(
np
.
log
((
h_in
[
0
]
+
zo
)
/
zot
)
-
psit_calc
((
h_in
[
0
]
+
zo
)
/
monob
,
meth
)
+
psit_calc
(
zot
/
monob
,
meth
))))
monob
=
h_in
[
0
]
/
zol
elif
(
L
==
3
):
tsrv
=
tsr
+
0.61
*
(
T
+
CtoK
)
*
qsr
zol
=
(
kappa
*
g
*
h_in
[
0
]
/
(
T
+
CtoK
)
*
(
tsr
+
0.61
*
(
T
+
CtoK
)
*
qsr
)
/
np
.
power
(
usr
,
2
))
monob
=
h_in
[
0
]
/
zol
return
tsrv
,
monob
#----------------------------------------------------------------------
def
get_heights
(
h
,
dim_len
):
""" Reads input heights for velocity, temperature and humidity
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment