From 543029b2378d5fb7604cdd5d6e1f334860e22a12 Mon Sep 17 00:00:00 2001 From: lkugler <lukas.kugler@gmail.com> Date: Tue, 23 Nov 2021 13:32:33 +0100 Subject: [PATCH] Update README.md --- README.md | 66 +++++++++++++++++++++++-------------------------------- 1 file changed, 28 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 92c9fa6..32a414d 100644 --- a/README.md +++ b/README.md @@ -15,42 +15,35 @@ Functions return a SLURM ID which can be used to trigger the start of another fu - Can I use it for real weather? - Yes, but you need to [convert your observations into DART format.](https://docs.dart.ucar.edu) -### A possible workflow: + +## Workflow +### Configure your experiment +Define simulation specific variables in [`config/cfg.py`](https://github.com/lkugler/DART-WRF/blob/master/config/cfg.py). +Define paths for python, ncks, etc. in [`config/clusters.py`](https://github.com/lkugler/DART-WRF/blob/master/config/clusters.py). +Dependencies are `numpy, pandas, scipy, xarray, netCDF4`. Install non-standard packages with `pip install docopt slurmpy --user`. + +### Prepare initial conditions (from input_sounding) +1) Define starting time: +`begin = dt.datetime(2008, 7, 30, 7)` +2) WRF needs directories with certain files: +`id = prepare_WRFrundir(begin)` +3) Create 3D initial conditions from input_sounding etc.: +`id = run_ideal(depends_on=id)` + +### Run free forecast +... + +### Prepare initial conditions from a previous run (wrfrst/wrfout) +`prepare_IC_from_prior` (set initial state to prior wrfrst/out) + +### Update initial conditions from Data Assimilation +`update_IC_from_DA` (overwrite assimilated variables in initial state) + +### Examples [`scheduler.py`](https://github.com/lkugler/DART-WRF/blob/master/scheduler.py) -```python -### define your functions gen_synth_obs, assimilate, run_ENS, ... - -# create initial conditions -id = prep_osse() - -# spin up the ensemble -background_init_time = dt.datetime(2008, 7, 30, 6, 0) -integration_end_time = dt.datetime(2008, 7, 30, 11, 0) -id = run_ENS(begin=background_init_time, - end=integration_end_time, - depends_on=id) - -time = integration_end_time # time now - -# now, start the ensemble data assimilation cycles -timedelta_integrate = dt.timedelta(minutes=15) -timedelta_btw_assim = dt.timedelta(minutes=15) - -while time < dt.datetime(2008, 7, 30, 16, 15): - assim_time = time - id = gen_synth_obs(assim_time, depends_on=id) - id = assimilate(assim_time, - background_init_time, - depends_on=id) - - background_init_time = assim_time # start integration now - integration_end_time = assim_time + timedelta_integrate - id = run_ENS(begin=background_init_time, - end=integration_end_time, - depends_on=id) - - time += timedelta_btw_assim -``` +[`generate_free.py`](https://github.com/lkugler/DART-WRF/blob/master/generate_free.py) + +## Finally ### SLURM submissions `scheduler.py` submits jobs into the SLURM queue with dependencies, so that SLURM starts the jobs itself as soon as resources are available. Most jobs need only one node, but model integration is done in a SLURM job array across e.g. 5 nodes: @@ -75,9 +68,6 @@ $ squeue -u `whoami` --sort=i 308393_[1-5] mem_0384 EnsWRF-3 lkugler PD 0:00 1 (Dependency) ``` -### Configure your experiment -Define simulation specific variables in [`config/cfg.py`](https://github.com/lkugler/DART-WRF/blob/master/config/cfg.py). - ### Easily switch between clusters Define cluster specific variables in `config/clusters.py `: ```python -- GitLab