Skip to content
Snippets Groups Projects
Commit 57ff4b1f authored by Lukas Kugler's avatar Lukas Kugler
Browse files

minor changes

parent 141342b4
No related branches found
No related tags found
No related merge requests found
"""Cluster configuration file, see docstring of ClusterConfig class in dartwrf/utils.py for details""" """Cluster configuration file, see docstring of ClusterConfig class in dartwrf/utils.py for details"""
cluster_defaults = dict( cluster_defaults = dict(
max_nproc = 16, max_nproc = 20,
max_nproc_for_each_ensemble_member = 9, max_nproc_for_each_ensemble_member = 16,
use_slurm = True, use_slurm = True,
# binaries # binaries
...@@ -33,7 +33,7 @@ cluster_defaults = dict( ...@@ -33,7 +33,7 @@ cluster_defaults = dict(
WRF_exe_template = '/jetfs/home/lkugler/DART-WRF/templates/run_WRF.jet.sh', WRF_exe_template = '/jetfs/home/lkugler/DART-WRF/templates/run_WRF.jet.sh',
WRF_ideal_template = '/jetfs/home/lkugler/DART-WRF/templates/run_WRF_ideal.sh', WRF_ideal_template = '/jetfs/home/lkugler/DART-WRF/templates/run_WRF_ideal.sh',
slurm_kwargs = {"account": "lkugler", "partition": "hub", slurm_kwargs = {"account": "lkugler", "partition": "all", "time": "00:30:00",
"ntasks": "1", "ntasks-per-core": "1", "mem": "30G", "ntasks": "1", "ntasks-per-core": "1", "mem": "30G",
"mail-type": "FAIL", "mail-user": "lukas.kugler@univie.ac.at"}, "mail-type": "FAIL", "mail-user": "lukas.kugler@univie.ac.at"},
......
...@@ -79,7 +79,7 @@ def run(cfg: Config) -> None: ...@@ -79,7 +79,7 @@ def run(cfg: Config) -> None:
try_remove(f_out) try_remove(f_out)
nml.write(f_out) nml.write(f_out)
print('saved', f_out) #print('saved', f_out)
# copy to archive # copy to archive
init = start.strftime('/%Y-%m-%d_%H:%M/') init = start.strftime('/%Y-%m-%d_%H:%M/')
......
...@@ -10,30 +10,29 @@ from config.defaults import dart_nml ...@@ -10,30 +10,29 @@ from config.defaults import dart_nml
# test multiple assimilation windows (11-12, 12-13, 13-14, ) # test multiple assimilation windows (11-12, 12-13, 13-14, )
timedelta_btw_assim = dt.timedelta(minutes=15) timedelta_btw_assim = dt.timedelta(minutes=15)
assim_times_start = pd.date_range('2008-07-30 11:00', '2008-07-30 13:00', freq='h') assim_times_start = pd.date_range('2008-07-30 11:00', '2008-07-30 13:00', freq='1h')
ensemble_size = 40
for t0 in assim_times_start:
id = None
ensemble_size = 3
dart_nml['&filter_nml'].update(num_output_state_members=ensemble_size, dart_nml['&filter_nml'].update(num_output_state_members=ensemble_size,
ens_size=ensemble_size) ens_size=ensemble_size)
t_raso = dict(var_name='Temperature', unit='[K]', vis = dict(
kind='RADIOSONDE_TEMPERATURE', kind='MSG_4_SEVIRI_BDRF', sat_channel=1,
obs_locations=[(45., 0.)], km_between_obs=12, skip_border_km=8.0,
error_generate=0.2, error_assimilate=0.6, error_generate=0.03, error_assimilate=0.06,
heights=range(1000, 15001, 500), loc_horiz_km=20,
loc_horiz_km=100, loc_vert_km=3) height=6000, loc_vert_km=6,
)
for t0 in assim_times_start:
cfg = Config(name='test_exp', id = None
cfg = Config(name=t0.strftime('exp_nat250_VIS_obs12_loc20_oe2_inf4-0.5_%H%M'),
model_dx = 2000, model_dx = 2000,
ensemble_size = ensemble_size, ensemble_size = ensemble_size,
dart_nml = dart_nml, dart_nml = dart_nml,
geo_em_forecast = '/jetfs/home/lkugler/data/sim_archive/geo_em.d01.nc.2km_200x200', geo_em_forecast = '/jetfs/home/lkugler/data/sim_archive/geo_em.d01.nc.2km_200x200',
time = dt.datetime(2008, 7, 30, 11), time = t0,
use_existing_obsseq = False, use_existing_obsseq = False,
nature_wrfout_pattern = '/jetfs/home/lkugler/data/sim_archive/nat_250m_1600x1600x100/*/1/wrfout_d01_%Y-%m-%d_%H_%M_%S', nature_wrfout_pattern = '/jetfs/home/lkugler/data/sim_archive/nat_250m_1600x1600x100/*/1/wrfout_d01_%Y-%m-%d_%H_%M_%S',
...@@ -43,30 +42,30 @@ for t0 in assim_times_start: ...@@ -43,30 +42,30 @@ for t0 in assim_times_start:
update_vars = ['U', 'V', 'W', 'THM', 'PH', 'MU', 'QVAPOR', 'QCLOUD', 'QICE', 'QSNOW', 'PSFC'], update_vars = ['U', 'V', 'W', 'THM', 'PH', 'MU', 'QVAPOR', 'QCLOUD', 'QICE', 'QSNOW', 'PSFC'],
input_profile = '/jetfs/home/lkugler/data/sim_archive/nat_250m_1600x1600x100/2008-07-30_08:00/1/input_sounding', input_profile = '/jetfs/home/lkugler/data/sim_archive/nat_250m_1600x1600x100/2008-07-30_08:00/1/input_sounding',
nature_exp_verif = 'nat_250m_blockavg2km', nature_exp_verif = 'nat_250m_blockavg2km',
assimilate_these_observations = [t_raso,], assimilate_these_observations = [vis,],
**cluster_defaults, # type: ignore **cluster_defaults, # type: ignore
) )
# test multiple assimilation windows (11-12, 12-13, 13-14, )
timedelta_btw_assim = dt.timedelta(minutes=15)
#pd.date_range('2008-07-30 11:00', '2008-07-30 13:00', freq='h')
w = WorkFlows(cfg) w = WorkFlows(cfg)
w.prepare_WRFrundir(cfg) w.prepare_WRFrundir(cfg)
#id = w.run_ideal(cfg, depends_on=id) #id = w.run_ideal(cfg, depends_on=id)
# assimilate at these times # assimilate at these times
time0 = cfg.time time0 = cfg.time
assim_times = pd.date_range(time0, time0 + timedelta_btw_assim, freq=timedelta_btw_assim) assim_times = pd.date_range(time0, time0 + dt.timedelta(hours=1), freq=timedelta_btw_assim)
last_assim_time = assim_times[-1] last_assim_time = assim_times[-1]
# loop over assimilations # loop over assimilations
for i, t in enumerate(assim_times): for i, t in enumerate(assim_times):
if i == 0: if i == 0:
if t == dt.datetime(2008, 7, 30, 11):
prior_init_time = dt.datetime(2008, 7, 30, 8)
else:
prior_init_time = t - dt.timedelta(minutes=15)
cfg.update(time = t, cfg.update(time = t,
prior_init_time = dt.datetime(2008, 7, 30, 8), prior_init_time = prior_init_time,
prior_valid_time = t, prior_valid_time = t,
prior_path_exp = '/jetfs/home/lkugler/data/sim_archive/exp_nat250m_noDA/',) prior_path_exp = '/jetfs/home/lkugler/data/sim_archive/exp_nat250m_noDA/',)
else: else:
...@@ -84,13 +83,17 @@ for t0 in assim_times_start: ...@@ -84,13 +83,17 @@ for t0 in assim_times_start:
# 2) Update posterior += updates from assimilation # 2) Update posterior += updates from assimilation
id = w.update_IC_from_DA(cfg, depends_on=id) id = w.update_IC_from_DA(cfg, depends_on=id)
# How long shall we integrate? if t == last_assim_time:
timedelta_integrate = dt.timedelta(minutes=5) restart_interval = 9999
timedelta_integrate = dt.timedelta(hours=4)
else:
restart_interval = timedelta_btw_assim.total_seconds()/60 # in minutes
timedelta_integrate = dt.timedelta(minutes=15)
cfg.update( WRF_start=t, cfg.update( WRF_start=t,
WRF_end=t+timedelta_integrate, WRF_end=t+timedelta_integrate,
restart=True, restart=True,
restart_interval=9999, restart_interval=restart_interval,
hist_interval_s=300, hist_interval_s=300,
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment