Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
NearRealTimeCTDAS
CTDAS
Commits
2faabd95
Commit
2faabd95
authored
Sep 02, 2019
by
brunner
Browse files
no bias correction, not needed
parent
f96c45ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
da/cosmo/base_optimizer.py
View file @
2faabd95
...
...
@@ -337,7 +337,7 @@ class Optimizer(object):
if
np
.
abs
(
res
)
>
threshold
:
# if np.abs(res) > threshold + abs(bias):
# if np.abs(res_rej) > threshold:
logging
.
debug
(
'Rejecting observation (%s,%i) because residual (%f) exceeds threshold (%f)'
%
(
self
.
sitecode
[
n
],
self
.
obs_ids
[
n
],
res
,
threshold
+
abs
(
bias
)
))
logging
.
debug
(
'Rejecting observation (%s,%i) because residual (%f) exceeds threshold (%f)'
%
(
self
.
sitecode
[
n
],
self
.
obs_ids
[
n
],
res
,
threshold
))
# logging.debug('Rejecting observation (%s,%i) because residual (%f) exceeds threshold (%f)' % (self.sitecode[n], self.obs_ids[n], res_rej, threshold))
self
.
flags
[
n
]
=
2
...
...
da/cosmo/observationoperator_cosmo.py
View file @
2faabd95
...
...
@@ -128,26 +128,26 @@ class ObservationOperator(object):
logging
.
info
(
'Starting COSMO'
)
#
os.system('python run_chain.py '+self.dacycle['run.name']+' '+abs_start_time_ch+' '+str(starth+lag*168)+' '+str(endh+lag*168)+' -j meteo icbc int2lm post_int2lm oae octe online_vprm cosmo -f')
os
.
system
(
'python run_chain.py '
+
self
.
dacycle
[
'run.name'
]
+
' '
+
abs_start_time_ch
+
' '
+
str
(
starth
+
lag
*
168
)
+
' '
+
str
(
endh
+
lag
*
168
)
+
' -j meteo icbc int2lm post_int2lm oae octe online_vprm cosmo -f'
)
logging
.
info
(
'COSMO done!'
)
# Here the extraction of COSMO output starts
dicts
=
self
.
read_csv
(
dacycle
)
#
rlat, rlon, dicts, path_in = self.get_hhl_data(dacycle, lag, 'lffd'+abs_start_time+'c.nc', dicts, starth, endh)
rlat
,
rlon
,
dicts
,
path_in
=
self
.
get_hhl_data
(
dacycle
,
lag
,
'lffd'
+
abs_start_time
+
'c.nc'
,
dicts
,
starth
,
endh
)
logging
.
info
(
'Starting parallel extraction \m/'
)
#
args = [
#
(dacycle, dacycle['time.sample.start']+timedelta(hours = 24*n), dicts, rlat, rlon, path_in)
#
for n in range(self.days)
#
]
args
=
[
(
dacycle
,
dacycle
[
'time.sample.start'
]
+
timedelta
(
hours
=
24
*
n
),
dicts
,
rlat
,
rlon
,
path_in
)
for
n
in
range
(
self
.
days
)
]
#
with Pool(self.days) as pool:
#
pool.starmap(self.get_cosmo_data, args)
with
Pool
(
self
.
days
)
as
pool
:
pool
.
starmap
(
self
.
get_cosmo_data
,
args
)
logging
.
info
(
'Finished parallel extraction \m/'
)
#
self.cat_cosmo_data(advance, dacycle)
self
.
cat_cosmo_data
(
advance
,
dacycle
)
for
i
in
range
(
self
.
forecast_nmembers
):
idx
=
str
(
i
+
1
).
zfill
(
3
)
...
...
Write
Preview
Supports
Markdown
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