From ca11b58a08a5a7d0a3b905c6d9c8122cfe92e540 Mon Sep 17 00:00:00 2001
From: lkugler <lukas.kugler@gmail.com>
Date: Fri, 10 Feb 2023 10:37:01 +0100
Subject: [PATCH] inflation option changed

---
 config/cfg.py              | 7 ++++---
 dartwrf/assim_synth_obs.py | 3 ++-
 templates/input.nml        | 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/config/cfg.py b/config/cfg.py
index af998f1..6dc6ee8 100755
--- a/config/cfg.py
+++ b/config/cfg.py
@@ -3,12 +3,13 @@ from config import clusters  # from . = problem in archivedir
 cluster = clusters.jet  # change cluster configuration here
 
 exp = utils.ExperimentConfiguration()
-exp.expname = "test_srvx1" #"exp_v1.22_P3_wbub7_WV62_obs10_loc20_oe1"
+exp.expname = "exp_v1.22_P2_rr_VIS+WV73_obs10_loc20_inf2"
 exp.model_dx = 2000
 exp.n_ens = 40
 
 exp.filter_kind = 1
-exp.inflation = True
+exp.prior_inflation = 2
+exp.post_inflation = 0
 exp.sec = True
 exp.reject_smallFGD = False
 exp.cov_loc_vert_km_horiz_km = (3, 20)
@@ -95,7 +96,7 @@ psfc = dict(plotname='SYNOP Pressure', plotunits='[Pa]',
             cov_loc_radius_km=32)
 
 
-exp.observations = [t]
+exp.observations = [vis,wv73]
 exp.update_vars = ['U', 'V', 'W', 'THM', 'PH', 'MU', 'QVAPOR', 'QCLOUD', 'QICE', 'PSFC']
 #exp.update_vars = ['U', 'V', 'W', 'T', 'PH', 'MU', 'QVAPOR', 'PSFC']
 
diff --git a/dartwrf/assim_synth_obs.py b/dartwrf/assim_synth_obs.py
index ce777c3..3b66917 100755
--- a/dartwrf/assim_synth_obs.py
+++ b/dartwrf/assim_synth_obs.py
@@ -42,7 +42,8 @@ def set_DART_nml(just_prior_values=False):
         "<adjust_obs_impact>": '.true.' if exp.adjust_obs_impact else '.false.',
         "<filter_kind>": str(int(exp.filter_kind)),
         "<sampling_error_correction>": '.true.' if exp.sec else '.false.',
-        "<post_inflation>": '4' if exp.inflation else '0',
+        "<prior_inflation>": str(exp.prior_inflation),
+        "<post_inflation>": str(exp.post_inflation),
         "<n_ens>": str(int(exp.n_ens)),
         "<cov_loc_radian>": "0.00000001",  # dummy value, used for types not mentioned below
         "<list_obstypes>": "'" + "','".join(list_obstypes) + "'",
diff --git a/templates/input.nml b/templates/input.nml
index ee5c2a7..3cc9b63 100644
--- a/templates/input.nml
+++ b/templates/input.nml
@@ -57,7 +57,7 @@
    output_sd                = .true.
    write_all_stages_at_end  = .false.
 
-   inf_flavor                  = 0,                      <post_inflation>,
+   inf_flavor                  = <prior_inflation>,                      <post_inflation>,
    inf_initial_from_restart    = .true.,                 .false.,
    inf_sd_initial_from_restart = .true.,                 .false.,
    inf_initial                 = 1.00,                    0.90,
-- 
GitLab