Skip to content
Snippets Groups Projects
Commit 21edb694 authored by lkugler's avatar lkugler
Browse files

fix if inflation 2

parent 90264266
Branches
Tags
No related merge requests found
...@@ -3,7 +3,7 @@ from dartwrf import utils ...@@ -3,7 +3,7 @@ from dartwrf import utils
exp = utils.Experiment() exp = utils.Experiment()
exp.expname = "test_newcode" #exp_v1.22_P2_rr_VIS_obs10_loc20_oe3" exp.expname = "test_newcode" #exp_v1.22_P2_rr_VIS_obs10_loc20_oe3"
exp.model_dx = 2000 exp.model_dx = 2000
exp.n_ens = 40 exp.n_ens = 10
exp.superob_km = False # False or int (spatial averaging of observations) exp.superob_km = False # False or int (spatial averaging of observations)
exp.use_existing_obsseq = False # False or pathname (use precomputed obs_seq.out files) exp.use_existing_obsseq = False # False or pathname (use precomputed obs_seq.out files)
...@@ -25,10 +25,10 @@ exp.dart_nml = {'&assim_tools_nml': ...@@ -25,10 +25,10 @@ exp.dart_nml = {'&assim_tools_nml':
num_output_state_members=exp.n_ens, num_output_state_members=exp.n_ens,
num_output_obs_members=exp.n_ens, num_output_obs_members=exp.n_ens,
inf_flavor=['0', '0'], inf_flavor=['0', '0'],
output_members='.true', output_members='.true.',
output_mean='.true.', output_mean='.true.',
output_sd='.true.', output_sd='.true.',
stages_to_write=[''], stages_to_write='output',
), ),
'&location_nml': '&location_nml':
dict(horiz_dist_only='.true.', dict(horiz_dist_only='.true.',
......
...@@ -529,6 +529,7 @@ def main(time, prior_init_time, prior_valid_time, prior_path_exp): ...@@ -529,6 +529,7 @@ def main(time, prior_init_time, prior_valid_time, prior_path_exp):
prepare_run_DART_folder() prepare_run_DART_folder()
nml = dart_nml.write_namelist() nml = dart_nml.write_namelist()
prior_inflation_type = nml['&filter_nml']['inf_flavor'][0][0]
print("prepare nature") print("prepare nature")
prepare_nature_dart(time) # link WRF files to DART directory prepare_nature_dart(time) # link WRF files to DART directory
...@@ -549,8 +550,7 @@ def main(time, prior_init_time, prior_valid_time, prior_path_exp): ...@@ -549,8 +550,7 @@ def main(time, prior_init_time, prior_valid_time, prior_path_exp):
print(" 2.3) reject observations? ") print(" 2.3) reject observations? ")
qc_obs(time, oso, osf_prior) qc_obs(time, oso, osf_prior)
print('prior inflation=', nml['&filter_nml']['inf_flavor'][0]) if prior_inflation_type == '2':
if nml['&filter_nml']['inf_flavor'][0]:
prepare_inflation_2(time, prior_init_time) prepare_inflation_2(time, prior_init_time)
print(" 3) run filter ") print(" 3) run filter ")
...@@ -558,7 +558,7 @@ def main(time, prior_init_time, prior_valid_time, prior_path_exp): ...@@ -558,7 +558,7 @@ def main(time, prior_init_time, prior_valid_time, prior_path_exp):
filter(nproc=nproc) filter(nproc=nproc)
archive_filteroutput(time) archive_filteroutput(time)
if exp.dart_nml: if prior_inflation_type == '2':
archive_inflation_2(time) archive_inflation_2(time)
print(" 4) evaluate posterior observations for all observations (incl rejected)") print(" 4) evaluate posterior observations for all observations (incl rejected)")
......
...@@ -24,7 +24,6 @@ class WorkFlows(object): ...@@ -24,7 +24,6 @@ class WorkFlows(object):
we load the config from load the config from cluster.scripts_rundir/config/cfg.py we load the config from load the config from cluster.scripts_rundir/config/cfg.py
""" """
print('------ start exp from ', exp_config, ' and ', server_config, ' ------')
def copy_dartwrf_to_archive(): def copy_dartwrf_to_archive():
# Copy scripts to self.cluster.archivedir folder # Copy scripts to self.cluster.archivedir folder
...@@ -50,6 +49,8 @@ class WorkFlows(object): ...@@ -50,6 +49,8 @@ class WorkFlows(object):
# later, we can load the cluster cfg with `from config.cluster import cluster` # later, we can load the cluster cfg with `from config.cluster import cluster`
shutil.copyfile('config/'+server_config, self.cluster.scripts_rundir+'/config/cluster.py') # whatever server, the config name is always the same! shutil.copyfile('config/'+server_config, self.cluster.scripts_rundir+'/config/cluster.py') # whatever server, the config name is always the same!
print('------ start exp from ', exp_config, ' and ', server_config, ' ------')
# copy config file to current config folder # copy config file to current config folder
try: try:
shutil.copyfile('config/'+exp_config, '/'.join(__file__.split('/')[:-2])+'/config/cfg.py') shutil.copyfile('config/'+exp_config, '/'.join(__file__.split('/')[:-2])+'/config/cfg.py')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment