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

related to wrfinput fix

parent 1aff1cf5
No related branches found
No related tags found
No related merge requests found
......@@ -23,15 +23,23 @@ def evaluate_one_time(assim_time, valid_time, use_other_obsseq=False):
# does an observation exist at this time?
f_oso = valid_time.strftime(aso.pattern_obs_seq_out)
f_oso = cluster.archivedir+valid_time.strftime("/obs_seq_out/%Y-%m-%d_%H:%M:%S_obs_seq.out")
f_oso = cluster.archivedir+valid_time.strftime("/%Y-%m-%d_%H:%M_obs_seq.out")
if os.path.exists(f_oso):
# use the existing file
shutil.copy(f_oso, cluster.dart_rundir+'/obs_seq.out')
else:
if False:
try:
# generate the observations for the specified valid_time
aso.prepare_nature_dart(valid_time)
osq_out.generate_obsseq_out(valid_time)
except:
print("failed to generate observations from a nature file")
print("-> trying to evaluate posterior with dummy observations")
# use an old obsseq file and overwrite obs/truth values with "missing value"
f_oso = cluster.archivedir+valid_time.strftime("/obs_seq_out/%Y-%m-%d_%H:%M_obs_seq.out")
f_oso = cluster.archivedir+valid_time.strftime("/diagnostics/%Y-%m-%d_%H:%M_obs_seq.out")
if not os.path.isfile(f_oso):
raise RuntimeError(f_oso+' not found. Cannot create dummy observation.')
from dartwrf.obs import obsseq
oso = obsseq.ObsSeq(f_oso)
......@@ -40,10 +48,6 @@ def evaluate_one_time(assim_time, valid_time, use_other_obsseq=False):
oso.df['observations'] = -888888.0
oso.df['truth'] = -888888.0
oso.to_dart(cluster.dart_rundir+'/obs_seq.out')
else:
# generate the observations for the specified valid_time
aso.prepare_nature_dart(valid_time)
osq_out.generate_obsseq_out(valid_time)
aso.evaluate(valid_time, f_out_pattern=cluster.archivedir + "/diagnostics/%Y-%m-%d_%H:%M:%S_obs_seq.final-evaluate")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment