|
1 |
| -todo |
| 1 | +### Adding an ALARO+SURFEX test to DAVAÏ |
| 2 | + |
| 3 | +This section describes what was done to add an ALARO+SURFEX test to DAVAÏ. It may serve as a recipe to add other tests. |
| 4 | + |
| 5 | +First, create a new DAVAÏ experiment with `davai-new_xp`. Also, run following commands to set the environment: |
| 6 | + |
| 7 | +```bash |
| 8 | +source ~acrd/.vortexrc/profile |
| 9 | +cp ~rm9/.vortexrc/uget-client-defaults.ini .vortexrc/ |
| 10 | +``` |
| 11 | + |
| 12 | +Next, initialize the hack directory for your user: |
| 13 | + |
| 14 | +```bash |
| 15 | +uget.py bootstrap_hack ${USER} |
| 16 | +``` |
| 17 | + |
| 18 | +Note: directories in this document are usually relative to the experiment's base directory. |
| 19 | + |
| 20 | +#### Creating the test itself |
| 21 | + |
| 22 | +##### Modifications to the file `conf/davai_nrv.ini`: |
| 23 | + |
| 24 | +* add a section for the model: |
| 25 | + ```ini |
| 26 | + [alaro] |
| 27 | + model = alaro |
| 28 | + LAM = True |
| 29 | + input_shelf = &{input_shelf_lam} |
| 30 | + fcst_term = 12 |
| 31 | + expertise_term = 12 |
| 32 | + coupling_frequency = 3 |
| 33 | + ``` |
| 34 | + |
| 35 | +* add a section for the forecast itself: |
| 36 | + ```ini |
| 37 | + [forecast-alaro1_sfx-chmh2325] |
| 38 | + alaro_version = 1_sfx |
| 39 | + rundate = date(2021022000) |
| 40 | + ``` |
| 41 | + |
| 42 | +* since we're using a new domain (chmh2325), add a section for this domain: |
| 43 | + ```ini |
| 44 | + [chmh2325] |
| 45 | + geometry = geometry(chmh2325) |
| 46 | + timestep = 90 |
| 47 | + ``` |
| 48 | + |
| 49 | +##### Modifications to the file `tasks/forecasts/standalone_forecasts.py`: |
| 50 | + |
| 51 | +The easiest is to copy and modify an existing forecast. In this case, we added to the following to the `alaro` family: |
| 52 | +```python |
| 53 | + Family(tag='chmh2325', ticket=t, nodes=[ |
| 54 | + StandaloneAlaroForecast(tag='forecast-alaro1_sfx-chmh2325', ticket=t, **kw), |
| 55 | + , **kw), |
| 56 | +``` |
| 57 | + |
| 58 | +##### Modifications to the file `tasks/forecasts/standalone/alaro.py`: |
| 59 | + |
| 60 | +We need to add the fetching of the SURFEX initial file, the SURFEX namelist and the PGD file. This was done using the AROME forecast task as an example. The fetching of these files is put under a condition `self.conf.alaro_version == '1_sfx'`, to make sure the files are only fetched when running ALARO with SURFEX. |
| 61 | + |
| 62 | +#### Setup a custom catalogue |
| 63 | + |
| 64 | +Find out which catalogue is used by your test. In the case of ALARO, the file `alaro.py` uses ```self.conf.davaienv```, which is set in `davai_nrv.ini` to be `cy49.davai_specials.02@davai`. A local copy of this catalogue is created with |
| 65 | + |
| 66 | +``` |
| 67 | +uget.py hack env cy49.davai_specials.02@davai into cy49.davai_specials.02@@${USER} |
| 68 | +``` |
| 69 | + |
| 70 | +This will create a local catalogue file under `~/.vortexrc/hack/uget/${USER}/env/`. Make sure to modify the value in `davai_nrv.ini` to use your local copy. |
| 71 | + |
| 72 | +#### Adding constant files such as namelist files, PGD file, etc. |
| 73 | + |
| 74 | +Constant files go into the `~/.vortexrc/hack/` directory. To add/modify a namelist file, first find out which namelists are used by your test in the local catalogue file you copied before (`cy49.davai_specials.02@${USER}`). In the case of the ALARO forecast, the namelists that are used are `49.arpifs@davai.02.nam.tgz@davai`, so a local copy is taken of these with |
| 75 | + |
| 76 | +``` |
| 77 | +uget.py hack data 49.arpifs@davai.02.nam.tgz@davai into 49.arpifs@davai.02.nam.tgz@${USER} |
| 78 | +``` |
| 79 | + |
| 80 | +This creates a tgz file under `~/.vortexrc/hack/uget/${USER}/data/`, which then needs to be unpacked. Make sure to modify the catalogue file to use your local copy of the namelists. |
| 81 | + |
| 82 | +You then can modify existing namelist files, or - as was the case for the ALARO+SURFEX test - add new namelist files. The location and name of the required namelists can be found in the forecast script (`alaro.py`). The namelists created were `model/alaro/fcst.alaro1_sfx.nam` and `model/alaro/fcst.alaro1_sfx.nam_surfex`. Make sure to use the following variables/values: |
| 83 | + |
| 84 | +``` |
| 85 | +CNMEXP=__CEXP__, |
| 86 | +NPROC=__NBPROC__, |
| 87 | +NSTRIN=__NBPROC__, |
| 88 | +NSTROUT=__NBPROC__, |
| 89 | +CSTOP=__FCSTOP__, |
| 90 | +TSTEP=__TIMESTEP__, |
| 91 | +``` |
| 92 | +since these are substituted by DAVAÏ. |
| 93 | + |
| 94 | +The name of the PGD file needs to be set in the catalogue `cy49.davai_specials.02@${USER}` by adding the line |
| 95 | + |
| 96 | +``` |
| 97 | +PGD_FA_CHMH2325=uget:pgd.chmh2325-02km33.fa.01@${USER} |
| 98 | +``` |
| 99 | + |
| 100 | +The PGD file itself should be put just under `~/.vortexrc/hack/uget/${USER}/data/`. |
| 101 | + |
| 102 | +#### Setting non-constant files such as initial conditions, LBC files, etc. |
| 103 | + |
| 104 | +These files should go into the shelf (since in mixed tests they could be generated by an earlier task). The name of the shelf can be found in `davai_nrv.ini`, and turns out to be `input_shelf_LAM = shelf_cy48t1_LAM.01@davai`, so we'll create a directory `/scratch/${USER}/mtool/cache/vortex/davai/shelves/shelf_cy48t1_LAM.01@davai/`. Following files are put in this directory: |
| 105 | + |
| 106 | +``` |
| 107 | +20210220T0000A/surfan/analysis.surf-surfex.chmh2325-02km33.fa |
| 108 | +20210220T0000A/coupling/cpl.arpege-4dvarfr-prod.chmh2325-02km33+0003:00.fa |
| 109 | +20210220T0000A/coupling/cpl.arpege-4dvarfr-prod.chmh2325-02km33+0009:00.fa |
| 110 | +20210220T0000A/coupling/cpl.arpege-4dvarfr-prod.chmh2325-02km33+0000:00.fa |
| 111 | +20210220T0000A/coupling/cpl.arpege-4dvarfr-prod.chmh2325-02km33+0006:00.fa |
| 112 | +20210220T0000A/coupling/cpl.arpege-4dvarfr-prod.chmh2325-02km33+0012:00.fa |
| 113 | +``` |
| 114 | + |
| 115 | +To know how to name these files, look at similar data for other experiments, or just your experiment and see where it crashes. |
| 116 | + |
| 117 | +### Defining a new geometry |
| 118 | + |
| 119 | +Since the ALARO+SURFEX test runs on a new domain, this domain should also be registred. This is done in a file `~/.vortexrc/geometries.ini`, following the examples from the file `vortex/conf/geometries.ini`. |
0 commit comments