source: flex_extract.git/test/Regression/Mars_request/run_local.sh @ 2f5ca80

ctbtodev
Last change on this file since 2f5ca80 was 2f5ca80, checked in by Anne Philipp <anne.philipp@…>, 5 years ago

added comparison test for mars requests with a starter set of control files to test

  • Property mode set to 100755
File size: 2.7 KB
Line 
1#!/bin/bash
2#
3# @Author: Anne Philipp
4#
5# @Date: October, 4 2018
6#
7# @Description: Sets all command line parameter for the "submit.py" script
8#               from flex_extract and calls it.
9#               
10# @ChangeHistory: November, 23 2018
11#                 In this version the parameters are fixed for the extraction of
12#                 MARS request files from the current flex_extract version to run
13#                 a couple of comparison checks.
14#                 The script has to be called with the name of the control file and
15#                 the path to the control files.
16#
17#                 Example:
18#                 ./run_local.sh 7.1 Controls
19#
20
21
22# -----------------------------------------------------------------
23# AVAILABLE COMMANDLINE ARGUMENTS TO SET
24#
25# THE USER HAS TO SPECIFY THESE PARAMETER
26#
27
28QUEUE=''
29START_DATE=None
30END_DATE=None
31DATE_CHUNK=None
32BASETIME=None
33STEP=None
34LEVELIST=None
35AREA=None
36INPUTDIR='./'${1}'/'
37OUTPUTDIR=None
38FLEXPART_ROOT_SCRIPTS=None
39PP_ID=None
40JOB_TEMPLATE='' 
41CONTROLFILE=$2 
42DEBUG=0 
43REQUEST=1
44PUBLIC=0
45
46# -----------------------------------------------------------------
47#
48# AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!
49#
50# -----------------------------------------------------------------
51
52# PATH TO SUBMISSION SCRIPT
53pyscript=../../../source/python/submit.py
54
55# INITIALIZE EMPTY PARAMETERLIST
56parameterlist=""
57
58# CHECK FOR MORE PARAMETER
59if [ -n "$START_DATE" ]; then
60  parameterlist+=" --start_date=$START_DATE"
61fi
62if [ -n "$END_DATE" ]; then
63  parameterlist+=" --end_date=$END_DATE"
64fi
65if [ -n "$DATE_CHUNK" ]; then
66  parameterlist+=" --date_chunk=$DATE_CHUNK"
67fi
68if [ -n "$BASETIME" ]; then
69  parameterlist+=" --basetime=$BASETIME"
70fi
71if [ -n "$STEP" ]; then
72  parameterlist+=" --step=$STEP"
73fi
74if [ -n "$LEVELIST" ]; then
75  parameterlist+=" --levelist=$LEVELIST"
76fi
77if [ -n "$AREA" ]; then
78  parameterlist+=" --area=$AREA"
79fi
80if [ -n "$INPUTDIR" ]; then
81  parameterlist+=" --inputdir=$INPUTDIR"
82fi
83if [ -n "$OUTPUTDIR" ]; then
84  parameterlist+=" --outputdir=$OUTPUTDIR"
85fi
86if [ -n "$FLEXPART_ROOT_SCRIPTS" ]; then
87  parameterlist+=" --flexpart_root_scripts=$FLEXPART_ROOT_SCRIPTS"
88fi
89if [ -n "$PP_ID" ]; then
90  parameterlist+=" --ppid=$PP_ID"
91fi
92if [ -n "$JOB_TEMPLATE" ]; then
93  parameterlist+=" --job_template=$JOB_TEMPLATE"
94fi
95if [ -n "$QUEUE" ]; then
96  parameterlist+=" --queue=$QUEUE"
97fi
98if [ -n "$CONTROLFILE" ]; then
99  parameterlist+=" --controlfile=$CONTROLFILE"
100fi
101if [ -n "$DEBUG" ]; then
102  parameterlist+=" --debug=$DEBUG"
103fi
104if [ -n "$REQUEST" ]; then
105  parameterlist+=" --request=$REQUEST"
106fi
107if [ -n "$PUBLIC" ]; then
108  parameterlist+=" --public=$PUBLIC"
109fi
110
111# -----------------------------------------------------------------
112# CALL SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS
113
114$pyscript $parameterlist
115
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG