Skip to content

Commit

Permalink
Improve format
Browse files Browse the repository at this point in the history
  • Loading branch information
patnr committed Jul 2, 2024
1 parent 8717c5e commit 7006390
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
23 changes: 13 additions & 10 deletions examples/basic_2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,18 @@
"outputs": [],
"source": [
"%matplotlib notebook\n",
"import dapper as dpr\n",
"import dapper as dpr # noqa: I001\n",
"import dapper.da_methods as da"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e6ac1662",
"metadata": {},
"outputs": [],
"cell_type": "markdown",
"id": "4684f899",
"metadata": {
"lines_to_next_cell": 2
},
"source": [
"# #### DA method configurations\n",
"# fmt: off\n",
"from dapper.mods.Lorenz63.sakov2012 import HMM # Expected rmse.a:"
"#### DA method configurations"
]
},
{
Expand All @@ -51,6 +49,9 @@
"metadata": {},
"outputs": [],
"source": [
"# fmt: off\n",
"from dapper.mods.Lorenz63.sakov2012 import HMM # Expected rmse.a:\n",
"\n",
"xps = dpr.xpList()\n",
"xps += da.Climatology() # 7.6\n",
"xps += da.OptInterp() # 1.25\n",
Expand Down Expand Up @@ -85,6 +86,7 @@
"metadata": {},
"outputs": [],
"source": [
"# fmt: off\n",
"# from dapper.mods.Lorenz96.sakov2008 import HMM # Expected rmse.a:\n",
"# xps = dpr.xpList()\n",
"# xps += da.Climatology() # 3.6\n",
Expand All @@ -99,7 +101,8 @@
"# xps += da.iEnKS('Sqrt' , N=40, infl=1.01, rot=True) # 0.17\n",
"# # With localisation:\n",
"# xps += da.LETKF( N=7 , infl=1.04, rot=True, loc_rad=4) # 0.22\n",
"# xps += da.SL_EAKF( N=7 , infl=1.07, rot=True, loc_rad=6) # 0.23"
"# xps += da.SL_EAKF( N=7 , infl=1.07, rot=True, loc_rad=6) # 0.23\n",
"# fmt: on"
]
},
{
Expand Down
8 changes: 7 additions & 1 deletion examples/basic_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
# Also note that liveplotting does not work on Colab.

# %matplotlib notebook
import dapper as dpr
import dapper as dpr # noqa: I001
import dapper.da_methods as da

# #### DA method configurations


# +
# fmt: off
from dapper.mods.Lorenz63.sakov2012 import HMM # Expected rmse.a:

Expand All @@ -31,10 +34,12 @@
# xps += da.PartFilt( N=4000, reg=0.7 , NER=0.05) # 0.27
# xps += da.PFxN(xN=1000, N=30 , Qs=2 , NER=0.2) # 0.56
# # fmt: on
# -

# #### With Lorenz-96 instead

# +
# fmt: off
# from dapper.mods.Lorenz96.sakov2008 import HMM # Expected rmse.a:
# xps = dpr.xpList()
# xps += da.Climatology() # 3.6
Expand All @@ -50,6 +55,7 @@
# # With localisation:
# xps += da.LETKF( N=7 , infl=1.04, rot=True, loc_rad=4) # 0.22
# xps += da.SL_EAKF( N=7 , infl=1.07, rot=True, loc_rad=6) # 0.23
# fmt: on
# -

# #### Other models (suitable xp's listed in HMM files):
Expand Down

0 comments on commit 7006390

Please sign in to comment.