cta_bb_modbuild_utils.h File Reference

#include <libxml/encoding.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xinclude.h>
#include <libxml/xmlwriter.h>
#include "cta.h"
#include "cta_xml.h"
#include "cta_bb_modbuild.h"

Go to the source code of this file.

Functions

char * BB_CopyText (const char *in)
 Copy a string.
void * BB_Realloc (void *memblock, size_t size)
 Reallocates a block of memory.
void * BB_Malloc (size_t nelem, size_t elsize)
 Allocates a block of memory.
void BB_Free (void *pntr)
 Frees a block of memory that is currently allocated.
int BB_Free_Model (BB_ModelPntr model)
 Frees a model that is currently allocated.
void BB_Free_StateExchange (BB_StateExchangePntr stateexchange)
 Frees a stateexchange that is currently allocated.
void BB_Free_Parameter (BB_ParameterPntr parameter)
 Frees a parameter that is currently allocated.
void BB_Free_Forcing (BB_ForcingPntr forcings)
 Frees a forcing that is currently allocated.
void BB_Free_Station (BB_StationPntr stations)
 Frees a station that is currently allocated.
int BB_State2Model (BB_ModelPntr model, double start, double stop, CTA_TreeVector sstate)
 Convert COSTA state vector to BB model.
int BB_Model2State (BB_ModelPntr model, double start, double stop, CTA_TreeVector *sstate)
 Convert BB model to COSTA state vector.
int BB_OpenModel2State (BB_ModelPntr model, CTA_Tree *htree)
 Open model2state file.
int BB_Model2StateByStationVariableTime (BB_ModelPntr model, CTA_Tree htree, char *station, char *variable, double time, double *value)
 Get value of BB model.
int BB_Run_Model (BB_ModelPntr model)
BB_ModelPntr BB_Read_Model (int simulationNumber, CTA_Tree hmodelinput, CTA_Handle *sstate, CTA_Handle *sparam, CTA_Handle *sforc)
void BB_CheckError (int ierr, const char *msg)
 Check for a COSTA error.

Function Documentation

void BB_CheckError ( int  ierr,
const char *  msg 
)

Check for a COSTA error.

Parameters:
ierr I COSTA error code
msg I Error message
Returns:
no return value
char* BB_CopyText ( const char *  in  ) 

Copy a string.

Parameters:
name I string to be copied
Returns:
copy of the string
void BB_Free ( void *  pntr  ) 

Frees a block of memory that is currently allocated.

Parameters:
pntr I starting address of the memory block to be freed
Returns:
no return value
void BB_Free_Forcing ( BB_ForcingPntr  forcings  ) 

Frees a forcing that is currently allocated.

Parameters:
pntr I starting address of the forcing to be freed
Returns:
no return value
int BB_Free_Model ( BB_ModelPntr  model  ) 

Frees a model that is currently allocated.

Parameters:
pntr I starting address of the model to be freed
Returns:
error status: CTA_OK, CTA_ILLEGAL_HANDLE
void BB_Free_Parameter ( BB_ParameterPntr  parameter  ) 

Frees a parameter that is currently allocated.

Parameters:
pntr I starting address of the parameter to be freed
Returns:
no return value
void BB_Free_StateExchange ( BB_StateExchangePntr  stateexchange  ) 

Frees a stateexchange that is currently allocated.

Parameters:
pntr I starting address of the stateexchange to be freed
Returns:
no return value
void BB_Free_Station ( BB_StationPntr  stations  ) 

Frees a station that is currently allocated.

Parameters:
pntr I starting address of the station to be freed
Returns:
no return value
void* BB_Malloc ( size_t  nelem,
size_t  elsize 
)

Allocates a block of memory.

Parameters:
nelem I Number of elements
elsize I Element size
Returns:
pointer to the allocated space
int BB_Model2State ( BB_ModelPntr  model,
double  start,
double  stop,
CTA_TreeVector sstate 
)

Convert BB model to COSTA state vector.

Parameters:
model I Pointer naar de model data
start I Simulatie starttijd in modified julian day
stop I Simulatie stoptijd in modified julian day
sstate O Pointer naar state vector
Returns:
error status: CTA_OK, CTA_ILLEGAL_HANDLE
int BB_Model2StateByStationVariableTime ( BB_ModelPntr  model,
CTA_Tree  htree,
char *  station,
char *  variable,
double  time,
double *  value 
)

Get value of BB model.

Parameters:
model I Pointer naar de model data
htree I Pointer naar costa tree
station I Name of the station
variable I Name of the variabele
time I tijdstip in MJD
value O waarde van de variabele op tijdstip van station
Returns:
error status: CTA_OK, CTA_ILLEGAL_HANDLE
int BB_OpenModel2State ( BB_ModelPntr  model,
CTA_Tree htree 
)

Open model2state file.

Parameters:
model I Pointer naar de model data
htree O Pointer naar costa tree
Returns:
error status: CTA_OK, CTA_ILLEGAL_HANDLE
BB_ModelPntr BB_Read_Model ( int  simulationNumber,
CTA_Tree  hmodelinput,
CTA_Handle sstate,
CTA_Handle sparam,
CTA_Handle sforc 
)
Parameters:
\return 
void* BB_Realloc ( void *  memblock,
size_t  size 
)

Reallocates a block of memory.

Parameters:
memblock I Pointer to previously allocated memory block
size I New size in bytes.
Returns:
pointer to the allocated space
int BB_Run_Model ( BB_ModelPntr  model  ) 
Parameters:
model I Pointer naar de model data
Returns:
error status: CTA_OK, CTA_ILLEGAL_HANDLE
int BB_State2Model ( BB_ModelPntr  model,
double  start,
double  stop,
CTA_TreeVector  sstate 
)

Convert COSTA state vector to BB model.

Parameters:
model I Pointer naar de model data
start I Simulatie starttijd in modified julian day
stop I Simulatie stoptijd in modified julian day
sstate I Model state to be written
Returns:
error status: CTA_OK, CTA_ILLEGAL_HANDLE

Generated on 4 Mar 2014 for OpenDA by  doxygen 1.6.1