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
ea7a0324
Commit
ea7a0324
authored
4 years ago
by
sbiri
Browse files
Options
Download
Email Patches
Plain Diff
- fixed warning in line 91
- changed tolIn to "all" instead of "flux"
parent
2ab01484
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
toy_ASFC.py
toy_ASFC.py
+5
-4
No files found.
toy_ASFC.py
View file @
ea7a0324
...
...
@@ -73,6 +73,7 @@ def toy_ASFC(inF, outF, gustIn, cskinIn, tolIn, meth):
res
=
AirSeaFluxCode
(
spd
,
t
,
sst
,
lat
=
lat
,
hum
=
[
'rh'
,
rh
],
P
=
p
,
hin
=
hin
,
Rs
=
sw
,
tol
=
tolIn
,
gust
=
gustIn
,
cskin
=
cskinIn
,
meth
=
meth
,
L
=
"ecmwf"
,
n
=
30
)
flg
=
res
[
"flag"
]
elif
(
inF
==
'era5_r360x180.nc'
):
#%% load era5_r360x180.nc
...
...
@@ -87,7 +88,7 @@ def toy_ASFC(inF, outF, gustIn, cskinIn, tolIn, meth):
msk
=
lsm
*
icon
T
=
np
.
array
(
fid
.
variables
[
"t2m"
])
*
msk
Td
=
np
.
array
(
fid
.
variables
[
"d2m"
])
*
msk
sst
=
np
.
array
(
fid
.
variables
[
"sst"
])
*
msk
sst
=
np
.
array
(
fid
.
variables
[
"sst"
])
sst
=
np
.
where
(
sst
<
-
100
,
np
.
nan
,
sst
)
*
msk
p
=
np
.
array
(
fid
.
variables
[
"msl"
])
*
msk
/
100
# to set hPa
lw
=
np
.
array
(
fid
.
variables
[
"strd"
])
*
msk
/
60
/
60
...
...
@@ -115,8 +116,8 @@ def toy_ASFC(inF, outF, gustIn, cskinIn, tolIn, meth):
hin
=
hin
,
Rs
=
sw
.
reshape
(
len
(
tim
),
len
(
lon
)
*
len
(
lat
))[
x
,
:],
Rl
=
lw
.
reshape
(
len
(
tim
),
len
(
lon
)
*
len
(
lat
))[
x
,
:],
gust
=
gustIn
,
cskin
=
cskinIn
,
tol
=
tolIn
,
qmeth
=
'WMO'
,
meth
=
meth
,
n
=
30
,
L
=
"ecmwf"
)
gust
=
gustIn
,
cskin
=
cskinIn
,
tol
=
tolIn
,
qmeth
=
'Buck2'
,
meth
=
meth
,
n
=
30
,
L
=
"ecmwf"
)
a
=
temp
.
loc
[:,
"tau"
:
"rh"
]
a
=
a
.
to_numpy
()
flg
[
x
,
:]
=
temp
[
"flag"
]
...
...
@@ -533,7 +534,7 @@ else:
#------------------------------------------------------------------------------
tolIn
=
input
(
"Give tolerance option (to use default press enter):
\n
"
)
if
(
tolIn
==
''
):
tolIn
=
[
'
flux'
,
1e-3
,
0.1
,
0.1
]
tolIn
=
[
'
all'
,
0.01
,
0.01
,
1e-05
,
1e-3
,
0.1
,
0.1
]
else
:
tolIn
=
eval
(
tolIn
)
ext
=
ext
+
'tol'
+
tolIn
[
0
]
...
...
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