-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathData.py
64 lines (61 loc) · 5.47 KB
/
Data.py
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 29 01:19:24 2022
@author: osama
"""
# READ All Required Data Inputs
import pandas as pd
import os
from Model_Config import Model_Config
from Pre_defined_Variables import Pre_defined_Variables
Working_Path = Model_Config.Working_Path
os.chdir('%s'%Working_Path)
class Data:
#Read SFWMM Daily Output File
SFWMM_Daily_Outputs = pd.read_csv('./Data/%s/ts_data/SFWMM_Daily_Outputs_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#read the Water Shortrage Management and Regulation Schedule Break points csv file
#FIXME [Just Make Sure you are using the WSM and Operation Zone Lake Eleveation Data Associated with the identified Operation Rules]
WSMs_RSBKs = pd.read_csv('./Data/%s/fixed_data/WSMs_RSBPs_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#Read the weekly demand input file
Weekly_dmd = pd.read_csv('./Data/%s/fixed_data/LOSA_wkly_dmd_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#read Weekly tributary condition (NetRF, S65E runoff, Palmer index, and Netinflow) data for the study period
Wkly_Trib_Cond = pd.read_csv('./Data/%s/ts_data/Trib_cond_wkly_data_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#Read Seasonal LONINO data (the latest values for use with LORS simulations) defined as Option 4 in the LOOPS Model (TC-LONINO Tab).
LONINO_Seas_data = pd.read_csv('./Data/%s/ts_data/Seasonal_LONINO_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
LONINO_Mult_Seas_data = pd.read_csv('./Data/%s/ts_data/Multi_Seasonal_LONINO_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#read Netinflow data(ac-ft/day)
NetInf_Input = pd.read_csv('./Data/%s/ts_data/NetFlows_acft_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#read actual daily water demand (output of SFWMM)
SFWMM_W_dmd = pd.read_csv('./Data/%s/ts_data/Water_dmd_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#read Rainfall Volume data
RF_Vol = pd.read_csv('./Data/%s/ts_data/RF_Volume_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#read ET Vol data
ET_Vol = pd.read_csv('./Data/%s/ts_data/ETVol_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#Read the C44 Runoff data which is output of SFWMM simulation.
C44_Runoff = pd.read_csv('./Data/%s/ts_data/C44RO_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#Read the mean monthly sum Basin runoffs file (i.e., sum of flow volume for each month of the entire period)
Sum_Basin_RO = pd.read_csv('./Data/%s/ts_data/Basin_RO_inputs_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#Read Mean Monthly basin runoffs (cfs)
C43RO = pd.read_csv('./Data/%s/ts_data/C43RO_Monthly_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
C44RO = pd.read_csv('./Data/%s/ts_data/C44RO_Monthly_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
SLTRIB = pd.read_csv('./Data/%s/ts_data/SLTRIB_Monthly_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#Read S80 and S77 Regulatory release rates for LORS2008 (Inputs from ActiveSchedule Tab in LOOPS Model!)
S77_RegRelRates = pd.read_csv('./Data/%s/fixed_data/S77_RegRelRates_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
S80_RegRelRates = pd.read_csv('./Data/%s/fixed_data/S80_RegRelRates_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#Read the daily C43Runoff
C43RO_Daily = pd.read_csv('./Data/%s/ts_data/C43RO_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#FIXME: I will use the CE and SLE turns out of the LOOPS model as inputs here (to figure out how to calculate it later in this model!)
CE_SLE_turns = pd.read_csv('./Data/%s/ts_data/CE_SLE_turns_inputs_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#Read the pulses input data (Tab Pulses in the LOOPS Spreadsheet Model!)
Pulses = pd.read_csv('./Data/%s/fixed_data/Pulses_Inputs_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#Note that I entered values of (-9999) in days of the year that do not include data (i.e. June 2nd to September 30th)
Targ_Stg_June_1st = pd.read_csv('./Data/%s/fixed_data/Chance of June 1st Lake stage falling below 11.0ft_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule), parse_dates = ['Date'])
Targ_Stg_May_1st = pd.read_csv('./Data/%s/fixed_data/Chance of May 1st Lake stage falling below 11.0ft_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule), parse_dates = ['Date'])
#FIXME
#The Estuary needs water needs to be updated if needed!
#Read the "Estuary needs water" for now (to be calculated later!)
Estuary_needs_water = pd.read_csv('./Data/%s/ts_data/Estuary_needs_water_Input_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#Read EAA_MIA_RUNOFF in cfs
EAA_MIA_RUNOFF = pd.read_csv('./Data/%s/ts_data/EAA_MIA_RUNOFF_Inputs_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))
#Read calculated Storage deviation daily values
Stroage_dev_df = pd.read_csv('./Data/%s/ts_data/Storage_Dev_%s.csv'%(Pre_defined_Variables.Schedule,Pre_defined_Variables.Schedule))