Changeset 3e13e02 in flex_extract.git for Source


Ignore:
Timestamp:
Jul 9, 2020, 8:09:16 AM (4 years ago)
Author:
anphi <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
f61e1df
Parents:
05e9362 (diff), 3363e01 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'dev' into 'master' after changes according to manuscript review were done

Location:
Source
Files:
1 added
22 edited

Legend:

Unmodified
Added
Removed
  • Source/Fortran/calc_etadot.f90

    rdfa7dbd rd90a529  
    486486  END IF ! MGAUSS
    487487
    488 !! CREATE FILE VERTICAL.EC NEEDED BY POP MODEL 
    489 
    490   OPEN(21,FILE='VERTICAL.EC')
    491   WRITE(21,'(A)')
    492   WRITE(21,'(A)') 'VERTICAL DISCRETIZATION OF POP MODEL'
    493   WRITE(21,'(A)')
    494   write(21,'(i3,a)') MLEVEL,'   number of layers'
    495   WRITE(21,'(A)')
    496   WRITE(21,'(A)') '* A(NLEV+1)'
    497   WRITE(21,'(A)')
    498   DO 205 I=1,MLEVEL+1
    499 205 WRITE(21,'(F18.12)') AK(I)
    500   WRITE(21,'(A)')
    501   WRITE(21,'(A)') '* B(NLEV+1)'
    502   WRITE(21,'(A)')
    503   DO 210 I=1,MLEVEL+1
    504 210 WRITE(21,'(F18.12)') BK(I)
    505   CLOSE(21)
     488! CREATE FILE VERTICAL.EC NEEDED BY POP MODEL 
     489! 2020-06-25 Commented out by PS - not needed anymore
     490
     491!  OPEN(21,FILE='VERTICAL.EC')
     492!  WRITE(21,'(A)')
     493!  WRITE(21,'(A)') 'VERTICAL DISCRETIZATION OF POP MODEL'
     494!  WRITE(21,'(A)')
     495!  write(21,'(i3,a)') MLEVEL,'   number of layers'
     496!  WRITE(21,'(A)')
     497!  WRITE(21,'(A)') '* A(NLEV+1)'
     498!  WRITE(21,'(A)')
     499!  DO 205 I=1,MLEVEL+1
     500!205 WRITE(21,'(F18.12)') AK(I)
     501!  WRITE(21,'(A)')
     502!  WRITE(21,'(A)') '* B(NLEV+1)'
     503!  WRITE(21,'(A)')
     504!  DO 210 I=1,MLEVEL+1
     505!210 WRITE(21,'(F18.12)') BK(I)
     506!  CLOSE(21)
    506507
    507508!------------------------------------------------------------------
  • Source/Fortran/makefile_debug

    r5868d74 rd2d6cf9  
    1515EXE      =  calc_etadot_debug.out
    1616
    17 ECCODES_LIB=  -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper
     17ECCODES_LIB=  -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm
    1818EMOSLIB=-lemosR64
    1919LIB =  $(ECCODES_LIB) $(EMOSLIB)
  • Source/Fortran/makefile_fast

    rda1b788 r14d9618  
    1515EXE      =  calc_etadot_fast.out
    1616
    17 ECCODES_LIB =  -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper
     17ECCODES_LIB =  -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm
    1818EMOSLIB=-lemosR64
    1919LIB =  $(ECCODES_LIB) $(EMOSLIB)
    2020
    2121ECCODES_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15
     22#/usr/local/include/ #oldstable
     23
    2224INC = -I. -I$(ECCODES_INCLUDE_DIR)
    2325
    2426FC = gfortran
    25 OPT = -O3 -march=native
     27OPT = -O3 # -O3 -march=native
    2628FFLAGS =   $(OPT) $(LIB) $(INC) -fdefault-real-8 -fopenmp -fconvert=big-endian
    2729LDFLAGS =  $(OPT) $(LIB) -fopenmp
  • Source/Fortran/posnam.f90

    rdfa7dbd r36dbabb  
    11  SUBROUTINE POSNAM(KULNAM,CDNAML)
    22
    3  !! position in namelist file.
    4  ! author:  Mats Hamrud, ECMWF
     3 !! Position in namelist file.
     4 !! Author:  Mats Hamrud, ECMWF
    55
    66    INTEGER, INTENT(IN)       :: KULNAM
  • Source/Fortran/rwgrib2.f90

    r5b5589b r36dbabb  
    11 MODULE RWGRIB2
     2
     3!! Read or write a field variable on a lat/lon grid from/to GRIB file, or
     4!! read a field in spectral representation from GRIB file
    25
    36 CONTAINS
     
    8588!      print*,i
    8689   END DO iloop
    87 !!   write(*,*) 'readlatlon: ',i-1,' records read'
     90! !   write(*,*) 'readlatlon: ',i-1,' records read'
    8891 
    8992   DO i=1,n
     
    169172   SUBROUTINE READSPECTRAL(FILENAME,CXMN,MNAUF,MLEVEL,MAXLEV,MPAR,A,B)
    170173
    171 !!  read a GRIB file in spherical harmonics
     174!!  Read a GRIB file in spherical harmonics
    172175
    173176   USE GRIB_API
     
    249252   END DO iloop
    250253
    251 !!   write(*,*) 'readspectral: ',i-1,' records read'
     254! !   write(*,*) 'readspectral: ',i-1,' records read'
    252255 
    253256   DO i=1,n
  • Source/Python/Classes/ControlFile.py

    r0f89116 r5f67883  
    1919#        - divided assignment of attributes and the check of conditions
    2020#        - outsourced the commandline argument assignments to control attributes
     21#   June 2020 - Anne Philipp
     22#        - update default makefile to None
    2123#
    2224# @License:
    23 #    (C) Copyright 2014-2019.
     25#    (C) Copyright 2014-2020.
    2426#    Anne Philipp, Leopold Haimberger
    2527#
     
    267269    makefile : str
    268270        Name of the makefile to be used for the Fortran program.
    269         Default value is 'Makefile.gfortran'.
     271        Default value is None.
    270272
    271273    destination : str
     
    402404        self.exedir = _config.PATH_FORTRAN_SRC
    403405        self.installdir = None
    404         self.makefile = 'Makefile.gfortran'
     406        self.makefile = None
    405407        self.destination = None
    406408        self.gateway = None
  • Source/Python/Classes/EcFlexpart.py

    r53d3b2a r2c3c135  
    3939#
    4040# @License:
    41 #    (C) Copyright 2014-2019.
     41#    (C) Copyright 2014-2020.
    4242#    Anne Philipp, Leopold Haimberger
    4343#
     
    14161416                                        'stepRange', 'values'],
    14171417                              keyvalues=[inumb, int(date.strftime('%Y%m%d')),
    1418                                          date.hour*100, 0, lsp_new_np[inumb, :, it]],
     1418                                         date.hour*100, 0, lsp_new_np[inumb, :, it]]
    14191419                             )
    14201420            fluxfile.set_keys(tmpfile, filemode='ab',
     
    14791479
    14801480        gribfile = GribUtil(os.path.join(inputdir, 'rr_grib_dummy.grb'))
    1481 
    1482         gribfile.copy_dummy_msg(ifile, keynames=['paramId'],
    1483                                 keyvalues=[142], filemode='wb')
    1484 
    1485         gribfile.copy_dummy_msg(ifile, keynames=['paramId'],
    1486                                 keyvalues=[143], filemode='ab')
     1481       
     1482        gribfile.copy_dummy_msg(ifile, keynames=['paramId','paramId'],
     1483                                keyvalues=[142,143], filemode='wb')       
    14871484
    14881485        return
     
    17221719# ============================================================================================
    17231720            # create name of final output file, e.g. EN13040500 (ENYYMMDDHH)
     1721            # for CERA-20C we need all 4 digits for the year sinc 1900 - 2010
    17241722            if c.purefc:
    1725                 suffix = cdate[2:8] + '.' + ctime + '.' + cstep
     1723                if c.marsclass == 'EP':
     1724                    suffix = cdate[0:8] + '.' + ctime + '.' + cstep
     1725                else:
     1726                    suffix = cdate[2:8] + '.' + ctime + '.' + cstep
    17261727            else:
    1727                 suffix = cdate_hour[2:10]
     1728                if c.marsclass == 'EP':
     1729                    suffix = cdate_hour[0:10]
     1730                else:
     1731                    suffix = cdate_hour[2:10]
    17281732
    17291733            # if necessary, add ensemble member number to filename suffix
     
    17481752                                                c.ppid +
    17491753                                                '*')[0])
    1750             fluxfile = 'flux' + cdate[0:2] + suffix
     1754            if c.marsclass == 'EP':
     1755                fluxfile = 'flux' + suffix
     1756            else:
     1757                fluxfile = 'flux' + cdate[0:2] + suffix
    17511758            if not c.cwc:
    17521759                flist = ['fort.15', fluxfile, 'fort.16', orolsm]
  • Source/Python/Classes/GribUtil.py

    r0f89116 r2c3c135  
    1313#
    1414# @License:
    15 #    (C) Copyright 2014-2019.
     15#    (C) Copyright 2014-2020.
    1616#    Anne Philipp, Leopold Haimberger
    1717#
     
    122122
    123123
    124     def set_keys(self, fromfile, keynames, keyvalues, wherekeynames,
    125                  wherekeyvalues, filemode='wb'):
     124    def set_keys(self, fromfile, filemode='wb', keynames=[], keyvalues=[],
     125                 wherekeynames=[], wherekeyvalues=[]):
    126126        '''Opens the file to read the grib messages and then write
    127127        the selected messages (with wherekeys) to a new output file.
     
    162162
    163163        fout = open(self.filenames, filemode)
    164 
    165         with open(fromfile, 'rb') as fin:
     164       # print(fout)
     165        fin = open(fromfile, 'rb')
     166       # print(fin)
     167        while True:
    166168            gid = codes_grib_new_from_file(fin)
    167 
     169           # print('test')
     170            if gid is None:
     171                break           
     172           
    168173            select = True
    169             i = 0
    170             for wherekey in wherekeynames:
     174            #print(str(codes_get(gid,'paramId')))
     175            for i, wherekey in enumerate(wherekeynames):
    171176                if not codes_is_defined(gid, wherekey):
    172177                    raise Exception("wherekey was not defined")
     
    174179                select = (select and (str(wherekeyvalues[i]) ==
    175180                                      str(codes_get(gid, wherekey))))
    176                 i += 1
    177181
    178182            if select:
    179                 i = 0
    180                 for key in keynames:
     183                for i, key in enumerate(keynames):
    181184                    if key == 'values':
    182185                        codes_set_values(gid, keyvalues[i])
    183186                    else:
    184187                        codes_set(gid, key, keyvalues[i])
    185                     i += 1
    186188
    187189                codes_write(gid, fout)
     
    190192
    191193        fout.close()
     194        fin.close()
    192195
    193196        return
     
    229232            raise Exception("Give a value for each keyname!")
    230233
    231 
    232234        fout = open(self.filenames, filemode)
    233 
     235        fin = open(filename_in, 'rb')
     236       
    234237        fields = 0
    235 
    236         with open(filename_in, 'rb') as fin:
    237             if fields >= 1:
     238        while True:
     239            if fields >= len(keyvalues):
    238240                fout.close()
     241                fin.close()
    239242                return
    240 
     243               
    241244            gid = codes_grib_new_from_file(fin)
    242 
    243             select = True
    244             i = 0
    245             for key in keynames:
     245            if gid is None:
     246                break           
     247
     248            for i, key in enumerate(keynames):
     249               
     250                select = True
     251               
    246252                if not codes_is_defined(gid, key):
    247253                    raise Exception("Key was not defined")
     
    253259                    select = (select and (str(keyvalues[i]) !=
    254260                                          str(codes_get(gid, key))))
    255                 i += 1
    256 
    257             if select:
    258                 fields = fields + 1
    259                 codes_write(gid, fout)
    260 
     261               
     262                if select:
     263                    fields = fields + 1
     264                    codes_write(gid, fout)
     265                   
    261266            codes_release(gid)
    262267
    263268        fout.close()
     269        fin.close()
    264270
    265271        return
  • Source/Python/Classes/MarsRetrieval.py

    r0f89116 r026b359  
    2020#
    2121# @License:
    22 #    (C) Copyright 2014-2019.
     22#    (C) Copyright 2014-2020.
    2323#    Anne Philipp, Leopold Haimberger
    2424#
  • Source/Python/Classes/UioFiles.py

    rd9abaac r026b359  
    2323#
    2424# @License:
    25 #    (C) Copyright 2014-2019.
     25#    (C) Copyright 2014-2020.
    2626#    Anne Philipp, Leopold Haimberger
    2727#
  • Source/Python/Classes/__init__.py

    rba99230 r026b359  
    77#
    88# @License:
    9 #    (C) Copyright 2015-2018.
     9#    (C) Copyright 2014-2020.
     10#    Anne Philipp, Leopold Haimberger
    1011#
    11 #    This software is licensed under the terms of the Apache Licence Version 2.0
    12 #    which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
     12#    SPDX-License-Identifier: CC-BY-4.0
     13#
     14#    This work is licensed under the Creative Commons Attribution 4.0
     15#    International License. To view a copy of this license, visit
     16#    http://creativecommons.org/licenses/by/4.0/ or send a letter to
     17#    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
    1318#
    1419#*******************************************************************************
  • Source/Python/Mods/__init__.py

    rba99230 r026b359  
    77#
    88# @License:
    9 #    (C) Copyright 2015-2018.
     9#    (C) Copyright 2014-2020.
     10#    Anne Philipp, Leopold Haimberger
    1011#
    11 #    This software is licensed under the terms of the Apache Licence Version 2.0
    12 #    which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
     12#    SPDX-License-Identifier: CC-BY-4.0
     13#
     14#    This work is licensed under the Creative Commons Attribution 4.0
     15#    International License. To view a copy of this license, visit
     16#    http://creativecommons.org/licenses/by/4.0/ or send a letter to
     17#    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
    1318#
    1419#*******************************************************************************
  • Source/Python/Mods/checks.py

    r50f9ca6 r026b359  
    99#
    1010# @License:
    11 #    (C) Copyright 2014-2019.
     11#    (C) Copyright 2014-2020.
    1212#    Anne Philipp, Leopold Haimberger
    1313#
  • Source/Python/Mods/disaggregation.py

    r0f89116 ra916e8f  
    1919#        - added the new disaggregation method for precipitation
    2020#
     21#    June 2020 - Anne Philipp (University of Vienna):
     22#        - reformulated formular for dapoly
     23#
    2124# @License:
    22 #    (C) Copyright 2014-2019.
     25#    (C) Copyright 2014-2020.
    2326#    Anne Philipp, Leopold Haimberger
    2427#
     
    9295
    9396    """
    94 
    95     pya = (alist[3] - alist[0] + 3. * (alist[1] - alist[2])) / 6.
    96     pyb = (alist[2] + alist[0]) / 2. - alist[1] - 9. * pya / 2.
    97     pyc = alist[1] - alist[0] - 7. * pya / 2. - 2. * pyb
    98     pyd = alist[0] - pya / 4. - pyb / 3. - pyc / 2.
    99     nfield = 8. * pya + 4. * pyb + 2. * pyc + pyd
     97   
     98    nfield = -1./12.*alist[0] + \
     99              7./12.*alist[1] + \
     100              7./12.*alist[2] - \
     101              1./12.*alist[3]
    100102
    101103    return nfield
  • Source/Python/Mods/get_mars_data.py

    r0f89116 r026b359  
    2626#
    2727# @License:
    28 #    (C) Copyright 2014-2019.
     28#    (C) Copyright 2014-2020.
    2929#    Anne Philipp, Leopold Haimberger
    3030#
  • Source/Python/Mods/prepare_flexpart.py

    r0f89116 r026b359  
    2929#
    3030# @License:
    31 #    (C) Copyright 2014-2019.
     31#    (C) Copyright 2014-2020.
    3232#    Anne Philipp, Leopold Haimberger
    3333#
  • Source/Python/Mods/profiling.py

    r0f89116 r026b359  
    1212#
    1313# @License:
    14 #    (C) Copyright 2018.
     14#    (C) Copyright 2020.
    1515#
    1616#    This software is licensed under the terms of the Apache Licence Version 2.0
  • Source/Python/Mods/tools.py

    rd1bfa24 r026b359  
    2424#
    2525# @License:
    26 #    (C) Copyright 2014-2019.
     26#    (C) Copyright 2014-2020.
    2727#    Anne Philipp, Leopold Haimberger
    2828#
  • Source/Python/__init__.py

    rba99230 r026b359  
    77#
    88# @License:
    9 #    (C) Copyright 2015-2018.
     9#    (C) Copyright 2014-2020.
     10#    Anne Philipp, Leopold Haimberger
    1011#
    11 #    This software is licensed under the terms of the Apache Licence Version 2.0
    12 #    which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
     12#    SPDX-License-Identifier: CC-BY-4.0
     13#
     14#    This work is licensed under the Creative Commons Attribution 4.0
     15#    International License. To view a copy of this license, visit
     16#    http://creativecommons.org/licenses/by/4.0/ or send a letter to
     17#    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
    1318#
    1419#*******************************************************************************
  • Source/Python/_config.py

    r0422cad r98f09d2  
    77#
    88# @Change History:
     9#      June 2020 - Anne Philipp
     10#         - changed template filenames to .template
    911#
    1012# @License:
    11 #    (C) Copyright 2014-2019.
     13#    (C) Copyright 2014-2020.
    1214#    Anne Philipp, Leopold Haimberger
    1315#
     
    3638# ------------------------------------------------------------------------------
    3739
    38 _VERSION_STR = '7.1.1'
     40_VERSION_STR = '7.1.2'
    3941
    4042FLAG_ON_ECMWFSERVER = 'ecgb' in platform.node()
     
    5759TEMPFILE_USER_ENVVARS = 'ECMWF_ENV.template'
    5860FILE_USER_ENVVARS = 'ECMWF_ENV'
    59 TEMPFILE_INSTALL_COMPILEJOB = 'compilejob.template'
     61TEMPFILE_INSTALL_COMPILEJOB = 'installscript.template'
    6062FILE_INSTALL_COMPILEJOB = 'compilejob.ksh'
    61 TEMPFILE_INSTALL_JOB = 'job.template'
    62 TEMPFILE_JOB = 'job.temp'
     63TEMPFILE_INSTALL_JOB = 'jobscript.template'
     64TEMPFILE_JOB = 'submitscript.template'
    6365FILE_JOB_OD = 'job.ksh'
    6466FILE_JOB_OP = 'jopoper.ksh'
    65 TEMPFILE_NAMELIST = 'convert.nl'
     67TEMPFILE_NAMELIST = 'calc_etadot_nml.template'
    6668FILE_NAMELIST = 'fort.4'
    6769FILE_GRIB_INDEX = 'date_time_stepRange.idx'
  • Source/Python/install.py

    r50f9ca6 ra916e8f  
    1313#        - moved install_args_and_control in here
    1414#        - splitted code in smaller functions
    15 #        - delete convert build files in here instead of compile job script
     15#        - delete fortran build files in here instead of compile job script
    1616#        - changed static path names to variables from config file
    1717#        - splitted install function into several smaller pieces
    1818#        - use of tarfile package in python
     19#    June 2020 - Anne Philipp
     20#        - renamed "convert" functions to "fortran" functions
     21#        - reconfigured mk_tarball to select *.template files instead
     22#          of *.nl and *.temp
     23#        - added check for makefile settings
    1924#
    2025# @License:
    21 #    (C) Copyright 2014-2019.
     26#    (C) Copyright 2014-2020.
    2227#    Anne Philipp, Leopold Haimberger
    2328#
     
    3944#    mk_compilejob
    4045#    mk_job_template
    41 #    del_convert_build
    42 #    mk_convert_build
     46#    del_fortran_build
     47#    mk_fortran_build
    4348#
    4449#*******************************************************************************
     
    243248                                  _config.PATH_REL_FORTRAN_SRC))
    244249
    245     # Create Fortran executable - CONVERT2
     250    # Create Fortran executable
    246251    print('Install ' +  _config.FLEXEXTRACT_DIRNAME + ' software at ' +
    247252          c.install_target + ' in directory ' +
    248253          os.path.abspath(c.installdir) + '\n')
    249254
    250     del_convert_build('.')
    251     mk_convert_build('.', c.makefile)
     255    del_fortran_build('.')
     256    mk_fortran_build('.', c.makefile)
    252257
    253258    os.chdir(_config.PATH_FLEXEXTRACT_DIR)
     
    304309            c.installdir = _config.PATH_FLEXEXTRACT_DIR
    305310
     311    if not c.makefile:
     312        print('WARNING: no makefile was specified.')
     313        if c.install_target == 'local':
     314            c.makefile = 'makefile_local_gfortran'
     315            print('WARNING: default makefile selected: makefile_local_gfortan')
     316        elif c.install_target == 'ecgate':
     317            c.makefile = 'makefile_ecgate'
     318            print('WARNING: default makefile selected: makefile_ecgate')
     319        elif c.install_target == 'cca' or \
     320             c.install_target == 'ccb':
     321            c.makefile = 'makefile_cray'
     322            print('WARNING: default makefile selected: makefile_cray')
     323        else:
     324            pass
     325       
    306326    return
    307327
     
    358378                 for x in UioFiles(_config.PATH_REL_TEST, '*').files]
    359379    tempfiles = [os.path.relpath(x, ecd)
    360                  for x in UioFiles(_config.PATH_REL_TEMPLATES, '*.temp').files]
    361     nlfiles = [os.path.relpath(x, ecd)
    362                for x in UioFiles(_config.PATH_REL_TEMPLATES, '*.nl').files]
     380                 for x in UioFiles(_config.PATH_REL_TEMPLATES, '*.template').files]
    363381    gribtable = [os.path.relpath(x, ecd)
    364382                 for x in UioFiles(_config.PATH_REL_TEMPLATES, '*grib*').files]
     
    372390
    373391    # concatenate single lists to one for a better looping
    374     filelist = pyfiles + pytestfiles + controlfiles + tempfiles + nlfiles + \
     392    filelist = pyfiles + pytestfiles + controlfiles + tempfiles + \
    375393               ffiles + gribtable + hfiles + makefiles + ecmwf_env_file + \
    376394               runfile + jobdir + testfiles +\
     
    498516    makefile : str
    499517        Name of the makefile which should be used to compile FORTRAN
    500         CONVERT2 program.
     518        program.
    501519
    502520    ecuid : str
     
    633651    return
    634652
    635 def del_convert_build(src_path):
     653def del_fortran_build(src_path):
    636654    '''Clean up the Fortran source directory and remove all
    637     build files (e.g. \*.o, \*.mod and CONVERT2)
     655    build files (e.g. \*.o, \*.mod and FORTRAN EXECUTABLE)
    638656
    639657    Parameters
     
    657675    return
    658676
    659 def mk_convert_build(src_path, makefile):
     677def mk_fortran_build(src_path, makefile):
    660678    '''Compiles the Fortran code and generates the executable.
    661679
     
    686704            print(perr.decode())
    687705            print('Please edit ' + makefile +
    688                   ' or try another Makefile in the src directory.')
    689             print('Most likely GRIB_API_INCLUDE_DIR, GRIB_API_LIB '
     706                  ' or try another makefile in the src directory.')
     707            print('Most likely ECCODES_INCLUDE_DIR, ECCODES_LIB '
    690708                  'and EMOSLIB must be adapted.')
    691             print('Available Makefiles:')
    692             print(UioFiles(src_path, 'Makefile*'))
     709            print('Available makefiles:')
     710            print(UioFiles(src_path, 'makefile*'))
    693711            sys.exit('Compilation failed!')
    694712    except ValueError as e:
    695         print('ERROR: Makefile call failed:')
     713        print('ERROR: makefile call failed:')
    696714        print(e)
    697715    else:
  • Source/Python/submit.py

    r0f89116 ra916e8f  
    2121#        - splitted submit function to use genshi templates for the
    2222#          job script and avoid code duplication
     23#    June 2020 - Anne Philipp
     24#        - changed finale job_file to filename from config file
     25#          instead of generating from the template filename
    2326#
    2427# @License:
    25 #    (C) Copyright 2014-2019.
     28#    (C) Copyright 2014-2020.
    2629#    Anne Philipp, Leopold Haimberger
    2730#
     
    7275from Mods.get_mars_data import get_mars_data
    7376from Mods.prepare_flexpart import prepare_flexpart
    74 #from Classes.ControlFile import ControlFile
    75 
    7677
    7778# ------------------------------------------------------------------------------
     
    129130        module and variable settings for the ECMWF environment as well as
    130131        the job call and mail report instructions.
    131         Default is "job.temp".
     132        Default is _config.TEMPFILE_JOB.
    132133
    133134    c : ControlFile
     
    151152
    152153        job_file = os.path.join(_config.PATH_JOBSCRIPTS,
    153                                 jtemplate[:-5] + '.ksh')
     154                                _config.FILE_JOB_OD)
    154155
    155156        # divide time periode into specified number of job chunks
     
    189190
    190191        job_file = os.path.join(_config.PATH_JOBSCRIPTS,
    191                                 jtemplate[:-5] + 'oper.ksh')
     192                                _config.FILE_JOB_OP)
    192193
    193194        c.start_date = '${MSJ_YEAR}${MSJ_MONTH}${MSJ_DAY}'
     
    214215    ----------
    215216    jtemplate : str
    216         Job template file from sub-directory "_templates" for
     217        Job template file from sub-directory "Templates" for
    217218        submission to ECMWF. It contains all necessary
    218219        module and variable settings for the ECMWF environment as well as
    219220        the job call and mail report instructions.
    220         Default is "job.temp".
     221        Default is _config.TEMPFILE_JOB.
    221222
    222223    job_file : str
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG