From 5bf163a83a60997cc70397ba4717876072d2a120 Mon Sep 17 00:00:00 2001
From: Anne Philipp <anne.philipp@univie.ac.at>
Date: Fri, 19 Jun 2020 21:51:02 +0200
Subject: [PATCH] prepared testscripts and install/usage scripts for the
 manuscript; used 4 digits for year for CERA-20C data;

---
 For_developers/mk_upload_tarball.sh           |   4 +-
 Source/Python/Classes/EcFlexpart.py           |  11 +-
 .../Installation/Api_testscripts/README.md    |   7 +
 .../Api_testscripts/test_cdsapi_modellevel.py |  23 ++++
 .../test_cdsapi_pressurelevel.py              |  19 +++
 .../Api_testscripts/test_ecmwfapi_member.py   |  20 +++
 .../Api_testscripts/test_ecmwfapi_public.py   |  20 +++
 .../{Convert => Calc_etadot}/README           |   0
 .../{Convert => Calc_etadot}/fort.10          | Bin
 .../{Convert => Calc_etadot}/fort.11          | Bin
 .../{Convert => Calc_etadot}/fort.12          | Bin
 .../{Convert => Calc_etadot}/fort.13          |   0
 .../{Convert => Calc_etadot}/fort.16          | Bin
 .../{Convert => Calc_etadot}/fort.17          | Bin
 .../{Convert => Calc_etadot}/fort.18          |   0
 .../{Convert => Calc_etadot}/fort.19          |   0
 .../{Convert => Calc_etadot}/fort.21          | Bin
 .../{Convert => Calc_etadot}/fort.22          | Bin
 .../{Convert => Calc_etadot}/fort.4           |   0
 .../Installation/First_extraction/README.md   |  11 ++
 Testing/Installation/First_extraction/run.sh  | 121 ++++++++++++++++++
 .../First_extraction/run_local.sh             | 121 ++++++++++++++++++
 .../First_extraction/run_local_public.sh      | 121 ++++++++++++++++++
 Testing/Installation/testecmwfapi_member.py   |  24 ----
 Testing/Installation/testecmwfapi_public.py   |  26 ----
 25 files changed, 474 insertions(+), 54 deletions(-)
 create mode 100644 Testing/Installation/Api_testscripts/README.md
 create mode 100644 Testing/Installation/Api_testscripts/test_cdsapi_modellevel.py
 create mode 100644 Testing/Installation/Api_testscripts/test_cdsapi_pressurelevel.py
 create mode 100644 Testing/Installation/Api_testscripts/test_ecmwfapi_member.py
 create mode 100644 Testing/Installation/Api_testscripts/test_ecmwfapi_public.py
 rename Testing/Installation/{Convert => Calc_etadot}/README (100%)
 rename Testing/Installation/{Convert => Calc_etadot}/fort.10 (100%)
 rename Testing/Installation/{Convert => Calc_etadot}/fort.11 (100%)
 rename Testing/Installation/{Convert => Calc_etadot}/fort.12 (100%)
 rename Testing/Installation/{Convert => Calc_etadot}/fort.13 (100%)
 rename Testing/Installation/{Convert => Calc_etadot}/fort.16 (100%)
 rename Testing/Installation/{Convert => Calc_etadot}/fort.17 (100%)
 rename Testing/Installation/{Convert => Calc_etadot}/fort.18 (100%)
 rename Testing/Installation/{Convert => Calc_etadot}/fort.19 (100%)
 rename Testing/Installation/{Convert => Calc_etadot}/fort.21 (100%)
 rename Testing/Installation/{Convert => Calc_etadot}/fort.22 (100%)
 rename Testing/Installation/{Convert => Calc_etadot}/fort.4 (100%)
 create mode 100644 Testing/Installation/First_extraction/README.md
 create mode 100644 Testing/Installation/First_extraction/run.sh
 create mode 100644 Testing/Installation/First_extraction/run_local.sh
 create mode 100644 Testing/Installation/First_extraction/run_local_public.sh
 delete mode 100644 Testing/Installation/testecmwfapi_member.py
 delete mode 100644 Testing/Installation/testecmwfapi_public.py

diff --git a/For_developers/mk_upload_tarball.sh b/For_developers/mk_upload_tarball.sh
index aa7ba79..0bb9d1f 100755
--- a/For_developers/mk_upload_tarball.sh
+++ b/For_developers/mk_upload_tarball.sh
@@ -17,8 +17,8 @@
 #    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
 #
 
-tarname='flex_extract_v7.1.tar.gz'
-tardir='flex_extract_v7.1'
+tarname='flex_extract_v7.1.2.tar.gz'
+tardir='flex_extract_v7.1.2'
 
 # go back to directory which is above flex_extract directory
 cd ../.. 
diff --git a/Source/Python/Classes/EcFlexpart.py b/Source/Python/Classes/EcFlexpart.py
index 09e6f35..e3b3faa 100644
--- a/Source/Python/Classes/EcFlexpart.py
+++ b/Source/Python/Classes/EcFlexpart.py
@@ -1721,10 +1721,17 @@ class EcFlexpart(object):
             os.chdir(pwd)
 # ============================================================================================
             # create name of final output file, e.g. EN13040500 (ENYYMMDDHH)
+            # for CERA-20C we need all 4 digits for the year sinc 1900 - 2010
             if c.purefc:
-                suffix = cdate[2:8] + '.' + ctime + '.' + cstep
+                if c.marsclass == 'EP':
+                    suffix = cdate[0:8] + '.' + ctime + '.' + cstep
+                else:
+                    suffix = cdate[2:8] + '.' + ctime + '.' + cstep
             else:
-                suffix = cdate_hour[2:10]
+                if c.marsclass == 'EP':
+                    suffix = cdate_hour[0:10]
+                else:
+                    suffix = cdate_hour[2:10]
 
             # if necessary, add ensemble member number to filename suffix
             if 'number' in index_keys:
diff --git a/Testing/Installation/Api_testscripts/README.md b/Testing/Installation/Api_testscripts/README.md
new file mode 100644
index 0000000..802b6d6
--- /dev/null
+++ b/Testing/Installation/Api_testscripts/README.md
@@ -0,0 +1,7 @@
+# API test scripts
+
+These example scripts were prepared to test the two APIs "CDS API" and "ECMWF Web API" after their installation for both, member-state users and public users.
+
+They were taken from the official journal publication from Section A2 "System prerequisites".
+
+Execute the scripts and wait for the retrieval to finish and look for the final GRIB file in the directory where the script was executed.
diff --git a/Testing/Installation/Api_testscripts/test_cdsapi_modellevel.py b/Testing/Installation/Api_testscripts/test_cdsapi_modellevel.py
new file mode 100644
index 0000000..baba95c
--- /dev/null
+++ b/Testing/Installation/Api_testscripts/test_cdsapi_modellevel.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+import cdsapi
+
+c = cdsapi.Client()
+
+c.retrieve('reanalysis-era5-complete',
+{
+	'class'   : 'ea',
+	'expver'  : '1',
+	'stream'  : 'oper',
+	'type'    : 'fc',
+	'step'    : '3/to/12/by/3',
+	'param'   : '130.128',
+	'levtype' : 'ml',
+	'levelist': '135/to/137',
+	'date'    : '2013-01-01',
+	'time'    : '06/18',
+	'area'    : '50/-5/40/5',
+	'grid'    : '1.0/1.0',
+	'format'  : 'grib',
+}, 'download_era5_cdsapi.grib')
diff --git a/Testing/Installation/Api_testscripts/test_cdsapi_pressurelevel.py b/Testing/Installation/Api_testscripts/test_cdsapi_pressurelevel.py
new file mode 100644
index 0000000..0e5b7a5
--- /dev/null
+++ b/Testing/Installation/Api_testscripts/test_cdsapi_pressurelevel.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+import cdsapi
+
+c = cdsapi.Client()
+
+c.retrieve("reanalysis-era5-pressure-levels",
+{
+	"variable": "temperature",
+	"pressure_level": "1000",
+	"product_type": "reanalysis",
+	"year": "2008",
+	"month": "01",
+	"day": "01",
+	"time": "12:00",
+	"format": "grib"
+},
+"download_cdsapi.grib")
diff --git a/Testing/Installation/Api_testscripts/test_ecmwfapi_member.py b/Testing/Installation/Api_testscripts/test_ecmwfapi_member.py
new file mode 100644
index 0000000..607d93b
--- /dev/null
+++ b/Testing/Installation/Api_testscripts/test_ecmwfapi_member.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+from ecmwfapi import ECMWFService
+
+server = ECMWFService('mars')
+
+server.retrieve({
+	'stream'    : "oper",
+	'levtype'   : "sfc",
+	'param'     : "165.128/166.128/167.128",
+	'dataset'   : "interim",
+	'step'      : "0",
+	'grid'      : "0.75/0.75",
+	'time'      : "00/06/12/18",
+	'date'      : "2014-07-01/to/2014-07-31",
+	'type'      : "an",
+	'class'     : "ei",
+	'target'    : "download_erainterim_ecmwfapi.grib"
+})
diff --git a/Testing/Installation/Api_testscripts/test_ecmwfapi_public.py b/Testing/Installation/Api_testscripts/test_ecmwfapi_public.py
new file mode 100644
index 0000000..89013e0
--- /dev/null
+++ b/Testing/Installation/Api_testscripts/test_ecmwfapi_public.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+from ecmwfapi import ECMWFDataServer
+
+server = ECMWFDataServer()
+
+server.retrieve({
+	'stream'    : "enda",
+	'levtype'   : "sfc",
+	'param'     : "165.128/166.128/167.128",
+	'dataset'   : "cera20c",
+	'step'      : "0",
+	'grid'      : "1./1.",
+	'time'      : "00/06/12/18",
+	'date'      : "2000-07-01/to/2000-07-31",
+	'type'      : "an",
+	'class'     : "ep",
+	'target'    : "download_cera20c_ecmwfapi.grib"
+})
diff --git a/Testing/Installation/Convert/README b/Testing/Installation/Calc_etadot/README
similarity index 100%
rename from Testing/Installation/Convert/README
rename to Testing/Installation/Calc_etadot/README
diff --git a/Testing/Installation/Convert/fort.10 b/Testing/Installation/Calc_etadot/fort.10
similarity index 100%
rename from Testing/Installation/Convert/fort.10
rename to Testing/Installation/Calc_etadot/fort.10
diff --git a/Testing/Installation/Convert/fort.11 b/Testing/Installation/Calc_etadot/fort.11
similarity index 100%
rename from Testing/Installation/Convert/fort.11
rename to Testing/Installation/Calc_etadot/fort.11
diff --git a/Testing/Installation/Convert/fort.12 b/Testing/Installation/Calc_etadot/fort.12
similarity index 100%
rename from Testing/Installation/Convert/fort.12
rename to Testing/Installation/Calc_etadot/fort.12
diff --git a/Testing/Installation/Convert/fort.13 b/Testing/Installation/Calc_etadot/fort.13
similarity index 100%
rename from Testing/Installation/Convert/fort.13
rename to Testing/Installation/Calc_etadot/fort.13
diff --git a/Testing/Installation/Convert/fort.16 b/Testing/Installation/Calc_etadot/fort.16
similarity index 100%
rename from Testing/Installation/Convert/fort.16
rename to Testing/Installation/Calc_etadot/fort.16
diff --git a/Testing/Installation/Convert/fort.17 b/Testing/Installation/Calc_etadot/fort.17
similarity index 100%
rename from Testing/Installation/Convert/fort.17
rename to Testing/Installation/Calc_etadot/fort.17
diff --git a/Testing/Installation/Convert/fort.18 b/Testing/Installation/Calc_etadot/fort.18
similarity index 100%
rename from Testing/Installation/Convert/fort.18
rename to Testing/Installation/Calc_etadot/fort.18
diff --git a/Testing/Installation/Convert/fort.19 b/Testing/Installation/Calc_etadot/fort.19
similarity index 100%
rename from Testing/Installation/Convert/fort.19
rename to Testing/Installation/Calc_etadot/fort.19
diff --git a/Testing/Installation/Convert/fort.21 b/Testing/Installation/Calc_etadot/fort.21
similarity index 100%
rename from Testing/Installation/Convert/fort.21
rename to Testing/Installation/Calc_etadot/fort.21
diff --git a/Testing/Installation/Convert/fort.22 b/Testing/Installation/Calc_etadot/fort.22
similarity index 100%
rename from Testing/Installation/Convert/fort.22
rename to Testing/Installation/Calc_etadot/fort.22
diff --git a/Testing/Installation/Convert/fort.4 b/Testing/Installation/Calc_etadot/fort.4
similarity index 100%
rename from Testing/Installation/Convert/fort.4
rename to Testing/Installation/Calc_etadot/fort.4
diff --git a/Testing/Installation/First_extraction/README.md b/Testing/Installation/First_extraction/README.md
new file mode 100644
index 0000000..a43c701
--- /dev/null
+++ b/Testing/Installation/First_extraction/README.md
@@ -0,0 +1,11 @@
+# Run scripts for the first extraction 
+
+These are the run.sh scripts mentioned in the "Usage section" in the flex_extract publication.
+
+run.sh - member and gateway mode, member-state users
+
+run_local.sh - local mode, both user groups: member-state users: all data sets; public users: ERA5
+
+run_local_public.sh - local mode, public users (CERA-20C, ERA-Interim)
+
+
diff --git a/Testing/Installation/First_extraction/run.sh b/Testing/Installation/First_extraction/run.sh
new file mode 100644
index 0000000..0f820f8
--- /dev/null
+++ b/Testing/Installation/First_extraction/run.sh
@@ -0,0 +1,121 @@
+#!/bin/bash
+#
+# @Author: Anne Philipp
+#
+# @Date: October, 4 2018
+#
+# @Description: 
+#    This script defines the available command-line parameters
+#    for running flex_extract and combines them for the execution  
+#    of the Python program. It also does some checks to 
+#    guarantee necessary parameters were set and consistent.
+#
+# @Licence:
+#    (C) Copyright 2014-2019.
+#
+#    SPDX-License-Identifier: CC-BY-4.0
+#
+#    This work is licensed under the Creative Commons Attribution 4.0
+#    International License. To view a copy of this license, visit
+#    http://creativecommons.org/licenses/by/4.0/ or send a letter to
+#    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
+#
+# -----------------------------------------------------------------
+# AVAILABLE COMMANDLINE ARGUMENTS TO SET
+# 
+# THE USER HAS TO SPECIFY THESE PARAMETERS:
+
+QUEUE='ecgate'
+START_DATE=None
+END_DATE=None
+DATE_CHUNK=None
+JOB_CHUNK=3
+BASETIME=None
+STEP=None
+LEVELIST=None
+AREA=None
+INPUTDIR=None
+OUTPUTDIR=None
+PP_ID=None
+JOB_TEMPLATE='submitscript.template' 
+CONTROLFILE='CONTROL_CERA' 
+DEBUG=0
+REQUEST=2
+PUBLIC=0
+
+# -----------------------------------------------------------------
+#
+# AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!
+#
+# -----------------------------------------------------------------
+
+# PATH TO SUBMISSION SCRIPT
+pyscript=../Source/Python/submit.py
+
+# INITIALIZE EMPTY PARAMETERLIST
+parameterlist=""
+
+# CHECK IF ON ECMWF SERVER; 
+if [[ $HOST == *"ecgb"* ]] || [[ $HOST == *"cca"* ]] || [[ $HOST == *"ccb"* ]]; then
+# LOAD PYTHON3 MODULE
+  module load python3
+fi 
+
+# CHECK FOR MORE PARAMETER 
+if [ -n "$START_DATE" ]; then
+  parameterlist+=" --start_date=$START_DATE"
+fi
+if [ -n "$END_DATE" ]; then
+  parameterlist+=" --end_date=$END_DATE"
+fi
+if [ -n "$DATE_CHUNK" ]; then
+  parameterlist+=" --date_chunk=$DATE_CHUNK"
+fi
+if [ -n "$JOB_CHUNK" ]; then
+  parameterlist+=" --job_chunk=$JOB_CHUNK"
+fi
+if [ -n "$BASETIME" ]; then
+  parameterlist+=" --basetime=$BASETIME"
+fi
+if [ -n "$STEP" ]; then
+  parameterlist+=" --step=$STEP"
+fi
+if [ -n "$LEVELIST" ]; then
+  parameterlist+=" --levelist=$LEVELIST"
+fi
+if [ -n "$AREA" ]; then
+  parameterlist+=" --area=$AREA"
+fi
+if [ -n "$INPUTDIR" ]; then
+  parameterlist+=" --inputdir=$INPUTDIR"
+fi
+if [ -n "$OUTPUTDIR" ]; then
+  parameterlist+=" --outputdir=$OUTPUTDIR"
+fi
+if [ -n "$PP_ID" ]; then
+  parameterlist+=" --ppid=$PP_ID"
+fi
+if [ -n "$JOB_TEMPLATE" ]; then
+  parameterlist+=" --job_template=$JOB_TEMPLATE"
+fi
+if [ -n "$QUEUE" ]; then
+  parameterlist+=" --queue=$QUEUE"
+fi
+if [ -n "$CONTROLFILE" ]; then
+  parameterlist+=" --controlfile=$CONTROLFILE"
+fi
+if [ -n "$DEBUG" ]; then
+  parameterlist+=" --debug=$DEBUG"
+fi
+if [ -n "$REQUEST" ]; then
+  parameterlist+=" --request=$REQUEST"
+fi
+if [ -n "$PUBLIC" ]; then
+  parameterlist+=" --public=$PUBLIC"
+fi
+
+# -----------------------------------------------------------------
+# CALL SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS
+
+$pyscript $parameterlist
+
diff --git a/Testing/Installation/First_extraction/run_local.sh b/Testing/Installation/First_extraction/run_local.sh
new file mode 100644
index 0000000..1c8243a
--- /dev/null
+++ b/Testing/Installation/First_extraction/run_local.sh
@@ -0,0 +1,121 @@
+#!/bin/bash
+#
+# @Author: Anne Philipp
+#
+# @Date: October, 4 2018
+#
+# @Description: 
+#    This script defines the available command-line parameters
+#    for running flex_extract and combines them for the execution  
+#    of the Python program. It also does some checks to 
+#    guarantee necessary parameters were set and consistent.
+#
+# @Licence:
+#    (C) Copyright 2014-2019.
+#
+#    SPDX-License-Identifier: CC-BY-4.0
+#
+#    This work is licensed under the Creative Commons Attribution 4.0
+#    International License. To view a copy of this license, visit
+#    http://creativecommons.org/licenses/by/4.0/ or send a letter to
+#    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
+#
+# -----------------------------------------------------------------
+# AVAILABLE COMMANDLINE ARGUMENTS TO SET
+# 
+# THE USER HAS TO SPECIFY THESE PARAMETERS:
+
+QUEUE=None
+START_DATE=None
+END_DATE=None
+DATE_CHUNK=None
+JOB_CHUNK=3
+BASETIME=None
+STEP=None
+LEVELIST=None
+AREA=None
+INPUTDIR='Workspace/CERA'
+OUTPUTDIR='Workspace/CERA'
+PP_ID=None
+JOB_TEMPLATE=None
+CONTROLFILE='CONTROL_CERA'
+DEBUG=0
+REQUEST=2
+PUBLIC=0
+
+# -----------------------------------------------------------------
+#
+# AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!
+#
+# -----------------------------------------------------------------
+
+# PATH TO SUBMISSION SCRIPT
+pyscript=../Source/Python/submit.py
+
+# INITIALIZE EMPTY PARAMETERLIST
+parameterlist=""
+
+# CHECK IF ON ECMWF SERVER; 
+if [[ $HOST == *"ecgb"* ]] || [[ $HOST == *"cca"* ]] || [[ $HOST == *"ccb"* ]]; then
+# LOAD PYTHON3 MODULE
+  module load python3
+fi 
+
+# CHECK FOR MORE PARAMETER 
+if [ -n "$START_DATE" ]; then
+  parameterlist+=" --start_date=$START_DATE"
+fi
+if [ -n "$END_DATE" ]; then
+  parameterlist+=" --end_date=$END_DATE"
+fi
+if [ -n "$DATE_CHUNK" ]; then
+  parameterlist+=" --date_chunk=$DATE_CHUNK"
+fi
+if [ -n "$JOB_CHUNK" ]; then
+  parameterlist+=" --job_chunk=$JOB_CHUNK"
+fi
+if [ -n "$BASETIME" ]; then
+  parameterlist+=" --basetime=$BASETIME"
+fi
+if [ -n "$STEP" ]; then
+  parameterlist+=" --step=$STEP"
+fi
+if [ -n "$LEVELIST" ]; then
+  parameterlist+=" --levelist=$LEVELIST"
+fi
+if [ -n "$AREA" ]; then
+  parameterlist+=" --area=$AREA"
+fi
+if [ -n "$INPUTDIR" ]; then
+  parameterlist+=" --inputdir=$INPUTDIR"
+fi
+if [ -n "$OUTPUTDIR" ]; then
+  parameterlist+=" --outputdir=$OUTPUTDIR"
+fi
+if [ -n "$PP_ID" ]; then
+  parameterlist+=" --ppid=$PP_ID"
+fi
+if [ -n "$JOB_TEMPLATE" ]; then
+  parameterlist+=" --job_template=$JOB_TEMPLATE"
+fi
+if [ -n "$QUEUE" ]; then
+  parameterlist+=" --queue=$QUEUE"
+fi
+if [ -n "$CONTROLFILE" ]; then
+  parameterlist+=" --controlfile=$CONTROLFILE"
+fi
+if [ -n "$DEBUG" ]; then
+  parameterlist+=" --debug=$DEBUG"
+fi
+if [ -n "$REQUEST" ]; then
+  parameterlist+=" --request=$REQUEST"
+fi
+if [ -n "$PUBLIC" ]; then
+  parameterlist+=" --public=$PUBLIC"
+fi
+
+# -----------------------------------------------------------------
+# CALL SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS
+
+$pyscript $parameterlist
+
diff --git a/Testing/Installation/First_extraction/run_local_public.sh b/Testing/Installation/First_extraction/run_local_public.sh
new file mode 100644
index 0000000..71e31af
--- /dev/null
+++ b/Testing/Installation/First_extraction/run_local_public.sh
@@ -0,0 +1,121 @@
+#!/bin/bash
+#
+# @Author: Anne Philipp
+#
+# @Date: October, 4 2018
+#
+# @Description: 
+#    This script defines the available command-line parameters
+#    for running flex_extract and combines them for the execution  
+#    of the Python program. It also does some checks to 
+#    guarantee necessary parameters were set and consistent.
+#
+# @Licence:
+#    (C) Copyright 2014-2019.
+#
+#    SPDX-License-Identifier: CC-BY-4.0
+#
+#    This work is licensed under the Creative Commons Attribution 4.0
+#    International License. To view a copy of this license, visit
+#    http://creativecommons.org/licenses/by/4.0/ or send a letter to
+#    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
+#
+# -----------------------------------------------------------------
+# AVAILABLE COMMANDLINE ARGUMENTS TO SET
+# 
+# THE USER HAS TO SPECIFY THESE PARAMETERS:
+
+QUEUE=None
+START_DATE=None
+END_DATE=None
+DATE_CHUNK=None
+JOB_CHUNK=3
+BASETIME=None
+STEP=None
+LEVELIST=None
+AREA=None
+INPUTDIR='Workspace/CERApublic'
+OUTPUTDIR='Workspace/CERApublic'
+PP_ID=None
+JOB_TEMPLATE=None
+CONTROLFILE='CONTROL_CERA.public'
+DEBUG=0
+REQUEST=0
+PUBLIC=1
+
+# -----------------------------------------------------------------
+#
+# AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!!
+#
+# -----------------------------------------------------------------
+
+# PATH TO SUBMISSION SCRIPT
+pyscript=../Source/Python/submit.py
+
+# INITIALIZE EMPTY PARAMETERLIST
+parameterlist=""
+
+# CHECK IF ON ECMWF SERVER; 
+if [[ $HOST == *"ecgb"* ]] || [[ $HOST == *"cca"* ]] || [[ $HOST == *"ccb"* ]]; then
+# LOAD PYTHON3 MODULE
+  module load python3
+fi 
+
+# CHECK FOR MORE PARAMETER 
+if [ -n "$START_DATE" ]; then
+  parameterlist+=" --start_date=$START_DATE"
+fi
+if [ -n "$END_DATE" ]; then
+  parameterlist+=" --end_date=$END_DATE"
+fi
+if [ -n "$DATE_CHUNK" ]; then
+  parameterlist+=" --date_chunk=$DATE_CHUNK"
+fi
+if [ -n "$JOB_CHUNK" ]; then
+  parameterlist+=" --job_chunk=$JOB_CHUNK"
+fi
+if [ -n "$BASETIME" ]; then
+  parameterlist+=" --basetime=$BASETIME"
+fi
+if [ -n "$STEP" ]; then
+  parameterlist+=" --step=$STEP"
+fi
+if [ -n "$LEVELIST" ]; then
+  parameterlist+=" --levelist=$LEVELIST"
+fi
+if [ -n "$AREA" ]; then
+  parameterlist+=" --area=$AREA"
+fi
+if [ -n "$INPUTDIR" ]; then
+  parameterlist+=" --inputdir=$INPUTDIR"
+fi
+if [ -n "$OUTPUTDIR" ]; then
+  parameterlist+=" --outputdir=$OUTPUTDIR"
+fi
+if [ -n "$PP_ID" ]; then
+  parameterlist+=" --ppid=$PP_ID"
+fi
+if [ -n "$JOB_TEMPLATE" ]; then
+  parameterlist+=" --job_template=$JOB_TEMPLATE"
+fi
+if [ -n "$QUEUE" ]; then
+  parameterlist+=" --queue=$QUEUE"
+fi
+if [ -n "$CONTROLFILE" ]; then
+  parameterlist+=" --controlfile=$CONTROLFILE"
+fi
+if [ -n "$DEBUG" ]; then
+  parameterlist+=" --debug=$DEBUG"
+fi
+if [ -n "$REQUEST" ]; then
+  parameterlist+=" --request=$REQUEST"
+fi
+if [ -n "$PUBLIC" ]; then
+  parameterlist+=" --public=$PUBLIC"
+fi
+
+# -----------------------------------------------------------------
+# CALL SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS
+
+$pyscript $parameterlist
+
diff --git a/Testing/Installation/testecmwfapi_member.py b/Testing/Installation/testecmwfapi_member.py
deleted file mode 100644
index 66cc7c1..0000000
--- a/Testing/Installation/testecmwfapi_member.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-
-import pytest
-from ecmwfapi import ECMWFService
-
-class TestECMWFApi:
-    """
-    """
-
-    def test_member():
-        server = ECMWFService("mars")
-
-        server.execute({'class'   : "ei",
-                        'time'    : "00",
-                        'date'    : "2013-09-01/to/2013-09-30",
-                        'step'    : "0",
-                        'type'    : "an",
-                        'levtype' : "sfc",
-                        'param'   : "165.128/41.128",
-                        'grid'    : "0.75/0.75"},
-                       "interim201309.grib")
-
diff --git a/Testing/Installation/testecmwfapi_public.py b/Testing/Installation/testecmwfapi_public.py
deleted file mode 100644
index 6e261df..0000000
--- a/Testing/Installation/testecmwfapi_public.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-
-import pytest
-from ecmwfapi import ECMWFDataServer
-
-class TestECMWFApi:
-    """
-    """
-
-    def test_public():
-        server = ECMWFDataServer()
-
-        server.retrieve({'dataset' : "interim",
-                         'time'    : "00",
-                         'date'    : "2013-09-01/to/2013-09-30",
-                         'step'    : "0",
-                         'type'    : "an",
-                         'levtype' : "sfc",
-                         'param'   : "165.128/41.128",
-                         'grid'    : "0.75/0.75",
-                         'target'  : "interim201309.grib"
-                        })
-
-
-- 
GitLab