diff --git a/config/exp_template.py b/config/exp_template.py index c45c6f74ce24cfd77177ed1e549beb16bd40c9ff..8a14c5d426defb4c4cef0a219f28eeba768cc745 100755 --- a/config/exp_template.py +++ b/config/exp_template.py @@ -3,7 +3,7 @@ from dartwrf import utils exp = utils.Experiment() exp.expname = "test_newcode" #exp_v1.22_P2_rr_VIS_obs10_loc20_oe3" exp.model_dx = 2000 -exp.n_ens = 40 +exp.n_ens = 10 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) @@ -25,10 +25,10 @@ exp.dart_nml = {'&assim_tools_nml': num_output_state_members=exp.n_ens, num_output_obs_members=exp.n_ens, inf_flavor=['0', '0'], - output_members='.true', + output_members='.true.', output_mean='.true.', output_sd='.true.', - stages_to_write=[''], + stages_to_write='output', ), '&location_nml': dict(horiz_dist_only='.true.', diff --git a/dartwrf/assim_synth_obs.py b/dartwrf/assim_synth_obs.py index a189db726da3696aca5a31275ae74222374cae33..e3860f31e8ab0e647ac0097474d0de1d2aae15d5 100755 --- a/dartwrf/assim_synth_obs.py +++ b/dartwrf/assim_synth_obs.py @@ -529,6 +529,7 @@ def main(time, prior_init_time, prior_valid_time, prior_path_exp): prepare_run_DART_folder() nml = dart_nml.write_namelist() + prior_inflation_type = nml['&filter_nml']['inf_flavor'][0][0] print("prepare nature") 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): print(" 2.3) reject observations? ") qc_obs(time, oso, osf_prior) - print('prior inflation=', nml['&filter_nml']['inf_flavor'][0]) - if nml['&filter_nml']['inf_flavor'][0]: + if prior_inflation_type == '2': prepare_inflation_2(time, prior_init_time) print(" 3) run filter ") @@ -558,7 +558,7 @@ def main(time, prior_init_time, prior_valid_time, prior_path_exp): filter(nproc=nproc) archive_filteroutput(time) - if exp.dart_nml: + if prior_inflation_type == '2': archive_inflation_2(time) print(" 4) evaluate posterior observations for all observations (incl rejected)") diff --git a/dartwrf/workflows.py b/dartwrf/workflows.py index 1a0807160bceab659ecf9de75ce1705179136e26..1eb4560bab326306b6f412a19541830b889c5ebd 100644 --- a/dartwrf/workflows.py +++ b/dartwrf/workflows.py @@ -24,7 +24,6 @@ class WorkFlows(object): 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(): # Copy scripts to self.cluster.archivedir folder @@ -50,6 +49,8 @@ class WorkFlows(object): # 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! + print('------ start exp from ', exp_config, ' and ', server_config, ' ------') + # copy config file to current config folder try: shutil.copyfile('config/'+exp_config, '/'.join(__file__.split('/')[:-2])+'/config/cfg.py')