Changes in Source/Python/_config.py [0a75335:75db9b0] in flex_extract.git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Source/Python/_config.py
r0a75335 r75db9b0 9 9 # June 2020 - Anne Philipp 10 10 # - changed template filenames to .template 11 # August 2020 - Leopold Haimberger 12 # - added another target for installation 13 # - added filename which will contain paths for system version 14 # - checks if software runs in normal local mode or system local mode 15 # and defines paths to user directory and executable paths 11 16 # 12 17 # @License: … … 38 43 # ------------------------------------------------------------------------------ 39 44 40 _VERSION_STR = '7.1.2 '45 _VERSION_STR = '7.1.2_ctbto' 41 46 42 47 FLAG_ON_ECMWFSERVER = 'ecgb' in platform.node() … … 44 49 QUEUES_LIST = ['ecgate', 'cca', 'ccb'] 45 50 46 INSTALL_TARGETS = ['local', ' ecgate', 'cca', 'ccb']51 INSTALL_TARGETS = ['local', 'syslocal', 'ecgate', 'cca', 'ccb'] 47 52 48 53 CDS_DATASET_ML = 'reanalysis-era5-complete' … … 70 75 FILE_GRIB_INDEX = 'date_time_stepRange.idx' 71 76 FILE_GRIBTABLE = 'ecmwf_grib1_table_128' 77 FILE_SYS_CONFIG = '.setup.rc' 72 78 73 79 # ------------------------------------------------------------------------------ … … 79 85 80 86 # ------------------------------------------------------------------------------ 81 # PATHES87 # LOAD ENVIRONMENT VARIABLES FOR SYS VERSION; IF NECESSARRY 82 88 # ------------------------------------------------------------------------------ 83 89 … … 89 95 if PATH_LOCAL_PYTHON not in sys.path: 90 96 sys.path.append(PATH_LOCAL_PYTHON) 97 98 # ------------------------------------------------------------------------------ 99 # PATHES 100 # ------------------------------------------------------------------------------ 101 91 102 PATH_FLEXEXTRACT_DIR = os.path.normpath(os.path.dirname(os.path.abspath( 92 103 inspect.getfile(inspect.currentframe()))) + '/../../') 104 if not os.path.isdir(os.path.join(PATH_FLEXEXTRACT_DIR,'Run')): 105 # if it does not exist, we have a system installation in place 106 # we need to have a sys and user path 107 # configure correct system path 108 PATH_SYSTEM_DIR = os.path.join(PATH_FLEXEXTRACT_DIR, FLEXEXTRACT_DIRNAME) 109 # configure correct user path 110 PATH_FLEXEXTRACT_DIR = os.environ.get('FLEXEXTRACT_USER_DIR') 111 else: 112 PATH_SYSTEM_DIR = PATH_FLEXEXTRACT_DIR 113 93 114 PATH_RUN_DIR = os.path.join(PATH_FLEXEXTRACT_DIR, 'Run') 94 PATH_SOURCES = os.path.join(PATH_ FLEXEXTRACT_DIR, 'Source')115 PATH_SOURCES = os.path.join(PATH_SYSTEM_DIR, 'Source') 95 116 PATH_TEMPLATES = os.path.join(PATH_FLEXEXTRACT_DIR, 'Templates') 96 117 PATH_ECMWF_ENV = os.path.join(PATH_RUN_DIR, FILE_USER_ENVVARS) 97 118 PATH_GRIBTABLE = os.path.join(PATH_TEMPLATES, FILE_GRIBTABLE) 98 119 PATH_JOBSCRIPTS = os.path.join(PATH_RUN_DIR, 'Jobscripts') 99 PATH_FORTRAN_SRC = os.path.join(PATH_SOURCES, 'Fortran') 120 if os.path.isdir(os.path.join(PATH_SYSTEM_DIR,'Fortran')): 121 PATH_FORTRAN_SRC = PATH_SYSTEM_DIR 122 else: 123 PATH_FORTRAN_SRC = os.path.join(PATH_SOURCES, 'Fortran') 100 124 PATH_PYTHONTEST_SRC = os.path.join(PATH_SOURCES, 'Pythontest') 101 125 PATH_INPUT_DIR = os.path.join(PATH_RUN_DIR, INPUT_DIRNAME_DEFAULT)
Note: See TracChangeset
for help on using the changeset viewer.