 Compare output from standard and reference codes. Std code output gets some processing to make it compatable with reference code.
            Transforms are:
            1) linesearch values in std case are transposed to make them compatable with reference case
            2) Jacobian in std code has last row (corresponding to constraint) removed.


 Run doLineSearch (or ref_doLineSearch) and pacakge results up in a dictionary
        :param ref: if set True run reference code. Default is False
        :param trace: If set True more information is output. Default is False.


 Compare output from standard and reference LineSearch codes. Std code output gets some processing to make it compatable with reference code.
            Transforms are:
            1) NewParam array is transposed.


Instantiate and  run fake fns.
    :return the function used to fake.


    Applies desired perturbations (steps) to the initial set of parameter
    values to return the parameter sets required for the GaussNewton phase
    of an iteration.

    The perturbations are towards the centre of the valid range for each
    parameter

    Inputs

         baseVals: array of parameters for the first of the GN runs (unperturbed)

         parLimits: max,min as read from JSON into 2-D array,
                    and passed through to here unaltered

         steps: array of stepsizess for each parameter.

         trace: Optional argument with default value False.
                Boolean -- True to get output, False no output

    Note inputs are all arrays, with data in order of the parameter list.

    Returns
          y: array defining the next set of parameter values
             with dimensions (nparameters, nparameters+1)


    Applys Tikinhov regularisation to covariance matrix so its inverse can be sensibly computed. This sometimes called ridge regression.
    Params: covariance - a NxN symmetric matrix whose diagonal values will be modified.
            cond_number -- the target condition number relative to the condition number of the diagonal matrix
            initial_scale -- initial scaling on the diagonal elements (default value 1e-4)
            trace -- provide some diagnostics when True (default is False)

   Algorithm: The scaling is doubled each iteration until the condition
   number is less than target value. Target value is cond_number*cond(diagonal covariance)


    calculate error for simulated observed values given targets
    and add anything else needed.
    NOTE from SFBT: PLEASE DOCUMENT ALL INPUTS & OUTPUTS TO FUNCTION and
    how this routine works. REFERENCE routine corresponding to Kuniko's
    original code. New code will replace this but keeping this version for
    testing purposes.


    Reference version of doGaaussNewton -- Kuniko's orginal version. This allows
    Easy comparision between Kuniko's original code and re-enginnered code.

    the function doGaussNewton_ref does the  calculation for the n+1 initial runs in an iteration,
    and can be invoked from (usually) the class GaussNewton, using data from studies, or from
    test python scripts for arbitrary inputs

    :param param_value: array of parameter values
    :param param_range: array of max/min of range for each parameter in order
    :param UM_value: array of simulated observables
    :param obs: array of target values
    :param cov: covariance array (header defines the observables in use) TODO inconsistent with use of constraint_target in JSON file?
    :param scalings: observables are related arrays get scaled before statistical analysis
    :param olist: name of the observables - probabaly unused except perhaps in diagnostic
    :param constraint: TODO what is this??
    :param studyJSON The complete dictionary from the study's JSON of which
                     this function might lift simple values to give extensibility.
    Other arguments have had some manipulation in reading the JSON (scalings, slist... to give correspondence across arrays)
    :param trace: turn on/off trace of what happening
    :returns: yyT: array defining the next set of parameter values ## change the name of this to somethign sensible...
    :returns: err: error values associated with input set of observables, one err per run.
    :returns outdict: dictionary of data destined for json file


    the function doGaussNewton does the calculataion, and can be invoked from
    the class GaussNewton, using data from studies, or from test python scripts
    for arbitrary inputs
    :param param_value: array of parameter values
    :param  param_range: array of max/min of range for each parameter in order
    :param UM_value: array of simulated observables
    :param obs: array of target values
    :param defCov: DEFAULT covariance array (header defines the observables in use) # TODO rename this
    :param scalings: observables are related arrays get scaled before statistical analysis
    :param olist: name of the observables - probably unused except perhaps in diagnostic
    :param studyJSON to allow simple parameters to be extensible.
    :param trace: little used at present - scope to turn on/off some trace of what happening
    :returns: status: "Continue", "Covnerged", "Stalled"
    :returns: err: error values associated with input set of observables, one err per run.
    :returns: newParam: array defining the next set of parameter values
    :returns: index: index identifying the best of the runs from along the line searched.
    :returns outdict: dictionary of data destined for json file


    Fit Nth (Default is 2) order fn to time co-ordinate of cube then compute value at specified year
    :param cube: cube to do fitting to.
    :param order  (default 2 )-- the order to fit too
    :param year (default [111, 181]) -- the years to get values for.
    :param x (detault is None) -- if specified regress against this rather than time.
    :param bootstrap (default is None) -- if specified computes bootstrap uncertainties -- assuming guaussin
    :param timeAvg (default is None) -- if specified time-average data with this period.
    :param mask (default is False) -- if True mask data..
    :param fit (default is False) -- if True return fit params
    :param makeCube (default for now if False) -- if True wrap the result as a cube.
    :return: the fitted values at the specified year


    Compute transient values
    :param force: dir path to forced simulation
    :param ctl: dir path to control simulation
    :param file: name of time_Cache file
    :param scale (optional): scaling to apply -- default 1.
    :return: estimated values at specified year


    Compute Ctl value at specified year
    :param ctl: dir path to control simulation
    :param file: name of time_Cache file
    :param scale (optional): scaling to apply -- default 1.
    :param year (optional): year at which to compute -- default is 181.
    :return: estimated values at specified year


    Compute equilibrium value from linear regression on net flux.
    :param delta:
    :param netFlux:
    :return: equilibrium value(s)


    Read a pp file  using iris pp library and return it as a cube
    Deals with (eventually) all the brokenness of iris...
    :param file: file to read data from
    :return: pp data  returned


    Generate time values for pp field
    :arg tspp timeseries


    Add aux coords to a cube
    :param cube:
    :return:


    Compute difference between file in dir1 from file in dir2
    :param dir1: Directory (as in readFile) where first data is
    :param dir2: Directory (as in readFile) where second data is
    :param file:File being read in
    :return: difference between two datasets.


    Compute difference between two cubes. cube2 will be interpolated to same times as cube1
    :param cube1:  first cube
    :param cube2: 2nd cube
    :return: difference after interpolating cube2 to same times as cube1.


    Compute net flux from ummonitor cached data
    :param direct: directory where pp files live
    :return: net flux


    work out the name of the annual directory and return it & any values (year) associated with it
    :param model: a model like object for which the directories are searched.
    :return:


    work out the name of the monthly-mean directory and return it & any values (year) associated with it
    :param model: a model like object for which the directories are searched.
    :return: the name of the directory and the


    Compute Equilibrium values  for 4xCO2 -- locked to HadCM3 (for the moment).
    Code, currently, is really example which could, eventually, be generalised
    Code aimed to be used for computing Jacobian.
    Code tricky as dependencies between running ctl and 4xCo2. Then need to read data..
    It could in principle be used to find parameters that produce high (or low) climate sensitivities...
    :param: params -- a numpy array with the parameter values.
    :param: ensembleMember -- ensemble member for this case.
    :param failNan -- fail if any nans in result. (default is True)
    :param args: -- positional arguments
    :param kwargs: -- keyword arguments
    :return: Value of ECS4xCO2


    Compute Transient Climate Response  at 4 & 2xCO2 -- locked to HadCM3 (for the moment).
    Code, currently, is really example which could, eventually, be generalised
    Code aimed to be used for computing Jacobian.
    Code tricky as dependencies between running ctl and 1%. Then need to read data..
    It could in principle be used to find parameters that produce high (or low) climate sensitivities...
    :param: params -- a numpy array with the parameter values.
    :param: ensembleMember -- ensemble member for this case.
    :param failNan -- fail if any nans in result. (default is True)
    :param args: -- positional arguments
    :param kwargs: -- keyword arguments
    :return: 2nd order fit at year 110 & yr 180 = 2xCO2 & 4xCO2 respectively


    Compute NH ice min & max values from a short ctl.
    :param: params -- a numpy array with the parameter values.
    :param: ensembleMember -- ensemble member for this case.
    :param args: -- positional arguments
    :param kwargs: -- keyword arguments
    :return: NH 10 year average min and max ice extent.


    fake TCR results
      just read in dta from reference experiment and write it out for appropriate period. Scale a bit depending on
      parameter
    :return:


    fake ECS4 results
    :return:


        Convenience fn to check dir as expected
        :param dirname: naem of directory to check
        :return:


    Read in pp data and add some aux co-ords.
    :param dir: name of directory relative to time-cache
    :param name:name of file
    :return: cube


    run makepph on directory and then run IDL ummonitor code.
    Requires that makepph, midl in path and ummonitor etc in idl search path.
    :param dir --- a pathLib path for which makepph and ummonitor to be run on
    :param choices -- a list of choices (see ummonitor). Default will make everything.
    :return: *name* of directory (not full path) where ummonitor put the data and
       maximum year of first ts_*.pp file found.


    Compute min and max ice extent from ice_extent timeseries
    :param ts: iris timeseries of ice extent site_number =1 = NH; 2 = SH
    :param year slice object for year range wanted.
    :param scale -- scaling to apply to timeseries. Set to 1e12 if want results in 10^6 km^2
    :return:dict with NHmax, NHmin, SHmax, SHmin  -- ice extent in m^2


    Generate a time constraint between start_time and end_time. start_time is included while end_time is not included in
    the times requested. start_time and end_time should be passed in as tuples/or lists


    Compute means for NH extra tropics, Tropics and SH extra Tropics.
    Tropics is 30N to 30S. NH extra tropics 30N to 90N and SH extra tropics 90S to 30S
    Arguments:
    :param cube -- cube to be processed
    :param name )optional -- default =
    :param timeMean If true (defaut) extract and time-mean data.


    Try and load variables from files using iris and multiple constraints
    :param files -- files for which dta is to be loaded
    :param name -- variable name
    (see iris.load_cube for full explanation)
    :param constrains -- list of iris constraints. First one matched returned


    Setup the processing information
    :param dataArray: the dataArray containing the data
    :param land_mask -- land mask as a dateArray.
    :param latitude_coord -- name of latitude co-ord (optional; default latitude)
    :return: dict containing data to be processed.


    Compute means for NH extra tropics, Tropics and SH extra Tropics.
    Tropics is 30N to 30S. NH extra tropics 30N to 90N and SH extra tropics 90S to 30S
    Arguments:
        :param dataArray -- dataArray to be processed
    :param name -- name to call mean.
    :param latitude_coord: name of the latitude co-ord. Default is 'latitude


    Fake model values --
    Assume that simulated values are a linear sum of effects from each parameter and that each parameter affects two
      types of parameters. With each region behaving similarly.
    :param paramV: parameter vector to run at
    :param studyCfg: study configuration -- which contains much useful information
    :param obsNames: (optional) the observations to make. If not provided studyCfg will be queried for them
    :param trace (optional) If True (default is False) more information will be printed out.
    :return: simulated observations as a pandas object


:return: the obsnames from the config


:return: param names from config


        get target values
        :param scale (default True) apply scaling
        :return: scaled target values from config


        Get scales from config
        :return: scaling values as pandas series. See StudyConfig scales.


        Return  transform matrix by calling StudyConfig.transMatrix
        :param (optional) scale (default True) -- scale transformation matrix;
        :param (optional) dataframe (default True) -- if True  wrap as a dataframe.
        :return: transform matrix.


        Read model configuration from directory, generate key and store it.
        :param dir: path to directory where model configuration is to be found
        :return: model if succeeded, None if failed.


        reads all model configurations from dir and stores them.
        :param dir: directory (filePath) where models to found

        :return:


        Generate key from keys and values in paramDict
        This should be unique (to some rounding on float parameters)
        :param paramDict -- a dictionary (or something that behaves likes a dict) of variable parameters.
        :param fpFmt -- format to convert float to string. (Default is %.4g)
        :return: a tuple as an index. tuple is key_name, value in sorted order of key_name.
        #TODO -- make the paramNames/values be everything. Passed in as an iterable.
        # then construct keys from name/values as now. Note this means that would be possible to
        # make this a method of the model which would have lots of advantages!


        Return model or None that matches key.
        :param self:
        :param params: parameters as a dict or iterable
        :param verbose (default None). If set overrule value in self.verbose
        :return: model that has requested parameters. None if nothing found.


        A generator function for key and value for all models
        :return: a items generator. (use as k,v in ModelSubmit.allModels():)


        Extract the parameters used in the simulations. Will include ensembleMember -- as a "fake" parameter
        :includeFixed (optional; default True) -- include all fixed params if True
        :return: pandas dataframe of parameters


        Extract the Obs used in the *individual* simulations
        No ensemble averaging is done and you need the param data to work out which ensemble is which.
        :param scale If True data will be scaled.
        :param remove_missing. If True remove any obs with missing data.
        :return: pandas dataframe of observations


        compute cost from data.
        :param: scale -- scale data.
        :return pandas series of costs.
        TODO: Add test cases.


        Generate key from model
        :param model: model for which key gets generated
        :return: key


:return: fixed parameters


    Support Function to compute diff  co-efficient
    :param dyndiff: diffusion value (fowrd should be in hours; backwards in what ever model wants!)
    :param dyndel: order of diffusion. 6 is default corresponding to 3rd order.
    :param inverse (default False) If True return inverse calculation.
    :return:


    Setup namelist for non-spherical ice.
    :param sphIce: True if want spherical ice (which is default)
    :param inverse: Return (from namelists) if spherical ice.
    :param namelist:  Return namelist info
    :return:  returns values or namelist.


    :param value: value to be set -- typically the name of a file
    :param parameter: string for parameter -- must be provided.
    :param inverse: inverst string (remove bit before the : and return the string after that. )
    :return:string (or inverse) to return.


    :param time:  start time as 3 to 6 element list. Spcifiying in order year, month, day of month, hour, minute and second
                    if hour, minute and second not specified they are set to zero.
    :param inverse: Do inverse calculation and return 6 element list as [YYYY, MM, DD, HH, MM, SS]
    :param namelist: No computation just return the namelist info.
    :return:  namelist info and values as array. (or if inverse set return the start time)
        Need to set MODEL_BASIS_TIME in CNTLALL/&NLSTCALL & CONTCNTL/&NLSTCALL but only the year part
    -- which requires something clever. No make the specify the basis_time and then write it out.
    fixhd(21) & fixhd(28) in RECONA/&HEADERS  -- this resets the year. (Presumably we could reset the month etc too.)

    Just need to reset year => adding to tupple an indicator for which part of an array to change?? (Breaks existing stuff?)
    ALas f90nml patch seems to fail for RECONA so will need to write it out explicitly.  (This may be fixed now)


    :param input:  Duration as [YYYY, MM, DD, HH, MM, SS] as used by the UM.
                             If list contains less than 6 elements then remaining values are set to 0
              OR a string in ISO 8061 format (PnYnMnDTnHnMn.nnS)
    :param inverse: Do inverse calculation and return  6 element list as [YYYY, MM, DD, HH, MM, SS]
    :param namelist: Do no computation just return the namelist info
    :param runTarget: namelist info suitable for runTarget. (default). If False namelist info suitable for resubInterval
    :return: namelist info and values as array. (or if inverse set return the run target )


    set runTarget -- see timeDelta for documentation.

    :param target_input:
    :param inverse:
    :param namelist:
    :return: namelist info.


    Set resubmit durations -- see timeDelta for documentation
    :param interval_input:
    :param inverse:
    :param namelist:
    :return: namelist info


    Compute experiment and job id.
    :param name: 5-character UM name
    :param inverse: Default value False. If True compute name from input directory.
    :param namelist: return the namelist used and do no computation.
    :return: experiment and job id from name or name from name['experID']+name['jobID']+name


    Compute gravity wave parameters given kay parameter.
    :param kay: value of kay (default is 2x10^4)
    :param inverse:  invert calculation
    :param namelist: return the namelist used and do no computation.
    :return: dict containing kay_gwave and kay_lee_gwave parameters. (or value of kay if inverse set)


    Compute ice albedo values given alpham
    :param alpham: value of alpham (if forward) or dict containing parameters for inverse
    :param inverse: default is False -- compute alpham
    :param namelist -- return namelist used.
    :return:


    Compute cw_sea from  cw_land
    :param cw_land: value of cw_land
    :param inverse -- if true do inverse calculation and return cw_land
    :return: returns dict containing cloud_cw_land and cloud_cw_sea values.


    Compute rhcrit on multiple model levels
    :param rhcrit: meta parameter for rhcrit
    :param inverse: default False. If True invert the relationship
    :param namelist: default False. If True return only the namelist information.
    :return: (value of meta parameter if inverse set otherwise
       a dict with cloud_rh_crit containing a list of rh_crit on model levels


    Compute array of eacf values for each model level. If inverse set work out what meta-parameter is from array.
    :param eacf: meta-pramater value for eacf
    :param inverse: compute inverse relationship
    :param namelist: default False. If True return only the namelist information.
    :return: either a dict with cloud_eacf being a list of values on each level.


    Compute arrays of diffusion co-efficients for all   levels.
    :param diff_time: time in hours for diffusion
    :param inverse: optional -- default = False. invert relationship to work our diffusion time
    :param namelist: default False. If True return only the namelist information.
    :return: if inverse set compute diffusion timescale otherwise compute diffusion coefficients.
         returns them as a dict with entries
         diff_coeff -- diffusion coefficient, diff_coeff_q -- diffusion coefficient for water vapour
         diff_power -- power of diffusion, diff_power_q -- power for diffusion.


    Generate namelist for NH and SH ocean ice diffusion co-efficient.
    :param OcnIceDiff: Value wanted for ocean ice diffusion coefficient
        Same value will be used for norther and southern hemispheres
        or dict containing parameters for inverse
    :param namelist: If True return only the name list information.
    :param inverse:  If True return the diffusion coefficient in the namelist.
    :return: (by default) the namelist information as a dict.


    Generate namelist for NH and SH ocean ice maximum concentration
    :param iceMaxConc: Value wanted for ocean max concentration
        Same value will be used for northerh and southern hemispheres with SH maximum being 0.98
        or dict containing parameters for inverse
    :param namelist: If True return only the name list information.
    :param inverse:  If True return the diffusion coefficient in the namelist.
    :return: (by default) the namelist information as a dict.


    Generate namelist for changes to Ocean isopynical diffusion.
    :param ocnIsoDiff: Value for ocean ice diffusion. Will set two values AM0_SI & AM1_SI
       Note these picked by examinign Lettie Roach's generated files.
    :param namelist: If True return the name list information
    :param inverse:  If True invert the relationship from the supplied namelist
    :return: Namelist info as a dict


    change scavenge meta parameter which changes L0 & L1 in the aerosol scheme
    :param scavenge: scales L0/L1
    :param namelist: If True return the namelist information
    :param inverse:  If True invert the relationship from the supplied namelist
    :return: Namelist info as dict


        Create the workdir and if refDirPath has .astart & .ostart copy those into created workDir
        :param refDirPath -- name of reference directory
        :param (optional) verbobse -- default False. If True be verbose.
        :return: nada


        modify script.
         set ARCHIVE_DIR to runid/A -- not in SCRIPT??? WOnder where it comes from. Will look at modified script..
         set EXPTID to runid  --  first ^EXPTID=xhdi
         set JOBID to jobid  -- first ^JOBID

          After . submitchk insert:
         . $JOBDIR/optclim_finished ## run the check for job release and resubmission.
            This will be modifed by the submission system

        :param name -- the name of the run.
        :return:


        Modify the Submit script for HadCM3
        Change to SUBMIT
          set RUNID to runid in SUBMIT   == first ^export RUNID=
          set JOBDIR to dirPath   -- first ^JOBDIR=
          set CJOBN to runid in SUBMIT  -- first ^CJOBN=
          set MY_DATADIR to dirPath
          set DATAW and DATAM to $MY_DATADIR/W & $MY_DATADIR/M respectively.
        :param runTime: default None -- if not None then specify time in seconds for model job.
        :param runCode: default None -- if not None then this is the project code for the model job.

        :return: nada


        set up single variable with name var.lower() in namelist nl in file nlFile
        :param var: Name of variable
        :param (optional) nl -- name of namelist. Default is 'slbc21'
        :param (optional) nlFile -- name of file for namelist. Default is 'CNTLATM'
        :return: none


        Fix problems with the CLIM_FCG_* namelists so they can be parsed by f90nml.
        Generates CNTLATM.bak and modifies CNTLATM
        :return: None


        Generate continuation script for model so that it is a CRUN and STEP=4
        :return: script name of continue simulation.


        Perturb the model **namelist** so as to generate a small perturbation.
        :param verbose -- If True be verbose
        :params -- if not None then set those parameters in the namelist.
        :return a list of all perturbed parameters.


            Used by the submission system to allow the post-processing job to be submitted when the simulation
            has completed. This code also modifies the UM so that when a NRUN is fnished it automatically runs the continuation case.
            This HadCM3 implementation generates a file call optclim_finished which is sourced by SCRIPT.
            SCRIPT needs to be modified to actually do this. (See modifySCRIPT).


        Clean out rootDir by removing all files and directories in it.
        However, .json files in the rootDir will not be removed and if rootDir.name is Configurations then
         an error will be triggered. This is to avoid accidental deletion.


        :param model -- add model to list of models to rerun
        :return: list of  models to rerun (no post processing needed -- 'coz something got wrong and pp job waiting)


        Read model configuration from directory, generate key and store it.
          Behaviour when no observations found depends on self.noObs
             'fail': fail!
             'continue': attempt to continue the simulation
             'perturb': perturb the simulation and restart it.
             'clean': remove the directory.
        :param dir: path to directory where model configuration is to be found
        :return: model if succeeded, None if failed.


        Add to list of runs to be submitted if value provided.
        Otherwise return  list of models to make.
        Return list
        :param self: object
        :param keyValue: two element tuple ; key and values to be stored
        :return:


        Return model or None that matches key.
        :param self:
        :param params: parameters as a dict or iterable
        :param update (default False). If True and params not found then as
              well as returning None will update _modelsSubmit dict
        :param verbose (default None). If set overrule value in self.verbose

        :return: model that has parameters. None if nothing found.


        Add existing (and maybe modified) model to directory of models to be reran.
        :param model: model
        :return: nothing


        generate the next name -- this is a generator function.
         :return: iterator that gives names


        Submit models that need to be submitted using self.submitFn -- see init documentation
            (repeating documentation)

            submitFn should expect a list of models to submit and take at least the following named arguments:
                verbose -- provide detailed output. TODO: just move to logging ??
                resubmit -- If not None the command to resubmit once all cases are done.
                rootDir -- the rootDirectory where model configurations are created.
                   Useful for any files submission needs to create.
            The following information will be extracted and passed to submitFunction from the configuration used
               to generate the ModelSubmit object.
                runTime
                runCode
                name
        :param resubmit -- if provided command to resubmit the calling script.
        :param dryRun (optional; default False). If True don't submit any runs though do create them.
        :param verbose (optional: default None). If set override value in self.
        :param cost (optional: default False) -- compute and store the cost in the configuration. (Only some algorithms will produce a cost)
        :param scale -- (optional: default True) -- when computing costs apply scaling to transform matrix and cost.
        :param args: unnamed arguments passed into submitFn
        :param kwargs: keyword arguments passed into submitFn
        :return: status of submission (depends on submit function), number of models passed to submit, and configuration.

             status True -- all OK; False -- something went wrong!


        Extract the Obs used in the *individual* simulations
        No ensemble averaging is done. (and you need the param data to work out which ensemble is which)
        :param scale (optional; default = True).
        :return: pandas dataframe of observations


        Add information on cost to configuration and return modified config.
        :param config -- configuration to be copied and have cost added in. Also stores
           best evaluation.

        :param scale (default True). If True scale covariance matrix and data for cost calculation.
        :param filename (default None). If set then new config will be saved to this file.
        :returns finalConfig -- the following methods will then work on it:

           finalConfig.cost() -- the cost for all model simulations.
           final.getv('bestEval') -- the  best evaluation over all model simulations.
              Note these are not the same as ensemble averages used within various algorithms.


        **copy** config and add parameters and obs to it . Config is returned and maybe saved if filename provided.
        :param config: the configuration on which the run was based on
        :param filename (default None). If set then new config will be saved to this file.

        TODO: Move to runSubmit as it is really there for the "run" cases.
        :return: modifed config. The following methods will work:
            finalConfig.parameters() -- returns the parameters for each model simulation
            finalConfig.simObs() -- returns the simulated observations for each model simulation.


        :param params: (optional -- default None). If params are set then observations (if provided) will be set for that value
           if not set then all observations will be returned. params should be a pandas series.
        :param obs: (optional -- default None). If set then params must be set and these values will be set.
          If not set then obs will be returned. obs should also be a pandas series. When returning a dataframe the series name will be the index.
        :param clear: (optional -- default False). If True remove all previously stored obs.
        :return: the observations & parameters for the specified parameters as a pandas series or all observations/parameters as a pandas dataframe.


        Standard Function used for framework. Returns values from cache if already got it.
          If not got cached model then raises runModelError exception
           after adding required model to list of models to be submitted.
          If multiple ensemble members being asked for will run each one and average.
          If any obs values are nan in the ensemble then the average value for that obs will be nan.

        It is a method rather than a class function as it makes use of some information in the object.
        So to actually get used as a function it needs to be converted to a function. This is done by genOptFunction which
          uses partial.function to do it. But this function does all the work.

        :param params -- a numpy array with the parameter values.
                These parameters should  be ordered as in self.paramNames()
        :param df (default True) -- If True return all obs (read in after processing) as a dataframe.

        :param raiseError (default True) -- raise exceptions.runModelError  if this is True.
                This should cause generation & submission of models that need running.
                Else return array full of nans.

        :param verbose (default False) -- be verbose when running.

        For the four  parameters below they are applied in the order: scale, residual, transform, sumSquare
        :param scale  (default True) -- if True scale obs  by self.scales()

        :param residual (default False) -- if True remove target (self.target()) from obs

        :param transform (default None) -- if provided transform the model obs by matrix multiplying them by this matrix.
                  It should be  N*nobs where nobs are the number of sim ons and  0 <= N <= nobs.
                  One application of this is to transform the data into a basis of eigenvectors of an
                    error covariance matrix. The transform matrix should be provided as a pandas datarray.
                  Column names being the obs names. Index being sensible labels for rows which will be new obs names.
                  Do be careful to make sure transform has same scaling as here...

        :param sumSquare (defaultFalse) -- if True return the sum of squares of the observations after any processing.

        Using stdFunction -- this  is a method as it needs to know various bits of information contained in ModelSubmit..
        To actually use it with optimisation function you need to call ModelSubmit.genOptFunction(**kwargs).
        That will give you a function suitable for many optimisation functions.  If you have more complex needs you
          likely need to add the runSubmit object to the list of arguments and then do runSubmitObs.stdFunction(.... )
          This might require you to create  a partial function. Your life will probably be easier if you set df=True
          and work with dataframes in your function.
        TODO use "random" perturbation approach to find how many parallel cases we can run.
        TODO support ensembles without averaging -- i.e. they just come back. Useful for applications like
          Ensemble Kalman Filter


        :return: a function suitable for use in an optimisation  algorithm (or anything else that uses the framework).
        by generating a partial function which converts stdFunction from a method to a function in the argument list
        and any adds extra args (as named arguments) that are present. You can use this to give you something suitable
        for most optimisation methods or use your own function to wrap stdFunction.


        :arg self
        Run optimised case using reference model which may be potentially different from configuration used to optimize.
        Cares about number of ensemble members (default is 1 if not set) and the optimum parameters which should be set.

        One issue is what to name it. As things stand it is up to the user. They should also set maxDigits sensibly.
        For the UM the sum of length of baseRun & maxDigits should  be 5 or less.
        TODO: Modify the HadAM3 class so it enforces this.

        :param optConfig -- configuration where optimum value is. If None (default) then config as used in runSubmit
          init will be used.  If optConfig is provided *only* the optimum value will be used.


        Generate perturb param values  towards the centre of the valid range for each
        parameter. Used in runJacobian

        Inputs

            arg: self -- Submit object.
            arg: baseVals: parameters at which Jacobian computed at.
            arg: parLimits: dataset max,min limits. parLimits.loc[:,'maxParm'] are the max values;
              parLimits.loc[:,'minParam'] are the min values;
            arg: steps: stepsizes for each parameter.

        Inputs, except parLimits, are all pandas series
        Returns pandas series array defining the perturbed parameter  offset. No checks are made to see
          if those choices are in range.


        run Jacobian cases.
        Rather crude (first order accurate) estimate. Evaluates functions at
          optimum values +/- delta where delta is specified in the StudyConfig used to generate Submit
          +/- is to keep perturbations towards the centre pf the domain.
        A more accurate version would run 2nd order differences around the base point.
        But (as yet) no need for this so not implemented. Probably best done with a centred option.
        The Jacobian computed is the transformed Jacobian. (Apply Transpose matrix).
        TODO:put this under configuration control.

        :arg self -- a Submit object.
        :arg optConfig (optional). If not None (default) then use optimum value in this config to
           perturb jacobian around. All other values -- particularly steps and boundaries will be taken from
           config used to generate runSubmit.
        :returns a configuration. The following methods should work on it:
                return: finalConfig -- a studyConfig. The following methods should give you useful data:

                finalConfig.transJacobian() -- the  transformed Jacobian matrix at the optimum pt
                finalConfig.hessian() -- the  hessian computed from J^T J at the optimum pt.

            runs runConfig to provide generic info. (See documentation for that)


        run DFOLS algorithm. It runs until new models need to be ran or DFOLS complets.
                If new models are needed then runModelError will be raised.
                DFOLS raises np.linalg.linalg.LinAlgError if it tries to do calculations with nan (which is what it gets
                when model has not been ran). This then triggers a runModelError. The callee of this method
                should trap that error and then run the necessary models using Submit.submit.

        :param scale (default True). If True scale data for transform matrix and in calculations of obs
        See StudyConfig.scalings()
        It should not make any difference if scale is True or False. But if regularisation is done
        then it is better to have all (diagonal) elements of the covariance matrix have roughly the same mag
        which is really what scaling does for you. (for example converting kg/sec/m^2 to mm/day). Current implementation
        of tranMatrix does truncates removing all evectors and evalues when evalues < 1E-6 * max(evalues)

        return: finalConfig -- a studyConfig. The following methods should give you useful data:

                # Generic stuff (that is probably more useful)
                finalConfig.transJacobian() -- the final transformed Jacobian matrix at the optimum pt
                finalConfig.hessian() -- the final hessian computed from J^T J at the optimum pt.
                finalConfig.get_dataFrameInfo('diagnostic_info') -- Diagnostic info from DFOLS. See DFOLS documentation.
                finalConfig.optimumParams() -- optimum parameters.

            also can get generic info and cost info:
            runs runCost & runConfig to provide  info. (See documentation of those methods for what they provide)


        param: verbose if True produce more verbose output.
        param: scale if True apply scaling (default is True)
        Run Gauss Newton algorithm as used in Tett et al, 2017.
        return: finalConfig -- a studyConfig. The following methods should give you useful data:
                finalConfig.GNparams() -- the best parameters (min error)
                finalConfig.GNcost() -- the cost for each function evaluation
                finalConfig.GNalpha() -- the values of alpha used for next optimisation in the linesearch
                finalConfig.GNhessian() -- the diagnosed Hessians (in transformed space) at each iteration
                # Generic stuff (that is probably more useful)
                finalConfig.transJacobian() -- the final transformed Jacobian matrix at the optimum pt
                finalConfig.hessian() -- the final hessian computed from J^T J at the optimum pt.
                finalConfig.optimumParams() -- optimum parameters.

            also can get generic info and cost info:
            as runs runCost & runConfig to provide  info. (See documentation of those methods for what they provide)


Run doDFBOLS  and package results up in a dictionary


    Wee test fn for trying out things.
    :param params -- numpy array of parameter values
    :param config -- configurations -- default is None. If not available then fn will crash.
    :param verbose -- if True print out more information.
    :param var_scales -- scales to apply to variables.
        Should be a pandas series. If not provided no scaling will be done
    :param rng -- random number generator. Default None
      If provided than random multivariate noise  based on the internal variance covariance will be added.

    for everything but params given design of optimisation algorithms you will need to find a way of getting
      the extra params in. One way is to make a lambda fn. Another is to wrap it in a function.

    returns  "fake" data. If params is a pandas series then result will be a pandas series.


    Fake model -- computes obs without running! uses bare_fn to actually compute values.
    Fake model values -- uses fn to actually compute values but modifies slightly. (defined above)

    :param model: model that we are running.
    :param studyCfg: study configuration -- which contains much useful information
    :param verbose (optional) If True (default is False) more information will be printed out.
    :param var_scales -- scaling applied to each obs -- used by bare_fn.  See that for documentation.
    :param rng -- random number generator. See bare_fn to see what this does
    :return: simulated observations as a pandas series


    Submit models to arc,  and the next iteration in the algorithm.
    :param model_list: a list of model configuration to submit
    :param config: study configuration file
    :param rootDir: root directory where files etc are to be created and found
    :param args -- the arguments that the main script was called with.
    :param resubmit -- default None. If not None next iteration cmd to be submitted.
        Normally should be the script the user ran so next stage of model running happens.
    :param runCode -- default None, If not none specifies the project code.
    :return: status of submission

    Does the following:
        2) Submits (if provided) resubmit so once the array of post processing jobs has completed the next bit of the algorithm gets ran.
        3) Submits the model simulations

    This algorithm is not particularly robust to failure -- if anything fails the various jobs will be sitting around
    Releasing them will be quite tricky! You can always kill and run again!


    Submit models to eddie, the post processing and the next iteration in the algorithm.
    :param model_list: a list of model configuration to submit
    :param config: study configuration file
    :param rootDir: root directory where files etc are to be created and found
    :param verbose: be verbose
    :param postProcess If true submit postprocessing.
    :param args -- the arguments that the main script was called with.
    :param resubmit -- default None. If not None and postProcess next iteration cmd to be submitted.
          Normally should be the script the user ran so next stage of model running happens.
        post processing will be submitted the main script will not be submitted. For dummy submission this doesn't do much!
    :param Submit -- default True. If False then no jobs will be submitted.
    :param archiveDir -- default None. If not none then where data should be archived too. TODO: write code.
    :return: status of submission

    Does the following:
        1) Submits the post processing jobs as a task array in held state.
        2) Submits (if provided) resubmit so once the array of post processing jobs has completed the next bit of the algorithm gets ran.
        3) Submits the model simulations -- which once each one has run will release the appropriate post processing task

    This algorithm is not particularly robust to failure -- if anything fails the various jobs will be sitting around
    Releasing them will be quite tricky! You can always kill and run again!


    Applies desired perturbations (steps) to the initial set of parameter
    values to return the parameter sets required for the GaussNewton phase
    of an iteration.

    The perturbations are towards the centre of the valid range for each
    parameter

    Inputs

         baseVals: array of parameters for the first of the GN runs (unperturbed)

         parLimits: max,min as read from JSON into 2-D array,
                    and passed through to here unaltered

         steps: array of stepsizess for each parameter.

         nrandom: perturb nrandom parameters rather than the full set.
         deterministic: optional argument with default value True -- make random choice of parameters deterministic.
            deterministic will be added to the RNG seed. So to modify what you get change the value of deterministic.
            It is a bit of a hack though...

         trace: Optional argument with default value False.
                Boolean -- True to get output, False no output

    Note inputs are all arrays, with data in order of the parameter list.

    Returns
          y: array defining the next set of parameter values
             with dimensions (nparameters+1, nparameters) with each row corresponding to a
             single simulation.


    the function doDFBOLS computes status, err, err_constraint, v_err for use by Fortran code.
    (SFBT thinks it should call the Fortran code itself...and then return the next set of parameters)
    Current code is a stub as it doesn't actually call DFBOLS.

    :param param_value: numpy array of parameter values.
    :param param_range: 2D numpy  array of min/max of range for each parameter.
      param_range[:,0] is the min value, param_range[:,1] the maximum value.
      Q: Should this be passed through studyJSON as property of optimisation rather than framework?
    :param UM_value: array of simulated observables
    :param obs: array of target values -- should contain same number of elements as columns in UM_value

     param_value & UM_value are ordered such that rows correspond to different simulations and
     columns to parameters and simulated observations respectively.

    :keyword  cov: covariance array
                    Default is identity matrix
    :keyword scalings: observables are related arrays get scaled before statistical analysis
                Default value is 1.
    :keyword olist: name of the observables. Default values are obs1..obsN where N is number of oBs.
    :keyword constraint: Value of simulated constraint. Should be
       present if studyJSON has sigma True
    :keyword constraint_target: Value of target value for simulated constraint. Should be present if studyJson has sigma True
    :keyword studyJSON The optimisation control specified as a dict. Contains the following values:
        sigma         -- If true then constraint is used.
        mu            -- weighting on constraint. (wt is sqrt(1/2mu)). Default is 1.
        covar_cond    -- if specified used by regularize_cov (qv) to regularize covariance

    :keyword trace: turn on/off trace of what happening. Default is False. Set True to get some tracing.

    :returns status: Status of calculation
    :returns v_err -- errors scaled by 1/diagonal of covariance matrix.
    :returns err: Error values for each simulation.
    :returns err_constraint: Constrained error for each simulation
    :returns info: dictionary of data destined for json file.
       diag: Diagonal values
       software_vn sofware version
       revision  software revision,
       SvnURL URL to SVN repository
       scalings: Scalings applied to data.
       olist: names of variables
       params: A dictionary of the  actual parameters (or defaults used) from studyJSON


Run gaussnewton (or ref_doGaussNewton) and package results up in a dictionary


        Convert obj into something that can be converted to JSON
        :param obj -- object to be converted
        :return "primitive" objects that can be converted + type of object


        Read configuration file
        :param verbose (Default = False) if set then print out more information
        :return: configuration


        Read in information on modelSimulation
        :param obsNames -- obs names being used -- if set will override original config
        :param ppOutputFile -- name of post processing output file. If set overrides original config
        :param update (default = False) -- this model sim can be updated if true
        :param  verbose(default = False) be verbose
        :return:


        Create (in filesystem) a model simulation. After creation the simulation will be read only.
        :param parameters -- dict of parameter names and values OR pandas series.
        :param ppExePath --  path to post processing executable -- Default None
        :param obsNames -- list of observations being used. -- Default None
        :param  name ((optional)) -- name of the model simulation. If not provided will be taken from dirPath
        :param  ppOutputFile (optional)  -- name of output file where output from postprcessing is (default comes from config)
        :param refDirPath (optional) -- reference directory. Copy all files from here into dirPath
        :param  verbose (optional) -- if true be verbose. Default is False


        Provide path for refdir
        :return: name of the reference directory or None


Return the name of the Model Configuration


        Return the name of the file to be produced by the post Processing
        :param file -- if defined set value for ppOutputFile to file.
        :return:


        Return the name of the post processing executable file.
        :return:


        Read the post processed data.
         This default implementation reads netcdf, json or csv data and
         stores it in the configuration
        :param obsNames: If not None then return the defined names. Any missing are set to None/np.nan
        :param series , If true return a pandas series containing the values.
        :param flush. If True flush the cached data and read data
        :return: a dict of observations (or pandas series) wanted. Values not found when requested will be set to None.


        Write the observations to file. Type of file determines how write done
        :param obs -- observations (dict with keys obsNames) (or pandas series)
        :param verbose: (default False) be verbose if True
        :return: nada!


        Register a function to process meta parameters
        The function should take three  argument -- a value for forward call and a dict with names and values for inverse call
        , a named argument inverse with default False, and a named argument namelist. value should be optional and default value is something sensible.
        It should return a dict of values keyed by namelist tuple.
        TODO: Add an example of how this works -- see test_modelSimulation.py
        :param varName: name of meta parameter
        :param function: Function to register
        :param verbose: be verbose. Default is False
        :return: nothing


        Generate a conversion list for use in converting model parameter names to namelist values.
         Recommended approach if have a easy case with one framework variable matching directly to
         one namelist variable.
        :param param: the name of the parameter (as a string)
        :param nameListVar  :  variable name in the namelist
        :param nameListName: name of namelist
        :param nameListFile: Paths *relative* to the configuration dir for file containing namelist
        :param verbose (optional -- default = False) be verbose if True
        :return: a named tuple containing variable, namelist and file.


        Apply transformation functions to meta parameters
          :param verbose: optional default is False. If True be verbose.
          :param fail: optional default is False. If true fail if parameter not found
          keywords are parameters and value.
        :return: returns dict of keys (which should be named tuple defining namelist var, namelist and file)  and their values,
            and list of meta parameters that were used.


        Modify existing namelist files using information generated via genConversion
        Existing files will be copied to .bak
        :param verbose (optional -- default is False). If True provide more information on what is going on.
        :param fail (optional default is False). If True fail if a parameter not found.
        :keyword arguments are parameters and values.
        :return:  ordered dict of parameters and values used.


        Read parameter value from registered namelist
        :param fail: If True fail if param not found
        :param verbose (Optional -- default False). Provide verbose information.
        :param params -- a list of parameters.
        :param full -- return namelist rather than interpreted parameters. Allows testing.
        :example self.readNameList(['RHCRIT', 'VF1'])
        :return:An OrderedDict with the values indexed by the param names


        Read single parameter specified via named tuple defining namelist variable

        :param verbose: default False. If True be verbose
        :param NameListVars: list of namelist variables to be retrieved
        :return: an ordered dict indexed by namelist info (if found) with values retrieved.


        Retrieve value of meta parameter  by reading namelists and running inverse function.
        :param param:  name of meta-parameter
        :param verbose: be verbose
        :param full: do not run inverse function -- return all values.
        :return:  value of meta-parameter


:return: list of all parameter names -- suitable  for passing through.


        provide current value of runStatus -- useful for dealing with model failures.
        This is persistent as status is stored in the configuration.,
        :param value: set runStatus to this value if not None.
           Allowed values are come from self.SubmitFiles
           This is used by the submit method to decide what script to submit.
        :return:  current value of runStatus with default value of 'start'


        Default continue simulation. Will modify the configuration so that next time it is submitted
          it will be a continuation case rather than a new simulation. History information will be updated.
        This is useful when the simulation has crashed and can safely be continued.
        :return: list of all timestamps when runs set for continuation


        Restart simulation. This is useful if the model  crashed because it ran out of
          time and needs restarting but cannot be continued safely.
          This will start the run again from scratch.
        :param verbose -- If True (default is False) print out some information.
        :return: list of all restarts -- gives times when model has been restarted


        Work out new values for parameters for perturbation. Algorithm just keeps adding parameters perturbing them
        :param verbose: be verbose if True
        :param pScale: How much to scale parameters
        :return: modified parameter dict.


        Perturb configuration. This method updates config info & history info by list of parameters perturbed.
          It does not modify runStatus. This is useful if the model crashes and needs rerunning with a perturbation.
        :param params -- parameters to perturb. If not set then the list of previous perturbations will be returned
          and nothing will be changed in the configuration.
        :param verbose -- be verbose. Currently does nothing..

        :return: list of perturbations.


        Provides full path to submit script AND makes it executable if it exists.
        :param runStatus -- If 'start' return path to new submit script
                            If 'continue' return path to continuation submit script (defined in self.SubmitFile)
                            If None then use value from runStatus method to chose.
         new submit and continue submit are both defined in self.SubmitFile
        :return: path to appropriate submit script that should be ran to submit the model


        Used by the submission system to allow the post-processing job to be submitted when the simulation
        has completed. As needs to be implemented for each model  this abstract version just raises an
        NotImplementedError with message to create version for your model.

        :param postProcessCmd -- a string which is the postProcessCmd. For example qrls XXXX.n
        :return -- the path to the file that was created/modified. (could be a list or something else)


        Work out namelists etc to be changed
        Returns dict indexed by filename with nl info as values.
        TODO add test for this case
        :return:


 Read data from netcdf runFile and
        return simulated observations and constraint as pandas series
     :param runFile - name of netcdf file containing simulated observables
     :param obsNames  list of observations wanted
     :param constraintName (optional) name of constraint wanted
     :param trace  (optional with default  False). If true produce more output
     :param allowNan (optional with defaiut False). If true return nan where no data for variable (or file missing everything is nan)


    Do one iteration of Gauss-Newton LineSearch algorithm
    :param function: function that is being optimised.
    :param startParam: Start parameters for iteration -- a numpy array of length M

    :param paramDelta: Size of perturbations
    :param paramRange: allowed range for parameter values.
    :param targetObs: Target Observations -- a numpy vector of length N

    optional arguments. Default None unless otherwise specified

    :param startObs: Simulated obs for startParam -- if None will be calculated.
    :param covTotal: total observational covariance -- will be Identity matrix
    :param covInt: Internal var observational covariance matrix -- will be Identity matrix
    :param scaling. If None then no scaling done.
    :param nrandom: How many random parameters to perturb. If not specified all are perturbed.
    :param rngSeed: (Default 0): Seed (combined with parameter values) for RNG used to generate param pert.
    :param extraArgs: (Default empty list): extra arguments  passed into funcion.
    :param covar_cond: Tgt Condition number of covariance matrix after regularization.
    :param hessian_regularize. Two element tuple of  reg_crit_cond, reg_pow_range
    :param minImprovement (Default 0). Minimum improvement needed for progress.
    :param chisqCrit (default is None). If set as two element tuple these are the p-values
       for agreement with startObs (status stalled) or agreement with targetObs (status suceeeded)
    :param verbose: Provide verbose output.

    This function uses the logging package (info) to produce output. To see it turn on logging!
    :return: nextStartParam, status, cost, nextObs, info
        nextStartParam -- next start parameter vector (previous one if stalled or failed)
        cost -- cost function of nextStartParam.
        nextObs -- simulated observed values from best optimisation.
        info -- information.


    :param scales: Scalings to apply to data
    :param obs: Observations to be scaled
    :param simObs: Simulated Observations to be scaled
    :*param covariances: Covariances to be scaled
    :return:  returns scaled obs, simObs and covariances


    :param scales: Scalings to apply to data
    :param obs: Observations to be scaled
    :*param covariances: Covariances to be scaled
    :return:  returns scaled obs, simObs and covariances


    :param scales: Scalings to apply to covariances
    :*param covariances: Covariances to be scaled
    :return:  returns scaled covariances


    compute Jacobian from given function. Really a fairly thin layer to allow optimise dict to be unpicked.
    :param function: function to be ran -- should call appropriate model simulations
    :param startParam:  start parameter as a pandas Series
    :param deltaParam:  perturbations as a pandas Series
    :param paramRange: paramRange as a pandas dataFrame

    TODO: Remove this code -- functionality gone to Submit (and should really go in a module of its own)

    Other unnamed arguments are passed to jacobian (and then to function)

    :keyword args

    :param obsNames (default None). Names of observations -- used to label the xarray. If not passed then will be 0,1,2...
    :param nEnsemble (default 1). Jacobian will be computed multiple times with parameter ensembleMember=X being passed to function.
    :param verbose (default False). If set then more verbose information
    :param returnVar (default False). If true then return the variance.

    other keyword arguments are passed to function.

    :return: jacobian (wrapped as an xarray)


    the function doGaussNewton does the  calculation for the n+1 initial runs in an iteration,
    and can be invoked from (usually) makeNewRuns, using data from studies, or from
    test python scripts for arbitrary inputs.
    TODO: update documentation
    TODO: Move all json stuff up a level.
    TODO: ideally remove all reference to constraint as that can be done up a level too,

    :param param_value: numpy array of parameter values.
    :param param_range: 2D numpy  array of min/max of range for each parameter.
      param_range[:,0] is the min value, param_range[:,1] the maximum value.
      Q: Should this be passed through studyJSON as property of optimisation rather than framework?
    :param optFunction -- function that is being optimised.

    :opt-param cov: covariance array (header defines the observables in use)
                    Default is identity matrix
    :opt-param scalings: observables are related arrays get scaled before statistical analysis
                Default value is 1
    :opt-param olist: name of the observables. Default values are obs1..obsN where N is number of oBs.
    :opt-param constraint: Value of simulated constraint.
    :opt-param constraint_target: Value of observed constraint. BOTH constraint and constraint_target should be   present if studyJSON has sigma True
    :opt-param studyJSON The optimisation control specified as a dict. Contains the following values:
        alphas        -- alpha values used in linesearch. Default values are 0.3, 0.7 and 1.
        sigma         -- If true then constraint is used. Default is False
        mu            -- weighting on constraint. (wt is sqrt(1/2mu)). Default is 1.
        covar_cond    -- if specified used by regularize_cov (qv) to regularize covariance
        reg_crit_cond -- critical condition number for regularisation of Hessian. Default is 10e10.
        reg_pow_range -- range of powers used to generate list of powers in regularisation. Default is (-7,-2)

    :opt-param trace: turn on/off trace of what happening. Default is False. Set True to get some tracing.

    :returns: linesearch: array defining the next set of parameter values. Each row corresponds to parameter set.
    :returns: err: Error values for each simulation.
    :returns: err_constraint: Constrained error for each simulation
    :returns info: dictionary of data destined for json file.
       hessian: An array of the regularised hessian matrix.
       jacobian: An array of the Jacobian matrix
       InvCov: An array of the Inverse Covariance matrix (after possible regularisation)
       condnum: The Condition Number of the regularized hessian matrix.
       software: A string with info on the software
       scalings: Scalings applied to data.
       olist: names of variables
       params: A dictionaary of the  actual parameters (or defaults used) from studyJSON


    Read a configuration and return object of the appropriate version.
    :param filename: name of file (or filepath) to read.
    :param ordered:  read in as a ordered dict rather than a dict.
    :return: Configuration of appropriate type


        If CovObsErr and CovIntVar are both specified then CovTotal will be computed from
        CovObsErr+2*CovIntVar overwriting the value of CovTotal that may have been specified.
        Unspecified values will be set equal to None.
        If CovIntVar is not present it will be set to diag(1e-12)
        If CovTotal is not present it will be set to the identity matrix

        :param obsNames: Optional List of observations wanted and in order expected.
        :param trace: optional with default False. If True then additional output will be generated.
        :param dirRewrite: optional with default None. If set then rewrite directory names used in readCovariances.
        :param scale: if set true (default is false) then covariances are scaled by scaling factors derived from self.scales()
        :param constraint: is set to True  (default is None) then add constraint weighting into Covariances. If set to None then
           if configuration asks for constraint (study.sigma set True) then will be set True. If set False then no constraint will be set.
            Total and ObsErr covariances for constraint will be set to 1/(2*mu) while IntVar covariance will be set to 1/(100*2*mu)
            This is applied when data is returned. If you don't want constraint set then see StudyConfig.constraint method.

        :param CovTotal -- if not None set CovTotal to  value overwriting any existing values. Should be a pandas datarrray
        :param CovIntVar -- if not None set CovIntVar to value overwriting any existing values. Should be a pandas datarrray
        :param CovObsErr -- if not None set CovObsErr to value overwriting any existing values. Should be a pandas datarrray
         In setting values you can make CovTotal inconsistent with CovIntVar and CovObsErr.
         This method does not check this. You should also pass in unscaled values as scaling is applied on data
        No diagonalisation  is done to these value. Constraint, if requested, added on.
         Scaling is then applied to these values (or orginal values)
        :param read (default True)-- if True use readCovariances to read in the data in essence resetting covariances
        :return: a dictionary containing CovTotal,CovIntVar, CovObsErr-  the covariance matrices and ancillary data.
         None if not present.

        TODO: Modify internal var covariance matrix as depends on ensemble size.


        uses value of submitName to lookup function in fnTable and then returns function (or None)
        :return: the submission function


        Use value of optimiseFunction to look up and return function in fnTable

        :param: fnTable -- dict  of functions
        :return: optimisation function


        get the begin parameter values for the study. These are specified in the JSON file in begin block
        Any values not specified use the standard values
        :param values -- if not None then set begin values to this. This should be provided as a pandas series  Note no scaling is done.
            and initScale will be set False.
        :param paramNames: Optional names of parameters to use.
        :param scale (default False). If True scale parameters by their range so 0 is minimum and 1 is maximum
        :return: pandas series of begin parameter values.


        Get the pathname relative to the study directory of the cache file.
        This file holds information (directories in current design) on model simulation directories.
        :return:  filename relative to studyDir
        TOD: Don't think this used so remove it.


            Ecxtract comments from list or list like things
            :param inputList: input list
            :param tgt_end:  what is a comment (anythoing ending in this)
            :return: extract list.


The shape of the segmentation array.


The shape of the mask data array.


Create thread pool on first request
         avoids instantiating unused threadpool for blocking clients.


Builds a JSON POST object.

        If obj is None, return None.
        If obj is str, int, long, float, bool, return directly.
        If obj is datetime.datetime, datetime.date
            convert to string in iso8601 format.
        If obj is list, sanitize each element in the list.
        If obj is dict, return the dict.
        If obj is OpenAPI model, return the properties dict.

        :param obj: The data to serialize.
        :return: The serialized form of data.


Deserializes response into an object.

        :param response: RESTResponse object to be deserialized.
        :param response_type: class literal for
            deserialized object, or string of class name.

        :return: deserialized object.


Deserializes dict, list, str into an object.

        :param data: dict, list or str.
        :param klass: class literal, or string of class name.

        :return: object.


Makes the HTTP request (synchronous) and returns deserialized data.

        To make an async_req request, set the async_req parameter.

        :param resource_path: Path to method endpoint.
        :param method: Method to call.
        :param path_params: Path parameters in the url.
        :param query_params: Query parameters in the url.
        :param header_params: Header parameters to be
            placed in the request header.
        :param body: Request body.
        :param post_params dict: Request post form parameters,
            for `application/x-www-form-urlencoded`, `multipart/form-data`.
        :param auth_settings list: Auth Settings names for the request.
        :param response: Response data type.
        :param files dict: key -> filename, value -> filepath,
            for `multipart/form-data`.
        :param async_req bool: execute request asynchronously
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param collection_formats: dict of collection formats for path, query,
            header, and post parameters.
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return:
            If async_req parameter is True,
            the request will be called asynchronously.
            The method will return the request thread.
            If parameter async_req is False or missing,
            then the method will return the response directly.


Makes the HTTP request using RESTClient.


Get parameters as list of tuples, formatting collections.

        :param params: Parameters as dict or list of two-tuples
        :param dict collection_formats: Parameter collection formats
        :return: Parameters as list of tuples, collections formatted


Builds form parameters.

        :param files: File parameters.
        :return: Form parameters with files.


Returns `Accept` based on an array of accepts provided.

        :param accepts: List of headers.
        :return: Accept (e.g. application/json).


Returns `Content-Type` based on an array of content_types provided.

        :param content_types: List of content-types.
        :return: Content-Type (e.g. application/json).


Updates header and query params based on authentication setting.

        :param headers: Header parameters dict to be updated.
        :param querys: Query parameters tuple list to be updated.
        :param auth_settings: Authentication setting identifiers list.


Deserializes body to file

        Saves response body into a file in a temporary folder,
        using the filename from the `Content-Disposition` header if provided.

        :param response:  RESTResponse.
        :return: file path.


Deserializes string to primitive type.

        :param data: str.
        :param klass: class literal.

        :return: int, long, float, str, bool.


Return an original value.

        :return: object.


Deserializes string to date.

        :param string: str.
        :return: date.


Deserializes string to datetime.

        The string should be in iso8601 datetime format.

        :param string: str.
        :return: datetime.


Deserializes list or dict to model.

        :param data: dict, list.
        :param klass: class literal.
        :return: model object.


Perform requests.

        :param method: http request method
        :param url: http request url
        :param query_params: query parameters in the url
        :param headers: http request headers
        :param body: request json body, for `application/json`
        :param post_params: request post parameters,
                            `application/x-www-form-urlencoded`
                            and `multipart/form-data`
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.


The logger file.

        If the logger_file is None, then add stream handler and remove file
        handler. Otherwise, add file handler and remove stream handler.

        :param value: The logger_file path.
        :type: str


Debug status

        :param value: The debug status, True or False.
        :type: bool


The logger format.

        The logger_formatter will be updated when sets logger_format.

        :param value: The format string.
        :type: str


Gets Auth Settings dict for api client.

        :return: The Auth Settings information dict.


Gets the essential information for debugging.

        :return: The report for debugging.


Returns a string representation of a path


Add a container specification to Mozart  # noqa: E501

        Add a new container.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_get_container_add(name, url, version, digest, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str name: Container Name (required)
        :param str url: Container URL (required)
        :param str version: Container Version (required)
        :param str digest: Container Digest (required)
        :param str x_fields: An optional fields mask
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ContainerAddResponseJSON
                 If the method is called asynchronously,
                 returns the request thread.


Add a container specification to Mozart  # noqa: E501

        Add a new container.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_get_container_add_with_http_info(name, url, version, digest, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str name: Container Name (required)
        :param str url: Container URL (required)
        :param str version: Container Version (required)
        :param str digest: Container Digest (required)
        :param str x_fields: An optional fields mask
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ContainerAddResponseJSON, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.


Log HySDS custom event  # noqa: E501

        Logs a HySDS custom event  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_add_log_event(type, status, event, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str type: Event type, e.g. aws_autoscaling, verdi_anomalies (required)
        :param str status: Event status, e.g. spot_termination, docker_daemon_failed (required)
        :param str event: Arbitrary JSON event payload, e.g. {} or {         \"ec2_instance_id\": \"i-07b8989f41ce23880\",         \"private_ip\": \"100.64.134.145\",         \"az\": \"us-west-2a\",         \"reservation\": \"r-02fd006170749a0a8\",         \"termination_date\": \"2015-01-02T15:49:05.571384\"     } (required)
        :param str tags: JSON list of tags, e.g. [\"dumby\", \"test_job\"]
        :param str hostname: Event-related hostname, e.g. \"job.hysds.net\", \"192.168.0.1\"
        :param str x_fields: An optional fields mask
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: HySDSEventLogResponseJSON
                 If the method is called asynchronously,
                 returns the request thread.


Log HySDS custom event  # noqa: E501

        Logs a HySDS custom event  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_add_log_event_with_http_info(type, status, event, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str type: Event type, e.g. aws_autoscaling, verdi_anomalies (required)
        :param str status: Event status, e.g. spot_termination, docker_daemon_failed (required)
        :param str event: Arbitrary JSON event payload, e.g. {} or {         \"ec2_instance_id\": \"i-07b8989f41ce23880\",         \"private_ip\": \"100.64.134.145\",         \"az\": \"us-west-2a\",         \"reservation\": \"r-02fd006170749a0a8\",         \"termination_date\": \"2015-01-02T15:49:05.571384\"     } (required)
        :param str tags: JSON list of tags, e.g. [\"dumby\", \"test_job\"]
        :param str hostname: Event-related hostname, e.g. \"job.hysds.net\", \"192.168.0.1\"
        :param str x_fields: An optional fields mask
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(HySDSEventLogResponseJSON, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.


Submits a job to run inside HySDS  # noqa: E501

        Submit job for execution in HySDS.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_submit_job(type, queue, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str type: a job type from jobspec/list (required)
        :param str queue: Job queue from /queue/list e.g. grfn-job_worker-small (required)
        :param int priority: Job priority in the range of 0 to 9
        :param str tags: JSON list of tags, e.g. [\"dumby\", \"test_job\"]
        :param str name: base job name override; defaults to job type
        :param str payload_hash: user-generated payload hash
        :param bool enable_dedup: flag to enable/disable job dedup
        :param str params: JSON job context, e.g. {         \"entity_id\": \"LC80101172015002LGN00\",         \"min_lat\": -79.09923,         \"max_lon\": -125.09297,         \"id\": \"dumby-product-20161114180506209624\",         \"acq_time\": \"2015-01-02T15:49:05.571384\",         \"min_sleep\": 1,         \"max_lat\": -77.7544,         \"min_lon\": -139.66082,         \"max_sleep\": 10     }
        :param str x_fields: An optional fields mask
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: SubmitJobResponse
                 If the method is called asynchronously,
                 returns the request thread.


Submits a job to run inside HySDS  # noqa: E501

        Submit job for execution in HySDS.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_submit_job_with_http_info(type, queue, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str type: a job type from jobspec/list (required)
        :param str queue: Job queue from /queue/list e.g. grfn-job_worker-small (required)
        :param int priority: Job priority in the range of 0 to 9
        :param str tags: JSON list of tags, e.g. [\"dumby\", \"test_job\"]
        :param str name: base job name override; defaults to job type
        :param str payload_hash: user-generated payload hash
        :param bool enable_dedup: flag to enable/disable job dedup
        :param str params: JSON job context, e.g. {         \"entity_id\": \"LC80101172015002LGN00\",         \"min_lat\": -79.09923,         \"max_lon\": -125.09297,         \"id\": \"dumby-product-20161114180506209624\",         \"acq_time\": \"2015-01-02T15:49:05.571384\",         \"min_sleep\": 1,         \"max_lat\": -77.7544,         \"min_lon\": -139.66082,         \"max_sleep\": 10     }
        :param str x_fields: An optional fields mask
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(SubmitJobResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.


Add a HySDS IO specification  # noqa: E501

        Adds a hysds-io specification  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_add_hy_sdsio_type(spec, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str spec: HySDS IO JSON Object (required)
        :param str x_fields: An optional fields mask
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: HySDSIOAdditionResponseJSON
                 If the method is called asynchronously,
                 returns the request thread.


Add a HySDS IO specification  # noqa: E501

        Adds a hysds-io specification  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_add_hy_sdsio_type_with_http_info(spec, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str spec: HySDS IO JSON Object (required)
        :param str x_fields: An optional fields mask
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(HySDSIOAdditionResponseJSON, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.


Add a Job Type specification JSON object  # noqa: E501

        Adds a job type specification from JSON.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_add_job_spec_type(spec, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str spec: Job Type Specification JSON Object (required)
        :param str x_fields: An optional fields mask
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: JobTypeSpecificationAdditionResponseJSON
                 If the method is called asynchronously,
                 returns the request thread.


Add a Job Type specification JSON object  # noqa: E501

        Adds a job type specification from JSON.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_add_job_spec_type_with_http_info(spec, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str spec: Job Type Specification JSON Object (required)
        :param str x_fields: An optional fields mask
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(JobTypeSpecificationAdditionResponseJSON, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.


Gets the success of this ContainerInfoResponseJSON.  # noqa: E501

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :return: The success of this ContainerInfoResponseJSON.  # noqa: E501
        :rtype: bool


Sets the success of this ContainerInfoResponseJSON.

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :param success: The success of this ContainerInfoResponseJSON.  # noqa: E501
        :type: bool


Gets the result of this ContainerInfoResponseJSON.  # noqa: E501

        Container Info  # noqa: E501

        :return: The result of this ContainerInfoResponseJSON.  # noqa: E501
        :rtype: object


Sets the result of this ContainerInfoResponseJSON.

        Container Info  # noqa: E501

        :param result: The result of this ContainerInfoResponseJSON.  # noqa: E501
        :type: object


Gets the message of this ContainerInfoResponseJSON.  # noqa: E501

        message describing success or failure  # noqa: E501

        :return: The message of this ContainerInfoResponseJSON.  # noqa: E501
        :rtype: str


Sets the message of this ContainerInfoResponseJSON.

        message describing success or failure  # noqa: E501

        :param message: The message of this ContainerInfoResponseJSON.  # noqa: E501
        :type: str


Returns the model properties as a dict


Gets the success of this JobTypeListResponseJSON.  # noqa: E501

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :return: The success of this JobTypeListResponseJSON.  # noqa: E501
        :rtype: bool


Sets the success of this JobTypeListResponseJSON.

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :param success: The success of this JobTypeListResponseJSON.  # noqa: E501
        :type: bool


Gets the result of this JobTypeListResponseJSON.  # noqa: E501

        list of job types  # noqa: E501

        :return: The result of this JobTypeListResponseJSON.  # noqa: E501
        :rtype: list[str]


Sets the result of this JobTypeListResponseJSON.

        list of job types  # noqa: E501

        :param result: The result of this JobTypeListResponseJSON.  # noqa: E501
        :type: list[str]


Gets the message of this JobTypeListResponseJSON.  # noqa: E501

        message describing success or failure  # noqa: E501

        :return: The message of this JobTypeListResponseJSON.  # noqa: E501
        :rtype: str


Sets the message of this JobTypeListResponseJSON.

        message describing success or failure  # noqa: E501

        :param message: The message of this JobTypeListResponseJSON.  # noqa: E501
        :type: str


Gets the success of this JobTypeSpecificationRemovalResponseJSON.  # noqa: E501

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :return: The success of this JobTypeSpecificationRemovalResponseJSON.  # noqa: E501
        :rtype: bool


Sets the success of this JobTypeSpecificationRemovalResponseJSON.

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :param success: The success of this JobTypeSpecificationRemovalResponseJSON.  # noqa: E501
        :type: bool


Gets the message of this JobTypeSpecificationRemovalResponseJSON.  # noqa: E501

        message describing success or failure  # noqa: E501

        :return: The message of this JobTypeSpecificationRemovalResponseJSON.  # noqa: E501
        :rtype: str


Sets the message of this JobTypeSpecificationRemovalResponseJSON.

        message describing success or failure  # noqa: E501

        :param message: The message of this JobTypeSpecificationRemovalResponseJSON.  # noqa: E501
        :type: str


Gets the success of this ContainerRemovalResponseJSON.  # noqa: E501

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :return: The success of this ContainerRemovalResponseJSON.  # noqa: E501
        :rtype: bool


Sets the success of this ContainerRemovalResponseJSON.

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :param success: The success of this ContainerRemovalResponseJSON.  # noqa: E501
        :type: bool


Gets the message of this ContainerRemovalResponseJSON.  # noqa: E501

        message describing success or failure  # noqa: E501

        :return: The message of this ContainerRemovalResponseJSON.  # noqa: E501
        :rtype: str


Sets the message of this ContainerRemovalResponseJSON.

        message describing success or failure  # noqa: E501

        :param message: The message of this ContainerRemovalResponseJSON.  # noqa: E501
        :type: str


Gets the success of this JobTypeSpecificationResponseJSON.  # noqa: E501

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :return: The success of this JobTypeSpecificationResponseJSON.  # noqa: E501
        :rtype: bool


Sets the success of this JobTypeSpecificationResponseJSON.

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :param success: The success of this JobTypeSpecificationResponseJSON.  # noqa: E501
        :type: bool


Gets the result of this JobTypeSpecificationResponseJSON.  # noqa: E501

        Job Type Specification  # noqa: E501

        :return: The result of this JobTypeSpecificationResponseJSON.  # noqa: E501
        :rtype: object


Sets the result of this JobTypeSpecificationResponseJSON.

        Job Type Specification  # noqa: E501

        :param result: The result of this JobTypeSpecificationResponseJSON.  # noqa: E501
        :type: object


Gets the message of this JobTypeSpecificationResponseJSON.  # noqa: E501

        message describing success or failure  # noqa: E501

        :return: The message of this JobTypeSpecificationResponseJSON.  # noqa: E501
        :rtype: str


Sets the message of this JobTypeSpecificationResponseJSON.

        message describing success or failure  # noqa: E501

        :param message: The message of this JobTypeSpecificationResponseJSON.  # noqa: E501
        :type: str


Gets the success of this HySDSIOAdditionResponseJSON.  # noqa: E501

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :return: The success of this HySDSIOAdditionResponseJSON.  # noqa: E501
        :rtype: bool


Sets the success of this HySDSIOAdditionResponseJSON.

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :param success: The success of this HySDSIOAdditionResponseJSON.  # noqa: E501
        :type: bool


Gets the result of this HySDSIOAdditionResponseJSON.  # noqa: E501

        HySDS IO ID  # noqa: E501

        :return: The result of this HySDSIOAdditionResponseJSON.  # noqa: E501
        :rtype: str


Sets the result of this HySDSIOAdditionResponseJSON.

        HySDS IO ID  # noqa: E501

        :param result: The result of this HySDSIOAdditionResponseJSON.  # noqa: E501
        :type: str


Gets the message of this HySDSIOAdditionResponseJSON.  # noqa: E501

        message describing success or failure  # noqa: E501

        :return: The message of this HySDSIOAdditionResponseJSON.  # noqa: E501
        :rtype: str


Sets the message of this HySDSIOAdditionResponseJSON.

        message describing success or failure  # noqa: E501

        :param message: The message of this HySDSIOAdditionResponseJSON.  # noqa: E501
        :type: str


Gets the success of this ContainerListResponseJSON.  # noqa: E501

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :return: The success of this ContainerListResponseJSON.  # noqa: E501
        :rtype: bool


Sets the success of this ContainerListResponseJSON.

        if 'false', encountered exception; otherwise no errors occurred  # noqa: E501

        :param success: The success of this ContainerListResponseJSON.  # noqa: E501
        :type: bool


Gets the result of this ContainerListResponseJSON.  # noqa: E501

        list of hysds-io types  # noqa: E501

        :return: The result of this ContainerListResponseJSON.  # noqa: E501
        :rtype: list[str]


Sets the result of this ContainerListResponseJSON.

        list of hysds-io types  # noqa: E501

        :param result: The result of this ContainerListResponseJSON.  # noqa: E501
        :type: list[str]