cta_modbuild_b3b_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_modbuild_b3b.h"

Go to the source code of this file.

Functions

char * B3B_CopyText (const char *in)
 Copy a string.
void * B3B_Realloc (void *memblock, size_t size)
 Reallocates a block of memory.
void * B3B_Malloc (size_t nelem, size_t elsize)
 Allocates a block of memory.
void B3B_Free (void *pntr)
 Frees a block of memory that is currently allocated.
int B3B_Free_Model (B3B_ModelPntr model)
 Frees a model that is currently allocated.
void B3B_Free_StateExchange (B3B_StateExchangePntr stateexchange)
 Frees a stateexchange that is currently allocated.
void B3B_Free_Parameter (B3B_ParameterPntr parameter)
 Frees a parameter that is currently allocated.
void B3B_Free_Forcing (B3B_ForcingPntr forcings)
 Frees a forcing that is currently allocated.
void B3B_Free_Station (B3B_StationPntr stations)
 Frees a station that is currently allocated.
int B3B_State2Model (B3B_ModelPntr model, double start, double stop)
 Convert COSTA state vector to B3B model.
int B3B_Model2State (B3B_ModelPntr model, double start, double stop, CTA_TreeVector *sstate)
 Convert B3B model to COSTA state vector.
int B3B_OpenModel2State (B3B_ModelPntr model, CTA_Tree *htree)
 Open model2state file.
int B3B_Model2StateByStationVariableTime (B3B_ModelPntr model, CTA_Tree htree, char *station, char *variable, double time, double *value)
 Get value of B3B model.
int B3B_Run_Model (B3B_ModelPntr model)
B3B_ModelPntr B3B_Read_Model (int simulationNumber, CTA_Tree hmodelinput, CTA_Handle *sstate, CTA_Handle *sparam, CTA_Handle *sforc)
void B3B_CheckError (int ierr, const char *msg)
 Check for a COSTA error.

Function Documentation

void B3B_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* B3B_CopyText ( const char *  in  ) 

Copy a string.

Parameters:
name I string to be copied
Returns:
copy of the string
void B3B_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 B3B_Free_Forcing ( B3B_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 B3B_Free_Model ( B3B_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 B3B_Free_Parameter ( B3B_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 B3B_Free_StateExchange ( B3B_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 B3B_Free_Station ( B3B_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* B3B_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 B3B_Model2State ( B3B_ModelPntr  model,
double  start,
double  stop,
CTA_TreeVector sstate 
)

Convert B3B 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 B3B_Model2StateByStationVariableTime ( B3B_ModelPntr  model,
CTA_Tree  htree,
char *  station,
char *  variable,
double  time,
double *  value 
)

Get value of B3B 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 B3B_OpenModel2State ( B3B_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
B3B_ModelPntr B3B_Read_Model ( int  simulationNumber,
CTA_Tree  hmodelinput,
CTA_Handle sstate,
CTA_Handle sparam,
CTA_Handle sforc 
)
Parameters:
\return 
void* B3B_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 B3B_Run_Model ( B3B_ModelPntr  model  ) 
Parameters:
model I Pointer naar de model data
Returns:
error status: CTA_OK, CTA_ILLEGAL_HANDLE
int B3B_State2Model ( B3B_ModelPntr  model,
double  start,
double  stop 
)

Convert COSTA state vector to B3B 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
Returns:
error status: CTA_OK, CTA_ILLEGAL_HANDLE

Generated on 4 Mar 2014 for OpenDA by  doxygen 1.6.1