cta_model.h File Reference

Interface description of the COSTA default model component. For user implementation see cta_usr_model.h. More...

#include "cta_handles.h"
#include "cta_datatypes.h"
#include "cta_functions.h"
#include "cta_treevector.h"
#include "cta_time.h"
#include "cta_obsdescr.h"

Go to the source code of this file.

Defines

#define I_CTA_MODEL_CREATE_SIZE   ( 0)
#define I_CTA_MODEL_CREATE_INIT   ( 1)
#define I_CTA_MODEL_FREE   ( 2)
#define I_CTA_MODEL_COMPUTE   ( 3)
#define I_CTA_MODEL_SET_STATE   ( 4)
#define I_CTA_MODEL_GET_STATE   ( 5)
#define CTA_MODEL_AXPY_STATE   ( 6)
#define CTA_MODEL_AXPY_MODEL   ( 7)
#define CTA_MODEL_SET_FORC   ( 8)
#define CTA_MODEL_GET_FORC   ( 9)
#define CTA_MODEL_AXPY_FORC   (10)
#define CTA_MODEL_SET_PARAM   (11)
#define CTA_MODEL_GET_PARAM   (12)
#define CTA_MODEL_AXPY_PARAM   (13)
#define CTA_MODEL_GET_STATESCALING   (14)
#define CTA_MODEL_GET_TIMEHORIZON   (15)
#define CTA_MODEL_GET_CURRENTTIME   (16)
#define CTA_MODEL_GET_NOISE_COUNT   (17)
#define CTA_MODEL_GET_NOISE_COVAR   (18)
#define CTA_MODEL_GET_OBSVALUES   (19)
#define CTA_MODEL_GET_OBSSELECT   (20)
#define CTA_MODEL_ANNOUNCE_OBSVALUES   (21)
#define CTA_MODEL_ADD_NOISE   (22)
#define I_CTA_MODEL_EXPORT   (23)
#define I_CTA_MODEL_IMPORT   (24)
#define CTA_MODEL_ADJ_SET_FORC   (25)
#define CTA_MODEL_ADJ_COMPUTE   (26)
#define CTA_MODEL_ADJ_PREPARE   (27)
#define I_CTA_MODEL_GETOBSLOCALIZATION   (28)
#define CTA_MODEL_SAVE_INTERNALSTATE   (30)
#define CTA_MODEL_RESTORE_INTERNALSTATE   (31)
#define CTA_MODEL_RELEASE_INTERNALSTATE   (32)
#define CTA_MODEL_SAVE_PERSISTENTSTATE   (33)
#define CTA_MODEL_LOAD_PERSISTENTSTATE   (29)
#define CTA_MODEL_NUMFUNC   (34)

Typedefs

typedef CTA_Handle CTA_Model
typedef CTA_Handle CTA_ModelClass

Functions

CTAEXPORT int CTA_Model_Create (CTA_ModelClass hmodcl, CTA_Handle userdata, CTA_Model *hmodel)
 Create a model instance.
CTAEXPORT int CTA_Model_Compute (CTA_Model hmodel, CTA_Time htime)
 Compute model for given timespan.
CTAEXPORT int CTA_Model_AddNoise (CTA_Model hmodel, CTA_Time htime)
 Add noise during during the given timespan at the Compute.
CTAEXPORT int CTA_Model_SetState (CTA_Model hmodel, CTA_TreeVector hstate)
 Set the internal state of the model.
CTAEXPORT int CTA_Model_GetState (CTA_Model hmodel, CTA_TreeVector *hstate)
 Get a copy of the internal state.
CTAEXPORT int CTA_Model_AxpyState (CTA_Model hmodel, double alpha, CTA_Handle hx)
 Perform axpy operation on the internal state.
CTAEXPORT int CTA_Model_GetStateScaling (CTA_Model hmodel, CTA_TreeVector *hscale)
 Get element-wise scaling for model state.
CTAEXPORT int CTA_Model_SetForc (CTA_Model hmodel, CTA_Time tspan, CTA_TreeVector hforc)
 Set the models forcings.
CTAEXPORT int CTA_Model_GetForc (CTA_Model hmodel, CTA_Time tspan, CTA_TreeVector *hforc)
 Get a copy of the values of the models forcings.
CTAEXPORT int CTA_Model_AxpyForc (CTA_Model hmodel, CTA_Time tspan, double alpha, CTA_TreeVector hx)
 Perform axpy operation on the models forcings.
CTAEXPORT int CTA_Model_SetParam (CTA_Model hmodel, CTA_TreeVector hparam)
 Set parameters of the model.
CTAEXPORT int CTA_Model_GetParam (CTA_Model hmodel, CTA_TreeVector *hparam)
 Get a copy of the parameters of the model.
CTAEXPORT int CTA_Model_AxpyParam (CTA_Model hmodel, double alpha, CTA_TreeVector hx)
 Perform axpy operation on the models parameters.
CTAEXPORT int CTA_Model_GetTimeHorizon (CTA_Model hmodel, CTA_Time tHorizon)
 Return the timehorizon on the model. The time horizon is the initial overal simulation span for which the mode is configured.
CTAEXPORT int CTA_Model_GetCurrentTime (CTA_Model hmodel, CTA_Time tCurrent)
 Return the current time of the model.
CTAEXPORT int CTA_Model_GetNoiseCovar (CTA_Model hmodel, CTA_TreeVector *hstmat)
 Get covariance matrix of noise parameters.
CTAEXPORT int CTA_Model_GetNoiseCount (CTA_Model hmodel, int *nnoise)
 Get number of noise parameters: the number of columns of the noise covariance matrix.
CTAEXPORT int CTA_Model_Free (CTA_Model *hmodel)
 Free model instance.
CTAEXPORT int CTA_Model_AnnounceObsValues (CTA_Model hmodel, CTA_ObsDescr hdescr)
 Announce to the model what observations will be requested.
CTAEXPORT int CTA_Model_GetObsValues (CTA_Model hmodel, CTA_Time htime, CTA_ObsDescr hdescr, CTA_Vector values)
 Get (interpolate) the models internal state to the observations described as specified in the observation description component.
CTAEXPORT int CTA_Model_GetObsLocalization (CTA_Model hmodel, CTA_ObsDescr hdescr, double distance, CTA_Vector locVecs)
 Get for each observation a localization scaling vector.
CTAEXPORT int CTA_Model_GetObsSelect (CTA_Model hmodel, CTA_Time htime, CTA_ObsDescr hdescr, CTA_String sselect)
 Get a query for the stochastic observer in order to filter out the observations that can actually be provided by the model.
CTAEXPORT int CTA_Model_SaveInternalState (CTA_Model hmodel, CTA_String *instanceID)
CTAEXPORT int CTA_Model_RestoreInternalState (CTA_Model hmodel, CTA_String instanceID)
CTAEXPORT int CTA_Model_ReleaseInternalState (CTA_Model hmodel, CTA_String instanceID)
CTAEXPORT int CTA_Model_SavePersistentState (CTA_Model hmodel, CTA_String filename, CTA_String instanceID)
CTAEXPORT int CTA_Model_LoadPersistentState (CTA_Model hmodel, CTA_String filename, CTA_String *instanceID)
int CTA_Model_Export (CTA_Model hmodel, CTA_Handle hexport)
 Export the whole internal state of a model This export function will export the whole state of the model such that a so called "restart" start from this point yielding the same results. There are no ruled on the format that is used to store the data. Various extra otions are valid but a model will in most cases support an export to a file and to a COSTA pack object.
int CTA_Model_Import (CTA_Model hmodel, CTA_Handle himport)
 Import the whole internal state of a model After the inport the models internal state is exactly the same as the point that the export was created using CTA_Model_Export.
int CTA_Model_AdjSetointForc (CTA_Model hmodel, CTA_ObsDescr hdescr, CTA_Vector vforc)
 bla HOMEWORK FOR JULIUS!
int CTA_Model_AdjPrepare (CTA_Model hmodel, CTA_Time time)
 bla HOMEWORK FOR JULIUS!
int CTA_Model_AdjCompute (CTA_Model hmodel, CTA_Time time)
 bla HOMEWORK FOR JULIUS!
int CTAI_Model_PerformTimesteps (CTA_Model hmodel, CTA_Function *function, CTA_Time htime, int mindBarrier)

Detailed Description

Interface description of the COSTA default model component. For user implementation see cta_usr_model.h.

Functions for creating and working with models. CTA_Model is the default class implementation for models.

Definition in file cta_model.h.


Define Documentation

#define CTA_MODEL_ADD_NOISE   (22)

Definition at line 68 of file cta_model.h.

#define CTA_MODEL_ADJ_COMPUTE   (26)

Definition at line 74 of file cta_model.h.

#define CTA_MODEL_ADJ_PREPARE   (27)

Definition at line 75 of file cta_model.h.

#define CTA_MODEL_ADJ_SET_FORC   (25)

Definition at line 73 of file cta_model.h.

#define CTA_MODEL_ANNOUNCE_OBSVALUES   (21)

Definition at line 66 of file cta_model.h.

#define CTA_MODEL_AXPY_FORC   (10)

Definition at line 51 of file cta_model.h.

#define CTA_MODEL_AXPY_MODEL   ( 7)

Definition at line 48 of file cta_model.h.

#define CTA_MODEL_AXPY_PARAM   (13)

Definition at line 54 of file cta_model.h.

#define CTA_MODEL_AXPY_STATE   ( 6)

Definition at line 47 of file cta_model.h.

#define CTA_MODEL_GET_CURRENTTIME   (16)

Definition at line 57 of file cta_model.h.

#define CTA_MODEL_GET_FORC   ( 9)

Definition at line 50 of file cta_model.h.

#define CTA_MODEL_GET_NOISE_COUNT   (17)

Definition at line 60 of file cta_model.h.

#define CTA_MODEL_GET_NOISE_COVAR   (18)

Definition at line 61 of file cta_model.h.

#define CTA_MODEL_GET_OBSSELECT   (20)

Definition at line 65 of file cta_model.h.

#define CTA_MODEL_GET_OBSVALUES   (19)

Definition at line 64 of file cta_model.h.

#define CTA_MODEL_GET_PARAM   (12)

Definition at line 53 of file cta_model.h.

#define CTA_MODEL_GET_STATESCALING   (14)

Definition at line 55 of file cta_model.h.

#define CTA_MODEL_GET_TIMEHORIZON   (15)

Definition at line 56 of file cta_model.h.

#define CTA_MODEL_LOAD_PERSISTENTSTATE   (29)

Definition at line 85 of file cta_model.h.

#define CTA_MODEL_NUMFUNC   (34)

Definition at line 87 of file cta_model.h.

#define CTA_MODEL_RELEASE_INTERNALSTATE   (32)

Definition at line 83 of file cta_model.h.

#define CTA_MODEL_RESTORE_INTERNALSTATE   (31)

Definition at line 82 of file cta_model.h.

#define CTA_MODEL_SAVE_INTERNALSTATE   (30)

Definition at line 81 of file cta_model.h.

#define CTA_MODEL_SAVE_PERSISTENTSTATE   (33)

Definition at line 84 of file cta_model.h.

#define CTA_MODEL_SET_FORC   ( 8)

Definition at line 49 of file cta_model.h.

#define CTA_MODEL_SET_PARAM   (11)

Definition at line 52 of file cta_model.h.

#define I_CTA_MODEL_COMPUTE   ( 3)

Definition at line 44 of file cta_model.h.

#define I_CTA_MODEL_CREATE_INIT   ( 1)

Definition at line 42 of file cta_model.h.

#define I_CTA_MODEL_CREATE_SIZE   ( 0)

Definition at line 41 of file cta_model.h.

#define I_CTA_MODEL_EXPORT   (23)

Definition at line 69 of file cta_model.h.

#define I_CTA_MODEL_FREE   ( 2)

Definition at line 43 of file cta_model.h.

#define I_CTA_MODEL_GET_STATE   ( 5)

Definition at line 46 of file cta_model.h.

#define I_CTA_MODEL_GETOBSLOCALIZATION   (28)

Definition at line 78 of file cta_model.h.

#define I_CTA_MODEL_IMPORT   (24)

Definition at line 70 of file cta_model.h.

#define I_CTA_MODEL_SET_STATE   ( 4)

Definition at line 45 of file cta_model.h.


Typedef Documentation

Definition at line 37 of file cta_model.h.

Definition at line 38 of file cta_model.h.


Function Documentation

CTAEXPORT int CTA_Model_AddNoise ( CTA_Model  hmodel,
CTA_Time  htime 
)

Add noise during during the given timespan at the Compute.

Note:
Noise is added in the compute-method
Parameters:
hmodel IO handle of model instance
htime I timespan for which to compute adding noise
Returns:
error status: CTA_OK if successful
int CTA_Model_AdjCompute ( CTA_Model  hmodel,
CTA_Time  time 
)

bla HOMEWORK FOR JULIUS!

Parameters:
hmodel I handle of model instance
Returns:
error status: CTA_OK if successful
int CTA_Model_AdjPrepare ( CTA_Model  hmodel,
CTA_Time  time 
)

bla HOMEWORK FOR JULIUS!

Parameters:
hmodel I handle of model instance
Returns:
error status: CTA_OK if successful
int CTA_Model_AdjSetointForc ( CTA_Model  hmodel,
CTA_ObsDescr  hdescr,
CTA_Vector  vforc 
)

bla HOMEWORK FOR JULIUS!

Parameters:
hmodel I handle of model instance
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_AnnounceObsValues ( CTA_Model  hmodel,
CTA_ObsDescr  hdescr 
)

Announce to the model what observations will be requested.

Before the compute method this method is used to announce what obeservation will be requested after the CTA_Model_Compute using the CTA_Model_GetObsvalues method.

For some simulation models it is more efficient to do a single simulation (a single CTA_Model_Compute call) for a particular simulation span then simulating the same simulation span in a number of steps (multiple CTA_Model_Compute calls).

This method can be used to announce for what observations the model must provide a prediction in advance. This method must be called prior to the CTA_Compute method and makes it possible to perform simulations over a longer time interval without the need to interupt the computations in order to get the predictions at intermediate time instances.

Notes on the behavior of the method:

  • The observation description used in the first CTA_Model_GetObsValues after the compute MUST be the same as the observation description used in the announce.
  • All observations that are announced MUST be in the timespan of the following CTA_Model_Compute.
  • The announced observations can only be retreved ONCE after the CTA_Model_Compute.
  • A CTA_Model_SetState or CTA_Model_AxpyState will reset the announced CTA_Model_AnnounceObsValues administration (since stored predictions might not be valid anymore)
Parameters:
hmodel I handle of model instance
hdescr I observation description component
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_AxpyForc ( CTA_Model  hmodel,
CTA_Time  tspan,
double  alpha,
CTA_TreeVector  hx 
)

Perform axpy operation on the models forcings.

Note:
AXPY: y=alpha*x+y. y corresponds to the models internal forcings. The adjustment to the forcings (alpha*x) is only valid for the given time span. Note that the model will use y(t)+x for the given time span where y(t) denotes the default forcings of the model.
Parameters:
hmodel IO handle of model instance (y)
tspan I time span for wich the given forcings are valid
alpha I scalar
hx I handle of forcings tree-vector x
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_AxpyParam ( CTA_Model  hmodel,
double  alpha,
CTA_TreeVector  hx 
)

Perform axpy operation on the models parameters.

Note:
AXPY: y=alpha*x+y where y corresponds to the models internal parameters.
Parameters:
hmodel IO handle of model instance (y)
alpha I alpha
hx I handle of treevector of parameters (x)
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_AxpyState ( CTA_Model  hmodel,
double  alpha,
CTA_Handle  hx 
)

Perform axpy operation on the internal state.

Note:
AXPY: y=alpha*x+y. y corresponds to the models internal state and x can be a state vector or a model
Parameters:
hmodel IO handle of model instance (y)
alpha I alpha
hx I handle of x (state or model)
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_Compute ( CTA_Model  hmodel,
CTA_Time  htime 
)

Compute model for given timespan.

Parameters:
hmodel IO handle of model instance
htime I timespan for which to compute
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_Create ( CTA_ModelClass  hmodcl,
CTA_Handle  userdata,
CTA_Model hmodel 
)

Create a model instance.

Parameters:
hmodcl I model class of new instance
userdata IO user data needed for creation (depends on modelclass)
hmodel O receives handle of new model instance
Returns:
error status: CTA_OK if successful
int CTA_Model_Export ( CTA_Model  hmodel,
CTA_Handle  hexport 
)

Export the whole internal state of a model This export function will export the whole state of the model such that a so called "restart" start from this point yielding the same results. There are no ruled on the format that is used to store the data. Various extra otions are valid but a model will in most cases support an export to a file and to a COSTA pack object.

Parameters:
hmodel I handle of model instance
hexport I target for export e.g. CTA_File or CTA_Pack
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_Free ( CTA_Model hmodel  ) 

Free model instance.

Note:
ONLY for Stochastic models.
Parameters:
hmodel IO handle of model instance, replaced by CTA_NULL on return
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_GetCurrentTime ( CTA_Model  hmodel,
CTA_Time  tCurrent 
)

Return the current time of the model.

Parameters:
hmodel I handle of model instance
tCurrent I time corresponding the the model state
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_GetForc ( CTA_Model  hmodel,
CTA_Time  tspan,
CTA_TreeVector hforc 
)

Get a copy of the values of the models forcings.

Note:
Optionally a tree-vector is created in that case the caller of this method is responsible for freeing that tree-vector. The input tree-vector must be compatible (same size and or composition) as the models internal tree-vector representing the forcings. If the forcings of the model are not constant for the given timespan the result is dependent on the model-implementation
If *hforc == CTA_NULL a new object is created, user is responsible for freeing this object.
Parameters:
hmodel I handle of model instance
tspan I timespan for wich the given forcings are valid
hforc IO receives models forcings, *hforc can be CTA_NULL on calling (see note)
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_GetNoiseCount ( CTA_Model  hmodel,
int *  nnoise 
)

Get number of noise parameters: the number of columns of the noise covariance matrix.

Note:
ONLY for Stochastic models.
Parameters:
hmodel I handle of model instance
nnoise O receives number of noise parameters
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_GetNoiseCovar ( CTA_Model  hmodel,
CTA_TreeVector hstmat 
)

Get covariance matrix of noise parameters.

Note:
ONLY for Stochastic models. The covariance matrix is represented by an array of tree-vectors (columns of the matrix) optionally a tree-vector is created in that case the caller of this method is responsible for freeing that tree-vector. The input tree-vector must be compatible (same size and or composition) as the models internal tree-vector.
If hstmat[icol] == CTA_NULL a new object is created, user is responsible for freeing this object.
Parameters:
hmodel I handle of model instance
hstmat O receives array of tree-vectors, *hstmat can equal CTA_NULL on calling (see note)
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_GetObsLocalization ( CTA_Model  hmodel,
CTA_ObsDescr  hdescr,
double  distance,
CTA_Vector  locVecs 
)

Get for each observation a localization scaling vector.

Parameters:
hmodel I handle of model instance
hdescr I observation description for which we want localization scaling vectors
distance I characteristic distance
locVecs O costa vector of handles to treevectors (scaling vectors). The treevectors are created when the indices are CTA_NULL on entry
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_GetObsSelect ( CTA_Model  hmodel,
CTA_Time  htime,
CTA_ObsDescr  hdescr,
CTA_String  sselect 
)

Get a query for the stochastic observer in order to filter out the observations that can actually be provided by the model.

Parameters:
hmodel I handle of model instance
htime I time instance
hdescr I observation description component
sselect O receives a query to filter out the observations, must exist before calling
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_GetObsValues ( CTA_Model  hmodel,
CTA_Time  htime,
CTA_ObsDescr  hdescr,
CTA_Vector  values 
)

Get (interpolate) the models internal state to the observations described as specified in the observation description component.

Note:
The interface supports a the time instance for time-interpolation. It depends on the model whether and how this is supported.
Parameters:
hmodel I handle of model instance
htime I time instance (for checking and time-interpolation if supported by model)
hdescr I observation description component
values O receives values of the models internal state corresponding to observations as described in hdescr
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_GetParam ( CTA_Model  hmodel,
CTA_TreeVector hparam 
)

Get a copy of the parameters of the model.

Note:
Optionally a tree-vector is created in that case the caller of this method is responsible for freeing that tree-vector. The input tree-vector must be compatible (same size and or composition) as the models internal tree-vector representing the parameters.
If *hforc == CTA_NULL a new object is created, user is responsible for freeing this object.
Parameters:
hmodel I handle of model instance
hparam IO receives model forcings, *hforc can equal CTA_NULL on calling (see note)
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_GetState ( CTA_Model  hmodel,
CTA_TreeVector hstate 
)

Get a copy of the internal state.

Note:
Optionally a tree-vector is created. In that case the caller of this method is responsible for freeing that tree-vector. The input state must be compatible (same size and or composition) as the models internal state.
If *hstate == CTA_NULL a new object is created, user is responsible for freeing this object.
Parameters:
hmodel I handle of model instance
hstate IO receives state of the model, *hstate can be CTA_NULL on calling (see note)
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_GetStateScaling ( CTA_Model  hmodel,
CTA_TreeVector hscale 
)

Get element-wise scaling for model state.

The values in the state-vector are compared on "importance" in various algorithms like RRSQRT and COFFEE. The model state holds in general various quantities like concentration, velicity, location etc in arbitrary units. The scaling vector (that can be model state dependend) makes it possible to meaningfull compare elements in the state-vector for importance. Various methods are available like a transformation to enery.

The scaling vector represents a diagonal scaling matrix but is respresented by a tree-vector.

Note:
The elementwise scaling is returned in the form of a tree-vector with same build-up as the tree-vector of the model state. The scaling vector is created whenever hscale==CTA_NULL on input, the caller is responsible for freeing this object.
Parameters:
hmodel I handle of model instance
hscale IO receives state scaling vector for the model state, hstate can be CTA_NULL on calling (see note)
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_GetTimeHorizon ( CTA_Model  hmodel,
CTA_Time  tHorizon 
)

Return the timehorizon on the model. The time horizon is the initial overal simulation span for which the mode is configured.

Parameters:
hmodel I handle of model instance
tHorizon I time horizon of model
Returns:
error status: CTA_OK if successful
int CTA_Model_Import ( CTA_Model  hmodel,
CTA_Handle  himport 
)

Import the whole internal state of a model After the inport the models internal state is exactly the same as the point that the export was created using CTA_Model_Export.

Parameters:
hmodel I handle of model instance
himport I handle with data created by CTA_MODEL_Export e.g. CTA_File or CTA_Pack
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_LoadPersistentState ( CTA_Model  hmodel,
CTA_String  filename,
CTA_String instanceID 
)
CTAEXPORT int CTA_Model_ReleaseInternalState ( CTA_Model  hmodel,
CTA_String  instanceID 
)
CTAEXPORT int CTA_Model_RestoreInternalState ( CTA_Model  hmodel,
CTA_String  instanceID 
)
CTAEXPORT int CTA_Model_SaveInternalState ( CTA_Model  hmodel,
CTA_String instanceID 
)
CTAEXPORT int CTA_Model_SavePersistentState ( CTA_Model  hmodel,
CTA_String  filename,
CTA_String  instanceID 
)
CTAEXPORT int CTA_Model_SetForc ( CTA_Model  hmodel,
CTA_Time  tspan,
CTA_TreeVector  hforc 
)

Set the models forcings.

Note:
Set the forcings (constant) for the given timespan. The model will fall back to its own forcings definition outside the given timespan.
Parameters:
hmodel IO handle of model instance
tspan I time span on which to set the forcing values
hforc I handle of vector with new forcings
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_SetParam ( CTA_Model  hmodel,
CTA_TreeVector  hparam 
)

Set parameters of the model.

Parameters:
hmodel IO handle of model instance
hparam I handle of parameters vector
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_Model_SetState ( CTA_Model  hmodel,
CTA_TreeVector  hstate 
)

Set the internal state of the model.

Note:
A copy of the state is set
Parameters:
hmodel IO handle of model instance
hstate I handle of new state
Returns:
error status: CTA_OK if successful
int CTAI_Model_PerformTimesteps ( CTA_Model  hmodel,
CTA_Function function,
CTA_Time  htime,
int  mindBarrier 
)

Generated on 4 Mar 2014 for OpenDA by  doxygen 1.6.1