"""Module where global model parameters are set
"""

epsilon = 1.0e-12

default_boundary_tag = 'exterior'


time_format = '%d/%m/%y %H:%M:%S'

min_timestep = 1.0e-6 #Should be computed based on geometry
max_timestep = 1000
#This is how:
#Define maximal possible speed in open water v_max, e.g. 500m/s (soundspeed?)
#Then work out minimal internal distance in mesh r_min and set
#min_timestep = r_min/v_max 
# 
#Max speeds are calculated in the flux function as
#
#lambda = v +/- sqrt(gh)
#
# so with 500 m/s, h ~ 500^2/g = 2500 m well out of the domain of the
# shallow water wave equation
#
#The actual soundspeed can be as high as 1530m
#(see http://staff.washington.edu/aganse/public.projects/clustering/clustering.html), but that would only happen with h>225000m in this equation. Why ?
#The maximal speed we specify is really related to the max speed
#of surface pertubation



v_max = 100 #For use in domain_ext.c
sound_speed = 500


max_smallsteps = 50  #Max number of degenerate steps allowed b4 trying first order

g = 9.8        #Gravity
manning = 0.3 #Manning's friction coefficient


eta_w = 3.0e-3 #Wind stress coefficient
rho_a = 1.2e-3 #Atmospheric density
rho_w = 1023   #Fluid density [kg/m^3] (rho_w = 1023 for salt water)

        




beta = 0.9  #]0;1] (e.g. 0.9). 1 allows the steepest gradients,
            #lower values are the more conservative
            #the limiter being a first order method.

pmesh_filename = '.\\pmesh'


import os, sys

if sys.platform == 'win32':
    data_dir = 'C:\grohm_output'
else:    
    data_dir = os.path.expanduser('~'+os.sep+'grohm_output')



use_extensions = True   #Try to use C-extensions
#use_extensions = False   #Do not use C-extensions

use_psyco = True  #Use psyco optimisations
#use_psyco = False  #Do not use psyco optimisations


#Specific to shallow water W.E.
minimum_allowed_height = 1.0e-3 #Water depth below which it is considered to be 0

