Commit af92088961b3538c5c3a14cb8b99f0678adbff7c

Authored by Elena.Budnik
1 parent 5c44cc6c
Exists in master

ajust

Bin.py/makeRequest.py
... ... @@ -24,8 +24,6 @@ checkArgs(6, 'Usage : python makeRequest.py (target) (tgt_vi) (sw_vi) (TaoStopTi
24 24 prefix = sys.argv[1]
25 25 tgtVI = sys.argv[2]
26 26 plasmaVI = sys.argv[3]
27   -#missionStopTime = sys.argv[4]
28   -#omniStopTime = sys.argv[5]
29 27  
30 28 # In[4]:
31 29 omniStopTime = datetime.strptime(sys.argv[5], '%Y-%m-%dT%H:%M:%S')
... ...
Bin.py/namelist 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +&INPARA1
  2 + idp_in=1
  3 + idp_prop=1
  4 + idp_out=1
  5 + angref(1)=0.,60.,120.,180.,240.,300.
  6 + idprop=1
  7 + fnin='/home/budnik/SolarWind/Data/mars_20160727/inputs.txt'
  8 + fnout='/home/budnik/SolarWind/Data/mars_20160727/outputs.txt'
  9 + fdirtmp='/home/budnik/SolarWind/Data/mars_20160727/'
  10 + instop=0
  11 + dtr=300.
  12 + touts=12.
  13 + xmin1=0.8
  14 + xmax1=10.8
  15 +/
  16 +&INPARA2
  17 + npout=10
  18 + bx0at1au=0.001d0
  19 + gm=1.40
  20 +/
... ...
Bin.py/run.py
... ... @@ -31,8 +31,11 @@ def main():
31 31 # logger.info("SW2NC : " + SW2NC)
32 32  
33 33 # CREATE A DIRECTORY FOR THE NEW QUERY
  34 + if not os.path.exists(SW2DATA):
  35 + os.makedirs(SW2DATA)
  36 +
34 37 MYDIR = SW2DATA+'/'+prefix+'_'+datetime.now().strftime('%Y%m%d')
35   - os.system('mkdir '+MYDIR)
  38 + os.makedirs(MYDIR)
36 39 os.system('chmod ug+w ' + MYDIR)
37 40  
38 41 # CREATION OF A LOGGER
... ... @@ -183,8 +186,8 @@ def main():
183 186 else:
184 187 idprop = 1
185 188 # xmax1 = 2.3
186   - xmax1 = 10.3
187   - xmin1 = 0.3
  189 + xmax1 = 10.8
  190 + xmin1 = 0.8
188 191  
189 192 # QUALITY FLAG
190 193 dataFlagData = np.array( [df.index,np.zeros(len(df.index)).astype(int)])
... ... @@ -248,7 +251,7 @@ def main():
248 251  
249 252 ddFile.close()
250 253  
251   - ncFile = MYDIR+'/'+xmlFile.split('.')[0]+'.nc'
  254 + ncFile = MYDIR+'/'+prefix+'_'+datetime.now().strftime('%Y%m%d')+'.nc'
252 255  
253 256 os.system('WriteDDTime '+ncFile)
254 257  
... ... @@ -430,7 +433,7 @@ def writeNamelist(directory,idprop,xmax1,xmin1):
430 433 nl.write(' idp_prop=1\n')
431 434 nl.write(' idp_out=1\n')
432 435 #nl.write(' angref(1)=0.,30.,60.,90.,120.,150.,180.,210.,240.,270.,300.,330.\n')
433   - nl.write(' angref(1)=0.,60.,120.,180.,240.,300.\n')
  436 + nl.write(' angref(1)=0.,60.,120.,180.,240.,300.\n')
434 437 nl.write(' idprop='+str(idprop)+'\n')
435 438 nl.write(' fnin=\''+directory+'/inputs.txt\'\n')
436 439 nl.write(' fnout=\''+directory+'/outputs.txt\'\n')
... ...
runRequest
... ... @@ -12,11 +12,11 @@ SwStop=$5
12 12 # delete results of previous calculations
13 13 rm -rf $SW2DATA/temp $SW2DATA/$tgt*
14 14  
15   - # delete previous requests
16   - rm -f $REQ/*.xml
  15 + # delete previous requests
  16 + rm -f $REQ/*.xml $
17 17  
18   - cd $SW2ROOT/Bin.py; python makeRequest.py $tgt $tgt_vi $src_vi $TaoStop $SwStop > $tgt\.log
19   - DDLogin $DDUSER $DDPWD > ddlog
  18 + cd $SW2ROOT/Bin.py; python makeRequest.py $tgt $tgt_vi $src_vi $TaoStop $SwStop
  19 + DDLogin $DDUSER $DDPWD
20 20  
21 21 # run newly created Request
22 22 for request in $REQ/$tgt*.xml
... ...