diff --git a/.gitignore b/.gitignore index 79ef1c7bef077a3e54fb4d232c05ff82c66cb257..1c814693ac3d63d3df5c20987b5645ce471cafd6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ # not be versionized!!! # # @Licence: -# (C) Copyright 2014-2019. +# (C) Copyright 2014-2020. # # SPDX-License-Identifier: CC-BY-4.0 # @@ -29,42 +29,16 @@ Source/Fortran/calc_etadot* Run/ECMWF_ENV Run/Workspace/* Run/Jobscripts/*sh -Test/Installation/Convert/VERTICAL.EC -Test/Installation/Convert/fort.15 +Testing/Installation/Calc_etadot/VERTICAL.EC +Testing/Installation/Calc_etadot/fort.15 For_developers/Sphinx/build_temp # Temporary ignorance of files!!!! -Source/Fortran/Makefile.ecgate -Source/Fortran/Makefile.local.gfortran.gw74 -Run/Control/Testgrid/ -Run/Control/notPublic/ -setup_local.sh -Run/run.sh -Run/run_local.sh -setup.sh +*anne.sh +Run/*anne.sh Source/Fortran/pycallgraph.png Source/Python/pylint_report_7.1.txt Source/.metrics -For_developers/sphinx-fortran/ - - -For_developers/GUIDE.odt -For_developers/COMMANDS -For_developers/class_diagram -For_developers/classes.dot -For_developers/classes.png -For_developers/gen_docu.sh -For_developers/mk_pdf2png.sh -For_developers/packages.dot -For_developers/packages.png -For_developers/Testcases.txt -For_developers/Metriken.txt -For_developers/FE_testing.txt -For_developers/Liste_FE_Functions_Testcoverage.xlsx - - - - Emoslib Unused_input_files diff --git a/Run/run.sh b/Run/run.sh index aa09ede69c2ebe46fb5956d2a1aa45005220d159..e8ae9c4181f415f7cfa170de528cd558c47bb1ea 100755 --- a/Run/run.sh +++ b/Run/run.sh @@ -11,7 +11,7 @@ # guarantee necessary parameters were set and consistent. # # @Licence: -# (C) Copyright 2014-2019. +# (C) Copyright 2014-2020. # # SPDX-License-Identifier: CC-BY-4.0 # diff --git a/Run/run_local.sh b/Run/run_local.sh new file mode 100755 index 0000000000000000000000000000000000000000..1c8243a585d923963812da8681dde76ab9df92c0 --- /dev/null +++ b/Run/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/Source/Python/_config.py b/Source/Python/_config.py index 77c1fc152b4fbe52eb01159dba29ab1a71bec218..15b4ce061d4505e3abfccbc8f234baf12a67afb9 100644 --- a/Source/Python/_config.py +++ b/Source/Python/_config.py @@ -37,7 +37,7 @@ import platform # PARAMETERS # ------------------------------------------------------------------------------ -_VERSION_STR = '7.1.1' +_VERSION_STR = '7.1.2' FLAG_ON_ECMWFSERVER = 'ecgb' in platform.node() diff --git a/Templates/installscript.template b/Templates/installscript.template index 1ea2e88f2b6863ba0a10e7a588a305359b0d1342..ac699b8d60bfb238c8678aa1dd61f94d22f5eb44 100644 --- a/Templates/installscript.template +++ b/Templates/installscript.template @@ -28,20 +28,17 @@ export VERSION=$version_number case $${HOST} in *ecg*) module unload grib_api - module unload eccodes - module unload python module unload emos - module load python3/3.6.8-01 - module load eccodes/2.13.0 + module load python3 + module load eccodes module load emos/455-r64 export FLEXPART_ROOT_SCRIPTS=$fp_root_scripts export MAKEFILE=$makefile ;; *cca*) - module unload python module switch PrgEnv-cray PrgEnv-intel module load python3 - module load eccodes/2.13.0 + module load eccodes module load emos/455-r64 echo $${GROUP} echo $${HOME} diff --git a/Templates/jobscript.template b/Templates/jobscript.template index 60054a8e34fd4b565280105f663144576a23c132..7cd4873ed9ccd2edaa963499226cdda663f342a8 100644 --- a/Templates/jobscript.template +++ b/Templates/jobscript.template @@ -28,19 +28,16 @@ export VERSION=$version_number case $$$${HOST} in *ecg*) module unload grib_api - module unload eccodes - module unload python module unload emos - module load python3/3.6.8-01 - module load eccodes/2.13.0 + module load python3 + module load eccodes module load emos/455-r64 export PATH=$$$${PATH}:$fp_root_path ;; *cca*) - module unload python module switch PrgEnv-cray PrgEnv-intel module load python3 - module load eccodes/2.13.0 + module load eccodes module load emos/455-r64 export SCRATCH=$$$${TMPDIR} export PATH=$$$${PATH}:$fp_root_path diff --git a/setup_local.sh b/setup_local.sh new file mode 100755 index 0000000000000000000000000000000000000000..8f9d0a2f020ec222c266792cee2a3ad26a8498c2 --- /dev/null +++ b/setup_local.sh @@ -0,0 +1,92 @@ +#!/bin/bash +# +# @Author: Anne Philipp +# +# @Date: September, 10 2018 +# +# @Description: +# This file defines the flex_extract's available installation +# parameters and puts them together for the call of the actual +# python installation script. It also does some checks to +# guarantee necessary parameters were set. +# +# @Licence: +# (C) Copyright 2014-2020. +# +# 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 +# +TARGET='local' +MAKEFILE='makefile_local_gfortran' +ECUID='<username>' +ECGID='<groupID>' +GATEWAY='<gatewayname>' +DESTINATION='<name>@genericSftp' +INSTALLDIR=None +JOB_TEMPLATE='' +CONTROLFILE='CONTROL_CERA' +# ----------------------------------------------------------------- +# +# AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!! +# +# ----------------------------------------------------------------- + +# PATH TO INSTALLATION SCRIPT +script="Source/Python/install.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 + +# DEFAULT PARAMETERLIST +if [ -n "$TARGET" ]; then + parameterlist=" --target=$TARGET" +else + echo "ERROR: No installation target specified." + echo "EXIT WITH ERROR" + exit +fi + +# CHECK FOR MORE PARAMETER +if [ "$TARGET" == "ecgate" ] || [ "$TARGET" == "cca" ]; then + # check if necessary Parameters are set + if [ -z "$ECUID" ] || [ -z "$ECGID" ] || [ -z "$GATEWAY" ] || [ -z "$DESTINATION" ]; then + echo "ERROR: At least one of the following parameters are not set: ECUID, ECGID, GATEWAY, DESTINATION!" + echo "EXIT WITH ERROR" + exit + else + parameterlist+=" --ecuid=$ECUID --ecgid=$ECGID --gateway=$GATEWAY --destination=$DESTINATION" + fi +fi +if [ -n "$MAKEFILE" ]; then + parameterlist+=" --makefile=$MAKEFILE" +fi +if [ -n "$FLEXPARTDIR" ]; then # not empty + parameterlist+=" --flexpartdir=$FLEXPARTDIR" +fi +if [ -n "$JOB_TEMPLATE" ]; then + parameterlist+=" --job_template=$JOB_TEMPLATE" +fi +if [ -n "$CONTROLFILE" ]; then + parameterlist+=" --controlfile=$CONTROLFILE" +fi + +# ----------------------------------------------------------------- +# CALL INSTALLATION SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS + +$script $parameterlist +