[0b00607] | 1 | ********************************** |
---|
| 2 | The executable Script - ``run.sh`` |
---|
| 3 | ********************************** |
---|
| 4 | |
---|
| 5 | The execution of ``flex_extract`` is done by the ``run.sh`` Shell script, which is a wrapping script for the top-level Python script ``submit.py``. |
---|
| 6 | The Python script constitutes the entry point to ECMWF data retrievals with ``flex_extract`` and controls the program flow. |
---|
| 7 | |
---|
| 8 | ``submit.py`` has two (three) sources for input parameters with information about program flow and ECMWF data selection, the so-called ``CONTROL`` file, |
---|
| 9 | the command line parameters and the so-called ``ECMWF_ENV`` file. Whereby, the command line parameters will override the ``CONTROL`` file parameters. |
---|
| 10 | |
---|
| 11 | Based on these input information ``flex_extract`` applies one of the application modes to either retrieve the ECMWF data via a Web API on a local maschine or submit a jobscript to ECMWF servers and retrieve the data there with sending the files to the local system eventually. |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | Submission Parameter |
---|
| 17 | -------------------- |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | .. exceltable:: Parameter for Submission |
---|
| 21 | :file: ../../_files/SubmitParameters.xls |
---|
| 22 | :header: 1 |
---|
| 23 | :sheet: 0 |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | Content of ``run.sh`` |
---|
| 29 | --------------------- |
---|
| 30 | |
---|
| 31 | .. literalinclude:: ../../../../../Run/run.sh |
---|
| 32 | :language: bash |
---|
| 33 | :caption: run.sh |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | .. _ref-install-script: |
---|
| 37 | |
---|
| 38 | Usage of ``submit.py`` (optional) |
---|
| 39 | --------------------------------- |
---|
| 40 | |
---|
| 41 | It is also possible to start ``flex_extract`` directly from command line by using the ``submit.py`` script instead of the wrapping Shell script ``run.sh``. This top-level script is located in |
---|
[b1674ed] | 42 | ``flex_extract_vX.X/Source/Python`` and is executable. With the ``help`` parameter we see again all possible |
---|
[0b00607] | 43 | command line parameter. |
---|
| 44 | |
---|
| 45 | .. code-block:: bash |
---|
| 46 | |
---|
| 47 | submit.py --help |
---|
| 48 | |
---|
| 49 | usage: submit.py [-h] [--start_date START_DATE] [--end_date END_DATE] |
---|
| 50 | [--date_chunk DATE_CHUNK] [--job_chunk JOB_CHUNK] |
---|
| 51 | [--controlfile CONTROLFILE] [--basetime BASETIME] |
---|
| 52 | [--step STEP] [--levelist LEVELIST] [--area AREA] |
---|
| 53 | [--debug DEBUG] [--oper OPER] [--request REQUEST] |
---|
| 54 | [--public PUBLIC] [--rrint RRINT] [--inputdir INPUTDIR] |
---|
| 55 | [--outputdir OUTPUTDIR] [--ppid PPID] |
---|
| 56 | [--job_template JOB_TEMPLATE] [--queue QUEUE] |
---|
| 57 | |
---|
| 58 | Retrieve FLEXPART input from ECMWF MARS archive |
---|
| 59 | |
---|
| 60 | optional arguments: |
---|
| 61 | -h, --help show this help message and exit |
---|
| 62 | --start_date START_DATE |
---|
| 63 | start date YYYYMMDD (default: None) |
---|
| 64 | --end_date END_DATE end_date YYYYMMDD (default: None) |
---|
| 65 | --date_chunk DATE_CHUNK |
---|
| 66 | # of days to be retrieved at once (default: None) |
---|
| 67 | --job_chunk JOB_CHUNK |
---|
| 68 | # of days to be retrieved within a single job |
---|
| 69 | (default: None) |
---|
| 70 | --controlfile CONTROLFILE |
---|
| 71 | The file with all CONTROL parameters. (default: |
---|
| 72 | CONTROL_EA5) |
---|
| 73 | --basetime BASETIME base such as 0 or 12 (for half day retrievals) |
---|
| 74 | (default: None) |
---|
| 75 | --step STEP Forecast steps such as 00/to/48 (default: None) |
---|
| 76 | --levelist LEVELIST Vertical levels to be retrieved, e.g. 30/to/60 |
---|
| 77 | (default: None) |
---|
| 78 | --area AREA area defined as north/west/south/east (default: None) |
---|
| 79 | --debug DEBUG debug mode - leave temporary files intact (default: |
---|
| 80 | None) |
---|
| 81 | --oper OPER operational mode - prepares dates with environment |
---|
| 82 | variables (default: None) |
---|
| 83 | --request REQUEST list all mars requests in file mars_requests.dat |
---|
| 84 | (default: None) |
---|
| 85 | --public PUBLIC public mode - retrieves the public datasets (default: |
---|
| 86 | None) |
---|
| 87 | --rrint RRINT Selection of old or new precipitation interpolation: 0 |
---|
| 88 | - old method 1 - new method (additional subgrid |
---|
| 89 | points) (default: None) |
---|
| 90 | --inputdir INPUTDIR Path to the temporary directory for the retrieval grib |
---|
| 91 | files and other processing files. (default: None) |
---|
| 92 | --outputdir OUTPUTDIR |
---|
| 93 | Path to the final directory where the final FLEXPART |
---|
| 94 | ready input files are stored. (default: None) |
---|
| 95 | --ppid PPID This is the specify parent process id of a single |
---|
| 96 | flex_extract run to identify the files. It is the |
---|
| 97 | second number in the GRIB files. (default: None) |
---|
| 98 | --job_template JOB_TEMPLATE |
---|
| 99 | The job template file which are adapted to be |
---|
| 100 | submitted to the batch system on ECMWF server. |
---|
| 101 | (default: job.temp) |
---|
| 102 | --queue QUEUE The ECMWF server name for submission of the job script |
---|
| 103 | to the batch system (e.g. ecgate | cca | ccb) |
---|
| 104 | (default: None) |
---|
| 105 | |
---|
| 106 | |
---|
| 107 | |
---|
| 108 | |
---|
| 109 | |
---|
| 110 | |
---|
| 111 | |
---|
| 112 | .. toctree:: |
---|
| 113 | :hidden: |
---|
| 114 | :maxdepth: 2 |
---|