-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
107 lines (81 loc) · 2.63 KB
/
settings.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
"""Configurable game settings."""
import true_values as tv
import math
""" ########################
##### GAME SETTINGS ######
######################## """
time_step_size = 1 # (s)
time_step_description = "1s"
""" ########################
##### WORLD SETTINGS #####
######################## """
""" world size """
world_circumference = 1.0 * tv.earths_circumference # (m)
world_radius = world_circumference/(2*math.pi) # (m)
world_mass = tv.earths_mass
""" oceans """
world_water_mass = tv.earths_water_mass*1.0
water_init_mode = "even"
""" cells """
world_cell_circumference = 80 # (cells)
cell_degree_width = 360.0/float(world_cell_circumference) # (degrees)
cell_width = world_circumference/world_cell_circumference # (m)
cell_area = pow(cell_width, 2)
""" world shape """
min_ground_height = -10000
max_ground_height = 10000
""" land properties """
land_depth = 5 # (m)
land_thermal_conductivity = tv.earths_crust_thermal_conductivity
""" world energy budgets """
initial_land_temperature = 283 # (K)
initial_water_temperature = 283
world_power = tv.earths_energy_production # (W)
""" densities """
land_density = tv.earths_crust_density
water_density = tv.water_density
""" sun properties """
sun_power = tv.suns_power # (W)
sun_distance = tv.earth_sun_distance*1 # (m)
""" albedos """
def water_albedo(facing):
"""Calcuate albedo of water given angle of incidence."""
return 1.0*tv.water_albedo(facing)
land_albedo = tv.soil_albedo
"""heat capacities"""
water_specific_heat_capacity = 1.0*tv.water_specific_heat_capacity
land_specific_heat_capacity = tv.earths_crust_specific_heat_capacity
# (J/K kg)
""" attenuation coefficients """
water_attenuation_coefficient_sunlight =\
tv.water_attenuation_coefficient_sunlight
water_attenuation_coefficient_infrared =\
tv.water_attenuation_coefficient_infrared
""" emmisivities """
land_emissivity = tv.soil_emissivity
water_emissivity = tv.water_emissivity
""" thermal conductivities """
land_thermal_conductivity = tv.earths_crust_thermal_conductivity
water_thermal_conductivity = tv.water_thermal_conductivity
""" ########################
###### MAP SETTINGS ######
######################## """
# width of map in px
map_width = 1200
# height of map in px
map_height = 600
# width of border around map in px
map_border = 0
# size of each cell
tile_height = map_height/float(world_cell_circumference/2 + 1)
tile_width = map_width/float(world_cell_circumference)
# boolean, draw water?
draw_water = True
# what mode are we drawing
draw_mode = "terrain"
draw_water = True
""" ########################
##### MISC SETTINGS ######
######################## """
verbose = True
debug = False