Commit df1b1c21 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

update of names of io functions, and input filename

parent 2afc6235
......@@ -56,9 +56,9 @@ def write_mixing_ratios(dacycle):
# Step (1): Get the posterior sample output data file for this cycle
infile = os.path.join(dacycle['dir.output'], 'sampleinfo_%s__newstyle.nc' % dacycle['time.sample.stamp'])
infile = os.path.join(dacycle['dir.output'], 'sampleinfo_%s.nc' % dacycle['time.sample.stamp'])
ncf_in = io.CT_Read(infile, 'read')
ncf_in = io.ct_read(infile, 'read')
obs_num = ncf_in.get_variable('obs_num')
obs_val = ncf_in.get_variable('observed')
......@@ -81,7 +81,7 @@ def write_mixing_ratios(dacycle):
if optimized_present:
ncf_fc_in = io.CT_Read(infile, 'read')
ncf_fc_in = io.ct_read(infile, 'read')
fc_obs_num = ncf_fc_in.get_variable('obspack_num')
fc_obs_val = ncf_fc_in.get_variable('observed')
......@@ -173,7 +173,7 @@ def write_mixing_ratios(dacycle):
savedict['units'] = "None"
savedict['dims'] = dimid
savedict['comment'] = 'Flag (0/1/2/99) for observation value, 0 means okay, 1 means QC error, 2 means rejected, 99 means not sampled'
ncf_out.AddVariable(savedict)
ncf_out.add_variable(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "modeldatamismatch"
......@@ -181,7 +181,7 @@ def write_mixing_ratios(dacycle):
savedict['units'] = "[mol mol-1]^2"
savedict['dims'] = dimid
savedict['comment'] = 'Variance of mole fractions resulting from model-data mismatch'
ncf_out.AddVariable(savedict)
ncf_out.add_variable(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "totalmolefractionvariance_forecast"
......@@ -189,7 +189,7 @@ def write_mixing_ratios(dacycle):
savedict['units'] = "[mol mol-1]^2"
savedict['dims'] = dimid
savedict['comment'] = 'Variance of mole fractions resulting from prior state and model-data mismatch'
ncf_out.AddVariable(savedict)
ncf_out.add_variable(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "modelsamplesmean"
......@@ -197,7 +197,7 @@ def write_mixing_ratios(dacycle):
savedict['units'] = "mol mol-1"
savedict['dims'] = dimid
savedict['comment'] = 'simulated mixing ratios based on optimized state vector'
ncf_out.AddVariable(savedict)
ncf_out.add_variable(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "modelsamplesmean_forecast"
......@@ -205,7 +205,7 @@ def write_mixing_ratios(dacycle):
savedict['units'] = "mol mol-1"
savedict['dims'] = dimid
savedict['comment'] = 'simulated mixing ratios based on prior state vector'
ncf_out.AddVariable(savedict)
ncf_out.add_variable(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "modelsamplesstandarddeviation"
......@@ -213,7 +213,7 @@ def write_mixing_ratios(dacycle):
savedict['units'] = "mol mol-1"
savedict['dims'] = dimid
savedict['comment'] = 'std dev of simulated mixing ratios based on optimized state vector'
ncf_out.AddVariable(savedict)
ncf_out.add_variable(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "modelsamplesstandarddeviation_forecast"
......@@ -221,7 +221,7 @@ def write_mixing_ratios(dacycle):
savedict['units'] = "mol mol-1"
savedict['dims'] = dimid
savedict['comment'] = 'std dev of simulated mixing ratios based on prior state vector'
ncf_out.AddVariable(savedict)
ncf_out.add_variable(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "modelsamplesensemble"
......@@ -229,7 +229,7 @@ def write_mixing_ratios(dacycle):
savedict['units'] = "mol mol-1"
savedict['dims'] = dimid + dimmembers
savedict['comment'] = 'ensemble of simulated mixing ratios based on optimized state vector'
ncf_out.AddVariable(savedict)
ncf_out.add_variable(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "modelsamplesensemble_forecast"
......@@ -237,7 +237,7 @@ def write_mixing_ratios(dacycle):
savedict['units'] = "mol mol-1"
savedict['dims'] = dimid + dimmembers
savedict['comment'] = 'ensemble of simulated mixing ratios based on prior state vector'
ncf_out.AddVariable(savedict)
ncf_out.add_variable(savedict)
else:
logging.debug("Modifying existing file (%s) in the analysis directory" % copy_file)
......@@ -327,8 +327,7 @@ if __name__ == "__main__":
dacycle.initialize()
dacycle.parse_times()
dasystem = CO2DaSystem('../rc/carbontracker_ct09_opf.rc')
dasystem.initialize()
dasystem = CO2DaSystem('../rc/carbontracker_ct09_opfnew.rc')
dacycle.dasystem = dasystem
......
Supports Markdown
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