From 7abd47c5b885ba5b30e48a1eb2727d0ac8d88ee2 Mon Sep 17 00:00:00 2001 From: patnr Date: Thu, 31 Oct 2024 10:35:02 +0100 Subject: [PATCH] Test --- dapper/README.md | 8 ++++---- dapper/da_methods/README.md | 4 +--- dapper/mods/README.md | 37 +++++++++++++++++-------------------- docs/examples/README.md | 2 +- 4 files changed, 23 insertions(+), 28 deletions(-) diff --git a/dapper/README.md b/dapper/README.md index 04cf395f..e00f5adc 100644 --- a/dapper/README.md +++ b/dapper/README.md @@ -5,13 +5,13 @@ your own **model** or **method**, then - If it is a complex one, you may be better off using DAPPER merely as *inspiration* (but you can still - [cite it](https://github.com/nansencenter/DAPPER#getting-started)) + [cite it](../#getting-started)) rather than trying to squeeze everything into its templates. - If it is relatively simple, however, you may well want to use DAPPER. In that case, read this: - - [`mods`][] - - [`da_methods`][] + - [`mods`](mods) + - [`da_methods`](da_methods) Since the generality of DAPPER is -[limited](https://github.com/nansencenter/DAPPER#similar-projects) +[limited](../#similar-projects) it is quite likely you will also need to make changes to the DAPPER code itself. diff --git a/dapper/da_methods/README.md b/dapper/da_methods/README.md index fb0454c1..20bb9755 100644 --- a/dapper/da_methods/README.md +++ b/dapper/da_methods/README.md @@ -1,6 +1,4 @@ -Also see the section on -[DA Methods](https://github.com/nansencenter/DAPPER#DA-Methods) -in the main README +Also see [this section on DA Methods](../../#da-methods) for an overview of the methods included with DAPPER. ## Defining your own method diff --git a/dapper/mods/README.md b/dapper/mods/README.md index d29fb413..18cc4422 100644 --- a/dapper/mods/README.md +++ b/dapper/mods/README.md @@ -1,5 +1,5 @@ See the README section on -[test cases (models)](https://github.com/nansencenter/DAPPER#Test-cases-models) +[test cases (models)](../../index.md#test-cases-models) for a table overview of the included models. ## Defining your own model @@ -8,33 +8,30 @@ Below is a sugested structuring followed by most models already within DAPPER. However, you are free to organize your model as you see fit, as long as it culminates in the definition of one or more [`mods.HiddenMarkovModel`][]. For the sake of modularity, -try not to import stuff from DAPPER outside of [`mods`][] and `liveplotting`. +try not to import stuff from DAPPER outside of [`mods`](.) and [`tools.liveplotting`][]. - Make a directory: `my_model`. It does not have to reside within the `dapper/mods` folder, but make sure to look into some of the other dirs thereunder as examples, for example `dapper/mods/DoublePendulum`. - - Make a file: `my_model/__init__.py` to hold the core workings of the model. Further details are given [below](#details-on-my_model__init__py), but the main work lies in defining a `step(x, t, dt)` function (you can name it however you like, but `step` is the convention), to implement the dynamical model/system mapping the state `x` from one time `t` to another `t + dt`. - - Make a file: `my_model/demo.py` to run `step` and visually showcase a simulation of the model without any DA, and verify it's working. - - Make a file: `my_model/my_settings_1.py` that defines - (or "configures", since there is usually little programming logic and flow taking place) - a complete [`mods.HiddenMarkovModel`][] ready for a synthetic experiment - (also called "twin experiment" or OSSE). -- Once you've made some experiments you believe are noteworthy you should add a - "suggested settings/tunings" section in comments at the bottom of - `my_model/my_settings_1.py`, listing some of the relevant DA method - configurations that you tested, along with the RMSE (or other stats) that - you obtained for those methods. You will find plenty of examples already in - DAPPER, used for cross-referenced with literature to verify the workings of DAPPER - (and the reproducibility of publications). + (or "configures", since there is usually little programming logic and flow taking place) + a complete [`mods.HiddenMarkovModel`][] ready for a synthetic experiment + (also called "twin experiment" or OSSE). +- Once you've made some experiments you believe are noteworthy you should add a + "suggested settings/tunings" section in comments at the bottom of + `my_model/my_settings_1.py`, listing some of the relevant DA method + configurations that you tested, along with the RMSE (or other stats) that + you obtained for those methods. You will find plenty of examples already in + DAPPER, used for cross-referenced with literature to verify the workings of DAPPER + (and the reproducibility of publications). ### Details on `my_model/__init__.py` @@ -48,11 +45,11 @@ try not to import stuff from DAPPER outside of [`mods`][] and `liveplotting`. - [`mods.Lorenz96`][]: use of relatively clever slice notation. - [`mods.LorenzUV`][]: use of cleverer slice notation: `...` (ellipsis). Consider pre-defining the slices like so: - - iiX = (..., slice(None, Nx)) - iiP = (..., slice(Nx, None)) - - to abbreviate the indexing elsewhere. + ```python + iiX = (..., slice(None, Nx)) + iiP = (..., slice(Nx, None)) + ``` + to abbreviate the indexing elsewhere. - [`mods.QG`][]: use of parallelized for loop (map). diff --git a/docs/examples/README.md b/docs/examples/README.md index 95275f5f..1cdbca2b 100644 --- a/docs/examples/README.md +++ b/docs/examples/README.md @@ -14,7 +14,7 @@ and that it requires a Google login): [![Open In Collab](https://colab.research. ## Description When adapting the scripts to your needs, -you should begin with `docs/examples/basic_1.py` +you should begin with `basic_1.py` before incorporating the aspects of `basic_2` and `basic_3`. - `basic_1.py`: A single experiment, with Liveplotting.