From fb8810cda0dbbf0169e05332ef2fe5632ef1214e Mon Sep 17 00:00:00 2001 From: anphi <anne.philipp@univie.ac.at> Date: Wed, 28 Nov 2018 17:36:11 +0100 Subject: [PATCH] changed version string from 7.0.3 to 7.0.4 --- python/FlexpartTools.py | 72 ++++++++++++++++++++--------------------- python/compilejob.temp | 2 +- python/install.py | 26 +++++++-------- python/job.temp.o | 2 +- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/python/FlexpartTools.py b/python/FlexpartTools.py index fbb2935..27c2ca9 100644 --- a/python/FlexpartTools.py +++ b/python/FlexpartTools.py @@ -302,7 +302,7 @@ def myerror(c,message='ERROR'): print message # uncomment if user wants email notification directly from python #for t in target: - #p=subprocess.Popen(['mail','-s flex_extract v7.0.3 ERROR', os.path.expandvars(t)], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,bufsize=1) + #p=subprocess.Popen(['mail','-s flex_extract v7.0.4 ERROR', os.path.expandvars(t)], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,bufsize=1) #tr='\n'.join(traceback.format_stack()) #pout=p.communicate(input=message+'\n\n'+tr)[0] #print 'Email sent to '+os.path.expandvars(t) # +' '+pout.decode() @@ -319,7 +319,7 @@ def normalexit(c,message='Done!'): target=[target] # Uncomment if user wants notification directly from python #for t in target: - #p=subprocess.Popen(['mail','-s flex_extract v7.0.3 normal exit', os.path.expandvars(t)], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,bufsize=1) + #p=subprocess.Popen(['mail','-s flex_extract v7.0.4 normal exit', os.path.expandvars(t)], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,bufsize=1) #pout=p.communicate(input=message+'\n\n')[0] #print pout.decode() @@ -1031,14 +1031,14 @@ class EIFlexpart: date=mfdate, time=mftime,number=self.number,step=mfstep, expver=self.expver, param=pv[0]) if request == "0": - MR.display_info() - MR.data_retrieve() + MR.displayInfo() + MR.dataRetrieve() elif request == "1": MR.print_infodata_csv(self.inputdir, self.mreq_count) elif request == "2": MR.print_infodata_csv(self.inputdir, self.mreq_count) - MR.display_info() - MR.data_retrieve() + MR.displayInfo() + MR.dataRetrieve() # The whole else section is only necessary for operational scripts. It could be removed else: # check if mars job requests fields beyond basetime. If yes eliminate those fields since they may not # be accessible with user's credentials @@ -1070,14 +1070,14 @@ class EIFlexpart: date=mfdate, time=mftime,number=self.number,step=mfstep, expver=self.expver, param=pv[0]) if request == "0": - MR.display_info() - MR.data_retrieve() + MR.displayInfo() + MR.dataRetrieve() elif request == "1": MR.print_infodata_csv(self.inputdir, self.mreq_count) elif request == "2": MR.print_infodata_csv(self.inputdir, self.mreq_count) - MR.display_info() - MR.data_retrieve() + MR.displayInfo() + MR.dataRetrieve() maxtime=elimit-datetime.timedelta(hours=12) mfdate=datetime.datetime.strftime(maxtime,'%Y%m%d') @@ -1090,14 +1090,14 @@ class EIFlexpart: accuracy=self.accuracy,grid=pv[3],target=mftarget,area=area, date=mfdate, time=mftime,number=self.number,step=mfstep, expver=self.expver, param=pv[0]) if request == "0": - MR.display_info() - MR.data_retrieve() + MR.displayInfo() + MR.dataRetrieve() elif request == "1": MR.print_infodata_csv(self.inputdir, self.mreq_count) elif request == "2": MR.print_infodata_csv(self.inputdir, self.mreq_count) - MR.display_info() - MR.data_retrieve() + MR.displayInfo() + MR.dataRetrieve() else: # increase number of mars requests self.mreq_count += 1 @@ -1107,14 +1107,14 @@ class EIFlexpart: date=mfdate, time=mftime,number=self.number,step=mfstep, expver=self.expver, param=pv[0]) if request == "0": - MR.display_info() - MR.data_retrieve() + MR.displayInfo() + MR.dataRetrieve() elif request == "1": MR.print_infodata_csv(self.inputdir, self.mreq_count) elif request == "2": MR.print_infodata_csv(self.inputdir, self.mreq_count) - MR.display_info() - MR.data_retrieve() + MR.displayInfo() + MR.dataRetrieve() else: maxtime=elimit-datetime.timedelta(hours=24) mfdate=datetime.datetime.strftime(maxtime,'%Y%m%d') @@ -1137,14 +1137,14 @@ class EIFlexpart: date=mfdate, time=mftime,number=self.number,step=mfstep, expver=self.expver, param=pv[0]) if request == "0": - MR.display_info() - MR.data_retrieve() + MR.displayInfo() + MR.dataRetrieve() elif request == "1": MR.print_infodata_csv(self.inputdir, self.mreq_count) elif request == "2": MR.print_infodata_csv(self.inputdir, self.mreq_count) - MR.display_info() - MR.data_retrieve() + MR.displayInfo() + MR.dataRetrieve() if int(mftimesave.split('/')[0])==0 and int(mfstep.split('/')[0])==0 and pk!='OG_OROLSM__SL': mfdate=datetime.datetime.strftime(elimit,'%Y%m%d') @@ -1159,14 +1159,14 @@ class EIFlexpart: date=mfdate, time=mftime,number=self.number,step=mfstep, expver=self.expver, param=pv[0]) if request == "0": - MR.display_info() - MR.data_retrieve() + MR.displayInfo() + MR.dataRetrieve() elif request == "1": MR.print_infodata_csv(self.inputdir, self.mreq_count) elif request == "2": MR.print_infodata_csv(self.inputdir, self.mreq_count) - MR.display_info() - MR.data_retrieve() + MR.displayInfo() + MR.dataRetrieve() if request == "0" or request == "2": @@ -1472,16 +1472,16 @@ class EIFlexpart: for key in index_keys: key_vals = grib_index_get(iid,key) print key_vals - if key=='step': - l=[] - for k in key_vals: - l.append(int(k)) - l.sort() - key_vals=[] - for k in l: - key_vals.append(str(k)) - - index_vals.append(key_vals) + + l=[] + for k in key_vals: + l.append(int(k)) + l.sort() + key_vals=[] + for k in l: + key_vals.append(str(k)) + + index_vals.append(key_vals) valsdict={} diff --git a/python/compilejob.temp b/python/compilejob.temp index 52a2cd5..f0691e4 100644 --- a/python/compilejob.temp +++ b/python/compilejob.temp @@ -24,7 +24,7 @@ ##PBS -l EC_memory_per_task=3200MB set -x -export VERSION=7.0.3 +export VERSION=7.0.4 case $HOST in *ecg*) module load python diff --git a/python/install.py b/python/install.py index 9822ce6..f028ec9 100755 --- a/python/install.py +++ b/python/install.py @@ -105,7 +105,7 @@ def install_via_gateway(c,target): if '##PBS -o' in data: data='##PBS -o /scratch/ms/'+c.ecgid+'/'+c.ecuid+'flex_ecmwf.$Jobname.$Job_ID.out' if 'export PATH=${PATH}:' in data: - data+=c.ec_flexpart_root_scripts+'/flex_extract_v7.0.3/python' + data+=c.ec_flexpart_root_scripts+'/flex_extract_v7.0.4/python' if 'cat>>' in data or 'cat >>' in data: i=data.index('>') @@ -136,17 +136,17 @@ def install_via_gateway(c,target): c.flexpart_root_scripts=os.path.expandvars(os.path.expanduser(c.flexpart_root_scripts)) if os.path.abspath(ecd)!=os.path.abspath(c.flexpart_root_scripts): os.chdir('/') - p=subprocess.check_call(['tar','-cvf',ecd+'../flex_extract_v7.0.3.tar',ecd+'python',ecd+'grib_templates',ecd+'src']) + p=subprocess.check_call(['tar','-cvf',ecd+'../flex_extract_v7.0.4.tar',ecd+'python',ecd+'grib_templates',ecd+'src']) try: - os.makedirs(c.flexpart_root_scripts+'/flex_extract_v7.0.3') + os.makedirs(c.flexpart_root_scripts+'/flex_extract_v7.0.4') except: pass - os.chdir(c.flexpart_root_scripts+'/flex_extract_v7.0.3') - p=subprocess.check_call(['tar','-xvf',ecd+'../flex_extract_v7.0.3.tar']) - os.chdir(c.flexpart_root_scripts+'/flex_extract_v7.0.3/src') + os.chdir(c.flexpart_root_scripts+'/flex_extract_v7.0.4') + p=subprocess.check_call(['tar','-xvf',ecd+'../flex_extract_v7.0.4.tar']) + os.chdir(c.flexpart_root_scripts+'/flex_extract_v7.0.4/src') os.chdir('../src') - print 'install flex_extract_v7.0.3 software on '+target+' in directory '+os.getcwd() + print 'install flex_extract_v7.0.4 software on '+target+' in directory '+os.getcwd() if c.makefile==None: makefile='Makefile.local.ifort' else: @@ -166,26 +166,26 @@ def install_via_gateway(c,target): elif target.lower()=='ecgate': os.chdir('/') - p=subprocess.check_call(['tar','-cvf',ecd+'../flex_extract_v7.0.3.tar',ecd+'python',ecd+'grib_templates',ecd+'src']) + p=subprocess.check_call(['tar','-cvf',ecd+'../flex_extract_v7.0.4.tar',ecd+'python',ecd+'grib_templates',ecd+'src']) try: - p=subprocess.check_call(['ecaccess-file-put',ecd+'../flex_extract_v7.0.3.tar','ecgate:/home/ms/'+c.ecgid+'/'+c.ecuid+'/flex_extract_v7.0.3.tar']) + p=subprocess.check_call(['ecaccess-file-put',ecd+'../flex_extract_v7.0.4.tar','ecgate:/home/ms/'+c.ecgid+'/'+c.ecuid+'/flex_extract_v7.0.4.tar']) except: print 'ecaccess-file-put failed! Probably the eccert key has expired.' exit(1) p=subprocess.check_call(['ecaccess-job-submit','-queueName',target,ecd+'python/compilejob.ksh']) - print 'compilejob.ksh has been submitted to ecgate for installation in '+c.ec_flexpart_root_scripts+'/flex_extract_v7.0.3' + print 'compilejob.ksh has been submitted to ecgate for installation in '+c.ec_flexpart_root_scripts+'/flex_extract_v7.0.4' print 'You should get an email with subject flexcompile within the next few minutes' elif target.lower()=='cca': os.chdir('/') - p=subprocess.check_call(['tar','-cvf',ecd+'../flex_extract_v7.0.3.tar',ecd+'python',ecd+'grib_templates',ecd+'src']) + p=subprocess.check_call(['tar','-cvf',ecd+'../flex_extract_v7.0.4.tar',ecd+'python',ecd+'grib_templates',ecd+'src']) try: - p=subprocess.check_call(['ecaccess-file-put',ecd+'../flex_extract_v7.0.3.tar','cca:/home/ms/'+c.ecgid+'/'+c.ecuid+'/flex_extract_v7.0.3.tar']) + p=subprocess.check_call(['ecaccess-file-put',ecd+'../flex_extract_v7.0.4.tar','cca:/home/ms/'+c.ecgid+'/'+c.ecuid+'/flex_extract_v7.0.4.tar']) except: print 'ecaccess-file-put failed! Probably the eccert key has expired.' exit(1) p=subprocess.check_call(['ecaccess-job-submit','-queueName',target,ecd+'python/compilejob.ksh']) - print 'compilejob.ksh has been submitted to cca for installation in '+c.ec_flexpart_root_scripts+'/flex_extract_v7.0.3' + print 'compilejob.ksh has been submitted to cca for installation in '+c.ec_flexpart_root_scripts+'/flex_extract_v7.0.4' print 'You should get an email with subject flexcompile within the next few minutes' else: print 'ERROR: unknown installation target ',target diff --git a/python/job.temp.o b/python/job.temp.o index ada8673..c320964 100644 --- a/python/job.temp.o +++ b/python/job.temp.o @@ -24,7 +24,7 @@ ##PBS -l EC_memory_per_task=32000MB set -x -export VERSION=7.0.3 +export VERSION=7.0.4 case $HOST in *ecg*) module load python -- GitLab