From 2faabd9530a6812a27df83c73f9a952ec1f59271 Mon Sep 17 00:00:00 2001 From: brunner <amvdw95@gmail.com> Date: Mon, 2 Sep 2019 14:49:56 +0000 Subject: [PATCH] no bias correction, not needed --- da/cosmo/base_optimizer.py | 2 +- da/cosmo/observationoperator_cosmo.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/da/cosmo/base_optimizer.py b/da/cosmo/base_optimizer.py index f46fad57..a86f5096 100755 --- a/da/cosmo/base_optimizer.py +++ b/da/cosmo/base_optimizer.py @@ -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 diff --git a/da/cosmo/observationoperator_cosmo.py b/da/cosmo/observationoperator_cosmo.py index feaaf08e..c51a45df 100755 --- a/da/cosmo/observationoperator_cosmo.py +++ b/da/cosmo/observationoperator_cosmo.py @@ -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) -- GitLab