"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.\n",
"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.\n",
Finally, the WRF's ideal.exe program is called for all ensemble members to create initial condition files, called `wrfinput_d01`, for each member.
Finally, the WRF's ideal.exe program is called for all ensemble members to create initial condition files, called `wrfinput_d01`, for each member.
```python
```python
w.run_ideal()
w.run_ideal()
```
```
Now we can go to step 3 to run the forecast.
Now we can go to step 3 to run the forecast.
### 2) Initialize a forecast from a previous forecast
### 2) Initialize a forecast from a previous forecast
To run a forecast from initial conditions of a previous forecasts, we import these modules
To run a forecast from initial conditions of a previous forecasts, we import these modules
```python
```python
importdatetimeasdt
importdatetimeasdt
fromdartwrf.workflowsimportWorkFlows
fromdartwrf.workflowsimportWorkFlows
```
```
Let's say you want to run a forecast starting at 9 UTC until 12 UTC.
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.
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.
2. Update the initial conditions from data assimilation:
2. Update the initial conditions from data assimilation:
```python
```python
id=w.update_IC_from_DA(time,depends_on=id)
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.
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.
### 3) Run the forecast
### 3) 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 when you want WRF-restart files. Since they take a lot of space, we want as few as possible.
```python
```python
timedelta_integrate=dt.timedelta(hours=5)
timedelta_integrate=dt.timedelta(hours=5)
w.run_ENS(begin=begin,# start integration from here
w.run_ENS(begin=begin,# start integration from here
end=time+timedelta_integrate,# integrate until here
end=time+timedelta_integrate,# integrate until here
output_restart_interval=9999,# do not write WRF restart files
output_restart_interval=9999,# do not write WRF restart files
)
)
```
```
If you want to assimilate in 15 minutes again, use
If you want to assimilate in 15 minutes again, use