-
Notifications
You must be signed in to change notification settings - Fork 5
/
sxw_environs.c
48 lines (38 loc) · 1.46 KB
/
sxw_environs.c
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
40
41
42
43
44
45
46
/**
* \file: sxw_environs.c
* \brief Generates [SOILWAT2](\ref sw_src) precipitation information and
* passes it to [Steppe](\ref STEPPE).
*
* \author CWB (inital programming)
* \date 21 May 2002
* \ingroup ENVIRONMENT
* \ingroup SXW_PRIVATE
*/
/* =================================================== */
/* INCLUDES / DEFINES */
/* --------------------------------------------------- */
#include "ST_steppe.h"
#include "ST_globals.h" // externs `*Env`
#include "sw_src/include/SW_Defines.h"
#include "sxw.h" // externs `*SXW`
#include "sxw_module.h"
#include "sw_src/include/SW_Model.h"
#include "sw_src/include/SW_Site.h"
#include "sw_src/include/SW_SoilWater.h"
#include "sw_src/include/SW_Weather.h"
/*************** Local Variable Declarations ***************/
/***********************************************************/
/*************** Local Function Declarations ***************/
/***********************************************************/
/***********************************************************/
/****************** Begin Function Code ********************/
/***********************************************************/
void _sxw_set_environs(void) {
/*======================================================*/
/* run this after SOILWAT has completed.
* need to convert ppt from cm to mm
*/
//Integer conversion always does floor so .5 is added
Env->ppt = (IntS) (SXW->ppt * 10 + .5);
Env->temp = SXW->temp;
}