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
7471e041
Commit
7471e041
authored
3 years ago
by
Richard Cornes
Browse files
Options
Download
Email Patches
Plain Diff
Tidied parmater limits for NCAR
parent
a7d3bbf1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
Code/AirSeaFluxCode.py
Code/AirSeaFluxCode.py
+12
-6
No files found.
Code/AirSeaFluxCode.py
View file @
7471e041
...
...
@@ -173,12 +173,12 @@ class S80:
self
.
ct
[
ind
],
self
.
cq
[
ind
]
=
ctcq_calc
(
self
.
cd10n
[
ind
],
self
.
cd
[
ind
],
self
.
ct10n
[
ind
],
self
.
cq10n
[
ind
],
self
.
h_in
[:,
ind
],
[
self
.
ref_ht
,
self
.
ref_ht
,
self
.
ref_ht
],
self
.
psit
[
ind
],
self
.
psiq
[
ind
])
if
(
self
.
meth
==
"NCAR"
):
self
.
cd
=
np
.
maximum
(
np
.
copy
(
self
.
cd
),
1e-4
)
self
.
ct
=
np
.
maximum
(
np
.
copy
(
self
.
ct
),
1e-4
)
self
.
cq
=
np
.
maximum
(
np
.
copy
(
self
.
cq
),
1e-4
)
self
.
zo
=
np
.
minimum
(
np
.
copy
(
self
.
zo
),
0.0025
)
# Some parameterizations set a minimum on parameters
try
:
self
.
_minimum_params
(
)
except
AttributeError
:
pass
self
.
usr
[
ind
],
self
.
tsr
[
ind
],
self
.
qsr
[
ind
]
=
get_strs
(
self
.
h_in
[:,
ind
],
self
.
monob
[
ind
],
self
.
wind
[
ind
],
self
.
zo
[
ind
],
self
.
zot
[
ind
],
self
.
zoq
[
ind
],
self
.
dt
[
ind
],
self
.
dq
[
ind
],
...
...
@@ -463,6 +463,12 @@ class LP82(S80):
class
NCAR
(
S80
):
def
_minimum_params
(
self
):
self
.
cd
=
np
.
maximum
(
np
.
copy
(
self
.
cd
),
1e-4
)
self
.
ct
=
np
.
maximum
(
np
.
copy
(
self
.
ct
),
1e-4
)
self
.
cq
=
np
.
maximum
(
np
.
copy
(
self
.
cq
),
1e-4
)
self
.
zo
=
np
.
minimum
(
np
.
copy
(
self
.
zo
),
0.0025
)
def
_class_flag
(
self
):
self
.
flag
=
np
.
where
((
self
.
utmp
<
0.5
)
&
(
self
.
flag
==
"n"
),
"o"
,
np
.
where
((
self
.
utmp
<
0.5
)
&
...
...
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