Commit 4d1ecc23 authored by Auke van der Woude's avatar Auke van der Woude
Browse files

changed tabs to spaces

parent 369a05bb
...@@ -254,27 +254,27 @@ class ObsPackObservations(Observations): ...@@ -254,27 +254,27 @@ class ObsPackObservations(Observations):
savedict['missing_value'] = '!' savedict['missing_value'] = '!'
f.add_data(savedict) f.add_data(savedict)
data = self.getvalues('obs') data = self.getvalues('obs')
savedict = io.std_savedict.copy() savedict = io.std_savedict.copy()
savedict['name'] = "observed" savedict['name'] = "observed"
savedict['long_name'] = "observedvalues" savedict['long_name'] = "observedvalues"
savedict['units'] = "mol mol-1" savedict['units'] = "mol mol-1"
savedict['dims'] = dimid savedict['dims'] = dimid
savedict['values'] = data.tolist() savedict['values'] = data.tolist()
savedict['comment'] = 'Observations used in optimization' savedict['comment'] = 'Observations used in optimization'
f.add_data(savedict) f.add_data(savedict)
data = self.getvalues('mdm') data = self.getvalues('mdm')
savedict = io.std_savedict.copy() savedict = io.std_savedict.copy()
savedict['name'] = "modeldatamismatch" savedict['name'] = "modeldatamismatch"
savedict['long_name'] = "modeldatamismatch" savedict['long_name'] = "modeldatamismatch"
savedict['units'] = "[mol mol-1]" savedict['units'] = "[mol mol-1]"
savedict['dims'] = dimid savedict['dims'] = dimid
savedict['values'] = data.tolist() savedict['values'] = data.tolist()
savedict['comment'] = 'Standard deviation of mole fractions resulting from model-data mismatch' savedict['comment'] = 'Standard deviation of mole fractions resulting from model-data mismatch'
f.add_data(savedict) f.add_data(savedict)
f.close() f.close()
......
...@@ -39,7 +39,7 @@ class CartesiusPlatform(Platform): ...@@ -39,7 +39,7 @@ class CartesiusPlatform(Platform):
""" """
Returns a blocking flag, which is important if tm5 is submitted in a queue system. The python ctdas code is forced to wait before tm5 run is finished Returns a blocking flag, which is important if tm5 is submitted in a queue system. The python ctdas code is forced to wait before tm5 run is finished
-on Huygens: return "-s" -on Huygens: return "-s"
-on Maunaloa: return "" (no queue available) -on Maunaloa: return "" (no queue available)
-on Jet/Zeus: return -on Jet/Zeus: return
""" """
...@@ -102,7 +102,7 @@ class CartesiusPlatform(Platform): ...@@ -102,7 +102,7 @@ class CartesiusPlatform(Platform):
"""#SBATCH -o joblog \n""" + \ """#SBATCH -o joblog \n""" + \
"""module load python\n""" + \ """module load python\n""" + \
"""module load nco\n""" + \ """module load nco\n""" + \
"""\n""" """\n"""
if 'depends' in joboptions: if 'depends' in joboptions:
template += """#$ -hold_jid depends \n""" template += """#$ -hold_jid depends \n"""
...@@ -151,16 +151,16 @@ class CartesiusPlatform(Platform): ...@@ -151,16 +151,16 @@ class CartesiusPlatform(Platform):
# jobid = output.split()[2] # jobid = output.split()[2]
# retcode = output.split()[-1] # retcode = output.split()[-1]
# #
# #for huygens # #for huygens
# print 'output', output # print 'output', output
# test = output.split()[3] # test = output.split()[3]
# dummy, jobid =test.split('nl.') # dummy, jobid =test.split('nl.')
# jobid='%s%s' %('"',jobid) # jobid='%s%s' %('"',jobid)
# submitmsg ='%s%s%s'%(output.split()[4],output.split()[5],output.split()[6]) # submitmsg ='%s%s%s'%(output.split()[4],output.split()[5],output.split()[6])
# if submitmsg=='hasbeensubmitted.': # if submitmsg=='hasbeensubmitted.':
# retcode=2 # retcode=2
# print 'retcode',submitmsg,retcode # print 'retcode',submitmsg,retcode
# return retcode # return retcode
# #
# def KillJob(self,jobid): # def KillJob(self,jobid):
......
...@@ -67,7 +67,7 @@ class ObsPackObservations(Observations): ...@@ -67,7 +67,7 @@ class ObsPackObservations(Observations):
We will loop over all site files in the ObsPackage, and subset each to our needs We will loop over all site files in the ObsPackage, and subset each to our needs
""" """
import string import string
# Step 1: Read list of available site files in package # Step 1: Read list of available site files in package
...@@ -98,11 +98,11 @@ class ObsPackObservations(Observations): ...@@ -98,11 +98,11 @@ class ObsPackObservations(Observations):
subselect = logical_and(dates >= self.startdate , dates <= self.enddate).nonzero()[0] subselect = logical_and(dates >= self.startdate , dates <= self.enddate).nonzero()[0]
if len(subselect) == 0: if len(subselect) == 0:
ncf.close() ncf.close()
continue continue
logging.debug("Trying to add %d observations from file (%s) to the Data list" % (len(subselect), ncfile)) logging.debug("Trying to add %d observations from file (%s) to the Data list" % (len(subselect), ncfile))
dates = dates.take(subselect, axis=0) dates = dates.take(subselect, axis=0)
...@@ -321,27 +321,27 @@ class ObsPackObservations(Observations): ...@@ -321,27 +321,27 @@ class ObsPackObservations(Observations):
savedict['missing_value'] = '!' savedict['missing_value'] = '!'
f.add_data(savedict) f.add_data(savedict)
data = data_obs data = data_obs
savedict = io.std_savedict.copy() savedict = io.std_savedict.copy()
savedict['name'] = "observed" savedict['name'] = "observed"
savedict['long_name'] = "observedvalues" savedict['long_name'] = "observedvalues"
savedict['units'] = "mol mol-1" savedict['units'] = "mol mol-1"
savedict['dims'] = dimid savedict['dims'] = dimid
savedict['values'] = data.tolist() savedict['values'] = data.tolist()
savedict['comment'] = 'Observations used in optimization' savedict['comment'] = 'Observations used in optimization'
f.add_data(savedict) f.add_data(savedict)
data = data_mdm data = data_mdm
savedict = io.std_savedict.copy() savedict = io.std_savedict.copy()
savedict['name'] = "modeldatamismatch" savedict['name'] = "modeldatamismatch"
savedict['long_name'] = "modeldatamismatch" savedict['long_name'] = "modeldatamismatch"
savedict['units'] = "[mol mol-1]" savedict['units'] = "[mol mol-1]"
savedict['dims'] = dimid savedict['dims'] = dimid
savedict['values'] = data.tolist() savedict['values'] = data.tolist()
savedict['comment'] = 'Standard deviation of mole fractions resulting from model-data mismatch' savedict['comment'] = 'Standard deviation of mole fractions resulting from model-data mismatch'
f.add_data(savedict) f.add_data(savedict)
f.close() f.close()
......
...@@ -325,7 +325,7 @@ def sample_step(dacycle, samples, statevector, obsoperator, lag, advance=False): ...@@ -325,7 +325,7 @@ def sample_step(dacycle, samples, statevector, obsoperator, lag, advance=False):
logging.info(" ... No simulations needed for this cycle of lag") logging.info(" ... No simulations needed for this cycle of lag")
logging.info(" ... No residuals needed for this cycle of lag") logging.info(" ... No residuals needed for this cycle of lag")
logging.info(" ... Proceeding to next cycle of lag") logging.info(" ... Proceeding to next cycle of lag")
return return
samples.setup(dacycle) samples.setup(dacycle)
samples.add_observations() samples.add_observations()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment