Changeset 5d42acd in flex_extract.git


Ignore:
Timestamp:
Sep 21, 2018, 10:39:25 AM (8 months ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
dev
Children:
25b14be
Parents:
2fb99de
Message:

working version of restructured usement of pathes with config file

Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • _templates/job.temp

    r2fb99de r5d42acd  
    4949cd python$$
    5050
    51 export CONTROL=CONTROL
     51export CONTROL=$PWD/CONTROL
    5252
    5353cat >$CONTROL<<EOF
  • python/ControlFile.py

    r2fb99de r5d42acd  
    425425
    426426        if self.request != 0:
    427             marsfile = os.path.join(_config.PATH_RUN_DIR,
     427            marsfile = os.path.join(self.inputdir,
    428428                                    _config.FILE_MARS_REQUESTS)
    429429            if os.path.isfile(marsfile):
  • python/EcFlexpart.py

    r2fb99de r5d42acd  
    206206        self.level = c.level
    207207        self.expver = c.expver
     208        self.levelist = c.levelist
    208209        # for gaussian grid retrieval
    209210        self.glevelist = '1/to/' + c.level
  • python/_config.py

    r2fb99de r5d42acd  
    7777
    7878# path to directory where all control files are stored
    79 PATH_CONTROLFILES = os.path.join(PATH_RUN_DIR, 'control')
    80 PATH_RELATIVE_CONTROLFILES = os.path.relpath(PATH_CONTROLFILES, PATH_FLEXEXTRACT_DIR)
     79if os.getenv('CONTROL') and '/' in os.getenv('CONTROL'):
     80    # this is only needed if remote version with job script is used!
     81    # because job is directly submitted from SCRATCH and because the
     82    # CONTROL file is stored there, the normal path is not valid.
     83    PATH_CONTROLFILES = os.getenv('CONTROL')
     84else:
     85    PATH_CONTROLFILES = os.path.join(PATH_RUN_DIR, 'control')
     86    PATH_RELATIVE_CONTROLFILES = os.path.relpath(PATH_CONTROLFILES, PATH_FLEXEXTRACT_DIR)
    8187
    8288# path to directory where all job scripts are stored
  • run/jobscripts/job.ksh

    r2fb99de r5d42acd  
    4949cd python$$
    5050
    51 export CONTROL=CONTROL
     51export CONTROL=$PWD/CONTROL
    5252
    5353cat >$CONTROL<<EOF
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG