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
370d574b
Commit
370d574b
authored
4 years ago
by
sbiri
Browse files
Options
Download
Email Patches
Plain Diff
Update AirSeaFluxCode.py
parent
31242d12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
AirSeaFluxCode.py
AirSeaFluxCode.py
+3
-13
No files found.
AirSeaFluxCode.py
View file @
370d574b
...
...
@@ -450,23 +450,13 @@ def AirSeaFluxCode(spd, T, SST, lat, RH, P, hin, hout, zi=600,
new
=
np
.
array
([
np
.
copy
(
u10n
),
np
.
copy
(
t10n
),
np
.
copy
(
q10n
),
np
.
copy
(
usr
),
np
.
copy
(
tsr
),
np
.
copy
(
qsr
)])
d
=
np
.
abs
(
new
-
old
)
#
ind = np.where((d[0, :] > tol[0])+(d[1, :] > tol[1]) +
#
(d[2, :] > tol[2])+(d[3, :] > tol[3]) +
#
(d[4, :] > tol[4])+(d[5, :] > tol[5]))
ind
=
np
.
where
((
d
[
0
,
:]
>
tol
[
0
])
+
(
d
[
1
,
:]
>
tol
[
1
])
+
(
d
[
2
,
:]
>
tol
[
2
])
+
(
d
[
3
,
:]
>
tol
[
3
])
+
(
d
[
4
,
:]
>
tol
[
4
])
+
(
d
[
5
,
:]
>
tol
[
5
]))
if
(
ind
[
0
].
size
==
0
):
ii
=
False
else
:
ii
=
True
if
((
it
==
3
)
or
(
it
==
6
)
or
(
it
==
10
)):
print
(
'Method {}, # {} tol u10n: {} | t10n: {} | q10n: {} | '
'u*: {} | t*: {} | q*: {}'
.
format
(
meth
,
it
,
np
.
ma
.
max
(
d
[
0
,
~
np
.
isnan
(
d
[
0
,:])]),
np
.
ma
.
max
(
d
[
1
,
~
np
.
isnan
(
d
[
1
,:])]),
np
.
ma
.
max
(
d
[
2
,
~
np
.
isnan
(
d
[
2
,:])]),
np
.
ma
.
max
(
d
[
3
,
~
np
.
isnan
(
d
[
3
,:])]),
np
.
ma
.
max
(
d
[
4
,
~
np
.
isnan
(
d
[
4
,:])]),
np
.
ma
.
max
(
d
[
5
,
~
np
.
isnan
(
d
[
5
,:])])),
file
=
open
(
'tol_mid.txt'
,
'a'
))
logging
.
info
(
'method %s | # of iterations:%s'
,
meth
,
it
)
logging
.
info
(
'method %s | # of points that did not converge :%s'
,
meth
,
ind
[
0
].
size
)
...
...
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