Skip to content
Snippets Groups Projects
Commit a916e8fb authored by Anne Philipp's avatar Anne Philipp
Browse files

ECMWF server output directory renamed; reformulate dapoly formula; changed...

ECMWF server output directory renamed; reformulate dapoly formula; changed template filenames; make use of config jobscript names
parent 0c8c0680
Branches
Tags
No related merge requests found
......@@ -37,7 +37,7 @@ AREA=None
INPUTDIR=None
OUTPUTDIR=None
PP_ID=None
JOB_TEMPLATE='jobscript.template'
JOB_TEMPLATE='submitscript.template'
CONTROLFILE='CONTROL_EA5'
DEBUG=0
REQUEST=2
......
......@@ -18,6 +18,9 @@
# to a new module named disaggregation
# - added the new disaggregation method for precipitation
#
# June 2020 - Anne Philipp (University of Vienna):
# - reformulated formular for dapoly
#
# @License:
# (C) Copyright 2014-2020.
# Anne Philipp, Leopold Haimberger
......@@ -92,11 +95,10 @@ def dapoly(alist):
"""
pya = (alist[3] - alist[0] + 3. * (alist[1] - alist[2])) / 6.
pyb = (alist[2] + alist[0]) / 2. - alist[1] - 9. * pya / 2.
pyc = alist[1] - alist[0] - 7. * pya / 2. - 2. * pyb
pyd = alist[0] - pya / 4. - pyb / 3. - pyc / 2.
nfield = 8. * pya + 4. * pyb + 2. * pyc + pyd
nfield = -1./12.*alist[0] + \
7./12.*alist[1] + \
7./12.*alist[2] - \
1./12.*alist[3]
return nfield
......
......@@ -6,6 +6,8 @@
# @Date: August 2018
#
# @Change History:
# June 2020 - Anne Philipp
# - changed template filenames to .template
#
# @License:
# (C) Copyright 2014-2020.
......
......@@ -16,6 +16,11 @@
# - changed static path names to variables from config file
# - splitted install function into several smaller pieces
# - use of tarfile package in python
# June 2020 - Anne Philipp
# - renamed "convert" functions to "fortran" functions
# - reconfigured mk_tarball to select *.template files instead
# of *.nl and *.temp
# - added check for makefile settings
#
# @License:
# (C) Copyright 2014-2020.
......@@ -372,9 +377,7 @@ def mk_tarball(tarball_path, target):
testfiles = [os.path.relpath(x, ecd)
for x in UioFiles(_config.PATH_REL_TEST, '*').files]
tempfiles = [os.path.relpath(x, ecd)
for x in UioFiles(_config.PATH_REL_TEMPLATES, '*.temp').files]
nlfiles = [os.path.relpath(x, ecd)
for x in UioFiles(_config.PATH_REL_TEMPLATES, '*.nl').files]
for x in UioFiles(_config.PATH_REL_TEMPLATES, '*.template').files]
gribtable = [os.path.relpath(x, ecd)
for x in UioFiles(_config.PATH_REL_TEMPLATES, '*grib*').files]
ffiles = [os.path.relpath(x, ecd)
......@@ -386,7 +389,7 @@ def mk_tarball(tarball_path, target):
jobdir = [_config.PATH_REL_JOBSCRIPTS]
# concatenate single lists to one for a better looping
filelist = pyfiles + pytestfiles + controlfiles + tempfiles + nlfiles + \
filelist = pyfiles + pytestfiles + controlfiles + tempfiles + \
ffiles + gribtable + hfiles + makefiles + ecmwf_env_file + \
runfile + jobdir + testfiles +\
['CODE_OF_CONDUCT.md', 'LICENSE.md', 'README.md']
......
......@@ -20,6 +20,9 @@
# additionally, as option without submitting the mars jobs
# - splitted submit function to use genshi templates for the
# job script and avoid code duplication
# June 2020 - Anne Philipp
# - changed finale job_file to filename from config file
# instead of generating from the template filename
#
# @License:
# (C) Copyright 2014-2020.
......@@ -71,8 +74,6 @@ from Mods.tools import (setup_controldata, normal_exit,
submit_job_to_ecserver)
from Mods.get_mars_data import get_mars_data
from Mods.prepare_flexpart import prepare_flexpart
#from Classes.ControlFile import ControlFile
# ------------------------------------------------------------------------------
# METHODS
......@@ -150,7 +151,7 @@ def submit(jtemplate, c, queue):
print('---- On-demand mode! ----')
job_file = os.path.join(_config.PATH_JOBSCRIPTS,
jtemplate[:-5] + '.ksh')
_config.FILE_JOB_OD)
# divide time periode into specified number of job chunks
# to have multiple job scripts
......@@ -188,7 +189,7 @@ def submit(jtemplate, c, queue):
print('---- Operational mode! ----')
job_file = os.path.join(_config.PATH_JOBSCRIPTS,
jtemplate[:-5] + 'oper.ksh')
_config.FILE_JOB_OP)
c.start_date = '${MSJ_YEAR}${MSJ_MONTH}${MSJ_DAY}'
c.end_date = '${MSJ_YEAR}${MSJ_MONTH}${MSJ_DAY}'
......@@ -213,7 +214,7 @@ def mk_jobscript(jtemplate, job_file, clist):
Parameters
----------
jtemplate : str
Job template file from sub-directory "_templates" for
Job template file from sub-directory "Templates" for
submission to ECMWF. It contains all necessary
module and variable settings for the ECMWF environment as well as
the job call and mail report instructions.
......
......@@ -48,8 +48,8 @@ case $$$${HOST} in
esac
cd $$$${SCRATCH}
mkdir -p python$$$$$$$$
cd python$$$$$$$$
mkdir -p extract$$$$$$$$
cd extract$$$$$$$$
export CONTROL=CONTROL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment