Changeset fdfaf00 in flex_extract.git


Ignore:
Timestamp:
Dec 13, 2018, 11:49:50 PM (5 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
268ee86
Parents:
2fef1f2
Message:

changed flexpart directory variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/python/install.py

    rde4dc27 rfdfaf00  
    117117                        help='ecaccess destination, e.g. leo@genericSftp')
    118118
    119     parser.add_argument("--flexpart_root_scripts", dest="flexpart_root_scripts",
     119    parser.add_argument("--flexpartdir", dest="flexpartdir",
    120120                        default=None, help="FLEXPART root directory on ECMWF \
    121121                        servers (to find grib2flexpart and COMMAND file)\n\
     
    164164
    165165        mk_compilejob(c.makefile, c.install_target, c.ecuid, c.ecgid,
    166                       c.flexpart_root_scripts)
     166                      c.flexpartdir)
    167167
    168168        mk_job_template(c.ecuid, c.ecgid, c.gateway,
    169                         c.destination, c.flexpart_root_scripts)
     169                        c.destination, c.flexpartdir)
    170170
    171171        mk_env_vars(c.ecuid, c.ecgid, c.gateway, c.destination)
     
    183183
    184184        print('job compilation script has been submitted to ecgate for ' +
    185               'installation in ' + c.flexpart_root_scripts +
     185              'installation in ' + c.flexpartdir +
    186186               '/' + target_dirname)
    187187        print('You should get an email with subject "flexcompile" within ' +
     
    189189
    190190    else: #local
    191         if c.flexpart_root_scripts == _config.PATH_FLEXEXTRACT_DIR :
    192             print('WARNING: FLEXPART_ROOT_SCRIPTS has not been specified')
     191        if c.flexpartdir == _config.PATH_FLEXEXTRACT_DIR :
     192            print('WARNING: FLEXPARTDIR has not been specified')
    193193            print('flex_extract will be installed in here by compiling the ' +
    194194                  'Fortran source in ' + _config.PATH_FORTRAN_SRC)
    195195            os.chdir(_config.PATH_FORTRAN_SRC)
    196196        else: # creates the target working directory for flex_extract
    197             c.flexpart_root_scripts = os.path.expandvars(os.path.expanduser(
    198                                         c.flexpart_root_scripts))
    199             if os.path.abspath(ecd) != os.path.abspath(c.flexpart_root_scripts):
     197            c.flexpartdir = os.path.expandvars(os.path.expanduser(
     198                                        c.flexpartdir))
     199            if os.path.abspath(ecd) != os.path.abspath(c.flexpartdir):
    200200                mk_tarball(tar_file, c.install_target)
    201                 make_dir(os.path.join(c.flexpart_root_scripts,
     201                make_dir(os.path.join(c.flexpartdir,
    202202                                      target_dirname))
    203                 os.chdir(os.path.join(c.flexpart_root_scripts,
     203                os.chdir(os.path.join(c.flexpartdir,
    204204                                      target_dirname))
    205205                un_tarball(tar_file)
    206                 os.chdir(os.path.join(c.flexpart_root_scripts,
     206                os.chdir(os.path.join(c.flexpartdir,
    207207                                      target_dirname,
    208208                                      _config.PATH_REL_FORTRAN_SRC))
     
    211211        print('Install ' + target_dirname + ' software at ' +
    212212              c.install_target + ' in directory ' +
    213               os.path.abspath(c.flexpart_root_scripts) + '\n')
     213              os.path.abspath(c.flexpartdir) + '\n')
    214214
    215215        delete_convert_build('.')
     
    262262            sys.exit(1)
    263263
    264         if not c.flexpart_root_scripts:
    265             c.flexpart_root_scripts = '${HOME}'
     264        if not c.flexpartdir:
     265            c.flexpartdir = '${HOME}'
    266266        else:
    267             c.flexpart_root_scripts = c.flexpart_root_scripts
     267            c.flexpartdir = c.flexpartdir
    268268    else: # local
    269         if not c.flexpart_root_scripts:
    270             c.flexpart_root_scripts = _config.PATH_FLEXEXTRACT_DIR
     269        if not c.flexpartdir:
     270            c.flexpartdir = _config.PATH_FLEXEXTRACT_DIR
    271271
    272272    return
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG