Пример #1
0
# mp = 7         # 7 CPUs (requires that you pip-installed DAPPER with [MP])
# mp = True      # All CPUs
# mp = "Google"  # Requires access to DAPPER cluster

save_as = xps.launch(HMM, __file__, mp, setup)


##############################
# Present results
##############################
# The following "section" **only** uses saved data.
# => Can run as a separate script, by setting save_as manually, e.g.
# save_as = dpr.rc.dirs.data / "basic_3" / ""run_2020-11-11__20:36:36"

# Load
xps = dpr.load_xps(save_as)

# Prints all
# xpList(xps).print_avrgs(statkeys=["rmse.a","rmv.a"])

# Associate each control variable with a coordinate/dimension
xp_dict = dpr.xpSpace.from_list(xps)

# Single out (highlight) particular settings.
# Note: Must use infl=1.01 (not 1) to reproduce "no infl" scores in Ref[1],
#       as well as rot=True (better scores can be obtained without rot).
point_out = xp_dict.label_xSection
point_out('NO-infl', ('infl'), da_method='LETKF', infl=1.01, rot=True)
point_out('NO-infl/loc', ('infl'), da_method='EnKF', infl=1.01, rot=True)

# Print, with columns: `inner`. Also try setting `outer=None`.
Пример #2
0
# #### Launch experiments

scriptname = "basic_3" if nb else __file__
save_as = xps.launch(
    HMM, scriptname, setup=set_X0_and_simulate,
    mp=False,           # Multiprocessing
    fail_gently=False,  # Facilitate debugging
    liveplots=False,    # NB: Turn off if running iEnKS
    free=False,         # Don't delete time series (enables replay)
)


# #### Show results

# Load data
xps = dpr.xpList(dpr.load_xps(save_as))


# These scores may be validated by cross-checking with those
# reported by bib.bocquet2013joint in their ...
print(xps.tabulate_avrgs([
    "rmse.state.a", "rmv.state.a",  # ... figure 6, and
    "rmse.param.a", "rmv.param.a",  # ... figure 7.
]))

# Note that only the data points at `Lag` (data assimilation window length) 0 and
# 1 are reproduced by DAPPER, because the IEnKS in DAPPER does not have MDA
# (in the same sense as bib.bocquet2013joint), which applies for `Lag>=2`.
# Nevertheless, DAPPER's IEnKS accuracy also improves (both for state and param)
# with increasing Lag. However, `Lag=100` is too much (causes divergence)
# without the MDA component of by Bocquet et al.