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

inf_initial + preassim archive

parent 452be5d0
No related branches found
No related tags found
1 merge request!3Consolidate
from dartwrf import utils from dartwrf import utils
exp = utils.Experiment() exp = utils.Experiment()
exp.expname = "obs-cold_localization-narrow" exp.expname = "obs-T_inflation-1.1"
exp.model_dx = 2000 exp.model_dx = 2000
exp.n_ens = 10 exp.n_ens = 10
exp.filter_kind = 1 exp.filter_kind = 1
exp.prior_inflation = 0 exp.prior_inflation = 0
exp.inf_initial = 1.1
exp.post_inflation = 4 exp.post_inflation = 4
exp.sec = True exp.sec = True
exp.cov_loc_vert_km_horiz_km = (4, 40) exp.cov_loc_vert_km_horiz_km = (4, 40)
...@@ -14,7 +15,7 @@ exp.superob_km = False # False or int (spatial averaging of observations) ...@@ -14,7 +15,7 @@ exp.superob_km = False # False or int (spatial averaging of observations)
exp.adjust_obs_impact = False exp.adjust_obs_impact = False
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)
exp.use_existing_obsseq = '/users/students/lehre/advDA_s2023/dartwrf_tutorial/very_cold_observation.out' #exp.use_existing_obsseq = '/users/students/lehre/advDA_s2023/dartwrf_tutorial/very_cold_observation.out'
# path to the nature run, where we take observations from # path to the nature run, where we take observations from
exp.nature = '/users/students/lehre/advDA_s2023/data/sample_nature/' exp.nature = '/users/students/lehre/advDA_s2023/data/sample_nature/'
...@@ -58,11 +59,11 @@ radar = dict(plotname='Radar reflectivity', plotunits='[dBz]', ...@@ -58,11 +59,11 @@ radar = dict(plotname='Radar reflectivity', plotunits='[dBz]',
t = dict(plotname='Temperature', plotunits='[K]', t = dict(plotname='Temperature', plotunits='[K]',
kind='RADIOSONDE_TEMPERATURE', kind='RADIOSONDE_TEMPERATURE',
#n_obs=22500, obs_locations='square_array_evenly_on_grid', n_obs=961, obs_locations='square_array_evenly_on_grid',
n_obs=1, obs_locations=[(45., 0.)], #n_obs=1, obs_locations=[(45., 0.)],
error_generate=0.2, error_assimilate=0.2, error_generate=0.2, error_assimilate=0.2,
heights=[1000,], #range(1000, 17001, 2000), heights=[1000,], #range(1000, 17001, 2000),
cov_loc_radius_km=50) cov_loc_radius_km=30)
q = dict(plotname='Specific humidity', plotunits='[kg/kg]', q = dict(plotname='Specific humidity', plotunits='[kg/kg]',
kind='RADIOSONDE_SPECIFIC_HUMIDITY', n_obs=1, kind='RADIOSONDE_SPECIFIC_HUMIDITY', n_obs=1,
...@@ -80,7 +81,6 @@ psfc = dict(plotname='SYNOP Pressure', plotunits='[Pa]', ...@@ -80,7 +81,6 @@ psfc = dict(plotname='SYNOP Pressure', plotunits='[Pa]',
error_generate=50., error_assimilate=100., error_generate=50., error_assimilate=100.,
cov_loc_radius_km=32) cov_loc_radius_km=32)
exp.observations = [t2m] exp.observations = [t]
exp.update_vars = ['U', 'V', 'W', 'THM', 'PH', 'MU', 'QVAPOR', 'QCLOUD', 'QICE', 'PSFC'] exp.update_vars = ['U', 'V', 'W', 'THM', 'PH', 'MU', 'QVAPOR', 'QCLOUD', 'QICE', 'PSFC']
#exp.update_vars = ['U', 'V', 'W', 'T', 'PH', 'MU', 'QVAPOR', 'PSFC']
...@@ -46,6 +46,7 @@ def set_DART_nml(just_prior_values=False): ...@@ -46,6 +46,7 @@ def set_DART_nml(just_prior_values=False):
"<sampling_error_correction>": '.true.' if exp.sec else '.false.', "<sampling_error_correction>": '.true.' if exp.sec else '.false.',
"<prior_inflation>": str(exp.prior_inflation), "<prior_inflation>": str(exp.prior_inflation),
"<post_inflation>": str(exp.post_inflation), "<post_inflation>": str(exp.post_inflation),
"<inf_initial>": str(exp.inf_initial),
"<n_ens>": str(int(exp.n_ens)), "<n_ens>": str(int(exp.n_ens)),
"<cov_loc_radian>": "0.00000001", # dummy value, used for types not mentioned below "<cov_loc_radian>": "0.00000001", # dummy value, used for types not mentioned below
"<list_obstypes>": "'" + "','".join(list_obstypes) + "'", "<list_obstypes>": "'" + "','".join(list_obstypes) + "'",
...@@ -220,11 +221,11 @@ def archive_filteroutput(time): ...@@ -220,11 +221,11 @@ def archive_filteroutput(time):
) )
try: # not necessary for next forecast run try: # not necessary for next forecast run
for iens in range(1, exp.n_ens + 1): ftypes = ['preassim', 'postassim']
copy( for ftype in ftypes:
cluster.dartrundir + "/postassim_member_" + str(iens).zfill(4) + ".nc", for iens in range(1, exp.n_ens + 1):
archive_assim + "/postassim_member_" + str(iens).zfill(4) + ".nc", fname = "/"+ftype+"_member_" + str(iens).zfill(4) + ".nc"
) copy(cluster.dartrundir + fname, archive_assim + fname)
for f in ["output_mean.nc", "output_sd.nc"]: # copy mean and sd to archive for f in ["output_mean.nc", "output_sd.nc"]: # copy mean and sd to archive
copy(cluster.dartrundir + "/" + f, archive_assim + "/" + f) copy(cluster.dartrundir + "/" + f, archive_assim + "/" + f)
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
inf_flavor = <prior_inflation>, <post_inflation>, inf_flavor = <prior_inflation>, <post_inflation>,
inf_initial_from_restart = .true., .false., inf_initial_from_restart = .true., .false.,
inf_sd_initial_from_restart = .true., .false., inf_sd_initial_from_restart = .true., .false.,
inf_initial = 1.00, 0.90, inf_initial = <inf_initial>, 0.90,
inf_lower_bound = 1.0, 1.0, inf_lower_bound = 1.0, 1.0,
inf_upper_bound = 1000000.0, 1000000.0, inf_upper_bound = 1000000.0, 1000000.0,
inf_damping = 0.9, 1.0, inf_damping = 0.9, 1.0,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment