Skip to content
Snippets Groups Projects
Commit 0d99607f authored by Anne Philipp's avatar Anne Philipp
Browse files

deleted unneeded testfiles

parent be6c0a2a
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#
# @Author: Anne Philipp
#
# @Date: November, 10 2018
#
# @Description: Makes a tar-ball for installation
#
# path to flex_extract base directory
path=../../
tarname='flex_extract_v7.1_local.tar'
tar -cvf ../../test/Unit/InstallTar/$tarname \
${path}source/python/classes/*py \
${path}source/python/mods/*py \
${path}source/python/*py \
${path}source/pythontest/*py \
${path}source/fortran/*.f \
${path}source/fortran/*.f90 \
${path}source/fortran/*.h \
${path}source/fortran/Makefile* \
${path}templates/convert.nl \
${path}templates/*.temp \
${path}templates/ecmwf_grib1_table_128 \
${path}run/run_local.sh \
${path}run/control/CONTROL* \
${path}run/jobscripts \
${path}LICENSE.md \
${path}CODE_OF_CONDUCT.md \
${path}README.md \
--exclude=*.ksh
tarname='flex_extract_v7.1_ecgate.tar'
tar -cvf ../../test/Unit/InstallTar/$tarname \
${path}source/python/classes/*py \
${path}source/python/mods/*py \
${path}source/python/*py \
${path}source/pythontest/*py \
${path}source/fortran/*.f \
${path}source/fortran/*.f90 \
${path}source/fortran/*.h \
${path}source/fortran/Makefile* \
${path}templates/convert.nl \
${path}templates/*.temp \
${path}templates/ecmwf_grib1_table_128 \
${path}run/ECMWF_ENV \
${path}run/run.sh \
${path}run/control/CONTROL* \
${path}run/jobscripts \
${path}LICENSE.md \
${path}CODE_OF_CONDUCT.md \
${path}README.md \
--exclude=*.ksh
\ No newline at end of file
#!/bin/bash
#
# @Author: Anne Philipp
#
# @Date: November, 10 2018
#
# @Description: Untar a tar-ball for installation
#
tarname='flex_extract_v7.1_local.tar'
dirname='flex_extract_v7.1_local'
path=../../test/Unit/InstallTar/
mkdir $path$dirname
cd $path$dirname
tar xvf ../$tarname
cd ../../../../source/pythontest
tarname='flex_extract_v7.1_ecgate.tar'
dirname='flex_extract_v7.1_ecgate'
path=../../test/Unit/InstallTar/
mkdir $path$dirname
cd $path$dirname
tar xvf ../$tarname
cd ../../../../source/pythontest
\ No newline at end of file
ECUID testuser
ECGID testgroup
GATEWAY gateway.test.ac.at
DESTINATION user@destination
#!/bin/ksh
# ON ECGB:
# start with ecaccess-job-submit -queueName ecgb NAME_OF_THIS_FILE on gateway server
# start with sbatch NAME_OF_THIS_FILE directly on machine
#SBATCH --workdir=/scratch/ms/testgroup/testuser
#SBATCH --qos=normal
#SBATCH --job-name=flex_ecmwf
#SBATCH --output=flex_ecmwf.%j.out
#SBATCH --error=flex_ecmwf.%j.out
#SBATCH --mail-type=FAIL
#SBATCH --time=12:00:00
## CRAY specific batch requests
##PBS -N flex_ecmwf
##PBS -q ns
##PBS -S /usr/bin/ksh
##PBS -o /scratch/ms/testgroup/testuser/flex_ecmwf.${Jobname}.${Job_ID}.out
# job output is in .ecaccess_DO_NOT_REMOVE
##PBS -j oe
##PBS -V
##PBS -l EC_threads_per_task=1
##PBS -l EC_memory_per_task=3200MB
set -x
export VERSION=7.1
case ${HOST} in
*ecg*)
module unload grib_api
module unload eccodes
module load eccodes
module load python
module unload emos
module load emos/455-r64
export FLEXPART_ROOT_SCRIPTS=fp_root_test_path
export MAKEFILE=Makefile.TEST
;;
*cca*)
module switch PrgEnv-cray PrgEnv-intel
module load eccodes
module load emos
module load python
echo ${GROUP}
echo ${HOME}
echo ${HOME} | awk -F / '{print $1, $2, $3, $4}'
export GROUP=`echo ${HOME} | awk -F / '{print $4}'`
export SCRATCH=/scratch/ms/${GROUP}/${USER}
export FLEXPART_ROOT_SCRIPTS=fp_root_test_path
export MAKEFILE=Makefile.TEST
;;
esac
mkdir -p ${FLEXPART_ROOT_SCRIPTS}/flex_extract_v${VERSION}
cd ${FLEXPART_ROOT_SCRIPTS}/flex_extract_v${VERSION} # if FLEXPART_ROOT is not set this means cd to the home directory
tar -xvf ${HOME}/flex_extract_v${VERSION}.tar
cd source/fortran
\rm *.o *.mod CONVERT2
make -f ${MAKEFILE} >flexcompile 2>flexcompile
ls -l CONVERT2 >>flexcompile
if [ $? -eq 0 ]; then
echo 'SUCCESS!' >>flexcompile
mail -s flexcompile.${HOST}.$$ ${USER} <flexcompile
else
echo Environment: >>flexcompile
env >> flexcompile
mail -s "ERROR! flexcompile.${HOST}.$$" ${USER} <flexcompile
fi
&NAMGEN
maxl = 61,
maxb = 46,
mlevel = 60,
mlevelist = "55/to/60",
mnauf = 63,
metapar = 77,
rlo0 = -15.0,
rlo1 = 45.0,
rla0 = 30.0,
rla1 = 75.0,
momega = 0,
momegadiff = 0,
mgauss = 1,
msmooth = 0,
meta = 0,
metadiff = 0,
mdpdeta = 1
/
#!/bin/ksh
# ON ECGB:
# start with ecaccess-job-submit -queueName ecgb NAME_OF_THIS_FILE on gateway server
# start with sbatch NAME_OF_THIS_FILE directly on machine
#SBATCH --workdir=/scratch/ms/testgroup/testuser
#SBATCH --qos=normal
#SBATCH --job-name=flex_ecmwf
#SBATCH --output=flex_ecmwf.%j.out
#SBATCH --error=flex_ecmwf.%j.out
#SBATCH --mail-type=FAIL
#SBATCH --time=12:00:00
## CRAY specific batch requests
##PBS -N flex_ecmwf
##PBS -q np
##PBS -S /usr/bin/ksh
## -o /scratch/ms/testgroup/testuser/flex_ecmwf.${PBS_JOBID}.out
## job output is in .ecaccess_DO_NOT_REMOVE
##PBS -j oe
##PBS -V
##PBS -l EC_threads_per_task=24
##PBS -l EC_memory_per_task=32000MB
set -x
export VERSION=7.1
case ${HOST} in
*ecg*)
module load python
module unload grib_api
module unload eccodes
module load eccodes
module unload emos
module load emos/455-r64
export PATH=${PATH}:fp_root_test_path/flex_extract_v7.1/source/python
;;
*cca*)
module switch PrgEnv-cray PrgEnv-intel
module load eccodes
module load emos
module load python
export SCRATCH=${TMPDIR}
export PATH=${PATH}:fp_root_test_path/flex_extract_v7.1/source/python
;;
esac
cd ${SCRATCH}
mkdir -p python$$
cd python$$
export CONTROL=CONTROL
cat >${CONTROL}<<EOF
EOF
submit.py --controlfile=${CONTROL} --inputdir=./work --outputdir=./work 1> prot 2>&1
if [ $? -eq 0 ] ; then
l=0
for muser in `grep -i MAILOPS ${CONTROL}`; do
if [ ${l} -gt 0 ] ; then
mail -s flex.${HOST}.$$ ${muser} <prot
fi
l=$((${l}+1))
done
else
l=0
for muser in `grep -i MAILFAIL ${CONTROL}`; do
if [ ${l} -gt 0 ] ; then
mail -s "ERROR! flex.${HOST}.$$" ${muser} <prot
fi
l=$((${l}+1))
done
fi
#This file is just for testing the submission of files to an ecserver.
ls -l
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from ecmwfapi import ECMWFDataServer
from ecmwfapi import ECMWFService
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"
})
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")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment