Changeset fb8810c in flex_extract.git
- Timestamp:
- Nov 28, 2018, 4:36:11 PM (5 years ago)
- Branches:
- master, ctbto, dev
- Children:
- ced5d27
- Parents:
- a9c7f3e
- Location:
- python
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
python/FlexpartTools.py
ra9c7f3e rfb8810c 303 303 # uncomment if user wants email notification directly from python 304 304 #for t in target: 305 #p=subprocess.Popen(['mail','-s flex_extract v7.0. 3ERROR', os.path.expandvars(t)], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,bufsize=1)305 #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) 306 306 #tr='\n'.join(traceback.format_stack()) 307 307 #pout=p.communicate(input=message+'\n\n'+tr)[0] … … 320 320 # Uncomment if user wants notification directly from python 321 321 #for t in target: 322 #p=subprocess.Popen(['mail','-s flex_extract v7.0. 3normal exit', os.path.expandvars(t)], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,bufsize=1)322 #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) 323 323 #pout=p.communicate(input=message+'\n\n')[0] 324 324 #print pout.decode() … … 1032 1032 1033 1033 if request == "0": 1034 MR.display _info()1035 MR.data _retrieve()1034 MR.displayInfo() 1035 MR.dataRetrieve() 1036 1036 elif request == "1": 1037 1037 MR.print_infodata_csv(self.inputdir, self.mreq_count) 1038 1038 elif request == "2": 1039 1039 MR.print_infodata_csv(self.inputdir, self.mreq_count) 1040 MR.display _info()1041 MR.data _retrieve()1040 MR.displayInfo() 1041 MR.dataRetrieve() 1042 1042 # The whole else section is only necessary for operational scripts. It could be removed 1043 1043 else: # check if mars job requests fields beyond basetime. If yes eliminate those fields since they may not … … 1071 1071 1072 1072 if request == "0": 1073 MR.display _info()1074 MR.data _retrieve()1073 MR.displayInfo() 1074 MR.dataRetrieve() 1075 1075 elif request == "1": 1076 1076 MR.print_infodata_csv(self.inputdir, self.mreq_count) 1077 1077 elif request == "2": 1078 1078 MR.print_infodata_csv(self.inputdir, self.mreq_count) 1079 MR.display _info()1080 MR.data _retrieve()1079 MR.displayInfo() 1080 MR.dataRetrieve() 1081 1081 1082 1082 maxtime=elimit-datetime.timedelta(hours=12) … … 1091 1091 date=mfdate, time=mftime,number=self.number,step=mfstep, expver=self.expver, param=pv[0]) 1092 1092 if request == "0": 1093 MR.display _info()1094 MR.data _retrieve()1093 MR.displayInfo() 1094 MR.dataRetrieve() 1095 1095 elif request == "1": 1096 1096 MR.print_infodata_csv(self.inputdir, self.mreq_count) 1097 1097 elif request == "2": 1098 1098 MR.print_infodata_csv(self.inputdir, self.mreq_count) 1099 MR.display _info()1100 MR.data _retrieve()1099 MR.displayInfo() 1100 MR.dataRetrieve() 1101 1101 else: 1102 1102 # increase number of mars requests … … 1108 1108 1109 1109 if request == "0": 1110 MR.display _info()1111 MR.data _retrieve()1110 MR.displayInfo() 1111 MR.dataRetrieve() 1112 1112 elif request == "1": 1113 1113 MR.print_infodata_csv(self.inputdir, self.mreq_count) 1114 1114 elif request == "2": 1115 1115 MR.print_infodata_csv(self.inputdir, self.mreq_count) 1116 MR.display _info()1117 MR.data _retrieve()1116 MR.displayInfo() 1117 MR.dataRetrieve() 1118 1118 else: 1119 1119 maxtime=elimit-datetime.timedelta(hours=24) … … 1138 1138 1139 1139 if request == "0": 1140 MR.display _info()1141 MR.data _retrieve()1140 MR.displayInfo() 1141 MR.dataRetrieve() 1142 1142 elif request == "1": 1143 1143 MR.print_infodata_csv(self.inputdir, self.mreq_count) 1144 1144 elif request == "2": 1145 1145 MR.print_infodata_csv(self.inputdir, self.mreq_count) 1146 MR.display _info()1147 MR.data _retrieve()1146 MR.displayInfo() 1147 MR.dataRetrieve() 1148 1148 1149 1149 if int(mftimesave.split('/')[0])==0 and int(mfstep.split('/')[0])==0 and pk!='OG_OROLSM__SL': … … 1160 1160 1161 1161 if request == "0": 1162 MR.display _info()1163 MR.data _retrieve()1162 MR.displayInfo() 1163 MR.dataRetrieve() 1164 1164 elif request == "1": 1165 1165 MR.print_infodata_csv(self.inputdir, self.mreq_count) 1166 1166 elif request == "2": 1167 1167 MR.print_infodata_csv(self.inputdir, self.mreq_count) 1168 MR.display _info()1169 MR.data _retrieve()1168 MR.displayInfo() 1169 MR.dataRetrieve() 1170 1170 1171 1171 … … 1473 1473 key_vals = grib_index_get(iid,key) 1474 1474 print key_vals 1475 if key=='step': 1476 1477 1478 1479 1480 1481 1482 1483 1484 1475 1476 l=[] 1477 for k in key_vals: 1478 l.append(int(k)) 1479 l.sort() 1480 key_vals=[] 1481 for k in l: 1482 key_vals.append(str(k)) 1483 1484 index_vals.append(key_vals) 1485 1485 1486 1486 -
python/compilejob.temp
rb38d750 rfb8810c 25 25 26 26 set -x 27 export VERSION=7.0. 327 export VERSION=7.0.4 28 28 case $HOST in 29 29 *ecg*) -
python/install.py
re18f4b5 rfb8810c 106 106 data='##PBS -o /scratch/ms/'+c.ecgid+'/'+c.ecuid+'flex_ecmwf.$Jobname.$Job_ID.out' 107 107 if 'export PATH=${PATH}:' in data: 108 data+=c.ec_flexpart_root_scripts+'/flex_extract_v7.0. 3/python'108 data+=c.ec_flexpart_root_scripts+'/flex_extract_v7.0.4/python' 109 109 110 110 if 'cat>>' in data or 'cat >>' in data: … … 137 137 if os.path.abspath(ecd)!=os.path.abspath(c.flexpart_root_scripts): 138 138 os.chdir('/') 139 p=subprocess.check_call(['tar','-cvf',ecd+'../flex_extract_v7.0. 3.tar',ecd+'python',ecd+'grib_templates',ecd+'src'])139 p=subprocess.check_call(['tar','-cvf',ecd+'../flex_extract_v7.0.4.tar',ecd+'python',ecd+'grib_templates',ecd+'src']) 140 140 try: 141 os.makedirs(c.flexpart_root_scripts+'/flex_extract_v7.0. 3')141 os.makedirs(c.flexpart_root_scripts+'/flex_extract_v7.0.4') 142 142 except: 143 143 pass 144 os.chdir(c.flexpart_root_scripts+'/flex_extract_v7.0. 3')145 p=subprocess.check_call(['tar','-xvf',ecd+'../flex_extract_v7.0. 3.tar'])146 os.chdir(c.flexpart_root_scripts+'/flex_extract_v7.0. 3/src')144 os.chdir(c.flexpart_root_scripts+'/flex_extract_v7.0.4') 145 p=subprocess.check_call(['tar','-xvf',ecd+'../flex_extract_v7.0.4.tar']) 146 os.chdir(c.flexpart_root_scripts+'/flex_extract_v7.0.4/src') 147 147 148 148 os.chdir('../src') 149 print 'install flex_extract_v7.0. 3software on '+target+' in directory '+os.getcwd()149 print 'install flex_extract_v7.0.4 software on '+target+' in directory '+os.getcwd() 150 150 if c.makefile==None: 151 151 makefile='Makefile.local.ifort' … … 167 167 elif target.lower()=='ecgate': 168 168 os.chdir('/') 169 p=subprocess.check_call(['tar','-cvf',ecd+'../flex_extract_v7.0. 3.tar',ecd+'python',ecd+'grib_templates',ecd+'src'])169 p=subprocess.check_call(['tar','-cvf',ecd+'../flex_extract_v7.0.4.tar',ecd+'python',ecd+'grib_templates',ecd+'src']) 170 170 try: 171 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'])171 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']) 172 172 except: 173 173 print 'ecaccess-file-put failed! Probably the eccert key has expired.' 174 174 exit(1) 175 175 p=subprocess.check_call(['ecaccess-job-submit','-queueName',target,ecd+'python/compilejob.ksh']) 176 print 'compilejob.ksh has been submitted to ecgate for installation in '+c.ec_flexpart_root_scripts+'/flex_extract_v7.0. 3'176 print 'compilejob.ksh has been submitted to ecgate for installation in '+c.ec_flexpart_root_scripts+'/flex_extract_v7.0.4' 177 177 print 'You should get an email with subject flexcompile within the next few minutes' 178 178 elif target.lower()=='cca': 179 179 os.chdir('/') 180 p=subprocess.check_call(['tar','-cvf',ecd+'../flex_extract_v7.0. 3.tar',ecd+'python',ecd+'grib_templates',ecd+'src'])180 p=subprocess.check_call(['tar','-cvf',ecd+'../flex_extract_v7.0.4.tar',ecd+'python',ecd+'grib_templates',ecd+'src']) 181 181 try: 182 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'])182 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']) 183 183 except: 184 184 print 'ecaccess-file-put failed! Probably the eccert key has expired.' … … 186 186 187 187 p=subprocess.check_call(['ecaccess-job-submit','-queueName',target,ecd+'python/compilejob.ksh']) 188 print 'compilejob.ksh has been submitted to cca for installation in '+c.ec_flexpart_root_scripts+'/flex_extract_v7.0. 3'188 print 'compilejob.ksh has been submitted to cca for installation in '+c.ec_flexpart_root_scripts+'/flex_extract_v7.0.4' 189 189 print 'You should get an email with subject flexcompile within the next few minutes' 190 190 else: -
python/job.temp.o
rb38d750 rfb8810c 25 25 26 26 set -x 27 export VERSION=7.0. 327 export VERSION=7.0.4 28 28 case $HOST in 29 29 *ecg*)
Note: See TracChangeset
for help on using the changeset viewer.