# ===============================================================================
# Copyright 2017 ross
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ===============================================================================

# ============= enthought library imports =======================
# ============= standard library imports ========================
# ============= local library imports  ==========================
import os
import sys
from datetime import datetime

import yaml

from app.paths import paths
from recharge import STATIC_KEYS, INITIAL_KEYS

DEFAULT_CFG = '''
---
input_root: Please Set Me      ## /Volumes/Seagate Expansion Drive/ETRM_input
output_root: Please Set Me     ## /Users/ross/Desktop

# === START (No earlier than year 2000) ===

start_day: SET ME # dd
start_month: SET ME # mm
start_year: SET ME # YYYY

# === Finish (No later than year 2013) ===

end_day: SET ME #dd
end_month: SET ME # mm
end_year: SET ME # YYYY

# === MASKS ===
mask: SET ME # mask of study area (e.g. Mask/my_mask.tif)
binary_shapefile: SET ME # Set path to raster for individual tracker output (e.g binary_shapefile/my_b_shp.tif)
polygons: Blank_Geo # (default)
tiff_shape: None

#  === Saving specific dates as rasters ===
save_dates: [] # list in format -> 'mm/dd/YYY' such as ['mm/dd/YYY', 'mm/dd/YYY', 'mm/dd/YYY']
write_freq: SET ME # modify to output monthly or yearly rasters. OPTIONS -> daily|monthly|yearly
daily_outputs:[dr, de, drew] # OPTIONS -> anything that appears in the tracker

#==== To track change between two consecutive time periods ===
use_period_change = False # Set to True to work

# === Settings that handle the stochastic rainfall runoff method
seed = 123456789 # A default seed to make the stochastic behaviour of the model to be replicated
use_walnut_gulch_ro = True # Uses Esther Xu (Xu Thesis 2018) stochastic runoff method based on Walnut Gulch watershed.
#Otherwise RO is linearly decided based on Amy Lewis data 
use_monsoon_precip_correction = True # Uses Xu correction to PRISM based on Walnut Gulch watershed precip vs PRISM
use_mountain_precip_correction = False # Corrects precip based on Amy Lewis

# === Misc settings ===
is_reduced: False # (default)
winter_evap_limiter: 0.3  # (default)
polygons: Blank_Geo # (default)
evap_ceff: 1.0 # (default)
ro_reinf_frac: 0.0 # (default) Runoff Reinfiltration Fraction. To increase runoff into soil.
rew_ceff: 1.0 # (default)
output_units: mm # (default) OPTIONS -> mm|acre-ft|?