Skip to content
Snippets Groups Projects
Commit a9c7f3e6 authored by anphi's avatar anphi
Browse files

added docu for request output and added header for request file; renamed request file

parent ceea034b
Branches
Tags
No related merge requests found
No preview for this file type
No preview for this file type
DAY1
DAY2
DTIME 3
TYPE AN FC FC FC FC FC FC FC FC FC FC FC AN FC FC FC FC FC FC FC FC FC FC FC
TIME 00 00 00 00 00 00 00 00 00 00 00 00 12 12 12 12 12 12 12 12 12 12 12 12
STEP 00 01 02 03 04 05 06 07 08 09 10 11 00 01 02 03 04 05 06 07 08 09 10 11
ACCTYPE FC
ACCTIME 00/12
ACCMAXSTEP 12
CLASS EI
STREAM OPER
NUMBER OFF
EXPVER 1
GRID 5000
LEFT -15000
LOWER 30000
UPPER 75000
RIGHT 45000
LEVEL 60
LEVELIST 55/to/60
RESOL 63
GAUSS 1
ACCURACY 16
OMEGA 0
OMEGADIFF 0
ETA 0
ETADIFF 0
DPDETA 1
SMOOTH 0
FORMAT GRIB1
ADDPAR 186/187/188/235/139/39
PREFIX EI
ECSTORAGE 0
ECTRANS 1
ECFSDIR ectmp:/${USER}/econdemand/
MAILFAIL ${USER}
MAILOPS ${USER}
GRIB2FLEXPART 0
EOF
...@@ -196,7 +196,7 @@ def interpret_args_and_control(*args,**kwargs): ...@@ -196,7 +196,7 @@ def interpret_args_and_control(*args,**kwargs):
c.request=args.request c.request=args.request
if c.request != '0': if c.request != '0':
marsfile = os.path.join(c.inputdir, 'mars_request.csv') marsfile = os.path.join(c.inputdir, 'mars_requests.csv')
if os.path.isfile(marsfile): if os.path.isfile(marsfile):
os.remove(marsfile) os.remove(marsfile)
...@@ -577,6 +577,11 @@ class Control: ...@@ -577,6 +577,11 @@ class Control:
if not hasattr(self,'request'): if not hasattr(self,'request'):
self.request='0' self.request='0'
elif self.request != 0:
marsfile = os.path.join(self.inputdir,
'mars_requests.csv')
if os.path.isfile(marsfile):
silentremove(marsfile)
return return
def __str__(self): def __str__(self):
...@@ -674,11 +679,12 @@ class MARSretrieval: ...@@ -674,11 +679,12 @@ class MARSretrieval:
''' '''
# Get all class attributes and their values as a dictionary # Get all class attributes and their values as a dictionary
attrs = vars(self) attrs = vars(self).copy()
del attrs['server'] del attrs['server']
del attrs['public']
# open a file to store all requests to # open a file to store all requests to
with open(os.path.join(inputdir, 'mars_request.csv'), 'a') as f: with open(os.path.join(inputdir, 'mars_requests.csv'), 'a') as f:
f.write(str(request_number) + ', ') f.write(str(request_number) + ', ')
f.write(', '.join(str(attrs[key]) f.write(', '.join(str(attrs[key])
for key in sorted(attrs.iterkeys()))) for key in sorted(attrs.iterkeys())))
...@@ -1474,8 +1480,8 @@ class EIFlexpart: ...@@ -1474,8 +1480,8 @@ class EIFlexpart:
key_vals=[] key_vals=[]
for k in l: for k in l:
key_vals.append(str(k)) key_vals.append(str(k))
index_vals.append(key_vals) index_vals.append(key_vals)
valsdict={} valsdict={}
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment