Commit 9ade30e5 authored by Miguel Tremblay's avatar Miguel Tremblay
Browse files

The three useful lines in global.h have been transfer to macadam.h.

Unless mistaken, global.c was not used.
parent 53743538
#include "global.h"
/***********************************************
** Set method
**********************************************/
void SetVocal(BOOL bVocal)
{
g_bVocal = bVocal;
}
void SetNoEol(BOOL bNoEol)
{
g_bNoEol = bNoEol;
}
void SetForMan(BOOL bForMan)
{
g_bForMan = bForMan;
}
void SetManuel(BOOL bManuel)
{
g_bManuel = bManuel;
}
void SetDual(BOOL bDual)
{
g_bDual = bDual;
}
void SetProtect(BOOL bProtect)
{
g_bProtect = bProtect;
}
void SetVerbose(BOOL bVerbose)
{
g_bVerbose = bVerbose;
}
void SetVerPlus(BOOL bVerPlus)
{
g_bVerPlus = bVerPlus;
}
void SetHLocal(BOOL bHLocal)
{
g_bHLocal = bHLocal;
}
void SetLang(char* cpLang)
{
strcpy(g_cpLang,cpLang);
}
void SetMess(char** cppMess, long nDim)
{
long i;
for(i=0; i<nDim; i++)
strcpy(g_cppMess[i], cppMess[i]);
}
/***********************************************
** Get method
**********************************************/
BOOL GetVocal()
{
return g_bVocal;
}
BOOL GetNoEol()
{
return g_bNoEol;
}
BOOL GetForMan()
{
return g_bForMan;
}
BOOL GetManuel()
{
return g_bManuel;
}
BOOL GetDual()
{
return g_bDual;
}
BOOL GetProtect()
{
return g_bProtect;
}
BOOL GetVerbose()
{
return g_bVerbose;
}
BOOL GetVerPlus()
{
return g_bVerPlus;
}
BOOL GetHLocal()
{
return g_bHLocal;
}
char* GetLang()
{
return g_cpLang;
}
char** GetMess()
{
return g_cppMess;
}
#define BOOL long
#define TRUE 1
#define FALSE 0
static BOOL g_bVocal=FALSE;
static BOOL g_bNoEol=FALSE;
static BOOL g_bForMan;
static BOOL g_bManuel;
static BOOL g_bDual;
static BOOL g_bProtect;
static BOOL g_bVerbose;
static BOOL g_bVerPlus;
static BOOL g_bHLocal;
static char* g_cpLang;
static char** g_cppMess;
/* Set */
void SetVocal(BOOL bVocal);
void SetNoEol(BOOL bNoEol);
void SetForMan(BOOL bForMan);
void SetManuel(BOOL bManuel);
void SetDual(BOOL bDual);
void SetProtect(BOOL bProtect);
void SetVerbose(BOOL bVerbose);
void SetVerPlus(BOOL bVerPlus);
void SetHLocal(BOOL bHLocal);
void SetLang(char* cpLang);
void SetMess(char** cppMess, long nDim);
/* Get */
BOOL GetVocal();
BOOL GetNoEol();
BOOL GetForMan();
BOOL GetManuel();
BOOL GetDual();
BOOL GetProtect();
BOOL GetVerbose();
BOOL GetVerPlus();
BOOL GetHLocal();
char* GetLang();
char** GetMess();
......@@ -172,8 +172,6 @@ void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNb
BOOL bSucces = TRUE;
long nNtp;
long nNtp2;
long nNRec;
long nNtdcl;
double* dpItp;
double dDiff;
double* dpWw;
......@@ -191,7 +189,6 @@ void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNb
double dEr2=0;
double dFp=0.0;
/* Grid values */
/* long nIRef=0; */
long nIR40;
double* dpCnt;
double* dpCapacity;
......@@ -247,12 +244,11 @@ void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNb
/***********************************************************************/
/* Coupling is different if there is more or less than 3 hours.
/* Coupling is different if there is more or less than 3 hours. */
/**********************************************************************/
bFail = FALSE;
if( !bThreeHoursObs){
/* less than 3 hours of observation in the coupling */
BOOL bFalse = FALSE;
long nOne =1;
if(!bSilent)
printf(" Not enough data for coupling.\n");
......@@ -275,13 +271,11 @@ void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNb
&(dpRTO[nDeltaTIndice]), &(dpDTO[nDeltaTIndice]), \
&(dpTAO[nDeltaTIndice]), &dDiff, &dMLon, npSwo, \
stTemperatureDepth.pdArray);
nNtdcl = nLenObservation - nDeltaTIndice -\
((nLenObservation-nDeltaTIndice < 28800.0/dDT) \
? nLenObservation-nDeltaTIndice : 28800.0/dDT);
f77name(initial)(dpItp , (dpRTO+1), (dpDTO+1), (dpTAO+1), &nOne, \
&nLenObservation, &stTemperatureDepth.nSize,\
&nIR40, &bFlat, npSwo, dpCapacity, dpConductivity);
nNtp = 0 + nNtdcl;
nNtp = 0; // + nNtdcl;
nNtp2 = nLenObservation - nDeltaTIndice;
f77name(coupla)(dpFS, dpFI, dpPS, dpTA, dpAH, dpFF, dpTYP, dpFT, dpQP, \
dpRC, &stTemperatureDepth.nSize, &nNtp, &nNtp2, dpItp,\
......
......@@ -17,9 +17,12 @@
**
****************************************************************************/
#include "global.h"
#include "number.h"
#define BOOL long
#define TRUE 1
#define FALSE 0
/* Pas de temps du modèle de bilan énergétique */
#define dDT 30.0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment