Commit 56c61c3e authored by karolina's avatar karolina
Browse files

cleanup - all function names (except sth in tools/rc) in lowercase

parent ad278492
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ctdas_light_refactor_new</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/ctdas_light_refactor_new</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project>
This diff is collapsed.
......@@ -5,7 +5,7 @@ sys.path.append('../../')
import os
import getopt
from datetime import datetime, timedelta
from da.tools.general import CreateDirs
from da.tools.general import create_dirs
import numpy as np
from pylab import date2num, num2date
......@@ -17,7 +17,7 @@ File created on 11 May 2012.
"""
def WriteMixingRatios(DaCycle):
def write_mixing_ratios(DaCycle):
"""
Write Sample information to NetCDF files. These files are organized by site and
......@@ -41,7 +41,7 @@ def WriteMixingRatios(DaCycle):
dirname = 'data_molefractions'
dirname = CreateDirs(os.path.join(DaCycle['dir.analysis'], dirname))
dirname = create_dirs(os.path.join(DaCycle['dir.analysis'], dirname))
#
# Some help variables
#
......@@ -61,10 +61,10 @@ def WriteMixingRatios(DaCycle):
ncf_in = io.CT_Read(infile, 'read')
obs_num = ncf_in.GetVariable('obs_num')
obs_val = ncf_in.GetVariable('observed')
simulated = ncf_in.GetVariable('modelsamples')
infilename = ncf_in.GetVariable('inputfilename')
obs_num = ncf_in.get_variable('obs_num')
obs_val = ncf_in.get_variable('observed')
simulated = ncf_in.get_variable('modelsamples')
infilename = ncf_in.get_variable('inputfilename')
infiles = netCDF4.chartostring(infilename).tolist()
#infiles = [join(s.compressed(),'') for s in infilename]
......@@ -84,21 +84,21 @@ def WriteMixingRatios(DaCycle):
ncf_fc_in = io.CT_Read(infile, 'read')
fc_obs_num = ncf_fc_in.GetVariable('obspack_num')
fc_obs_val = ncf_fc_in.GetVariable('observed')
fc_simulated = ncf_fc_in.GetVariable('modelsamplesmean_prior')
fc_simulated_ens = ncf_fc_in.GetVariable('modelsamplesdeviations_prior')
fc_flag = ncf_fc_in.GetVariable('flag')
fc_obs_num = ncf_fc_in.get_variable('obspack_num')
fc_obs_val = ncf_fc_in.get_variable('observed')
fc_simulated = ncf_fc_in.get_variable('modelsamplesmean_prior')
fc_simulated_ens = ncf_fc_in.get_variable('modelsamplesdeviations_prior')
fc_flag = ncf_fc_in.get_variable('flag')
if not DaCycle.DaSystem.has_key('opt.algorithm'):
fc_r = ncf_fc_in.GetVariable('modeldatamismatchvariance')
fc_hphtr = ncf_fc_in.GetVariable('totalmolefractionvariance')
fc_r = ncf_fc_in.get_variable('modeldatamismatchvariance')
fc_hphtr = ncf_fc_in.get_variable('totalmolefractionvariance')
elif DaCycle.DaSystem['opt.algorithm'] == 'serial':
fc_r = ncf_fc_in.GetVariable('modeldatamismatchvariance')
fc_hphtr = ncf_fc_in.GetVariable('totalmolefractionvariance')
fc_r = ncf_fc_in.get_variable('modeldatamismatchvariance')
fc_hphtr = ncf_fc_in.get_variable('totalmolefractionvariance')
elif DaCycle.DaSystem['opt.algorithm'] == 'bulk':
fc_r = ncf_fc_in.GetVariable('modeldatamismatchvariance').diagonal()
fc_hphtr = ncf_fc_in.GetVariable('totalmolefractionvariance').diagonal()
filesitecode = ncf_fc_in.GetVariable('sitecode')
fc_r = ncf_fc_in.get_variable('modeldatamismatchvariance').diagonal()
fc_hphtr = ncf_fc_in.get_variable('totalmolefractionvariance').diagonal()
filesitecode = ncf_fc_in.get_variable('sitecode')
fc_sitecodes = netCDF4.chartostring(filesitecode).tolist()
#fc_sitecodes = [join(s.compressed(),'') for s in filesitecode]
......@@ -249,9 +249,9 @@ def WriteMixingRatios(DaCycle):
# Get existing file obs_nums to determine match to local obs_nums
if ncf_out.variables.has_key('id'):
file_obs_nums = ncf_out.GetVariable('id')
file_obs_nums = ncf_out.get_variable('id')
elif ncf_out.variables.has_key('obspack_num'):
file_obs_nums = ncf_out.GetVariable('obspack_num')
file_obs_nums = ncf_out.get_variable('obspack_num')
# Get all obs_nums related to this file, determine their indices in the local arrays
......@@ -326,19 +326,19 @@ if __name__ == "__main__":
logging.root.setLevel(logging.DEBUG)
DaCycle = CycleControl(args={'rc':'../../ctdas-od-gfed2-glb6x4-obspack-full.rc'})
DaCycle.Initialize()
DaCycle.ParseTimes()
DaCycle.initialize()
DaCycle.parse_times()
DaSystem = CtDaSystem('../rc/carbontracker_ct09_opf.rc')
DaSystem.Initialize()
DaSystem.initialize()
DaCycle.DaSystem = DaSystem
while DaCycle['time.start'] < DaCycle['time.finish']:
outfile = WriteMixingRatios(DaCycle)
outfile = write_mixing_ratios(DaCycle)
DaCycle.AdvanceCycleTimes()
DaCycle.advance_cycle_times()
sys.exit(0)
......@@ -13,7 +13,7 @@ sys.path.append('../../')
import sys
import os
from da.tools.general import CreateDirs
from da.tools.general import create_dirs
import matplotlib.dates as pltdt
import matplotlib.pyplot as plt
from matplotlib.mlab import normpdf
......@@ -61,7 +61,7 @@ def site_timeseries(DaCycle):
#
mrdir = os.path.join(DaCycle['dir.analysis'], 'timeseries_molefractions')
if not os.path.exists(mrdir):
CreateDirs(mrdir)
create_dirs(mrdir)
#
# Make a dictionary of available sites and the NetCDF file names associated with them
#
......@@ -147,12 +147,12 @@ def timehistograms_new(fig, infile):
# Get data
#
f = io.CT_CDF(infile, 'read')
date = f.GetVariable('time')
obs = f.GetVariable('value') * 1e6
mdm = f.GetVariable('modeldatamismatch') * 1e6
hphtr = f.GetVariable('totalmolefractionvariance_forecast') * 1e6 * 1e6
simulated = f.GetVariable('modelsamplesmean_forecast') * 1e6
flags = f.GetVariable('flag_forecast')
date = f.get_variable('time')
obs = f.get_variable('value') * 1e6
mdm = f.get_variable('modeldatamismatch') * 1e6
hphtr = f.get_variable('totalmolefractionvariance_forecast') * 1e6 * 1e6
simulated = f.get_variable('modelsamplesmean_forecast') * 1e6
flags = f.get_variable('flag_forecast')
longsitestring = f.site_name + ', ' + f.site_country
location = nice_lat(f.site_latitude) + ', ' + nice_lon(f.site_longitude) + ', ' + nice_alt(f.site_elevation)
......@@ -335,11 +335,11 @@ def timevssite_new(fig, infile):
# Get data
#
f = io.CT_CDF(infile, 'read')
date = f.GetVariable('time')
obs = f.GetVariable('value') * 1e6
mdm = f.GetVariable('modeldatamismatch') * 1e6
simulated = f.GetVariable('modelsamplesmean') * 1e6
flags = f.GetVariable('flag_forecast')
date = f.get_variable('time')
obs = f.get_variable('value') * 1e6
mdm = f.get_variable('modeldatamismatch') * 1e6
simulated = f.get_variable('modelsamplesmean') * 1e6
flags = f.get_variable('flag_forecast')
longsitestring = f.site_name + ', ' + f.site_country
location = nice_lat(f.site_latitude) + ', ' + nice_lon(f.site_longitude) + ', ' + nice_alt(f.site_elevation)
......@@ -538,12 +538,12 @@ def residuals_new(fig, infile):
# Get data
#
f = io.CT_CDF(infile, 'read')
date = f.GetVariable('time')
obs = f.GetVariable('value') * 1e6
mdm = f.GetVariable('modeldatamismatch') * 1e6
hphtr = f.GetVariable('totalmolefractionvariance_forecast') * 1e6 * 1e6
simulated = f.GetVariable('modelsamplesmean_forecast') * 1e6
flags = f.GetVariable('flag_forecast')
date = f.get_variable('time')
obs = f.get_variable('value') * 1e6
mdm = f.get_variable('modeldatamismatch') * 1e6
hphtr = f.get_variable('totalmolefractionvariance_forecast') * 1e6 * 1e6
simulated = f.get_variable('modelsamplesmean_forecast') * 1e6
flags = f.get_variable('flag_forecast')
longsitestring = f.site_name + ', ' + f.site_country
location = nice_lat(f.site_latitude) + ', ' + nice_lon(f.site_longitude) + ', ' + nice_alt(f.site_elevation)
......@@ -753,11 +753,11 @@ if __name__ == '__main__': # started as script
logging.root.setLevel(logging.DEBUG)
DaCycle = CycleControl(args={'rc':'../../ctdas-od-gfed2-glb6x4-obspack-full.rc'})
DaCycle.Initialize()
DaCycle.ParseTimes()
DaCycle.initialize()
DaCycle.parse_times()
DaSystem = CtDaSystem('../rc/carbontracker_ct09_opf.rc')
DaSystem.Initialize()
DaSystem.initialize()
DaCycle.DaSystem = DaSystem
......
......@@ -6,8 +6,8 @@ import numpy as np
import string
import datetime as dt
import logging
import re
import da.tools.io4 as io
from da.tools.general import CreateDirs
fontsize = 10
......@@ -44,7 +44,7 @@ def nice_alt(cls):
return string.strip('%10.1f masl' % round(cls, -1))
def SummarizeObs(DaCycle, printfmt='html'):
def summarize_obs(DaCycle, printfmt='html'):
"""***************************************************************************************
Call example:
......@@ -58,7 +58,7 @@ def SummarizeObs(DaCycle, printfmt='html'):
call directly from a python script as:
q=SummarizeObs(DaCycle,printfmt='html')
q=summarize_obs(DaCycle,printfmt='html')
***************************************************************************************"""
......@@ -113,19 +113,16 @@ def SummarizeObs(DaCycle, printfmt='html'):
fmt = '%8s ' + ' %55s %s %s' + ' %4d ' + ' %4d ' + ' %5.2f ' + ' %5.2f'
table = []
lons = []
lats = []
names = []
nobs = []
for infile in infiles:
#logging.debug( infile )
f = io.CT_CDF(infile, 'read')
date = f.GetVariable('time')
obs = f.GetVariable('value') * 1e6
mdm = f.GetVariable('modeldatamismatch') * 1e6
simulated = f.GetVariable('modelsamplesmean_forecast') * 1e6
simulated_std = f.GetVariable('modelsamplesstandarddeviation_forecast') * 1e6
date = f.get_variable('time')
obs = f.get_variable('value') * 1e6
mdm = f.get_variable('modeldatamismatch') * 1e6
simulated = f.get_variable('modelsamplesmean_forecast') * 1e6
simulated_std = f.get_variable('modelsamplesstandarddeviation_forecast') * 1e6
pydates = [dt.datetime(1970, 1, 1) + dt.timedelta(seconds=int(d)) for d in date]
......@@ -138,7 +135,7 @@ def SummarizeObs(DaCycle, printfmt='html'):
diffstd = ((simulated - obs).std())
diffsummerstd = ((simulated - obs).take(summer).std())
diffwinterstd = ((simulated - obs).take(winter).std())
longsitestring = f.site_name + ', ' + f.site_country
location = nice_lat(f.site_latitude) + ', ' + nice_lon(f.site_longitude) + ', ' + nice_alt(f.site_elevation)
if printfmt == 'html':
......@@ -188,7 +185,7 @@ def SummarizeObs(DaCycle, printfmt='html'):
logging.info("File written with summary: %s" % saveas)
def SummarizeStats(DaCycle):
def summarize_stats(DaCycle):
"""
Summarize the statistics of the observations for this cycle
This includes X2 statistics, RMSD, and others for both forecast and
......@@ -212,13 +209,13 @@ def SummarizeStats(DaCycle):
raise IOError
f = io.CT_CDF(infile, 'read')
sites = f.GetVariable('sitecode')
y0 = f.GetVariable('observed') * 1e6
hx = f.GetVariable('modelsamplesmean_prior') * 1e6
dF = f.GetVariable('modelsamplesdeviations_prior') * 1e6
HPHTR = f.GetVariable('totalmolefractionvariance').diagonal() * 1e6 * 1e6
R = f.GetVariable('modeldatamismatchvariance').diagonal() * 1e6 * 1e6
flags = f.GetVariable('flag')
sites = f.get_variable('sitecode')
y0 = f.get_variable('observed') * 1e6
hx = f.get_variable('modelsamplesmean_prior') * 1e6
dF = f.get_variable('modelsamplesdeviations_prior') * 1e6
HPHTR = f.get_variable('totalmolefractionvariance').diagonal() * 1e6 * 1e6
R = f.get_variable('modeldatamismatchvariance').diagonal() * 1e6 * 1e6
flags = f.get_variable('flag')
f.close()
HPHT = dF.dot(np.transpose(dF)).diagonal() / (dF.shape[1] - 1.0)
......@@ -309,7 +306,7 @@ def SummarizeStats(DaCycle):
f.write(tablehead)
files = os.listdir(sumdir)
x2_files = [file for file in files if file.startswith('x2')]
x2_files = [fil for fil in files if fil.startswith('x2')]
for htmlfile in x2_files:
lines = grep(site, os.path.join(sumdir, htmlfile))
for line in lines:
......@@ -322,11 +319,10 @@ def SummarizeStats(DaCycle):
f.write(txt)
f.close()
import re
def grep(pattern, file):
fileObj = open(file, 'r')
def grep(pattern, fil):
fileObj = open(fil, 'r')
r = []
linenumber = 0
for line in fileObj:
if re.search(pattern, line):
r.append(line)
......@@ -335,30 +331,27 @@ def grep(pattern, file):
# main body if called as script
if __name__ == '__main__': # started as script
from da.tools.initexit import CycleControl
from da.ct.dasystem import CtDaSystem
from da.ct.statevector import CtStateVector
sys.path.append('../../')
logging.root.setLevel(logging.DEBUG)
DaCycle = CycleControl(args={'rc':'../../ctdas-od-gfed2-glb6x4-obspack-full.rc'})
DaCycle.Initialize()
DaCycle.ParseTimes()
DaCycle.initialize()
DaCycle.parse_times()
DaSystem = CtDaSystem('../rc/carbontracker_ct09_opf.rc')
DaSystem.Initialize()
DaSystem.initialize()
DaCycle.DaSystem = DaSystem
q = SummarizeObs(DaCycle)
q = summarize_obs(DaCycle)
while DaCycle['time.start'] < DaCycle['time.finish']:
q = SummarizeStats(DaCycle)
DaCycle.AdvanceCycleTimes()
q = summarize_stats(DaCycle)
DaCycle.advance_cycle_times()
sys.exit(0)
......
......@@ -25,7 +25,7 @@ for i, k in enumerate(ext_ecocomps):
##### END OF REGION DEFINITIONS
def StateToGrid(values, regionmap, reverse=False, avg=False, mapname=None):
def state_to_grid(values, regionmap, reverse=False, avg=False, mapname=None):
"""
This method converts parameters from a CarbonTracker StateVector object to a gridded map of linear multiplication values. These
can subsequently be used in the transport model code to multiply/manipulate fluxes
......
......@@ -14,10 +14,10 @@ import da.tools.io4 as io
matrix_file = os.path.join(analysisdir, 'regions.nc')
cdf_temp = io.CT_CDF(matrix_file, 'read')
transcommask = cdf_temp.GetVariable('transcom_regions')
olson240mask = cdf_temp.GetVariable('regions')
olsonmask = cdf_temp.GetVariable('land_ecosystems')
oifmask = cdf_temp.GetVariable('ocean_regions')
transcommask = cdf_temp.get_variable('transcom_regions')
olson240mask = cdf_temp.get_variable('regions')
olsonmask = cdf_temp.get_variable('land_ecosystems')
oifmask = cdf_temp.get_variable('ocean_regions')
dummy = cdf_temp.close()
# Names and short names of TransCom regions
......@@ -58,7 +58,7 @@ ext_transcomps = []
matrix_file = os.path.join(analysisdir, 'postagg_definitions.nc')
cdf_temp = io.CT_CDF(matrix_file, 'read')
xform = cdf_temp.GetVariable('xform')
xform = cdf_temp.get_variable('xform')
keys = cdf_temp.ncattrs()
keys.sort()
......
......@@ -50,11 +50,11 @@ class DaSystem(dict):
"""
self.Identifier = 'CarbonTracker CO2' # the identifier gives the platform name
self.LoadRc(rcfilename)
self.load_rc(rcfilename)
logging.debug("Data Assimilation System initialized: %s" % self.Identifier)
def LoadRc(self, RcFileName):
def load_rc(self, RcFileName):
"""
This method loads a DA System Info rc-file with settings for this simulation
"""
......@@ -67,9 +67,9 @@ class DaSystem(dict):
logging.debug("DA System Info rc-file (%s) loaded successfully" % self.RcFileName)
def Validate(self):
def validate(self):
"""
Validate the contents of the rc-file given a dictionary of required keys
validate the contents of the rc-file given a dictionary of required keys
"""
needed_rc_items = {}
......
......@@ -9,7 +9,7 @@ Revision History:
File created on 28 Jul 2010.
.. autoclass:: da.baseclasses.obs.Observation
:members: Initialize, Validate, add_observations, add_simulations, add_model_data_mismatch, write_sample_info
:members: initialize, Validate, add_observations, add_simulations, add_model_data_mismatch, write_sample_info
.. autoclass:: da.baseclasses.obs.ObservationList
:members: __init__
......@@ -51,7 +51,7 @@ class Observation(object):
"""
self.Identifier = identifier
self.Version = version
self.datalist = [] # Initialize with an empty list of obs
self.datalist = [] # initialize with an empty list of obs
# The following code allows the object to be initialized with a DaCycle object already present. Otherwise, it can
# be added at a later moment.
......@@ -66,7 +66,7 @@ class Observation(object):
def getlength(self):
return len(self.datalist)
def Initialize(self):
def initialize(self):
""" Perform all steps needed to start working with observational data, this can include moving data, concatenating files,
selecting datasets, etc.
"""
......
......@@ -35,8 +35,8 @@ class ObservationOperator(object):
self.RestartFileList = []
self.outputdir = None # Needed for opening the samples.nc files created
self.LoadRc(RcFileName) # load the specified rc-file
self.ValidateRc() # validate the contents
self.load_rc(RcFileName) # load the specified rc-file
self.validate_rc() # validate the contents
logging.info('Observation Operator object initialized: %s' % self.Identifier)
......@@ -52,7 +52,7 @@ class ObservationOperator(object):
def get_initial_data(self):
""" This method places all initial data needed by an ObservationOperator in the proper folder for the model """
def Initialize(self):
def initialize(self):
""" Perform all steps necessary to start the observation operator through a simple Run() call """
def validate_input(self):
......
......@@ -34,7 +34,7 @@ class Optimizer(object):
logging.info('Optimizer object initialized: %s' % self.Identifier)
def Initialize(self, dims):
def initialize(self, dims):
self.nlag = dims[0]
self.nmembers = dims[1]
self.nparams = dims[2]
......@@ -182,12 +182,12 @@ class Optimizer(object):
# Add dimensions
dimparams = f.AddParamsDim(self.nparams)
dimmembers = f.AddMembersDim(self.nmembers)
dimlag = f.AddLagDim(self.nlag, unlimited=False)
dimobs = f.AddObsDim(self.nobs)
dimstate = f.AddDim('nstate', self.nparams * self.nlag)
dim200char = f.AddDim('string_of200chars', 200)
dimparams = f.add_params_dim(self.nparams)
dimmembers = f.add_members_dim(self.nmembers)
dimlag = f.add_lag_dim(self.nlag, unlimited=False)
dimobs = f.add_obs_dim(self.nobs)
dimstate = f.add_dim('nstate', self.nparams * self.nlag)
dim200char = f.add_dim('string_of200chars', 200)
# Add data, first the ones that are written both before and after the optimization
......@@ -198,7 +198,7 @@ class Optimizer(object):
savedict['dims'] = dimstate
savedict['values'] = self.x.tolist()
savedict['comment'] = 'Full %s state vector mean ' % type
f.AddData(savedict)
f.add_data(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "statevectordeviations_%s" % type
......@@ -207,7 +207,7 @@ class Optimizer(object):
savedict['dims'] = dimstate + dimmembers
savedict['values'] = self.X_prime.tolist()
savedict['comment'] = 'Full state vector %s deviations as resulting from the optimizer' % type
f.AddData(savedict)
f.add_data(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "modelsamplesmean_%s" % type
......@@ -216,7 +216,7 @@ class Optimizer(object):
savedict['dims'] = dimobs
savedict['values'] = self.Hx.tolist()
savedict['comment'] = '%s mean mixing ratios based on %s state vector' % (type, type)
f.AddData(savedict)
f.add_data(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "modelsamplesdeviations_%s" % type
......@@ -225,7 +225,7 @@ class Optimizer(object):
savedict['dims'] = dimobs + dimmembers
savedict['values'] = self.HX_prime.tolist()
savedict['comment'] = '%s mixing ratio deviations based on %s state vector' % (type, type)
f.AddData(savedict)
f.add_data(savedict)
# Continue with prior only data
......@@ -238,7 +238,7 @@ class Optimizer(object):
savedict['dims'] = dimobs + dim200char
savedict['values'] = self.sitecode
savedict['missing_value'] = '!'
f.AddData(savedict)
f.add_data(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "observed"
......@@ -247,7 +247,7 @@ class Optimizer(object):
savedict['dims'] = dimobs
savedict['values'] = self.obs.tolist()
savedict['comment'] = 'Observations used in optimization'
f.AddData(savedict)
f.add_data(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "obspack_num"
......@@ -257,7 +257,7 @@ class Optimizer(object):
savedict['dims'] = dimobs
savedict['values'] = self.obs_ids.tolist()
savedict['comment'] = 'Unique observation number across the entire ObsPack distribution'
f.AddData(savedict)
f.add_data(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "modeldatamismatchvariance"
......@@ -268,7 +268,7 @@ class Optimizer(object):
else: savedict['dims'] = dimobs + dimobs
savedict['values'] = self.R.tolist()
savedict['comment'] = 'Variance of mole fractions resulting from model-data mismatch'
f.AddData(savedict)
f.add_data(savedict)
# Continue with posterior only data
......@@ -283,7 +283,7 @@ class Optimizer(object):
else: savedict['dims'] = dimobs + dimobs
savedict['values'] = self.HPHR.tolist()
savedict['comment'] = 'Variance of mole fractions resulting from prior state and model-data mismatch'
f.AddData(savedict)
f.add_data(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "flag"
......@@ -292,7 +292,7 @@ class Optimizer(object):
savedict['dims'] = dimobs
savedict['values'] = self.flags.tolist()
savedict['comment'] = 'Flag (0/1/2/99) for observation value, 0 means okay, 1 means QC error, 2 means rejected, 99 means not sampled'
f.AddData(savedict)
f.add_data(savedict)
savedict = io.std_savedict.copy()
savedict['name'] = "kalmangainmatrix"
......@@ -301,7 +301,7 @@ class Optimizer(object):
savedict['dims'] = dimstate + dimobs
savedict['values'] = self.KG.tolist()
savedict['comment'] = 'Kalman gain matrix of all obs and state vector elements'