-
Notifications
You must be signed in to change notification settings - Fork 2
/
forecaster_methods.h
40 lines (34 loc) · 1.44 KB
/
forecaster_methods.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef FORECASTER_METHODS_H
#define FORECASTER_METHODS_H
#include "structs.h"
#include "comm.h"
#include "riversys.h"
#include <time.h>
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <libssh2.h>
#include <arpa/inet.h>
typedef struct ForecastData
{
char* model_name;
char* halt_filename;
unsigned int forecasting_forcing;
unsigned int num_rainsteps;
short int ifis_display;
char* rainmaps_filename;
ConnData* rainmaps_db;
double forecast_window;
} ForecastData;
int DeleteFutureValues(ConnData* conninfo,unsigned int num_tables,UnivVars* GlobalVars,char* table_name,char* model_name,unsigned int clear_after,unsigned int equal,char* schema);
void PerformTableMaintainance(ConnData* conninfo_hydros,UnivVars* GlobalVars,ForecastData* Forecaster,short int* vac,short unsigned int hr1,unsigned int num_tables,char* tablename,char* schema);
void CheckPartitionedTable(ConnData* conninfo,UnivVars* GlobalVars,ForecastData* Forecaster,unsigned int num_tables,char* tablename,char* colname,char* schema);
void CreateHaltFile(char* filename);
short int CheckFinished(char* filename);
int WaitForDB(ConnData* conninfo,unsigned int naptime,int stale_time,unsigned int query_size);
void FreeDBLock(ConnData* conninfo,unsigned int query_size);
ForecastData* Init_ForecastData(char* fcst_filename,unsigned int string_size);
void Free_ForecastData(ForecastData** Forecaster);
int SendFilesTo51(char* loclfile,char* serverlocation);
#endif