diff --git a/Bin.py/makeRequest.py b/Bin.py/makeRequest.py index b6e5814..d031ae2 100644 --- a/Bin.py/makeRequest.py +++ b/Bin.py/makeRequest.py @@ -24,8 +24,6 @@ checkArgs(6, 'Usage : python makeRequest.py (target) (tgt_vi) (sw_vi) (TaoStopTi prefix = sys.argv[1] tgtVI = sys.argv[2] plasmaVI = sys.argv[3] -#missionStopTime = sys.argv[4] -#omniStopTime = sys.argv[5] # In[4]: omniStopTime = datetime.strptime(sys.argv[5], '%Y-%m-%dT%H:%M:%S') diff --git a/Bin.py/namelist b/Bin.py/namelist new file mode 100644 index 0000000..e21af71 --- /dev/null +++ b/Bin.py/namelist @@ -0,0 +1,20 @@ +&INPARA1 + idp_in=1 + idp_prop=1 + idp_out=1 + angref(1)=0.,60.,120.,180.,240.,300. + idprop=1 + fnin='/home/budnik/SolarWind/Data/mars_20160727/inputs.txt' + fnout='/home/budnik/SolarWind/Data/mars_20160727/outputs.txt' + fdirtmp='/home/budnik/SolarWind/Data/mars_20160727/' + instop=0 + dtr=300. + touts=12. + xmin1=0.8 + xmax1=10.8 +/ +&INPARA2 + npout=10 + bx0at1au=0.001d0 + gm=1.40 +/ diff --git a/Bin.py/run.py b/Bin.py/run.py index 8271ca7..7143021 100755 --- a/Bin.py/run.py +++ b/Bin.py/run.py @@ -31,8 +31,11 @@ def main(): # logger.info("SW2NC : " + SW2NC) # CREATE A DIRECTORY FOR THE NEW QUERY + if not os.path.exists(SW2DATA): + os.makedirs(SW2DATA) + MYDIR = SW2DATA+'/'+prefix+'_'+datetime.now().strftime('%Y%m%d') - os.system('mkdir '+MYDIR) + os.makedirs(MYDIR) os.system('chmod ug+w ' + MYDIR) # CREATION OF A LOGGER @@ -183,8 +186,8 @@ def main(): else: idprop = 1 # xmax1 = 2.3 - xmax1 = 10.3 - xmin1 = 0.3 + xmax1 = 10.8 + xmin1 = 0.8 # QUALITY FLAG dataFlagData = np.array( [df.index,np.zeros(len(df.index)).astype(int)]) @@ -248,7 +251,7 @@ def main(): ddFile.close() - ncFile = MYDIR+'/'+xmlFile.split('.')[0]+'.nc' + ncFile = MYDIR+'/'+prefix+'_'+datetime.now().strftime('%Y%m%d')+'.nc' os.system('WriteDDTime '+ncFile) @@ -430,7 +433,7 @@ def writeNamelist(directory,idprop,xmax1,xmin1): nl.write(' idp_prop=1\n') nl.write(' idp_out=1\n') #nl.write(' angref(1)=0.,30.,60.,90.,120.,150.,180.,210.,240.,270.,300.,330.\n') - nl.write(' angref(1)=0.,60.,120.,180.,240.,300.\n') + nl.write(' angref(1)=0.,60.,120.,180.,240.,300.\n') nl.write(' idprop='+str(idprop)+'\n') nl.write(' fnin=\''+directory+'/inputs.txt\'\n') nl.write(' fnout=\''+directory+'/outputs.txt\'\n') diff --git a/runRequest b/runRequest index f75a231..caac8d6 100755 --- a/runRequest +++ b/runRequest @@ -12,11 +12,11 @@ SwStop=$5 # delete results of previous calculations rm -rf $SW2DATA/temp $SW2DATA/$tgt* - # delete previous requests - rm -f $REQ/*.xml + # delete previous requests + rm -f $REQ/*.xml $ - cd $SW2ROOT/Bin.py; python makeRequest.py $tgt $tgt_vi $src_vi $TaoStop $SwStop > $tgt\.log - DDLogin $DDUSER $DDPWD > ddlog + cd $SW2ROOT/Bin.py; python makeRequest.py $tgt $tgt_vi $src_vi $TaoStop $SwStop + DDLogin $DDUSER $DDPWD # run newly created Request for request in $REQ/$tgt*.xml -- libgit2 0.21.2