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

docs

parent 92016497
No related branches found
No related tags found
No related merge requests found
......@@ -184,7 +184,8 @@ Set up the workflow
We start by importing some modules.
To assimilate observations at dt.datetime `time` we set the directory paths and times of the prior ensemble forecasts.
Then we set up the experiment with the ``WorkFlow()`` call. It will also create the output folders and backup the configuration files and scripts. Finally, we run the data assimilation by calling :func:`dartwrf.workflows.WorkFlows.assimilate`.
Then we set up the experiment with the ``WorkFlow()`` call. It will also create the output folders and backup the configuration files and scripts.
Finally, we run the data assimilation by calling :func:`dartwrf.workflows.WorkFlows.assimilate`.
.. code-block:: python
......
......@@ -66,39 +66,35 @@ Now we can go to step 3 to run the forecast.
2) Initialize a forecast from a previous forecast
*************************************************
To run a forecast from initial conditions of a previous forecasts, we import these modules
Let's say you want to run a forecast starting at 9 UTC until 12 UTC.
We use initial conditions of a previous experiment ``/user/test/data/sim_archive/exp_abc`` which was initialized at 6 UTC and there are WRF restart files for 9 UTC.
Documentation can be found at :func:`dartwrf.workflows.WorkFlows.prepare_IC_from_prior`.
.. code-block:: python
import datetime as dt
from dartwrf.workflows import WorkFlows
Let's say you want to run a forecast starting at 9 UTC until 12 UTC.
Initial conditions shall be taken from a previous experiment in `/user/test/data/sim_archive/exp_abc` which was initialized at 6 UTC and there are WRF restart files for 9 UTC.
Then the code would be
.. code-block:: python
w = WorkFlows(exp_config='cfg.py', server_config='srvx1.py')
prior_path_exp = '/user/test/data/sim_archive/exp_abc'
prior_init_time = dt.datetime(2008,7,30,6)
prior_valid_time = dt.datetime(2008,7,30,9)
w = WorkFlows(exp_config='cfg.py', server_config='srvx1.py')
begin = dt.datetime(2008, 7, 30, 9)
end = dt.datetime(2008, 7, 30, 12)
w.prepare_WRFrundir(begin)
w.prepare_IC_from_prior(prior_path_exp, prior_init_time, prior_valid_time)
Now, we are ready :ref:`to start a forecast <1) Run the Forecast>`.
2b) Optional: Update posterior with increments from assimilation
-------------------------------------------------------------------
In order to continue a forecast after assimilation you need the posterior = prior (1) + increments (2)
1. Prepare initial conditions from a prior forecast:
1. Prepare initial conditions from a prior forecast (see above)
.. code-block:: python
......@@ -106,19 +102,23 @@ In order to continue a forecast after assimilation you need the posterior = prio
2. Update the initial conditions from data assimilation:
1. Update the initial conditions from data assimilation.
:func:`dartwrf.workflows.WorkFlows.update_IC_from_DA` updates the initial conditions (WRFrst files) with assimilation increments from DART output and copies them to the WRF run directories.
.. code-block:: python
w.update_IC_from_DA(time)
After this, the wrfrst files are updated with assimilation increments from DART output and copied to the WRF's run directories so you can continue to run the forecast ensemble.
Now you can run the forecast ensemble.
1) Run the Forecast
*******************
Define how long you want to run the forecast and when you want WRF-restart files. Since they take a lot of space, we want as few as possible.
Define how long you want to run the forecast and how often you want WRF-restart files.
Since they take a lot of space, we want as few restart files as possible.
However, we can only assimilate observations for times at which we have WRF restart files.
.. code-block:: python
......@@ -142,4 +142,5 @@ If you want to assimilate in 15 minutes again, use
output_restart_interval=output_restart_interval
)
By default, it assumes that the input data is a WRF restart file. To use WRF input file as initial conditions, set keyword ``input_is_restart=False``.
\ No newline at end of file
By default, it assumes that the input data is a WRF restart file. To use WRF input file as initial conditions, set keyword ``input_is_restart=False``.
More documentation is in the docstring of :func:`dartwrf.workflows.WorkFlows.run_ENS`.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment