diff --git a/Source/Python/_config.py~ b/Source/Python/_config.py~ deleted file mode 100644 index 82b7bc0883ad7b67e87003258a2deb02c7914dfe..0000000000000000000000000000000000000000 --- a/Source/Python/_config.py~ +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -#******************************************************************************* -# @Author: Anne Philipp (University of Vienna) -# -# @Date: August 2018 -# -# @Change History: -# -# @License: -# (C) Copyright 2014-2019. -# Anne Philipp, Leopold Haimberger -# -# 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. -#******************************************************************************* -'''Configurations for flex_extract. - -Defines a couple of global constant parameters as well as filenames -and pathes. -''' -# ------------------------------------------------------------------------------ -# MODULES -# ------------------------------------------------------------------------------ -import os -import sys -import inspect -import platform - -# ------------------------------------------------------------------------------ -# PARAMETERS -# ------------------------------------------------------------------------------ - -_VERSION_STR = '7.1' - -FLAG_ON_ECMWFSERVER = 'ecgb' in platform.node() - -QUEUES_LIST = ['ecgate', 'cca', 'ccb'] - -INSTALL_TARGETS = ['local', 'ecgate', 'cca', 'ccb'] - -CDS_DATASET = 'reanalysis-era5-complete' - -# up-to-date available maximum level numbers at ECMWF, 05.10.2018 -MAX_LEVEL_LIST = [16, 19, 31, 40, 50, 60, 62, 91, 137] - -# ------------------------------------------------------------------------------ -# FILENAMES -# ------------------------------------------------------------------------------ - -FILE_MARS_REQUESTS = 'mars_requests.csv' -FORTRAN_EXECUTABLE = 'calc_etadot' -TEMPFILE_USER_ENVVARS = 'ECMWF_ENV.template' -FILE_USER_ENVVARS = 'ECMWF_ENV' -TEMPFILE_INSTALL_COMPILEJOB = 'compilejob.template' -FILE_INSTALL_COMPILEJOB = 'compilejob.ksh' -TEMPFILE_INSTALL_JOB = 'job.template' -TEMPFILE_JOB = 'job.temp' -FILE_JOB_OD = 'job.ksh' -FILE_JOB_OP = 'jopoper.ksh' -TEMPFILE_NAMELIST = 'convert.nl' -FILE_NAMELIST = 'fort.4' -FILE_GRIB_INDEX = 'date_time_stepRange.idx' -FILE_GRIBTABLE = 'ecmwf_grib1_table_128' - -# ------------------------------------------------------------------------------ -# DIRECTORY NAMES -# ------------------------------------------------------------------------------ - -FLEXEXTRACT_DIRNAME = 'flex_extract_v' + _VERSION_STR -INPUT_DIRNAME_DEFAULT = 'Workspace' - -# ------------------------------------------------------------------------------ -# PATHES -# ------------------------------------------------------------------------------ - -# path to the local python source files -# first thing to get because the submitted python script starts in here -PATH_LOCAL_PYTHON = os.path.dirname(os.path.abspath( - inspect.getfile(inspect.currentframe()))) -# add path to pythonpath -if PATH_LOCAL_PYTHON not in sys.path: - sys.path.append(PATH_LOCAL_PYTHON) -PATH_FLEXEXTRACT_DIR = os.path.normpath(os.path.dirname(os.path.abspath( - inspect.getfile(inspect.currentframe()))) + '/../../') -PATH_RUN_DIR = os.path.join(PATH_FLEXEXTRACT_DIR, 'Run') -PATH_SOURCES = os.path.join(PATH_FLEXEXTRACT_DIR, 'Source') -PATH_TEMPLATES = os.path.join(PATH_FLEXEXTRACT_DIR, 'Templates') -PATH_ECMWF_ENV = os.path.join(PATH_RUN_DIR, FILE_USER_ENVVARS) -PATH_GRIBTABLE = os.path.join(PATH_TEMPLATES, FILE_GRIBTABLE) -PATH_JOBSCRIPTS = os.path.join(PATH_RUN_DIR, 'Jobscripts') -PATH_FORTRAN_SRC = os.path.join(PATH_SOURCES, 'Fortran') -PATH_PYTHONTEST_SRC = os.path.join(PATH_SOURCES, 'Pythontest') -PATH_INPUT_DIR = os.path.join(PATH_RUN_DIR, INPUT_DIRNAME_DEFAULT) -PATH_TEST = os.path.join(PATH_FLEXEXTRACT_DIR, 'Testing') -if os.getenv('CONTROL'): - # this is only needed if (gateway) version with job script is used! - # because job is directly submitted from SCRATCH and because the - # CONTROL file is stored there, the normal path is not valid. - PATH_CONTROLFILES = '.' -else: - PATH_CONTROLFILES = os.path.join(PATH_RUN_DIR, 'Control') -# -# ------------------------------------------------------------------------------ -# RELATIVE PATHES FOR INSTALLATION TAR-BALL -# ------------------------------------------------------------------------------ - -PATH_REL_PYTHON_SRC = os.path.relpath(PATH_LOCAL_PYTHON, PATH_FLEXEXTRACT_DIR) -PATH_REL_PYTHONTEST_SRC = os.path.relpath(PATH_PYTHONTEST_SRC, PATH_FLEXEXTRACT_DIR) -PATH_REL_CONTROLFILES = os.path.relpath(PATH_CONTROLFILES, PATH_FLEXEXTRACT_DIR) -PATH_REL_TEMPLATES = os.path.relpath(PATH_TEMPLATES, PATH_FLEXEXTRACT_DIR) -PATH_REL_ECMWF_ENV = os.path.relpath(PATH_ECMWF_ENV, PATH_FLEXEXTRACT_DIR) -PATH_REL_RUN_DIR = os.path.relpath(PATH_RUN_DIR, PATH_FLEXEXTRACT_DIR) -PATH_REL_JOBSCRIPTS = os.path.relpath(PATH_JOBSCRIPTS, PATH_FLEXEXTRACT_DIR) -PATH_REL_FORTRAN_SRC = os.path.relpath(PATH_FORTRAN_SRC, PATH_FLEXEXTRACT_DIR) -PATH_REL_TEST = os.path.relpath(PATH_TEST, PATH_FLEXEXTRACT_DIR) diff --git a/Source/Pythontest/.coverage b/Source/Pythontest/.coverage deleted file mode 100644 index 47caf6bb2658216f0fa17ad108780a38c3a8e385..0000000000000000000000000000000000000000 --- a/Source/Pythontest/.coverage +++ /dev/null @@ -1 +0,0 @@ -!coverage.py: This is a private format, don't read it directly!{"lines":{"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/test_suite.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/_config.py":[32,33,37,24,25,26,28,31],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/MarsRetrieval.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/install.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/get_mars_data.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/testecmwfapi.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/EcFlexpart.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/profiling.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/pythontest/TestInput.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/plot_retrieved.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/ControlFile.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/submit.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/pythontest/__init__.py":[13],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/pythontest/TestTools.py":[4,5,6,7,8,10,11,12,18,20,22,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,59,61,63,64,65,67,68,70,71,72,73,74,76,77,78,79,80,82,83,84,85,86,88,90,92,94,96,97,99,100,102,103,104,105,106,107,108,110,111,112,113,114,115,117,126,127,128,129,131,139,140,141,142,143,145,146,147,148,149,151,152,153,154,155,157,158,159,160,161,162,163,164,166,167,168,169,170,171,173,175,176,177,178,182,183,184,185,186,188,189,190,193],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/disaggregation.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/pythontest/TestPathes.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/GribTools.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/prepare_flexpart.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/tools.py":[517,518,519,520,521,522,523,524,526,527,529,50,51,52,53,54,55,56,62,76,77,78,81,82,83,84,85,86,89,90,91,92,93,94,95,96,99,100,101,102,103,104,107,110,112,115,116,117,118,120,121,122,123,124,125,127,129,131,144,145,146,147,148,149,151,153,191,210,213,214,215,216,217,218,219,220,221,222,223,224,229,230,232,237,279,315,328,329,330,331,335,338,353,354,355,356,357,358,360,363,386,387,388,389,390,391,392,396,398,416,418,420,433,434,435,436,438,440,442,444,476,477,478,481,482,483,484,485,486,488,489,491,493],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/pythontest/TestEcFlexpart.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/pythontest/TestUIOFiles.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/pythontest/TestInstall.py":[],"/raid60/nas/tmc/Anne/Interpolation/flexextract/flexextract/python/UioFiles.py":[]}} \ No newline at end of file diff --git a/Source/Pythontest/TestInstall.py b/Source/Pythontest/TestInstall.py index c2d4d4a070b473a593caaa1ce305aa9564ba28ac..3fc6892353ba26d144e947ceff74865842d2fa72 100644 --- a/Source/Pythontest/TestInstall.py +++ b/Source/Pythontest/TestInstall.py @@ -158,7 +158,7 @@ class TestInstall(): for name in files: tarfiles_list.append(os.path.relpath( os.path.join(path, name), test_dir)) - + # test for equality assert sorted(tarfiles_list) == sorted(comparison_list) diff --git a/Testing/Installation/Api_testscripts/test_cdsapi_modellevel.py~ b/Testing/Installation/Api_testscripts/test_cdsapi_modellevel.py~ deleted file mode 100644 index 591184f5cfa592a9ff573ecb3f0d9bb182eb1c0b..0000000000000000000000000000000000000000 --- a/Testing/Installation/Api_testscripts/test_cdsapi_modellevel.py~ +++ /dev/null @@ -1,23 +0,0 @@ -#!/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' : 't', - '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~ deleted file mode 100644 index 0e5b7a51a5ff27c68909f0598980246a34203233..0000000000000000000000000000000000000000 --- a/Testing/Installation/Api_testscripts/test_cdsapi_pressurelevel.py~ +++ /dev/null @@ -1,19 +0,0 @@ -#!/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~ deleted file mode 100644 index 607d93b2612706b8afaa112602c835fed49a33b6..0000000000000000000000000000000000000000 --- a/Testing/Installation/Api_testscripts/test_ecmwfapi_member.py~ +++ /dev/null @@ -1,20 +0,0 @@ -#!/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~ deleted file mode 100644 index bac172d8f3b7d297a4e7d7e3facbb95fb721ae04..0000000000000000000000000000000000000000 --- a/Testing/Installation/Api_testscripts/test_ecmwfapi_public.py~ +++ /dev/null @@ -1,21 +0,0 @@ -#!/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", - 'number' : "0", - 'target' : "download_cera20c_ecmwfapi.grib" -})