Best JavaScript code snippet using taiko
initialize.py
Source:initialize.py
1import os2import numpy as np3#==================================================================================4def Wet_NPG(self):5 print '..Reading Wetland Tundra Non-Polygonal Ground Parameters'6 self.WetNPG = {}7 with open(self.Wet_NPG_Control, 'r') as f:8 for line in f:9 if line.startswith('#'):10 continue11 else:12 (key, val) = line.split()13 self.WetNPG[(key)] = val14 # Convert strings to floats as necessary15 self.WetNPG['A1_above'] = float(self.WetNPG['A1_above'])16 self.WetNPG['A2_above'] = float(self.WetNPG['A2_above'])17 self.WetNPG['x0_above'] = float(self.WetNPG['x0_above'])18 self.WetNPG['dx_above'] = float(self.WetNPG['dx_above'])19 self.WetNPG['A1_below'] = float(self.WetNPG['A1_below'])20 self.WetNPG['A2_below'] = float(self.WetNPG['A2_below'])21 self.WetNPG['x0_below'] = float(self.WetNPG['x0_below'])22 self.WetNPG['dx_below'] = float(self.WetNPG['dx_below'])23 self.WetNPG['a_above'] = float(self.WetNPG['a_above'])24 self.WetNPG['b_above'] = float(self.WetNPG['b_above'])25 self.WetNPG['a_below'] = float(self.WetNPG['a_below'])26 self.WetNPG['b_below'] = float(self.WetNPG['b_below'])27 self.WetNPG['K_above'] = float(self.WetNPG['K_above'])28 self.WetNPG['C_above'] = float(self.WetNPG['C_above'])29 self.WetNPG['A_above'] = float(self.WetNPG['A_above'])30 self.WetNPG['B_above'] = float(self.WetNPG['B_above'])31 self.WetNPG['K_below'] = float(self.WetNPG['K_below'])32 self.WetNPG['C_below'] = float(self.WetNPG['C_below'])33 self.WetNPG['A_below'] = float(self.WetNPG['A_below'])34 self.WetNPG['B_below'] = float(self.WetNPG['B_below'])35 self.WetNPG['HillB_above'] = float(self.WetNPG['HillB_above'])36 self.WetNPG['HillN_above'] = float(self.WetNPG['HillN_above'])37 self.WetNPG['HillB_below'] = float(self.WetNPG['HillB_below'])38 self.WetNPG['HillN_below'] = float(self.WetNPG['HillN_below'])39 self.WetNPG['max_terrain_transition'] = \40 float(self.WetNPG['max_terrain_transition'])41 self.WetNPG['ice_slope_poor'] = float(self.WetNPG['ice_slope_poor'])42 self.WetNPG['ice_slope_pore'] = float(self.WetNPG['ice_slope_pore'])43 self.WetNPG['ice_slope_wedge'] = float(self.WetNPG['ice_slope_wedge'])44 self.WetNPG['ice_slope_massive'] = float(self.WetNPG['ice_slope_massive'])45 self.WetNPG['porosity'] = float(self.WetNPG['porosity'])46#================================================================================47def Wet_LCP(self):48 print '..Reading Wetland Low Center Polygon Cohort Parameters'49 self.WetLCP = {}50 with open(self.Wet_LCP_Control, 'r') as f:51 for line in f:52 if line.startswith('#'):53 continue54 else:55 (key, val) = line.split()56 self.WetLCP[(key)] = val57 # Convert strings to floats as necessary58 self.WetLCP['A1_above'] = float(self.WetLCP['A1_above'])59 self.WetLCP['A2_above'] = float(self.WetLCP['A2_above'])60 self.WetLCP['x0_above'] = float(self.WetLCP['x0_above'])61 self.WetLCP['dx_above'] = float(self.WetLCP['dx_above'])62 self.WetLCP['A1_below'] = float(self.WetLCP['A1_below'])63 self.WetLCP['A2_below'] = float(self.WetLCP['A2_below'])64 self.WetLCP['x0_below'] = float(self.WetLCP['x0_below'])65 self.WetLCP['dx_below'] = float(self.WetLCP['dx_below'])66 self.WetLCP['a_above'] = float(self.WetLCP['a_above'])67 self.WetLCP['b_above'] = float(self.WetLCP['b_above'])68 self.WetLCP['a_below'] = float(self.WetLCP['a_below'])69 self.WetLCP['b_below'] = float(self.WetLCP['b_below'])70 self.WetLCP['K_above'] = float(self.WetLCP['K_above'])71 self.WetLCP['C_above'] = float(self.WetLCP['C_above'])72 self.WetLCP['A_above'] = float(self.WetLCP['A_above'])73 self.WetLCP['B_above'] = float(self.WetLCP['B_above'])74 self.WetLCP['K_below'] = float(self.WetLCP['K_below'])75 self.WetLCP['C_below'] = float(self.WetLCP['C_below'])76 self.WetLCP['A_below'] = float(self.WetLCP['A_below'])77 self.WetLCP['B_below'] = float(self.WetLCP['B_below'])78 self.WetLCP['HillB_above'] = float(self.WetLCP['HillB_above'])79 self.WetLCP['HillN_above'] = float(self.WetLCP['HillN_above'])80 self.WetLCP['HillB_below'] = float(self.WetLCP['HillB_below'])81 self.WetLCP['HillN_below'] = float(self.WetLCP['HillN_below'])82 self.WetLCP['max_terrain_transition'] = \83 float(self.WetNPG['max_terrain_transition'])84 self.WetLCP['ice_slope_poor'] = float(self.WetLCP['ice_slope_poor'])85 self.WetLCP['ice_slope_pore'] = float(self.WetLCP['ice_slope_pore'])86 self.WetLCP['ice_slope_wedge'] = float(self.WetLCP['ice_slope_wedge'])87 self.WetLCP['ice_slope_massive'] = float(self.WetLCP['ice_slope_massive'])88 self.WetLCP['porosity'] = float(self.WetLCP['porosity'])89#===============================================================================90def Wet_CLC(self):91 print '..Reading Wetland Coalescent Low Center Polygon Cohort Parameters'92 self.WetCLC = {}93 with open(self.Wet_CLC_Control, 'r') as f:94 for line in f:95 if line.startswith('#'):96 continue97 else:98 (key, val) = line.split()99 self.WetCLC[(key)] = val100 # Convert strings to floats as necessary101 self.WetCLC['A1_above'] = float(self.WetCLC['A1_above'])102 self.WetCLC['A2_above'] = float(self.WetCLC['A2_above'])103 self.WetCLC['x0_above'] = float(self.WetCLC['x0_above'])104 self.WetCLC['dx_above'] = float(self.WetCLC['dx_above'])105 self.WetCLC['A1_below'] = float(self.WetCLC['A1_below'])106 self.WetCLC['A2_below'] = float(self.WetCLC['A2_below'])107 self.WetCLC['x0_below'] = float(self.WetCLC['x0_below'])108 self.WetCLC['dx_below'] = float(self.WetCLC['dx_below'])109 self.WetCLC['a_above'] = float(self.WetCLC['a_above'])110 self.WetCLC['b_above'] = float(self.WetCLC['b_above'])111 self.WetCLC['a_below'] = float(self.WetCLC['a_below'])112 self.WetCLC['b_below'] = float(self.WetCLC['b_below'])113 self.WetCLC['K_above'] = float(self.WetCLC['K_above'])114 self.WetCLC['C_above'] = float(self.WetCLC['C_above'])115 self.WetCLC['A_above'] = float(self.WetCLC['A_above'])116 self.WetCLC['B_above'] = float(self.WetCLC['B_above'])117 self.WetCLC['K_below'] = float(self.WetCLC['K_below'])118 self.WetCLC['C_below'] = float(self.WetCLC['C_below'])119 self.WetCLC['A_below'] = float(self.WetCLC['A_below'])120 self.WetCLC['B_below'] = float(self.WetCLC['B_below'])121 self.WetCLC['HillB_above'] = float(self.WetCLC['HillB_above'])122 self.WetCLC['HillN_above'] = float(self.WetCLC['HillN_above'])123 self.WetCLC['HillB_below'] = float(self.WetCLC['HillB_below'])124 self.WetCLC['HillN_below'] = float(self.WetCLC['HillN_below'])125 self.WetCLC['max_terrain_transition'] = \126 float(self.WetCLC['max_terrain_transition'])127 self.WetCLC['ice_slope_poor'] = float(self.WetCLC['ice_slope_poor'])128 self.WetCLC['ice_slope_pore'] = float(self.WetCLC['ice_slope_pore'])129 self.WetCLC['ice_slope_wedge'] = float(self.WetCLC['ice_slope_wedge'])130 self.WetCLC['ice_slope_massive'] = float(self.WetCLC['ice_slope_massive'])131 self.WetCLC['porosity'] = float(self.WetCLC['porosity'])132#=================================================================================133def Wet_FCP(self):134 print '..Reading Wetland Flat Center Polygon Cohort Parameters'135 self.WetFCP = {}136 with open(self.Wet_FCP_Control, 'r') as f:137 for line in f:138 if line.startswith('#'):139 continue140 else:141 (key, val) = line.split()142 self.WetFCP[(key)] = val143 # Convert strings to floats as necessary144 self.WetFCP['A1_above'] = float(self.WetFCP['A1_above'])145 self.WetFCP['A2_above'] = float(self.WetFCP['A2_above'])146 self.WetFCP['x0_above'] = float(self.WetFCP['x0_above'])147 self.WetFCP['dx_above'] = float(self.WetFCP['dx_above'])148 self.WetFCP['A1_below'] = float(self.WetFCP['A1_below'])149 self.WetFCP['A2_below'] = float(self.WetFCP['A2_below'])150 self.WetFCP['x0_below'] = float(self.WetFCP['x0_below'])151 self.WetFCP['dx_below'] = float(self.WetFCP['dx_below'])152 self.WetFCP['a_above'] = float(self.WetFCP['a_above'])153 self.WetFCP['b_above'] = float(self.WetFCP['b_above'])154 self.WetFCP['a_below'] = float(self.WetFCP['a_below'])155 self.WetFCP['b_below'] = float(self.WetFCP['b_below'])156 self.WetFCP['K_above'] = float(self.WetFCP['K_above'])157 self.WetFCP['C_above'] = float(self.WetFCP['C_above'])158 self.WetFCP['A_above'] = float(self.WetFCP['A_above'])159 self.WetFCP['B_above'] = float(self.WetFCP['B_above'])160 self.WetFCP['K_below'] = float(self.WetFCP['K_below'])161 self.WetFCP['C_below'] = float(self.WetFCP['C_below'])162 self.WetFCP['A_below'] = float(self.WetFCP['A_below'])163 self.WetFCP['B_below'] = float(self.WetFCP['B_below'])164 self.WetFCP['HillB_above'] = float(self.WetFCP['HillB_above'])165 self.WetFCP['HillN_above'] = float(self.WetFCP['HillN_above'])166 self.WetFCP['HillB_below'] = float(self.WetFCP['HillB_below'])167 self.WetFCP['HillN_below'] = float(self.WetFCP['HillN_below'])168 self.WetFCP['max_terrain_transition'] = \169 float(self.WetFCP['max_terrain_transition'])170 self.WetFCP['ice_slope_poor'] = float(self.WetFCP['ice_slope_poor'])171 self.WetFCP['ice_slope_pore'] = float(self.WetFCP['ice_slope_pore'])172 self.WetFCP['ice_slope_wedge'] = float(self.WetFCP['ice_slope_wedge'])173 self.WetFCP['ice_slope_massive'] = float(self.WetFCP['ice_slope_massive'])174 self.WetFCP['porosity'] = float(self.WetFCP['porosity'])175#===============================================================================176def Wet_HCP(self):177 print '..Reading Wetland Flat Center Polygon Cohort Parameters'178 self.WetHCP = {}179 with open(self.Wet_HCP_Control, 'r') as f:180 for line in f:181 if line.startswith('#'):182 continue183 else:184 (key, val) = line.split()185 self.WetHCP[(key)] = val186 # Convert strings to floats as necessary187 self.WetHCP['A1_above'] = float(self.WetHCP['A1_above'])188 self.WetHCP['A2_above'] = float(self.WetHCP['A2_above'])189 self.WetHCP['x0_above'] = float(self.WetHCP['x0_above'])190 self.WetHCP['dx_above'] = float(self.WetHCP['dx_above'])191 self.WetHCP['A1_below'] = float(self.WetHCP['A1_below'])192 self.WetHCP['A2_below'] = float(self.WetHCP['A2_below'])193 self.WetHCP['x0_below'] = float(self.WetHCP['x0_below'])194 self.WetHCP['dx_below'] = float(self.WetHCP['dx_below'])195 self.WetHCP['a_above'] = float(self.WetHCP['a_above'])196 self.WetHCP['b_above'] = float(self.WetHCP['b_above'])197 self.WetHCP['a_below'] = float(self.WetHCP['a_below'])198 self.WetHCP['b_below'] = float(self.WetHCP['b_below'])199 self.WetHCP['K_above'] = float(self.WetHCP['K_above'])200 self.WetHCP['C_above'] = float(self.WetHCP['C_above'])201 self.WetHCP['A_above'] = float(self.WetHCP['A_above'])202 self.WetHCP['B_above'] = float(self.WetHCP['B_above'])203 self.WetHCP['K_below'] = float(self.WetHCP['K_below'])204 self.WetHCP['C_below'] = float(self.WetHCP['C_below'])205 self.WetHCP['A_below'] = float(self.WetHCP['A_below'])206 self.WetHCP['B_below'] = float(self.WetHCP['B_below'])207 self.WetHCP['HillB_above'] = float(self.WetHCP['HillB_above'])208 self.WetHCP['HillN_above'] = float(self.WetHCP['HillN_above'])209 self.WetHCP['HillB_below'] = float(self.WetHCP['HillB_below'])210 self.WetHCP['max_terrain_transition'] = \211 float(self.WetHCP['max_terrain_transition'])212 self.WetHCP['ice_slope_poor'] = float(self.WetHCP['ice_slope_poor'])213 self.WetHCP['ice_slope_pore'] = float(self.WetHCP['ice_slope_pore'])214 self.WetHCP['ice_slope_wedge'] = float(self.WetHCP['ice_slope_wedge'])215 self.WetHCP['ice_slope_massive'] = float(self.WetHCP['ice_slope_massive'])216 self.WetHCP['porosity'] = float(self.WetHCP['porosity'])217#===============================================================================218def LakePond(self):219 print '..Reading Land and Pond Cohort Parameters'220 221 """ Read files from the input directory """222 if self.Simulation_area.lower() == 'barrow':223 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\224 self.Control_directory)225 elif self.Simulation_area.lower() == 'arctic_coast':226 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic'+\227 self.Control_directory+'/')228 elif self.Simulation_area.lower() == 'tanana':229 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana')230 elif self.Simulation_area.lower() == 'yukon':231 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon')232 elif self.Simulation_area.lower() == 'aiem':233 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM')234 elif self.Simulation_area.lower() == 'ngee':235 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE')236 237 self.LakePond = {}238 with open(self.Lake_Pond_Control, 'r') as f:239 for line in f:240 if line.startswith('#'):241 continue242 else:243 (key, val) = line.split()244 self.LakePond[(key)] = val245 # Convert strings to floats as necessary246 self.LakePond['Uniform_Lake_Depth'] = float(self.LakePond['Uniform_Lake_Depth'])247 248 self.LakePond['Lower_LargeLake_WT_Y_Depth'] = float(self.LakePond['Lower_LargeLake_WT_Y_Depth'])249 self.LakePond['Upper_LargeLake_WT_Y_Depth'] = float(self.LakePond['Upper_LargeLake_WT_Y_Depth'])250 self.LakePond['Lower_MediumLake_WT_Y_Depth'] = float(self.LakePond['Lower_MediumLake_WT_Y_Depth'])251 self.LakePond['Upper_MediumLake_WT_Y_Depth'] = float(self.LakePond['Upper_MediumLake_WT_Y_Depth'])252 self.LakePond['Lower_SmallLake_WT_Y_Depth'] = float(self.LakePond['Lower_SmallLake_WT_Y_Depth'])253 self.LakePond['Upper_SmallLake_WT_Y_Depth'] = float(self.LakePond['Upper_SmallLake_WT_Y_Depth'])254 self.LakePond['Lower_LargeLake_WT_M_Depth'] = float(self.LakePond['Lower_LargeLake_WT_M_Depth'])255 self.LakePond['Upper_LargeLake_WT_M_Depth'] = float(self.LakePond['Upper_LargeLake_WT_M_Depth'])256 self.LakePond['Lower_MediumLake_WT_M_Depth'] = float(self.LakePond['Lower_MediumLake_WT_M_Depth'])257 self.LakePond['Upper_MediumLake_WT_M_Depth'] = float(self.LakePond['Upper_MediumLake_WT_M_Depth'])258 self.LakePond['Lower_SmallLake_WT_M_Depth'] = float(self.LakePond['Lower_SmallLake_WT_M_Depth'])259 self.LakePond['Upper_SmallLake_WT_M_Depth'] = float(self.LakePond['Upper_SmallLake_WT_M_Depth']) 260 261 self.LakePond['Lower_LargeLake_WT_O_Depth'] = float(self.LakePond['Lower_LargeLake_WT_O_Depth'])262 self.LakePond['Upper_LargeLake_WT_O_Depth'] = float(self.LakePond['Upper_LargeLake_WT_O_Depth'])263 self.LakePond['Lower_MediumLake_WT_O_Depth'] = float(self.LakePond['Lower_MediumLake_WT_O_Depth'])264 self.LakePond['Upper_MediumLake_WT_O_Depth'] = float(self.LakePond['Upper_MediumLake_WT_O_Depth'])265 self.LakePond['Lower_SmallLake_WT_O_Depth'] = float(self.LakePond['Lower_SmallLake_WT_O_Depth'])266 self.LakePond['Upper_SmallLake_WT_O_Depth'] = float(self.LakePond['Upper_SmallLake_WT_O_Depth']) 267 self.LakePond['Lower_Lake_Depth'] = float(self.LakePond['Lower_Lake_Depth'])268 self.LakePond['Upper_Lake_Depth'] = float(self.LakePond['Upper_Lake_Depth'])269 self.LakePond['Uniform_Pond_Depth'] = float(self.LakePond['Uniform_Pond_Depth'])270 self.LakePond['Lower_Pond_Depth'] = float(self.LakePond['Lower_Pond_Depth'])271 self.LakePond['Upper_Pond_Depth'] = float(self.LakePond['Upper_Pond_Depth'])272 self.LakePond['Lower_Pond_WT_Y_Depth'] = float(self.LakePond['Lower_Pond_WT_Y_Depth'])273 self.LakePond['Upper_Pond_WT_Y_Depth'] = float(self.LakePond['Upper_Pond_WT_Y_Depth'])274 self.LakePond['Lower_Pond_WT_M_Depth'] = float(self.LakePond['Lower_Pond_WT_M_Depth'])275 self.LakePond['Upper_Pond_WT_M_Depth'] = float(self.LakePond['Upper_Pond_WT_M_Depth'])276 self.LakePond['Lower_Pond_WT_O_Depth'] = float(self.LakePond['Lower_Pond_WT_O_Depth'])277 self.LakePond['Upper_Pond_WT_O_Depth'] = float(self.LakePond['Upper_Pond_WT_O_Depth'])278 279 self.LakePond['Lake_Expansion'] = float(self.LakePond['Lake_Expansion'])280 self.LakePond['Pond_Expansion'] = float(self.LakePond['Pond_Expansion'])281 self.LakePond['LargeLake_WT_Y_Expansion'] = float(self.LakePond['LargeLake_WT_Y_Expansion'])282 self.LakePond['MediumLake_WT_Y_Expansion'] = float(self.LakePond['MediumLake_WT_Y_Expansion'])283 self.LakePond['SmallLake_WT_Y_Expansion'] = float(self.LakePond['SmallLake_WT_Y_Expansion'])284 self.LakePond['LargeLake_WT_M_Expansion'] = float(self.LakePond['LargeLake_WT_M_Expansion'])285 self.LakePond['MediumLake_WT_M_Expansion'] = float(self.LakePond['MediumLake_WT_M_Expansion'])286 self.LakePond['SmallLake_WT_M_Expansion'] = float(self.LakePond['SmallLake_WT_M_Expansion'])287 self.LakePond['LargeLake_WT_O_Expansion'] = float(self.LakePond['LargeLake_WT_O_Expansion'])288 self.LakePond['MediumLake_WT_O_Expansion'] = float(self.LakePond['MediumLake_WT_O_Expansion'])289 self.LakePond['SmallLake_WT_O_Expansion'] = float(self.LakePond['SmallLake_WT_O_Expansion'])290 self.LakePond['Pond_WT_Y_Expansion'] = float(self.LakePond['Pond_WT_Y_Expansion'])291 self.LakePond['Pond_WT_M_Expansion'] = float(self.LakePond['Pond_WT_M_Expansion'])292 self.LakePond['Pond_WT_O_Expansion'] = float(self.LakePond['Pond_WT_O_Expansion'])293 294 self.LakePond['Pond_Infill_Constant'] = float(self.LakePond['Pond_Infill_Constant'])295 self.LakePond['Pond_WT_Y_Infill_Constant'] = float(self.LakePond['Pond_WT_Y_Infill_Constant'])296 self.LakePond['Pond_WT_M_Infill_Constant'] = float(self.LakePond['Pond_WT_M_Infill_Constant'])297 self.LakePond['Pond_WT_O_Infill_Constant'] = float(self.LakePond['Pond_WT_O_Infill_Constant'])298 299 self.LakePond['ice_thickness_uniform_alpha'] = float(self.LakePond['ice_thickness_uniform_alpha'])300 self.LakePond['Lower_ice_thickness_alpha'] = float(self.LakePond['Lower_ice_thickness_alpha'])301 self.LakePond['Upper_ice_thickness_alpha'] = float(self.LakePond['Upper_ice_thickness_alpha'])302 self.LakePond['pond_growth_time_required'] = float(self.LakePond['pond_growth_time_required'])303 self.LakePond['Pond_WT_Y_growth_time_required'] = float(self.LakePond['Pond_WT_Y_growth_time_required'])304 self.LakePond['Pond_WT_M_growth_time_required'] = float(self.LakePond['Pond_WT_M_growth_time_required'])305 self.LakePond['Pond_WT_O_growth_time_required'] = float(self.LakePond['Pond_WT_O_growth_time_required'])306 307 self.LakePond['lake_depth_control'] = float(self.LakePond['lake_depth_control'])308 self.LakePond['LargeLake_WT_Y_depth_control'] = float(self.LakePond['LargeLake_WT_Y_depth_control'])309 self.LakePond['LargeLake_WT_M_depth_control'] = float(self.LakePond['LargeLake_WT_M_depth_control'])310 self.LakePond['LargeLake_WT_O_depth_control'] = float(self.LakePond['LargeLake_WT_O_depth_control'])311 self.LakePond['MediumLake_WT_Y_depth_control'] = float(self.LakePond['MediumLake_WT_Y_depth_control'])312 self.LakePond['MediumLake_WT_M_depth_control'] = float(self.LakePond['MediumLake_WT_M_depth_control'])313 self.LakePond['MediumLake_WT_O_depth_control'] = float(self.LakePond['MediumLake_WT_O_depth_control'])314 self.LakePond['SmallLake_WT_Y_depth_control'] = float(self.LakePond['SmallLake_WT_Y_depth_control'])315 self.LakePond['SmallLake_WT_M_depth_control'] = float(self.LakePond['SmallLake_WT_M_depth_control'])316 self.LakePond['SmallLake_WT_O_depth_control'] = float(self.LakePond['SmallLake_WT_O_depth_control'])317 318 self.LakePond['pond_depth_control'] = float(self.LakePond['pond_depth_control'])319 self.LakePond['Pond_WT_Y_depth_control'] = float(self.LakePond['Pond_WT_Y_depth_control'])320 self.LakePond['Pond_WT_M_depth_control'] = float(self.LakePond['Pond_WT_M_depth_control'])321 self.LakePond['Pond_WT_O_depth_control'] = float(self.LakePond['Pond_WT_O_depth_control'])322#===============================================================================323def Terrestrial_Barrow(self):324 print '..Reading General Terrestrial Parameters'325 """ Move to the control directory """326 self.Terrestrial = {}327 with open(self.Terrestrial_Control, 'r') as f:328 for line in f:329 if line.startswith('#'):330 continue331 else:332 (key, val) = line.split()333 self.Terrestrial[(key)] = val334 # Convert to strings if necessary335 self.Terrestrial['Drainage_Efficiency_Random_Value'] = \336 float(self.Terrestrial['Drainage_Efficiency_Random_Value'])337 self.Terrestrial['ALD_Distribution_Lower_Bound'] = \338 float(self.Terrestrial['ALD_Distribution_Lower_Bound'])339 self.Terrestrial['ALD_Distribution_Upper_Bound'] = \340 float(self.Terrestrial['ALD_Distribution_Upper_Bound'])341 #self.Terrestrial['Wet_NPG_PLF'] = float(self.Terrestrial['Wet_NPG_PLF'])342 #self.Terrestrial['Wet_LCP_PLF'] = float(self.Terrestrial['Wet_LCP_PLF'])343 #self.Terrestrial['Wet_CLC_PLF'] = float(self.Terrestrial['Wet_CLC_PLF'])344 #self.Terrestrial['Wet_FCP_PLF'] = float(self.Terrestrial['Wet_FCP_PLF'])345 #self.Terrestrial['Wet_HCP_PLF'] = float(self.Terrestrial['Wet_HCP_PLF'])346 #self.Terrestrial['Gra_NPG_PLF'] = float(self.Terrestrial['Gra_NPG_PLF'])347 #self.Terrestrial['Gra_LCP_PLF'] = float(self.Terrestrial['Gra_LCP_PLF'])348 #self.Terrestrial['Gra_FCP_PLF'] = float(self.Terrestrial['Gra_FCP_PLF'])349 #self.Terrestrial['Gra_HCP_PLF'] = float(self.Terrestrial['Gra_HCP_PLF'])350 #self.Terrestrial['Shr_NPG_PLF'] = float(self.Terrestrial['Shr_NPG_PLF'])351 #self.Terrestrial['Shr_LCP_PLF'] = float(self.Terrestrial['Shr_LCP_PLF'])352 #self.Terrestrial['Shr_FCP_PLF'] = float(self.Terrestrial['Shr_FCP_PLF'])353 #self.Terrestrial['Shr_HCP_PLF'] = float(self.Terrestrial['Shr_HCP_PLF'])354 #self.Terrestrial['Lakes_PLF'] = float(self.Terrestrial['Lakes_PLF'])355 #self.Terrestrial['Ponds_PLF'] = float(self.Terrestrial['Ponds_PLF'])356 self.Terrestrial['CLC_WT_Y_PLF'] = float(self.Terrestrial['CLC_WT_Y_PLF'])357 self.Terrestrial['CLC_WT_M_PLF'] = float(self.Terrestrial['CLC_WT_M_PLF'])358 self.Terrestrial['CLC_WT_O_PLF'] = float(self.Terrestrial['CLC_WT_O_PLF'])359 self.Terrestrial['CoastalWaters_WT_O_PLF'] = float(self.Terrestrial['CoastalWaters_WT_O_PLF']) 360 self.Terrestrial['DrainedSlope_WT_Y_PLF'] = float(self.Terrestrial['DrainedSlope_WT_Y_PLF'])361 self.Terrestrial['DrainedSlope_WT_M_PLF'] = float(self.Terrestrial['DrainedSlope_WT_M_PLF'])362 self.Terrestrial['DrainedSlope_WT_O_PLF'] = float(self.Terrestrial['DrainedSlope_WT_O_PLF']) 363 self.Terrestrial['FCP_WT_Y_PLF'] = float(self.Terrestrial['FCP_WT_Y_PLF'])364 self.Terrestrial['FCP_WT_M_PLF'] = float(self.Terrestrial['FCP_WT_M_PLF'])365 self.Terrestrial['FCP_WT_O_PLF'] = float(self.Terrestrial['FCP_WT_O_PLF']) 366 self.Terrestrial['HCP_WT_Y_PLF'] = float(self.Terrestrial['HCP_WT_Y_PLF'])367 self.Terrestrial['HCP_WT_M_PLF'] = float(self.Terrestrial['HCP_WT_M_PLF'])368 self.Terrestrial['HCP_WT_O_PLF'] = float(self.Terrestrial['HCP_WT_O_PLF']) 369 self.Terrestrial['LCP_WT_Y_PLF'] = float(self.Terrestrial['LCP_WT_Y_PLF'])370 self.Terrestrial['LCP_WT_M_PLF'] = float(self.Terrestrial['LCP_WT_M_PLF'])371 self.Terrestrial['LCP_WT_O_PLF'] = float(self.Terrestrial['LCP_WT_O_PLF']) 372 self.Terrestrial['Meadow_WT_Y_PLF'] = float(self.Terrestrial['Meadow_WT_Y_PLF'])373 self.Terrestrial['Meadow_WT_M_PLF'] = float(self.Terrestrial['Meadow_WT_M_PLF'])374 self.Terrestrial['Meadow_WT_O_PLF'] = float(self.Terrestrial['Meadow_WT_O_PLF']) 375 self.Terrestrial['NoData_WT_O_PLF'] = float(self.Terrestrial['NoData_WT_O_PLF']) 376 self.Terrestrial['SandDunes_WT_Y_PLF'] = float(self.Terrestrial['SandDunes_WT_Y_PLF'])377 self.Terrestrial['SandDunes_WT_M_PLF'] = float(self.Terrestrial['SandDunes_WT_M_PLF'])378 self.Terrestrial['SandDunes_WT_O_PLF'] = float(self.Terrestrial['SandDunes_WT_O_PLF'])379 self.Terrestrial['SaturatedBarrens_WT_Y_PLF'] = float(self.Terrestrial['SaturatedBarrens_WT_Y_PLF'])380 self.Terrestrial['SaturatedBarrens_WT_M_PLF'] = float(self.Terrestrial['SaturatedBarrens_WT_M_PLF'])381 self.Terrestrial['SaturatedBarrens_WT_O_PLF'] = float(self.Terrestrial['SaturatedBarrens_WT_O_PLF'])382 self.Terrestrial['Shrubs_WT_O_PLF'] = float(self.Terrestrial['Shrubs_WT_O_PLF'])383 self.Terrestrial['Urban_WT_PLF'] = float(self.Terrestrial['Urban_WT_PLF'])384 self.Terrestrial['LargeLakes_WT_Y_PLF'] = float(self.Terrestrial['LargeLakes_WT_Y_PLF'])385 self.Terrestrial['LargeLakes_WT_M_PLF'] = float(self.Terrestrial['LargeLakes_WT_M_PLF'])386 self.Terrestrial['LargeLakes_WT_O_PLF'] = float(self.Terrestrial['LargeLakes_WT_O_PLF']) 387 self.Terrestrial['MediumLakes_WT_Y_PLF'] = float(self.Terrestrial['MediumLakes_WT_Y_PLF'])388 self.Terrestrial['MediumLakes_WT_M_PLF'] = float(self.Terrestrial['MediumLakes_WT_M_PLF'])389 self.Terrestrial['MediumLakes_WT_O_PLF'] = float(self.Terrestrial['MediumLakes_WT_O_PLF']) 390 self.Terrestrial['SmallLakes_WT_Y_PLF'] = float(self.Terrestrial['SmallLakes_WT_Y_PLF'])391 self.Terrestrial['SmallLakes_WT_M_PLF'] = float(self.Terrestrial['SmallLakes_WT_M_PLF'])392 self.Terrestrial['SmallLakes_WT_O_PLF'] = float(self.Terrestrial['SmallLakes_WT_O_PLF']) 393 self.Terrestrial['Ponds_WT_Y_PLF'] = float(self.Terrestrial['Ponds_WT_Y_PLF'])394 self.Terrestrial['Ponds_WT_M_PLF'] = float(self.Terrestrial['Ponds_WT_M_PLF'])395 self.Terrestrial['Ponds_WT_O_PLF'] = float(self.Terrestrial['Ponds_WT_O_PLF']) 396 self.Terrestrial['Rivers_WT_Y_PLF'] = float(self.Terrestrial['Rivers_WT_Y_PLF'])397 self.Terrestrial['Rivers_WT_M_PLF'] = float(self.Terrestrial['Rivers_WT_M_PLF'])398 self.Terrestrial['Rivers_WT_O_PLF'] = float(self.Terrestrial['Rivers_WT_O_PLF']) 399#===============================================================================400def Terrestrial_Tanana(self):401 print '..Reading General Terrestrial Parameters'402 self.Terrestrial = {}403 with open(self.Terrestrial_Control, 'r') as f:404 for line in f:405 if line.startswith('#'):406 continue407 else:408 (key, val) = line.split()409 self.Terrestrial[(key)] = val410 # Convert to strings if necessary411 self.Terrestrial['Drainage_Efficiency_Random_Value'] = \412 float(self.Terrestrial['Drainage_Efficiency_Random_Value'])413 self.Terrestrial['ALD_Distribution_Lower_Bound'] = \414 float(self.Terrestrial['ALD_Distribution_Lower_Bound'])415 self.Terrestrial['ALD_Distribution_Upper_Bound'] = \416 float(self.Terrestrial['ALD_Distribution_Upper_Bound'])417 self.Terrestrial['TF_OB_PLF'] = float(self.Terrestrial['TF_OB_PLF'])418 self.Terrestrial['TF_YB_PLF'] = float(self.Terrestrial['TF_YB_PLF'])419 self.Terrestrial['TF_OF_PLF'] = float(self.Terrestrial['TF_OF_PLF'])420 self.Terrestrial['TF_YF_PLF'] = float(self.Terrestrial['TF_YF_PLF'])421 self.Terrestrial['TF_Dec_PP_PLF'] = float(self.Terrestrial['TF_Dec_PP_PLF'])422 self.Terrestrial['TF_Con_PP_PLF'] = float(self.Terrestrial['TF_Con_PP_PLF'])423 self.Terrestrial['TF_TL_PLF'] = float(self.Terrestrial['TF_TL_PLF'])424#==================================================================================425def Met(self):426 import read_degree_days427 import calc_degree_days428 import read_met_data429 430 print '..Reading General Meteorologic Parameters'431 """ Read files from the input directory """432 if self.Simulation_area.lower() == 'barrow':433 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\434 self.Control_directory+'/')435 elif self.Simulation_area.lower() == 'arctic_coast':436 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic/'+\437 self.Control_directory+'/')438 elif self.Simulation_area.lower() == 'tanana':439 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\440 self.Control_directory+'/')441 elif self.Simulation_area.lower() == 'yukon':442 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\443 self.Control_directory+'/')444 elif self.Simulation_area.lower() == 'aiem':445 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM/'+\446 self.Control_directory+'/')447 elif self.Simulation_area.lower() == 'ngee':448 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE/'+\449 self.Control_directory+'/')450 self.Met = {}451 with open(self.Met_Control, 'r') as f:452 for line in f:453 if line.startswith('#'):454 continue455 else:456 (key, val) = line.split()457 self.Met[(key)] = val458 # Convert string variables if necessary459 self.Met['climate_block_lower_bound'] = int(self.Met['climate_block_lower_bound'])460 self.Met['climate_block_upper_bound'] = int(self.Met['climate_block_upper_bound'])461 self.Met['climate_event_probability'] = float(self.Met['climate_event_probability'])462 self.Met['pond_drain_rate_<0.01'] = float(self.Met['pond_drain_rate_<0.01'])463 self.Met['pond_drain_rate_0.01<0.1'] = float(self.Met['pond_drain_rate_0.01<0.1'])464 self.Met['pond_drain_rate_0.1<0.4'] = float(self.Met['pond_drain_rate_0.1<0.4'])465 self.Met['pond_drain_rate_0.1<1.0'] = float(self.Met['pond_drain_rate_0.4<1.0'])466 self.Met['lake_drain_rate_<0.01'] = float(self.Met['lake_drain_rate_<0.01'])467 self.Met['lake_drain_rate_0.01<0.1'] = float(self.Met['lake_drain_rate_0.01<0.1'])468 self.Met['lake_drain_rate_0.1<0.4'] = float(self.Met['lake_drain_rate_0.1<0.4'])469 self.Met['lake_drain_rate_0.4<1.0'] = float(self.Met['lake_drain_rate_0.4<1.0'])470 #-----------------------------------------------------471 # Read the Met Data472 #-----------------------------------------------------473 if self.Met['met_distribution'].lower() == 'point':474 self.met_file = self.Met['met_file_point']475 elif self.Met['met_distribution'].lower() == 'spatial':476 self.met_file = self.Met['met_file_distributed']477 print ' The meteorologic file to be used is :', self.met_file478 read_met_data.read_met_data(self)479 #_______________________________________480 # READ MET Data & Calculate Degree Days481 #_______________________________________482 if self.Met['degree_day_method'].lower() == 'read': # 'Read' file or 'Calc' from geotiff input483 read_degree_days.read_degree_days(self)484 else:485 calc_degree_days.calc_degree_days(self)486#====================================================================================487def run(self):488 if self.test_code.lower() == 'yes':489 self.stop = self.test_code_duration490 else:491 self.stop = int(self.ATTM_time_steps)492 493#====================================================================================494def initialize(self):495 print ' Initializing the model'496 497 if self.Simulation_area.lower() == 'barrow':498 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\499 self.control['Control_dir']+'/')500 elif self.Simulation_area.lower() == 'tanana':501 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\502 self.control['Control_dir'])503 elif self.Simulation_area.lower() == 'yukon':504 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\505 self.control['Control_dir'])506 self.initialize = {}507 with open(self.Initialize_Control, 'r') as f:508 for line in f:509 if line.startswith('#'):510 continue511 else:512 (key, val) = line.split()513 self.initialize[(key)] = val514#====================================================================================515def CLC_WT(self):516 517 print ' ..Reading Wetland Tundra Coalescent Low Center Polygon Parameters'518 """ Read files from the input directory """519 if self.Simulation_area.lower() == 'barrow':520 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\521 self.Control_directory)522 elif self.Simulation_area.lower() == 'arctic_coast':523 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic/'+\524 self.Control_directory)525 elif self.Simulation_area.lower() == 'tanana':526 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\527 self.Control_directory)528 elif self.Simulation_area.lower() == 'yukon':529 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\530 self.Control_directory)531 elif self.Simulation_area.lower() == 'aiem':532 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM/'+\533 self.Control_directory)534 elif self.Simulation_area.lower() == 'ngee':535 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE/'+\536 self.Control_directory)537 # - - - - - - - - - - - - - - - - - - - - - - - - -538 # Reading Young Age Parameters from Control file539 # - - - - - - - - - - - - - - - - - - - - - - - - -540 print ' .. Young age parameters'541 self.CLC_WT_Y = {}542 with open(self.CLC_WT_Y_Control, 'r') as f:543 for line in f:544 if line.startswith('#'):545 continue546 else:547 (key, val) = line.split()548 self.CLC_WT_Y[(key)] = val549 # Convert strings to floats as necessary550 self.CLC_WT_Y['A1_above'] = float(self.CLC_WT_Y['A1_above'])551 self.CLC_WT_Y['A2_above'] = float(self.CLC_WT_Y['A2_above'])552 self.CLC_WT_Y['x0_above'] = float(self.CLC_WT_Y['x0_above'])553 self.CLC_WT_Y['dx_above'] = float(self.CLC_WT_Y['dx_above'])554 self.CLC_WT_Y['A1_below'] = float(self.CLC_WT_Y['A1_below'])555 self.CLC_WT_Y['A2_below'] = float(self.CLC_WT_Y['A2_below'])556 self.CLC_WT_Y['x0_below'] = float(self.CLC_WT_Y['x0_below'])557 self.CLC_WT_Y['dx_below'] = float(self.CLC_WT_Y['dx_below'])558 self.CLC_WT_Y['a_above'] = float(self.CLC_WT_Y['a_above'])559 self.CLC_WT_Y['b_above'] = float(self.CLC_WT_Y['b_above'])560 self.CLC_WT_Y['a_below'] = float(self.CLC_WT_Y['a_below'])561 self.CLC_WT_Y['b_below'] = float(self.CLC_WT_Y['b_below'])562 self.CLC_WT_Y['K_above'] = float(self.CLC_WT_Y['K_above'])563 self.CLC_WT_Y['C_above'] = float(self.CLC_WT_Y['C_above'])564 self.CLC_WT_Y['A_above'] = float(self.CLC_WT_Y['A_above'])565 self.CLC_WT_Y['B_above'] = float(self.CLC_WT_Y['B_above'])566 self.CLC_WT_Y['K_below'] = float(self.CLC_WT_Y['K_below'])567 self.CLC_WT_Y['C_below'] = float(self.CLC_WT_Y['C_below'])568 self.CLC_WT_Y['A_below'] = float(self.CLC_WT_Y['A_below'])569 self.CLC_WT_Y['B_below'] = float(self.CLC_WT_Y['B_below'])570 self.CLC_WT_Y['HillB_above'] = float(self.CLC_WT_Y['HillB_above'])571 self.CLC_WT_Y['HillN_above'] = float(self.CLC_WT_Y['HillN_above'])572 self.CLC_WT_Y['HillB_below'] = float(self.CLC_WT_Y['HillB_below'])573 self.CLC_WT_Y['HillN_below'] = float(self.CLC_WT_Y['HillN_below'])574 self.CLC_WT_Y['max_terrain_transition'] = \575 float(self.CLC_WT_Y['max_terrain_transition'])576 self.CLC_WT_Y['ice_slope_poor'] = float(self.CLC_WT_Y['ice_slope_poor'])577 self.CLC_WT_Y['ice_slope_pore'] = float(self.CLC_WT_Y['ice_slope_pore'])578 self.CLC_WT_Y['ice_slope_wedge'] = float(self.CLC_WT_Y['ice_slope_wedge'])579 self.CLC_WT_Y['ice_slope_massive'] = float(self.CLC_WT_Y['ice_slope_massive'])580 self.CLC_WT_Y['porosity'] = float(self.CLC_WT_Y['porosity']) 581 # - - - - - - - - - - - - - - - - - - - - - - - - -582 # Reading Medium Age Parameters from Control file583 # - - - - - - - - - - - - - - - - - - - - - - - - -584 print ' .. Medium age parameters'585 586 self.CLC_WT_M = {}587 with open(self.CLC_WT_M_Control, 'r') as f:588 for line in f:589 if line.startswith('#'):590 continue591 else:592 (key, val) = line.split()593 self.CLC_WT_M[(key)] = val594 # Convert strings to floats as necessary595 self.CLC_WT_M['A1_above'] = float(self.CLC_WT_M['A1_above'])596 self.CLC_WT_M['A2_above'] = float(self.CLC_WT_M['A2_above'])597 self.CLC_WT_M['x0_above'] = float(self.CLC_WT_M['x0_above'])598 self.CLC_WT_M['dx_above'] = float(self.CLC_WT_M['dx_above'])599 self.CLC_WT_M['A1_below'] = float(self.CLC_WT_M['A1_below'])600 self.CLC_WT_M['A2_below'] = float(self.CLC_WT_M['A2_below'])601 self.CLC_WT_M['x0_below'] = float(self.CLC_WT_M['x0_below'])602 self.CLC_WT_M['dx_below'] = float(self.CLC_WT_M['dx_below'])603 self.CLC_WT_M['a_above'] = float(self.CLC_WT_M['a_above'])604 self.CLC_WT_M['b_above'] = float(self.CLC_WT_M['b_above'])605 self.CLC_WT_M['a_below'] = float(self.CLC_WT_M['a_below'])606 self.CLC_WT_M['b_below'] = float(self.CLC_WT_M['b_below'])607 self.CLC_WT_M['K_above'] = float(self.CLC_WT_M['K_above'])608 self.CLC_WT_M['C_above'] = float(self.CLC_WT_M['C_above'])609 self.CLC_WT_M['A_above'] = float(self.CLC_WT_M['A_above'])610 self.CLC_WT_M['B_above'] = float(self.CLC_WT_M['B_above'])611 self.CLC_WT_M['K_below'] = float(self.CLC_WT_M['K_below'])612 self.CLC_WT_M['C_below'] = float(self.CLC_WT_M['C_below'])613 self.CLC_WT_M['A_below'] = float(self.CLC_WT_M['A_below'])614 self.CLC_WT_M['B_below'] = float(self.CLC_WT_M['B_below'])615 self.CLC_WT_M['HillB_above'] = float(self.CLC_WT_M['HillB_above'])616 self.CLC_WT_M['HillN_above'] = float(self.CLC_WT_M['HillN_above'])617 self.CLC_WT_M['HillB_below'] = float(self.CLC_WT_M['HillB_below'])618 self.CLC_WT_M['HillN_below'] = float(self.CLC_WT_M['HillN_below'])619 self.CLC_WT_M['max_terrain_transition'] = \620 float(self.CLC_WT_M['max_terrain_transition'])621 self.CLC_WT_M['ice_slope_poor'] = float(self.CLC_WT_M['ice_slope_poor'])622 self.CLC_WT_M['ice_slope_pore'] = float(self.CLC_WT_M['ice_slope_pore'])623 self.CLC_WT_M['ice_slope_wedge'] = float(self.CLC_WT_M['ice_slope_wedge'])624 self.CLC_WT_M['ice_slope_massive'] = float(self.CLC_WT_M['ice_slope_massive'])625 self.CLC_WT_M['porosity'] = float(self.CLC_WT_M['porosity']) 626 # - - - - - - - - - - - - - - - - - - - - - - - - -627 # Reading Old Age Parameters from Control file628 # - - - - - - - - - - - - - - - - - - - - - - - - -629 print ' .. Old age parameters'630 631 self.CLC_WT_O = {}632 with open(self.CLC_WT_O_Control, 'r') as f:633 for line in f:634 if line.startswith('#'):635 continue636 else:637 (key, val) = line.split()638 self.CLC_WT_O[(key)] = val639 # Convert strings to floats as necessary640 self.CLC_WT_O['A1_above'] = float(self.CLC_WT_O['A1_above'])641 self.CLC_WT_O['A2_above'] = float(self.CLC_WT_O['A2_above'])642 self.CLC_WT_O['x0_above'] = float(self.CLC_WT_O['x0_above'])643 self.CLC_WT_O['dx_above'] = float(self.CLC_WT_O['dx_above'])644 self.CLC_WT_O['A1_below'] = float(self.CLC_WT_O['A1_below'])645 self.CLC_WT_O['A2_below'] = float(self.CLC_WT_O['A2_below'])646 self.CLC_WT_O['x0_below'] = float(self.CLC_WT_O['x0_below'])647 self.CLC_WT_O['dx_below'] = float(self.CLC_WT_O['dx_below'])648 self.CLC_WT_O['a_above'] = float(self.CLC_WT_O['a_above'])649 self.CLC_WT_O['b_above'] = float(self.CLC_WT_O['b_above'])650 self.CLC_WT_O['a_below'] = float(self.CLC_WT_O['a_below'])651 self.CLC_WT_O['b_below'] = float(self.CLC_WT_O['b_below'])652 self.CLC_WT_O['K_above'] = float(self.CLC_WT_O['K_above'])653 self.CLC_WT_O['C_above'] = float(self.CLC_WT_O['C_above'])654 self.CLC_WT_O['A_above'] = float(self.CLC_WT_O['A_above'])655 self.CLC_WT_O['B_above'] = float(self.CLC_WT_O['B_above'])656 self.CLC_WT_O['K_below'] = float(self.CLC_WT_O['K_below'])657 self.CLC_WT_O['C_below'] = float(self.CLC_WT_O['C_below'])658 self.CLC_WT_O['A_below'] = float(self.CLC_WT_O['A_below'])659 self.CLC_WT_O['B_below'] = float(self.CLC_WT_O['B_below'])660 self.CLC_WT_O['HillB_above'] = float(self.CLC_WT_O['HillB_above'])661 self.CLC_WT_O['HillN_above'] = float(self.CLC_WT_O['HillN_above'])662 self.CLC_WT_O['HillB_below'] = float(self.CLC_WT_O['HillB_below'])663 self.CLC_WT_O['HillN_below'] = float(self.CLC_WT_O['HillN_below'])664 self.CLC_WT_O['max_terrain_transition'] = \665 float(self.CLC_WT_O['max_terrain_transition'])666 self.CLC_WT_O['ice_slope_poor'] = float(self.CLC_WT_O['ice_slope_poor'])667 self.CLC_WT_O['ice_slope_pore'] = float(self.CLC_WT_O['ice_slope_pore'])668 self.CLC_WT_O['ice_slope_wedge'] = float(self.CLC_WT_O['ice_slope_wedge'])669 self.CLC_WT_O['ice_slope_massive'] = float(self.CLC_WT_O['ice_slope_massive'])670 self.CLC_WT_O['porosity'] = float(self.CLC_WT_O['porosity']) 671#====================================================================================672def CoastalWaters_WT(self):673 674 print ' ..Reading Wetland Tundra Coastal Waters Parameters'675 """ Read files from the input directory """676 if self.Simulation_area.lower() == 'barrow':677 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\678 self.Control_directory)679 elif self.Simulation_area.lower() == 'arctic_coast':680 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic/'+\681 self.Control_directory)682 elif self.Simulation_area.lower() == 'tanana':683 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\684 self.Control_directory)685 elif self.Simulation_area.lower() == 'yukon':686 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\687 self.Control_directory)688 elif self.Simulation_area.lower() == 'aiem':689 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM/'+\690 self.Control_directory)691 elif self.Simulation_area.lower() == 'ngee':692 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE/'+\693 self.Control_directory)694 # - - - - - - - - - - - - - - - - - - - - - - - - -695 # Reading Old Age Parameters from Control file696 # - - - - - - - - - - - - - - - - - - - - - - - - -697 self.CoastalWaters_WT_O = {}698 with open(self.CoastalWaters_WT_O_Control, 'r') as f:699 for line in f:700 if line.startswith('#'):701 continue702 else:703 (key, val) = line.split()704 self.CoastalWaters_WT_O[(key)] = val705 # Convert strings to floats as necessary706 self.CoastalWaters_WT_O['A1_above'] = float(self.CoastalWaters_WT_O['A1_above'])707 self.CoastalWaters_WT_O['A2_above'] = float(self.CoastalWaters_WT_O['A2_above'])708 self.CoastalWaters_WT_O['x0_above'] = float(self.CoastalWaters_WT_O['x0_above'])709 self.CoastalWaters_WT_O['dx_above'] = float(self.CoastalWaters_WT_O['dx_above'])710 self.CoastalWaters_WT_O['A1_below'] = float(self.CoastalWaters_WT_O['A1_below'])711 self.CoastalWaters_WT_O['A2_below'] = float(self.CoastalWaters_WT_O['A2_below'])712 self.CoastalWaters_WT_O['x0_below'] = float(self.CoastalWaters_WT_O['x0_below'])713 self.CoastalWaters_WT_O['dx_below'] = float(self.CoastalWaters_WT_O['dx_below'])714 self.CoastalWaters_WT_O['a_above'] = float(self.CoastalWaters_WT_O['a_above'])715 self.CoastalWaters_WT_O['b_above'] = float(self.CoastalWaters_WT_O['b_above'])716 self.CoastalWaters_WT_O['a_below'] = float(self.CoastalWaters_WT_O['a_below'])717 self.CoastalWaters_WT_O['b_below'] = float(self.CoastalWaters_WT_O['b_below'])718 self.CoastalWaters_WT_O['K_above'] = float(self.CoastalWaters_WT_O['K_above'])719 self.CoastalWaters_WT_O['C_above'] = float(self.CoastalWaters_WT_O['C_above'])720 self.CoastalWaters_WT_O['A_above'] = float(self.CoastalWaters_WT_O['A_above'])721 self.CoastalWaters_WT_O['B_above'] = float(self.CoastalWaters_WT_O['B_above'])722 self.CoastalWaters_WT_O['K_below'] = float(self.CoastalWaters_WT_O['K_below'])723 self.CoastalWaters_WT_O['C_below'] = float(self.CoastalWaters_WT_O['C_below'])724 self.CoastalWaters_WT_O['A_below'] = float(self.CoastalWaters_WT_O['A_below'])725 self.CoastalWaters_WT_O['B_below'] = float(self.CoastalWaters_WT_O['B_below'])726 self.CoastalWaters_WT_O['HillB_above'] = float(self.CoastalWaters_WT_O['HillB_above'])727 self.CoastalWaters_WT_O['HillN_above'] = float(self.CoastalWaters_WT_O['HillN_above'])728 self.CoastalWaters_WT_O['HillB_below'] = float(self.CoastalWaters_WT_O['HillB_below'])729 self.CoastalWaters_WT_O['HillN_below'] = float(self.CoastalWaters_WT_O['HillN_below'])730 self.CoastalWaters_WT_O['max_terrain_transition'] = \731 float(self.CoastalWaters_WT_O['max_terrain_transition'])732 self.CoastalWaters_WT_O['ice_slope_poor'] = float(self.CoastalWaters_WT_O['ice_slope_poor'])733 self.CoastalWaters_WT_O['ice_slope_pore'] = float(self.CoastalWaters_WT_O['ice_slope_pore'])734 self.CoastalWaters_WT_O['ice_slope_wedge'] = float(self.CoastalWaters_WT_O['ice_slope_wedge'])735 self.CoastalWaters_WT_O['ice_slope_massive'] = float(self.CoastalWaters_WT_O['ice_slope_massive'])736 self.CoastalWaters_WT_O['porosity'] = float(self.CoastalWaters_WT_O['porosity']) 737#====================================================================================738def DrainedSlope_WT(self):739 740 print ' ..Reading Wetland Tundra Drained Slope Parameters'741 """ Read files from the input directory """742 if self.Simulation_area.lower() == 'barrow':743 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\744 self.Control_directory)745 elif self.Simulation_area.lower() == 'arctic_coast':746 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic/'+\747 self.Control_directory)748 elif self.Simulation_area.lower() == 'tanana':749 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\750 self.Control_directory)751 elif self.Simulation_area.lower() == 'yukon':752 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\753 self.Control_directory)754 elif self.Simulation_area.lower() == 'aiem':755 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM/'+\756 self.Control_directory)757 elif self.Simulation_area.lower() == 'ngee':758 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE/'+\759 self.Control_directory)760 # - - - - - - - - - - - - - - - - - - - - - - - - -761 # Reading Young Age Parameters from Control file762 # - - - - - - - - - - - - - - - - - - - - - - - - -763 print ' .. Young age parameters'764 765 self.DrainedSlope_WT_Y = {}766 with open(self.DrainedSlope_WT_Y_Control, 'r') as f:767 for line in f:768 if line.startswith('#'):769 continue770 else:771 (key, val) = line.split()772 self.DrainedSlope_WT_Y[(key)] = val773 # Convert strings to floats as necessary774 self.DrainedSlope_WT_Y['A1_above'] = float(self.DrainedSlope_WT_Y['A1_above'])775 self.DrainedSlope_WT_Y['A2_above'] = float(self.DrainedSlope_WT_Y['A2_above'])776 self.DrainedSlope_WT_Y['x0_above'] = float(self.DrainedSlope_WT_Y['x0_above'])777 self.DrainedSlope_WT_Y['dx_above'] = float(self.DrainedSlope_WT_Y['dx_above'])778 self.DrainedSlope_WT_Y['A1_below'] = float(self.DrainedSlope_WT_Y['A1_below'])779 self.DrainedSlope_WT_Y['A2_below'] = float(self.DrainedSlope_WT_Y['A2_below'])780 self.DrainedSlope_WT_Y['x0_below'] = float(self.DrainedSlope_WT_Y['x0_below'])781 self.DrainedSlope_WT_Y['dx_below'] = float(self.DrainedSlope_WT_Y['dx_below'])782 self.DrainedSlope_WT_Y['a_above'] = float(self.DrainedSlope_WT_Y['a_above'])783 self.DrainedSlope_WT_Y['b_above'] = float(self.DrainedSlope_WT_Y['b_above'])784 self.DrainedSlope_WT_Y['a_below'] = float(self.DrainedSlope_WT_Y['a_below'])785 self.DrainedSlope_WT_Y['b_below'] = float(self.DrainedSlope_WT_Y['b_below'])786 self.DrainedSlope_WT_Y['K_above'] = float(self.DrainedSlope_WT_Y['K_above'])787 self.DrainedSlope_WT_Y['C_above'] = float(self.DrainedSlope_WT_Y['C_above'])788 self.DrainedSlope_WT_Y['A_above'] = float(self.DrainedSlope_WT_Y['A_above'])789 self.DrainedSlope_WT_Y['B_above'] = float(self.DrainedSlope_WT_Y['B_above'])790 self.DrainedSlope_WT_Y['K_below'] = float(self.DrainedSlope_WT_Y['K_below'])791 self.DrainedSlope_WT_Y['C_below'] = float(self.DrainedSlope_WT_Y['C_below'])792 self.DrainedSlope_WT_Y['A_below'] = float(self.DrainedSlope_WT_Y['A_below'])793 self.DrainedSlope_WT_Y['B_below'] = float(self.DrainedSlope_WT_Y['B_below'])794 self.DrainedSlope_WT_Y['HillB_above'] = float(self.DrainedSlope_WT_Y['HillB_above'])795 self.DrainedSlope_WT_Y['HillN_above'] = float(self.DrainedSlope_WT_Y['HillN_above'])796 self.DrainedSlope_WT_Y['HillB_below'] = float(self.DrainedSlope_WT_Y['HillB_below'])797 self.DrainedSlope_WT_Y['HillN_below'] = float(self.DrainedSlope_WT_Y['HillN_below'])798 self.DrainedSlope_WT_Y['max_terrain_transition'] = \799 float(self.DrainedSlope_WT_Y['max_terrain_transition'])800 self.DrainedSlope_WT_Y['ice_slope_poor'] = float(self.DrainedSlope_WT_Y['ice_slope_poor'])801 self.DrainedSlope_WT_Y['ice_slope_pore'] = float(self.DrainedSlope_WT_Y['ice_slope_pore'])802 self.DrainedSlope_WT_Y['ice_slope_wedge'] = float(self.DrainedSlope_WT_Y['ice_slope_wedge'])803 self.DrainedSlope_WT_Y['ice_slope_massive'] = float(self.DrainedSlope_WT_Y['ice_slope_massive'])804 self.DrainedSlope_WT_Y['porosity'] = float(self.DrainedSlope_WT_Y['porosity']) 805 # - - - - - - - - - - - - - - - - - - - - - - - - -806 # Reading Medium Age Parameters from Control file807 # - - - - - - - - - - - - - - - - - - - - - - - - -808 print ' .. Medium age parameters'809 810 self.DrainedSlope_WT_M = {}811 with open(self.DrainedSlope_WT_M_Control, 'r') as f:812 for line in f:813 if line.startswith('#'):814 continue815 else:816 (key, val) = line.split()817 self.DrainedSlope_WT_M[(key)] = val818 # Convert strings to floats as necessary819 self.DrainedSlope_WT_M['A1_above'] = float(self.DrainedSlope_WT_M['A1_above'])820 self.DrainedSlope_WT_M['A2_above'] = float(self.DrainedSlope_WT_M['A2_above'])821 self.DrainedSlope_WT_M['x0_above'] = float(self.DrainedSlope_WT_M['x0_above'])822 self.DrainedSlope_WT_M['dx_above'] = float(self.DrainedSlope_WT_M['dx_above'])823 self.DrainedSlope_WT_M['A1_below'] = float(self.DrainedSlope_WT_M['A1_below'])824 self.DrainedSlope_WT_M['A2_below'] = float(self.DrainedSlope_WT_M['A2_below'])825 self.DrainedSlope_WT_M['x0_below'] = float(self.DrainedSlope_WT_M['x0_below'])826 self.DrainedSlope_WT_M['dx_below'] = float(self.DrainedSlope_WT_M['dx_below'])827 self.DrainedSlope_WT_M['a_above'] = float(self.DrainedSlope_WT_M['a_above'])828 self.DrainedSlope_WT_M['b_above'] = float(self.DrainedSlope_WT_M['b_above'])829 self.DrainedSlope_WT_M['a_below'] = float(self.DrainedSlope_WT_M['a_below'])830 self.DrainedSlope_WT_M['b_below'] = float(self.DrainedSlope_WT_M['b_below'])831 self.DrainedSlope_WT_M['K_above'] = float(self.DrainedSlope_WT_M['K_above'])832 self.DrainedSlope_WT_M['C_above'] = float(self.DrainedSlope_WT_M['C_above'])833 self.DrainedSlope_WT_M['A_above'] = float(self.DrainedSlope_WT_M['A_above'])834 self.DrainedSlope_WT_M['B_above'] = float(self.DrainedSlope_WT_M['B_above'])835 self.DrainedSlope_WT_M['K_below'] = float(self.DrainedSlope_WT_M['K_below'])836 self.DrainedSlope_WT_M['C_below'] = float(self.DrainedSlope_WT_M['C_below'])837 self.DrainedSlope_WT_M['A_below'] = float(self.DrainedSlope_WT_M['A_below'])838 self.DrainedSlope_WT_M['B_below'] = float(self.DrainedSlope_WT_M['B_below'])839 self.DrainedSlope_WT_M['HillB_above'] = float(self.DrainedSlope_WT_M['HillB_above'])840 self.DrainedSlope_WT_M['HillN_above'] = float(self.DrainedSlope_WT_M['HillN_above'])841 self.DrainedSlope_WT_M['HillB_below'] = float(self.DrainedSlope_WT_M['HillB_below'])842 self.DrainedSlope_WT_M['HillN_below'] = float(self.DrainedSlope_WT_M['HillN_below'])843 self.DrainedSlope_WT_M['max_terrain_transition'] = \844 float(self.DrainedSlope_WT_M['max_terrain_transition'])845 self.DrainedSlope_WT_M['ice_slope_poor'] = float(self.DrainedSlope_WT_M['ice_slope_poor'])846 self.DrainedSlope_WT_M['ice_slope_pore'] = float(self.DrainedSlope_WT_M['ice_slope_pore'])847 self.DrainedSlope_WT_M['ice_slope_wedge'] = float(self.DrainedSlope_WT_M['ice_slope_wedge'])848 self.DrainedSlope_WT_M['ice_slope_massive'] = float(self.DrainedSlope_WT_M['ice_slope_massive'])849 self.DrainedSlope_WT_M['porosity'] = float(self.DrainedSlope_WT_M['porosity']) 850 # - - - - - - - - - - - - - - - - - - - - - - - - -851 # Reading Old Age Parameters from Control file852 # - - - - - - - - - - - - - - - - - - - - - - - - -853 print ' .. Old age parameters'854 855 self.DrainedSlope_WT_O = {}856 with open(self.DrainedSlope_WT_O_Control, 'r') as f:857 for line in f:858 if line.startswith('#'):859 continue860 else:861 (key, val) = line.split()862 self.DrainedSlope_WT_O[(key)] = val863 # Convert strings to floats as necessary864 self.DrainedSlope_WT_O['A1_above'] = float(self.DrainedSlope_WT_O['A1_above'])865 self.DrainedSlope_WT_O['A2_above'] = float(self.DrainedSlope_WT_O['A2_above'])866 self.DrainedSlope_WT_O['x0_above'] = float(self.DrainedSlope_WT_O['x0_above'])867 self.DrainedSlope_WT_O['dx_above'] = float(self.DrainedSlope_WT_O['dx_above'])868 self.DrainedSlope_WT_O['A1_below'] = float(self.DrainedSlope_WT_O['A1_below'])869 self.DrainedSlope_WT_O['A2_below'] = float(self.DrainedSlope_WT_O['A2_below'])870 self.DrainedSlope_WT_O['x0_below'] = float(self.DrainedSlope_WT_O['x0_below'])871 self.DrainedSlope_WT_O['dx_below'] = float(self.DrainedSlope_WT_O['dx_below'])872 self.DrainedSlope_WT_O['a_above'] = float(self.DrainedSlope_WT_O['a_above'])873 self.DrainedSlope_WT_O['b_above'] = float(self.DrainedSlope_WT_O['b_above'])874 self.DrainedSlope_WT_O['a_below'] = float(self.DrainedSlope_WT_O['a_below'])875 self.DrainedSlope_WT_O['b_below'] = float(self.DrainedSlope_WT_O['b_below'])876 self.DrainedSlope_WT_O['K_above'] = float(self.DrainedSlope_WT_O['K_above'])877 self.DrainedSlope_WT_O['C_above'] = float(self.DrainedSlope_WT_O['C_above'])878 self.DrainedSlope_WT_O['A_above'] = float(self.DrainedSlope_WT_O['A_above'])879 self.DrainedSlope_WT_O['B_above'] = float(self.DrainedSlope_WT_O['B_above'])880 self.DrainedSlope_WT_O['K_below'] = float(self.DrainedSlope_WT_O['K_below'])881 self.DrainedSlope_WT_O['C_below'] = float(self.DrainedSlope_WT_O['C_below'])882 self.DrainedSlope_WT_O['A_below'] = float(self.DrainedSlope_WT_O['A_below'])883 self.DrainedSlope_WT_O['B_below'] = float(self.DrainedSlope_WT_O['B_below'])884 self.DrainedSlope_WT_O['HillB_above'] = float(self.DrainedSlope_WT_O['HillB_above'])885 self.DrainedSlope_WT_O['HillN_above'] = float(self.DrainedSlope_WT_O['HillN_above'])886 self.DrainedSlope_WT_O['HillB_below'] = float(self.DrainedSlope_WT_O['HillB_below'])887 self.DrainedSlope_WT_O['HillN_below'] = float(self.DrainedSlope_WT_O['HillN_below'])888 self.DrainedSlope_WT_O['max_terrain_transition'] = \889 float(self.DrainedSlope_WT_O['max_terrain_transition'])890 self.DrainedSlope_WT_O['ice_slope_poor'] = float(self.DrainedSlope_WT_O['ice_slope_poor'])891 self.DrainedSlope_WT_O['ice_slope_pore'] = float(self.DrainedSlope_WT_O['ice_slope_pore'])892 self.DrainedSlope_WT_O['ice_slope_wedge'] = float(self.DrainedSlope_WT_O['ice_slope_wedge'])893 self.DrainedSlope_WT_O['ice_slope_massive'] = float(self.DrainedSlope_WT_O['ice_slope_massive'])894 self.DrainedSlope_WT_O['porosity'] = float(self.DrainedSlope_WT_O['porosity']) 895#====================================================================================896def FCP_WT(self):897 898 print ' ..Reading Wetland Tundra Flat Center Polygon Parameters'899 """ Read files from the input directory """900 if self.Simulation_area.lower() == 'barrow':901 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\902 self.Control_directory)903 elif self.Simulation_area.lower() == 'arctic_coast':904 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic/'+\905 self.Control_directory)906 elif self.Simulation_area.lower() == 'tanana':907 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\908 self.Control_directory)909 elif self.Simulation_area.lower() == 'yukon':910 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\911 self.Control_directory)912 elif self.Simulation_area.lower() == 'aiem':913 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM/'+\914 self.Control_directory)915 elif self.Simulation_area.lower() == 'ngee':916 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE/'+\917 self.Control_directory)918 # - - - - - - - - - - - - - - - - - - - - - - - - -919 # Reading Young Age Parameters from Control file920 # - - - - - - - - - - - - - - - - - - - - - - - - -921 print ' .. Young age parameters'922 923 self.FCP_WT_Y = {}924 with open(self.FCP_WT_Y_Control, 'r') as f:925 for line in f:926 if line.startswith('#'):927 continue928 else:929 (key, val) = line.split()930 self.FCP_WT_Y[(key)] = val931 # Convert strings to floats as necessary932 self.FCP_WT_Y['A1_above'] = float(self.FCP_WT_Y['A1_above'])933 self.FCP_WT_Y['A2_above'] = float(self.FCP_WT_Y['A2_above'])934 self.FCP_WT_Y['x0_above'] = float(self.FCP_WT_Y['x0_above'])935 self.FCP_WT_Y['dx_above'] = float(self.FCP_WT_Y['dx_above'])936 self.FCP_WT_Y['A1_below'] = float(self.FCP_WT_Y['A1_below'])937 self.FCP_WT_Y['A2_below'] = float(self.FCP_WT_Y['A2_below'])938 self.FCP_WT_Y['x0_below'] = float(self.FCP_WT_Y['x0_below'])939 self.FCP_WT_Y['dx_below'] = float(self.FCP_WT_Y['dx_below'])940 self.FCP_WT_Y['a_above'] = float(self.FCP_WT_Y['a_above'])941 self.FCP_WT_Y['b_above'] = float(self.FCP_WT_Y['b_above'])942 self.FCP_WT_Y['a_below'] = float(self.FCP_WT_Y['a_below'])943 self.FCP_WT_Y['b_below'] = float(self.FCP_WT_Y['b_below'])944 self.FCP_WT_Y['K_above'] = float(self.FCP_WT_Y['K_above'])945 self.FCP_WT_Y['C_above'] = float(self.FCP_WT_Y['C_above'])946 self.FCP_WT_Y['A_above'] = float(self.FCP_WT_Y['A_above'])947 self.FCP_WT_Y['B_above'] = float(self.FCP_WT_Y['B_above'])948 self.FCP_WT_Y['K_below'] = float(self.FCP_WT_Y['K_below'])949 self.FCP_WT_Y['C_below'] = float(self.FCP_WT_Y['C_below'])950 self.FCP_WT_Y['A_below'] = float(self.FCP_WT_Y['A_below'])951 self.FCP_WT_Y['B_below'] = float(self.FCP_WT_Y['B_below'])952 self.FCP_WT_Y['HillB_above'] = float(self.FCP_WT_Y['HillB_above'])953 self.FCP_WT_Y['HillN_above'] = float(self.FCP_WT_Y['HillN_above'])954 self.FCP_WT_Y['HillB_below'] = float(self.FCP_WT_Y['HillB_below'])955 self.FCP_WT_Y['HillN_below'] = float(self.FCP_WT_Y['HillN_below'])956 self.FCP_WT_Y['max_terrain_transition'] = \957 float(self.FCP_WT_Y['max_terrain_transition'])958 self.FCP_WT_Y['ice_slope_poor'] = float(self.FCP_WT_Y['ice_slope_poor'])959 self.FCP_WT_Y['ice_slope_pore'] = float(self.FCP_WT_Y['ice_slope_pore'])960 self.FCP_WT_Y['ice_slope_wedge'] = float(self.FCP_WT_Y['ice_slope_wedge'])961 self.FCP_WT_Y['ice_slope_massive'] = float(self.FCP_WT_Y['ice_slope_massive'])962 self.FCP_WT_Y['porosity'] = float(self.FCP_WT_Y['porosity']) 963 # - - - - - - - - - - - - - - - - - - - - - - - - -964 # Reading Medium Age Parameters from Control file965 # - - - - - - - - - - - - - - - - - - - - - - - - -966 print ' .. Medium age parameters'967 968 self.FCP_WT_M = {}969 with open(self.FCP_WT_M_Control, 'r') as f:970 for line in f:971 if line.startswith('#'):972 continue973 else:974 (key, val) = line.split()975 self.FCP_WT_M[(key)] = val976 # Convert strings to floats as necessary977 self.FCP_WT_M['A1_above'] = float(self.FCP_WT_M['A1_above'])978 self.FCP_WT_M['A2_above'] = float(self.FCP_WT_M['A2_above'])979 self.FCP_WT_M['x0_above'] = float(self.FCP_WT_M['x0_above'])980 self.FCP_WT_M['dx_above'] = float(self.FCP_WT_M['dx_above'])981 self.FCP_WT_M['A1_below'] = float(self.FCP_WT_M['A1_below'])982 self.FCP_WT_M['A2_below'] = float(self.FCP_WT_M['A2_below'])983 self.FCP_WT_M['x0_below'] = float(self.FCP_WT_M['x0_below'])984 self.FCP_WT_M['dx_below'] = float(self.FCP_WT_M['dx_below'])985 self.FCP_WT_M['a_above'] = float(self.FCP_WT_M['a_above'])986 self.FCP_WT_M['b_above'] = float(self.FCP_WT_M['b_above'])987 self.FCP_WT_M['a_below'] = float(self.FCP_WT_M['a_below'])988 self.FCP_WT_M['b_below'] = float(self.FCP_WT_M['b_below'])989 self.FCP_WT_M['K_above'] = float(self.FCP_WT_M['K_above'])990 self.FCP_WT_M['C_above'] = float(self.FCP_WT_M['C_above'])991 self.FCP_WT_M['A_above'] = float(self.FCP_WT_M['A_above'])992 self.FCP_WT_M['B_above'] = float(self.FCP_WT_M['B_above'])993 self.FCP_WT_M['K_below'] = float(self.FCP_WT_M['K_below'])994 self.FCP_WT_M['C_below'] = float(self.FCP_WT_M['C_below'])995 self.FCP_WT_M['A_below'] = float(self.FCP_WT_M['A_below'])996 self.FCP_WT_M['B_below'] = float(self.FCP_WT_M['B_below'])997 self.FCP_WT_M['HillB_above'] = float(self.FCP_WT_M['HillB_above'])998 self.FCP_WT_M['HillN_above'] = float(self.FCP_WT_M['HillN_above'])999 self.FCP_WT_M['HillB_below'] = float(self.FCP_WT_M['HillB_below'])1000 self.FCP_WT_M['HillN_below'] = float(self.FCP_WT_M['HillN_below'])1001 self.FCP_WT_M['max_terrain_transition'] = \1002 float(self.FCP_WT_M['max_terrain_transition'])1003 self.FCP_WT_M['ice_slope_poor'] = float(self.FCP_WT_M['ice_slope_poor'])1004 self.FCP_WT_M['ice_slope_pore'] = float(self.FCP_WT_M['ice_slope_pore'])1005 self.FCP_WT_M['ice_slope_wedge'] = float(self.FCP_WT_M['ice_slope_wedge'])1006 self.FCP_WT_M['ice_slope_massive'] = float(self.FCP_WT_M['ice_slope_massive'])1007 self.FCP_WT_M['porosity'] = float(self.FCP_WT_M['porosity']) 1008 # - - - - - - - - - - - - - - - - - - - - - - - - -1009 # Reading Old Age Parameters from Control file1010 # - - - - - - - - - - - - - - - - - - - - - - - - -1011 print ' .. Old age parameters'1012 1013 self.FCP_WT_O = {}1014 with open(self.FCP_WT_O_Control, 'r') as f:1015 for line in f:1016 if line.startswith('#'):1017 continue1018 else:1019 (key, val) = line.split()1020 self.FCP_WT_O[(key)] = val1021 # Convert strings to floats as necessary1022 self.FCP_WT_O['A1_above'] = float(self.FCP_WT_O['A1_above'])1023 self.FCP_WT_O['A2_above'] = float(self.FCP_WT_O['A2_above'])1024 self.FCP_WT_O['x0_above'] = float(self.FCP_WT_O['x0_above'])1025 self.FCP_WT_O['dx_above'] = float(self.FCP_WT_O['dx_above'])1026 self.FCP_WT_O['A1_below'] = float(self.FCP_WT_O['A1_below'])1027 self.FCP_WT_O['A2_below'] = float(self.FCP_WT_O['A2_below'])1028 self.FCP_WT_O['x0_below'] = float(self.FCP_WT_O['x0_below'])1029 self.FCP_WT_O['dx_below'] = float(self.FCP_WT_O['dx_below'])1030 self.FCP_WT_O['a_above'] = float(self.FCP_WT_O['a_above'])1031 self.FCP_WT_O['b_above'] = float(self.FCP_WT_O['b_above'])1032 self.FCP_WT_O['a_below'] = float(self.FCP_WT_O['a_below'])1033 self.FCP_WT_O['b_below'] = float(self.FCP_WT_O['b_below'])1034 self.FCP_WT_O['K_above'] = float(self.FCP_WT_O['K_above'])1035 self.FCP_WT_O['C_above'] = float(self.FCP_WT_O['C_above'])1036 self.FCP_WT_O['A_above'] = float(self.FCP_WT_O['A_above'])1037 self.FCP_WT_O['B_above'] = float(self.FCP_WT_O['B_above'])1038 self.FCP_WT_O['K_below'] = float(self.FCP_WT_O['K_below'])1039 self.FCP_WT_O['C_below'] = float(self.FCP_WT_O['C_below'])1040 self.FCP_WT_O['A_below'] = float(self.FCP_WT_O['A_below'])1041 self.FCP_WT_O['B_below'] = float(self.FCP_WT_O['B_below'])1042 self.FCP_WT_O['HillB_above'] = float(self.FCP_WT_O['HillB_above'])1043 self.FCP_WT_O['HillN_above'] = float(self.FCP_WT_O['HillN_above'])1044 self.FCP_WT_O['HillB_below'] = float(self.FCP_WT_O['HillB_below'])1045 self.FCP_WT_O['HillN_below'] = float(self.FCP_WT_O['HillN_below'])1046 self.FCP_WT_O['max_terrain_transition'] = \1047 float(self.FCP_WT_O['max_terrain_transition'])1048 self.FCP_WT_O['ice_slope_poor'] = float(self.FCP_WT_O['ice_slope_poor'])1049 self.FCP_WT_O['ice_slope_pore'] = float(self.FCP_WT_O['ice_slope_pore'])1050 self.FCP_WT_O['ice_slope_wedge'] = float(self.FCP_WT_O['ice_slope_wedge'])1051 self.FCP_WT_O['ice_slope_massive'] = float(self.FCP_WT_O['ice_slope_massive'])1052 self.FCP_WT_O['porosity'] = float(self.FCP_WT_O['porosity']) 1053#====================================================================================1054def HCP_WT(self):1055 1056 print ' ..Reading Wetland Tundra High Center Polygon Parameters'1057 """ Read files from the input directory """1058 if self.Simulation_area.lower() == 'barrow':1059 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\1060 self.Control_directory)1061 elif self.Simulation_area.lower() == 'arctic_coast':1062 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic/'+\1063 self.Control_directory)1064 elif self.Simulation_area.lower() == 'tanana':1065 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\1066 self.Control_directory)1067 elif self.Simulation_area.lower() == 'yukon':1068 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\1069 self.Control_directory)1070 elif self.Simulation_area.lower() == 'aiem':1071 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM/'+\1072 self.Control_directory)1073 elif self.Simulation_area.lower() == 'ngee':1074 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE/'+\1075 self.Control_directory)1076 # - - - - - - - - - - - - - - - - - - - - - - - - -1077 # Reading Young Age Parameters from Control file1078 # - - - - - - - - - - - - - - - - - - - - - - - - -1079 print ' .. Young age parameters'1080 1081 self.HCP_WT_Y = {}1082 with open(self.HCP_WT_Y_Control, 'r') as f:1083 for line in f:1084 if line.startswith('#'):1085 continue1086 else:1087 (key, val) = line.split()1088 self.HCP_WT_Y[(key)] = val1089 # Convert strings to floats as necessary1090 self.HCP_WT_Y['A1_above'] = float(self.HCP_WT_Y['A1_above'])1091 self.HCP_WT_Y['A2_above'] = float(self.HCP_WT_Y['A2_above'])1092 self.HCP_WT_Y['x0_above'] = float(self.HCP_WT_Y['x0_above'])1093 self.HCP_WT_Y['dx_above'] = float(self.HCP_WT_Y['dx_above'])1094 self.HCP_WT_Y['A1_below'] = float(self.HCP_WT_Y['A1_below'])1095 self.HCP_WT_Y['A2_below'] = float(self.HCP_WT_Y['A2_below'])1096 self.HCP_WT_Y['x0_below'] = float(self.HCP_WT_Y['x0_below'])1097 self.HCP_WT_Y['dx_below'] = float(self.HCP_WT_Y['dx_below'])1098 self.HCP_WT_Y['a_above'] = float(self.HCP_WT_Y['a_above'])1099 self.HCP_WT_Y['b_above'] = float(self.HCP_WT_Y['b_above'])1100 self.HCP_WT_Y['a_below'] = float(self.HCP_WT_Y['a_below'])1101 self.HCP_WT_Y['b_below'] = float(self.HCP_WT_Y['b_below'])1102 self.HCP_WT_Y['K_above'] = float(self.HCP_WT_Y['K_above'])1103 self.HCP_WT_Y['C_above'] = float(self.HCP_WT_Y['C_above'])1104 self.HCP_WT_Y['A_above'] = float(self.HCP_WT_Y['A_above'])1105 self.HCP_WT_Y['B_above'] = float(self.HCP_WT_Y['B_above'])1106 self.HCP_WT_Y['K_below'] = float(self.HCP_WT_Y['K_below'])1107 self.HCP_WT_Y['C_below'] = float(self.HCP_WT_Y['C_below'])1108 self.HCP_WT_Y['A_below'] = float(self.HCP_WT_Y['A_below'])1109 self.HCP_WT_Y['B_below'] = float(self.HCP_WT_Y['B_below'])1110 self.HCP_WT_Y['HillB_above'] = float(self.HCP_WT_Y['HillB_above'])1111 self.HCP_WT_Y['HillN_above'] = float(self.HCP_WT_Y['HillN_above'])1112 self.HCP_WT_Y['HillB_below'] = float(self.HCP_WT_Y['HillB_below'])1113 self.HCP_WT_Y['HillN_below'] = float(self.HCP_WT_Y['HillN_below'])1114 self.HCP_WT_Y['max_terrain_transition'] = \1115 float(self.HCP_WT_Y['max_terrain_transition'])1116 self.HCP_WT_Y['ice_slope_poor'] = float(self.HCP_WT_Y['ice_slope_poor'])1117 self.HCP_WT_Y['ice_slope_pore'] = float(self.HCP_WT_Y['ice_slope_pore'])1118 self.HCP_WT_Y['ice_slope_wedge'] = float(self.HCP_WT_Y['ice_slope_wedge'])1119 self.HCP_WT_Y['ice_slope_massive'] = float(self.HCP_WT_Y['ice_slope_massive'])1120 self.HCP_WT_Y['porosity'] = float(self.HCP_WT_Y['porosity']) 1121 # - - - - - - - - - - - - - - - - - - - - - - - - -1122 # Reading Medium Age Parameters from Control file1123 # - - - - - - - - - - - - - - - - - - - - - - - - -1124 print ' .. Medium age parameters'1125 1126 self.HCP_WT_M = {}1127 with open(self.HCP_WT_M_Control, 'r') as f:1128 for line in f:1129 if line.startswith('#'):1130 continue1131 else:1132 (key, val) = line.split()1133 self.HCP_WT_M[(key)] = val1134 # Convert strings to floats as necessary1135 self.HCP_WT_M['A1_above'] = float(self.HCP_WT_M['A1_above'])1136 self.HCP_WT_M['A2_above'] = float(self.HCP_WT_M['A2_above'])1137 self.HCP_WT_M['x0_above'] = float(self.HCP_WT_M['x0_above'])1138 self.HCP_WT_M['dx_above'] = float(self.HCP_WT_M['dx_above'])1139 self.HCP_WT_M['A1_below'] = float(self.HCP_WT_M['A1_below'])1140 self.HCP_WT_M['A2_below'] = float(self.HCP_WT_M['A2_below'])1141 self.HCP_WT_M['x0_below'] = float(self.HCP_WT_M['x0_below'])1142 self.HCP_WT_M['dx_below'] = float(self.HCP_WT_M['dx_below'])1143 self.HCP_WT_M['a_above'] = float(self.HCP_WT_M['a_above'])1144 self.HCP_WT_M['b_above'] = float(self.HCP_WT_M['b_above'])1145 self.HCP_WT_M['a_below'] = float(self.HCP_WT_M['a_below'])1146 self.HCP_WT_M['b_below'] = float(self.HCP_WT_M['b_below'])1147 self.HCP_WT_M['K_above'] = float(self.HCP_WT_M['K_above'])1148 self.HCP_WT_M['C_above'] = float(self.HCP_WT_M['C_above'])1149 self.HCP_WT_M['A_above'] = float(self.HCP_WT_M['A_above'])1150 self.HCP_WT_M['B_above'] = float(self.HCP_WT_M['B_above'])1151 self.HCP_WT_M['K_below'] = float(self.HCP_WT_M['K_below'])1152 self.HCP_WT_M['C_below'] = float(self.HCP_WT_M['C_below'])1153 self.HCP_WT_M['A_below'] = float(self.HCP_WT_M['A_below'])1154 self.HCP_WT_M['B_below'] = float(self.HCP_WT_M['B_below'])1155 self.HCP_WT_M['HillB_above'] = float(self.HCP_WT_M['HillB_above'])1156 self.HCP_WT_M['HillN_above'] = float(self.HCP_WT_M['HillN_above'])1157 self.HCP_WT_M['HillB_below'] = float(self.HCP_WT_M['HillB_below'])1158 self.HCP_WT_M['HillN_below'] = float(self.HCP_WT_M['HillN_below'])1159 self.HCP_WT_M['max_terrain_transition'] = \1160 float(self.HCP_WT_M['max_terrain_transition'])1161 self.HCP_WT_M['ice_slope_poor'] = float(self.HCP_WT_M['ice_slope_poor'])1162 self.HCP_WT_M['ice_slope_pore'] = float(self.HCP_WT_M['ice_slope_pore'])1163 self.HCP_WT_M['ice_slope_wedge'] = float(self.HCP_WT_M['ice_slope_wedge'])1164 self.HCP_WT_M['ice_slope_massive'] = float(self.HCP_WT_M['ice_slope_massive'])1165 self.HCP_WT_M['porosity'] = float(self.HCP_WT_M['porosity']) 1166 # - - - - - - - - - - - - - - - - - - - - - - - - -1167 # Reading Old Age Parameters from Control file1168 # - - - - - - - - - - - - - - - - - - - - - - - - -1169 print ' .. Old age parameters'1170 1171 self.HCP_WT_O = {}1172 with open(self.HCP_WT_O_Control, 'r') as f:1173 for line in f:1174 if line.startswith('#'):1175 continue1176 else:1177 (key, val) = line.split()1178 self.HCP_WT_O[(key)] = val1179 # Convert strings to floats as necessary1180 self.HCP_WT_O['A1_above'] = float(self.HCP_WT_O['A1_above'])1181 self.HCP_WT_O['A2_above'] = float(self.HCP_WT_O['A2_above'])1182 self.HCP_WT_O['x0_above'] = float(self.HCP_WT_O['x0_above'])1183 self.HCP_WT_O['dx_above'] = float(self.HCP_WT_O['dx_above'])1184 self.HCP_WT_O['A1_below'] = float(self.HCP_WT_O['A1_below'])1185 self.HCP_WT_O['A2_below'] = float(self.HCP_WT_O['A2_below'])1186 self.HCP_WT_O['x0_below'] = float(self.HCP_WT_O['x0_below'])1187 self.HCP_WT_O['dx_below'] = float(self.HCP_WT_O['dx_below'])1188 self.HCP_WT_O['a_above'] = float(self.HCP_WT_O['a_above'])1189 self.HCP_WT_O['b_above'] = float(self.HCP_WT_O['b_above'])1190 self.HCP_WT_O['a_below'] = float(self.HCP_WT_O['a_below'])1191 self.HCP_WT_O['b_below'] = float(self.HCP_WT_O['b_below'])1192 self.HCP_WT_O['K_above'] = float(self.HCP_WT_O['K_above'])1193 self.HCP_WT_O['C_above'] = float(self.HCP_WT_O['C_above'])1194 self.HCP_WT_O['A_above'] = float(self.HCP_WT_O['A_above'])1195 self.HCP_WT_O['B_above'] = float(self.HCP_WT_O['B_above'])1196 self.HCP_WT_O['K_below'] = float(self.HCP_WT_O['K_below'])1197 self.HCP_WT_O['C_below'] = float(self.HCP_WT_O['C_below'])1198 self.HCP_WT_O['A_below'] = float(self.HCP_WT_O['A_below'])1199 self.HCP_WT_O['B_below'] = float(self.HCP_WT_O['B_below'])1200 self.HCP_WT_O['HillB_above'] = float(self.HCP_WT_O['HillB_above'])1201 self.HCP_WT_O['HillN_above'] = float(self.HCP_WT_O['HillN_above'])1202 self.HCP_WT_O['HillB_below'] = float(self.HCP_WT_O['HillB_below'])1203 self.HCP_WT_O['HillN_below'] = float(self.HCP_WT_O['HillN_below'])1204 self.HCP_WT_O['max_terrain_transition'] = \1205 float(self.HCP_WT_O['max_terrain_transition'])1206 self.HCP_WT_O['ice_slope_poor'] = float(self.HCP_WT_O['ice_slope_poor'])1207 self.HCP_WT_O['ice_slope_pore'] = float(self.HCP_WT_O['ice_slope_pore'])1208 self.HCP_WT_O['ice_slope_wedge'] = float(self.HCP_WT_O['ice_slope_wedge'])1209 self.HCP_WT_O['ice_slope_massive'] = float(self.HCP_WT_O['ice_slope_massive'])1210 self.HCP_WT_O['porosity'] = float(self.HCP_WT_O['porosity']) 1211#====================================================================================1212def LCP_WT(self):1213 1214 print ' ..Reading Wetland Tundra Low Center Polygon Parameters'1215 """ Read files from the input directory """1216 if self.Simulation_area.lower() == 'barrow':1217 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\1218 self.Control_directory)1219 elif self.Simulation_area.lower() == 'arctic_coast':1220 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic/'+\1221 self.Control_directory)1222 elif self.Simulation_area.lower() == 'tanana':1223 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\1224 self.Control_directory)1225 elif self.Simulation_area.lower() == 'yukon':1226 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\1227 self.Control_directory)1228 elif self.Simulation_area.lower() == 'aiem':1229 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM/'+\1230 self.Control_directory)1231 elif self.Simulation_area.lower() == 'ngee':1232 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE/'+\1233 self.Control_directory)1234 # - - - - - - - - - - - - - - - - - - - - - - - - -1235 # Reading Young Age Parameters from Control file1236 # - - - - - - - - - - - - - - - - - - - - - - - - -1237 print ' .. Young age parameters'1238 1239 self.LCP_WT_Y = {}1240 with open(self.LCP_WT_Y_Control, 'r') as f:1241 for line in f:1242 if line.startswith('#'):1243 continue1244 else:1245 (key, val) = line.split()1246 self.LCP_WT_Y[(key)] = val1247 # Convert strings to floats as necessary1248 self.LCP_WT_Y['A1_above'] = float(self.LCP_WT_Y['A1_above'])1249 self.LCP_WT_Y['A2_above'] = float(self.LCP_WT_Y['A2_above'])1250 self.LCP_WT_Y['x0_above'] = float(self.LCP_WT_Y['x0_above'])1251 self.LCP_WT_Y['dx_above'] = float(self.LCP_WT_Y['dx_above'])1252 self.LCP_WT_Y['A1_below'] = float(self.LCP_WT_Y['A1_below'])1253 self.LCP_WT_Y['A2_below'] = float(self.LCP_WT_Y['A2_below'])1254 self.LCP_WT_Y['x0_below'] = float(self.LCP_WT_Y['x0_below'])1255 self.LCP_WT_Y['dx_below'] = float(self.LCP_WT_Y['dx_below'])1256 self.LCP_WT_Y['a_above'] = float(self.LCP_WT_Y['a_above'])1257 self.LCP_WT_Y['b_above'] = float(self.LCP_WT_Y['b_above'])1258 self.LCP_WT_Y['a_below'] = float(self.LCP_WT_Y['a_below'])1259 self.LCP_WT_Y['b_below'] = float(self.LCP_WT_Y['b_below'])1260 self.LCP_WT_Y['K_above'] = float(self.LCP_WT_Y['K_above'])1261 self.LCP_WT_Y['C_above'] = float(self.LCP_WT_Y['C_above'])1262 self.LCP_WT_Y['A_above'] = float(self.LCP_WT_Y['A_above'])1263 self.LCP_WT_Y['B_above'] = float(self.LCP_WT_Y['B_above'])1264 self.LCP_WT_Y['K_below'] = float(self.LCP_WT_Y['K_below'])1265 self.LCP_WT_Y['C_below'] = float(self.LCP_WT_Y['C_below'])1266 self.LCP_WT_Y['A_below'] = float(self.LCP_WT_Y['A_below'])1267 self.LCP_WT_Y['B_below'] = float(self.LCP_WT_Y['B_below'])1268 self.LCP_WT_Y['HillB_above'] = float(self.LCP_WT_Y['HillB_above'])1269 self.LCP_WT_Y['HillN_above'] = float(self.LCP_WT_Y['HillN_above'])1270 self.LCP_WT_Y['HillB_below'] = float(self.LCP_WT_Y['HillB_below'])1271 self.LCP_WT_Y['HillN_below'] = float(self.LCP_WT_Y['HillN_below'])1272 self.LCP_WT_Y['max_terrain_transition'] = \1273 float(self.LCP_WT_Y['max_terrain_transition'])1274 self.LCP_WT_Y['ice_slope_poor'] = float(self.LCP_WT_Y['ice_slope_poor'])1275 self.LCP_WT_Y['ice_slope_pore'] = float(self.LCP_WT_Y['ice_slope_pore'])1276 self.LCP_WT_Y['ice_slope_wedge'] = float(self.LCP_WT_Y['ice_slope_wedge'])1277 self.LCP_WT_Y['ice_slope_massive'] = float(self.LCP_WT_Y['ice_slope_massive'])1278 self.LCP_WT_Y['porosity'] = float(self.LCP_WT_Y['porosity']) 1279 # - - - - - - - - - - - - - - - - - - - - - - - - -1280 # Reading Medium Age Parameters from Control file1281 # - - - - - - - - - - - - - - - - - - - - - - - - -1282 print ' .. Medium age parameters'1283 1284 self.LCP_WT_M = {}1285 with open(self.LCP_WT_M_Control, 'r') as f:1286 for line in f:1287 if line.startswith('#'):1288 continue1289 else:1290 (key, val) = line.split()1291 self.LCP_WT_M[(key)] = val1292 # Convert strings to floats as necessary1293 self.LCP_WT_M['A1_above'] = float(self.LCP_WT_M['A1_above'])1294 self.LCP_WT_M['A2_above'] = float(self.LCP_WT_M['A2_above'])1295 self.LCP_WT_M['x0_above'] = float(self.LCP_WT_M['x0_above'])1296 self.LCP_WT_M['dx_above'] = float(self.LCP_WT_M['dx_above'])1297 self.LCP_WT_M['A1_below'] = float(self.LCP_WT_M['A1_below'])1298 self.LCP_WT_M['A2_below'] = float(self.LCP_WT_M['A2_below'])1299 self.LCP_WT_M['x0_below'] = float(self.LCP_WT_M['x0_below'])1300 self.LCP_WT_M['dx_below'] = float(self.LCP_WT_M['dx_below'])1301 self.LCP_WT_M['a_above'] = float(self.LCP_WT_M['a_above'])1302 self.LCP_WT_M['b_above'] = float(self.LCP_WT_M['b_above'])1303 self.LCP_WT_M['a_below'] = float(self.LCP_WT_M['a_below'])1304 self.LCP_WT_M['b_below'] = float(self.LCP_WT_M['b_below'])1305 self.LCP_WT_M['K_above'] = float(self.LCP_WT_M['K_above'])1306 self.LCP_WT_M['C_above'] = float(self.LCP_WT_M['C_above'])1307 self.LCP_WT_M['A_above'] = float(self.LCP_WT_M['A_above'])1308 self.LCP_WT_M['B_above'] = float(self.LCP_WT_M['B_above'])1309 self.LCP_WT_M['K_below'] = float(self.LCP_WT_M['K_below'])1310 self.LCP_WT_M['C_below'] = float(self.LCP_WT_M['C_below'])1311 self.LCP_WT_M['A_below'] = float(self.LCP_WT_M['A_below'])1312 self.LCP_WT_M['B_below'] = float(self.LCP_WT_M['B_below'])1313 self.LCP_WT_M['HillB_above'] = float(self.LCP_WT_M['HillB_above'])1314 self.LCP_WT_M['HillN_above'] = float(self.LCP_WT_M['HillN_above'])1315 self.LCP_WT_M['HillB_below'] = float(self.LCP_WT_M['HillB_below'])1316 self.LCP_WT_M['HillN_below'] = float(self.LCP_WT_M['HillN_below'])1317 self.LCP_WT_M['max_terrain_transition'] = \1318 float(self.LCP_WT_M['max_terrain_transition'])1319 self.LCP_WT_M['ice_slope_poor'] = float(self.LCP_WT_M['ice_slope_poor'])1320 self.LCP_WT_M['ice_slope_pore'] = float(self.LCP_WT_M['ice_slope_pore'])1321 self.LCP_WT_M['ice_slope_wedge'] = float(self.LCP_WT_M['ice_slope_wedge'])1322 self.LCP_WT_M['ice_slope_massive'] = float(self.LCP_WT_M['ice_slope_massive'])1323 self.LCP_WT_M['porosity'] = float(self.LCP_WT_M['porosity']) 1324 # - - - - - - - - - - - - - - - - - - - - - - - - -1325 # Reading Old Age Parameters from Control file1326 # - - - - - - - - - - - - - - - - - - - - - - - - -1327 print ' .. Old age parameters'1328 1329 self.LCP_WT_O = {}1330 with open(self.LCP_WT_O_Control, 'r') as f:1331 for line in f:1332 if line.startswith('#'):1333 continue1334 else:1335 (key, val) = line.split()1336 self.LCP_WT_O[(key)] = val1337 # Convert strings to floats as necessary1338 self.LCP_WT_O['A1_above'] = float(self.LCP_WT_O['A1_above'])1339 self.LCP_WT_O['A2_above'] = float(self.LCP_WT_O['A2_above'])1340 self.LCP_WT_O['x0_above'] = float(self.LCP_WT_O['x0_above'])1341 self.LCP_WT_O['dx_above'] = float(self.LCP_WT_O['dx_above'])1342 self.LCP_WT_O['A1_below'] = float(self.LCP_WT_O['A1_below'])1343 self.LCP_WT_O['A2_below'] = float(self.LCP_WT_O['A2_below'])1344 self.LCP_WT_O['x0_below'] = float(self.LCP_WT_O['x0_below'])1345 self.LCP_WT_O['dx_below'] = float(self.LCP_WT_O['dx_below'])1346 self.LCP_WT_O['a_above'] = float(self.LCP_WT_O['a_above'])1347 self.LCP_WT_O['b_above'] = float(self.LCP_WT_O['b_above'])1348 self.LCP_WT_O['a_below'] = float(self.LCP_WT_O['a_below'])1349 self.LCP_WT_O['b_below'] = float(self.LCP_WT_O['b_below'])1350 self.LCP_WT_O['K_above'] = float(self.LCP_WT_O['K_above'])1351 self.LCP_WT_O['C_above'] = float(self.LCP_WT_O['C_above'])1352 self.LCP_WT_O['A_above'] = float(self.LCP_WT_O['A_above'])1353 self.LCP_WT_O['B_above'] = float(self.LCP_WT_O['B_above'])1354 self.LCP_WT_O['K_below'] = float(self.LCP_WT_O['K_below'])1355 self.LCP_WT_O['C_below'] = float(self.LCP_WT_O['C_below'])1356 self.LCP_WT_O['A_below'] = float(self.LCP_WT_O['A_below'])1357 self.LCP_WT_O['B_below'] = float(self.LCP_WT_O['B_below'])1358 self.LCP_WT_O['HillB_above'] = float(self.LCP_WT_O['HillB_above'])1359 self.LCP_WT_O['HillN_above'] = float(self.LCP_WT_O['HillN_above'])1360 self.LCP_WT_O['HillB_below'] = float(self.LCP_WT_O['HillB_below'])1361 self.LCP_WT_O['HillN_below'] = float(self.LCP_WT_O['HillN_below'])1362 self.LCP_WT_O['max_terrain_transition'] = \1363 float(self.LCP_WT_O['max_terrain_transition'])1364 self.LCP_WT_O['ice_slope_poor'] = float(self.LCP_WT_O['ice_slope_poor'])1365 self.LCP_WT_O['ice_slope_pore'] = float(self.LCP_WT_O['ice_slope_pore'])1366 self.LCP_WT_O['ice_slope_wedge'] = float(self.LCP_WT_O['ice_slope_wedge'])1367 self.LCP_WT_O['ice_slope_massive'] = float(self.LCP_WT_O['ice_slope_massive'])1368 self.LCP_WT_O['porosity'] = float(self.LCP_WT_O['porosity']) 1369#====================================================================================1370def Meadow_WT(self):1371 1372 print ' ..Reading Wetland Tundra Meadow Parameters'1373 """ Read files from the input directory """1374 if self.Simulation_area.lower() == 'barrow':1375 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\1376 self.Control_directory)1377 elif self.Simulation_area.lower() == 'arctic_coast':1378 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic/'+\1379 self.Control_directory)1380 elif self.Simulation_area.lower() == 'tanana':1381 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\1382 self.Control_directory)1383 elif self.Simulation_area.lower() == 'yukon':1384 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\1385 self.Control_directory)1386 elif self.Simulation_area.lower() == 'aiem':1387 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM/'+\1388 self.Control_directory)1389 elif self.Simulation_area.lower() == 'ngee':1390 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE/'+\1391 self.Control_directory)1392 # - - - - - - - - - - - - - - - - - - - - - - - - -1393 # Reading Young Age Parameters from Control file1394 # - - - - - - - - - - - - - - - - - - - - - - - - -1395 print ' .. Young age parameters'1396 1397 self.Meadow_WT_Y = {}1398 with open(self.Meadow_WT_Y_Control, 'r') as f:1399 for line in f:1400 if line.startswith('#'):1401 continue1402 else:1403 (key, val) = line.split()1404 self.Meadow_WT_Y[(key)] = val1405 # Convert strings to floats as necessary1406 self.Meadow_WT_Y['A1_above'] = float(self.Meadow_WT_Y['A1_above'])1407 self.Meadow_WT_Y['A2_above'] = float(self.Meadow_WT_Y['A2_above'])1408 self.Meadow_WT_Y['x0_above'] = float(self.Meadow_WT_Y['x0_above'])1409 self.Meadow_WT_Y['dx_above'] = float(self.Meadow_WT_Y['dx_above'])1410 self.Meadow_WT_Y['A1_below'] = float(self.Meadow_WT_Y['A1_below'])1411 self.Meadow_WT_Y['A2_below'] = float(self.Meadow_WT_Y['A2_below'])1412 self.Meadow_WT_Y['x0_below'] = float(self.Meadow_WT_Y['x0_below'])1413 self.Meadow_WT_Y['dx_below'] = float(self.Meadow_WT_Y['dx_below'])1414 self.Meadow_WT_Y['a_above'] = float(self.Meadow_WT_Y['a_above'])1415 self.Meadow_WT_Y['b_above'] = float(self.Meadow_WT_Y['b_above'])1416 self.Meadow_WT_Y['a_below'] = float(self.Meadow_WT_Y['a_below'])1417 self.Meadow_WT_Y['b_below'] = float(self.Meadow_WT_Y['b_below'])1418 self.Meadow_WT_Y['K_above'] = float(self.Meadow_WT_Y['K_above'])1419 self.Meadow_WT_Y['C_above'] = float(self.Meadow_WT_Y['C_above'])1420 self.Meadow_WT_Y['A_above'] = float(self.Meadow_WT_Y['A_above'])1421 self.Meadow_WT_Y['B_above'] = float(self.Meadow_WT_Y['B_above'])1422 self.Meadow_WT_Y['K_below'] = float(self.Meadow_WT_Y['K_below'])1423 self.Meadow_WT_Y['C_below'] = float(self.Meadow_WT_Y['C_below'])1424 self.Meadow_WT_Y['A_below'] = float(self.Meadow_WT_Y['A_below'])1425 self.Meadow_WT_Y['B_below'] = float(self.Meadow_WT_Y['B_below'])1426 self.Meadow_WT_Y['HillB_above'] = float(self.Meadow_WT_Y['HillB_above'])1427 self.Meadow_WT_Y['HillN_above'] = float(self.Meadow_WT_Y['HillN_above'])1428 self.Meadow_WT_Y['HillB_below'] = float(self.Meadow_WT_Y['HillB_below'])1429 self.Meadow_WT_Y['HillN_below'] = float(self.Meadow_WT_Y['HillN_below'])1430 self.Meadow_WT_Y['max_terrain_transition'] = \1431 float(self.Meadow_WT_Y['max_terrain_transition'])1432 self.Meadow_WT_Y['ice_slope_poor'] = float(self.Meadow_WT_Y['ice_slope_poor'])1433 self.Meadow_WT_Y['ice_slope_pore'] = float(self.Meadow_WT_Y['ice_slope_pore'])1434 self.Meadow_WT_Y['ice_slope_wedge'] = float(self.Meadow_WT_Y['ice_slope_wedge'])1435 self.Meadow_WT_Y['ice_slope_massive'] = float(self.Meadow_WT_Y['ice_slope_massive'])1436 self.Meadow_WT_Y['porosity'] = float(self.Meadow_WT_Y['porosity']) 1437 # - - - - - - - - - - - - - - - - - - - - - - - - -1438 # Reading Medium Age Parameters from Control file1439 # - - - - - - - - - - - - - - - - - - - - - - - - -1440 print ' .. Medium age parameters'1441 1442 self.Meadow_WT_M = {}1443 with open(self.Meadow_WT_M_Control, 'r') as f:1444 for line in f:1445 if line.startswith('#'):1446 continue1447 else:1448 (key, val) = line.split()1449 self.Meadow_WT_M[(key)] = val1450 # Convert strings to floats as necessary1451 self.Meadow_WT_M['A1_above'] = float(self.Meadow_WT_M['A1_above'])1452 self.Meadow_WT_M['A2_above'] = float(self.Meadow_WT_M['A2_above'])1453 self.Meadow_WT_M['x0_above'] = float(self.Meadow_WT_M['x0_above'])1454 self.Meadow_WT_M['dx_above'] = float(self.Meadow_WT_M['dx_above'])1455 self.Meadow_WT_M['A1_below'] = float(self.Meadow_WT_M['A1_below'])1456 self.Meadow_WT_M['A2_below'] = float(self.Meadow_WT_M['A2_below'])1457 self.Meadow_WT_M['x0_below'] = float(self.Meadow_WT_M['x0_below'])1458 self.Meadow_WT_M['dx_below'] = float(self.Meadow_WT_M['dx_below'])1459 self.Meadow_WT_M['a_above'] = float(self.Meadow_WT_M['a_above'])1460 self.Meadow_WT_M['b_above'] = float(self.Meadow_WT_M['b_above'])1461 self.Meadow_WT_M['a_below'] = float(self.Meadow_WT_M['a_below'])1462 self.Meadow_WT_M['b_below'] = float(self.Meadow_WT_M['b_below'])1463 self.Meadow_WT_M['K_above'] = float(self.Meadow_WT_M['K_above'])1464 self.Meadow_WT_M['C_above'] = float(self.Meadow_WT_M['C_above'])1465 self.Meadow_WT_M['A_above'] = float(self.Meadow_WT_M['A_above'])1466 self.Meadow_WT_M['B_above'] = float(self.Meadow_WT_M['B_above'])1467 self.Meadow_WT_M['K_below'] = float(self.Meadow_WT_M['K_below'])1468 self.Meadow_WT_M['C_below'] = float(self.Meadow_WT_M['C_below'])1469 self.Meadow_WT_M['A_below'] = float(self.Meadow_WT_M['A_below'])1470 self.Meadow_WT_M['B_below'] = float(self.Meadow_WT_M['B_below'])1471 self.Meadow_WT_M['HillB_above'] = float(self.Meadow_WT_M['HillB_above'])1472 self.Meadow_WT_M['HillN_above'] = float(self.Meadow_WT_M['HillN_above'])1473 self.Meadow_WT_M['HillB_below'] = float(self.Meadow_WT_M['HillB_below'])1474 self.Meadow_WT_M['HillN_below'] = float(self.Meadow_WT_M['HillN_below'])1475 self.Meadow_WT_M['max_terrain_transition'] = \1476 float(self.Meadow_WT_M['max_terrain_transition'])1477 self.Meadow_WT_M['ice_slope_poor'] = float(self.Meadow_WT_M['ice_slope_poor'])1478 self.Meadow_WT_M['ice_slope_pore'] = float(self.Meadow_WT_M['ice_slope_pore'])1479 self.Meadow_WT_M['ice_slope_wedge'] = float(self.Meadow_WT_M['ice_slope_wedge'])1480 self.Meadow_WT_M['ice_slope_massive'] = float(self.Meadow_WT_M['ice_slope_massive'])1481 self.Meadow_WT_M['porosity'] = float(self.Meadow_WT_M['porosity']) 1482 # - - - - - - - - - - - - - - - - - - - - - - - - -1483 # Reading Old Age Parameters from Control file1484 # - - - - - - - - - - - - - - - - - - - - - - - - -1485 print ' .. Old age parameters'1486 1487 self.Meadow_WT_O = {}1488 with open(self.Meadow_WT_O_Control, 'r') as f:1489 for line in f:1490 if line.startswith('#'):1491 continue1492 else:1493 (key, val) = line.split()1494 self.Meadow_WT_O[(key)] = val1495 # Convert strings to floats as necessary1496 self.Meadow_WT_O['A1_above'] = float(self.Meadow_WT_O['A1_above'])1497 self.Meadow_WT_O['A2_above'] = float(self.Meadow_WT_O['A2_above'])1498 self.Meadow_WT_O['x0_above'] = float(self.Meadow_WT_O['x0_above'])1499 self.Meadow_WT_O['dx_above'] = float(self.Meadow_WT_O['dx_above'])1500 self.Meadow_WT_O['A1_below'] = float(self.Meadow_WT_O['A1_below'])1501 self.Meadow_WT_O['A2_below'] = float(self.Meadow_WT_O['A2_below'])1502 self.Meadow_WT_O['x0_below'] = float(self.Meadow_WT_O['x0_below'])1503 self.Meadow_WT_O['dx_below'] = float(self.Meadow_WT_O['dx_below'])1504 self.Meadow_WT_O['a_above'] = float(self.Meadow_WT_O['a_above'])1505 self.Meadow_WT_O['b_above'] = float(self.Meadow_WT_O['b_above'])1506 self.Meadow_WT_O['a_below'] = float(self.Meadow_WT_O['a_below'])1507 self.Meadow_WT_O['b_below'] = float(self.Meadow_WT_O['b_below'])1508 self.Meadow_WT_O['K_above'] = float(self.Meadow_WT_O['K_above'])1509 self.Meadow_WT_O['C_above'] = float(self.Meadow_WT_O['C_above'])1510 self.Meadow_WT_O['A_above'] = float(self.Meadow_WT_O['A_above'])1511 self.Meadow_WT_O['B_above'] = float(self.Meadow_WT_O['B_above'])1512 self.Meadow_WT_O['K_below'] = float(self.Meadow_WT_O['K_below'])1513 self.Meadow_WT_O['C_below'] = float(self.Meadow_WT_O['C_below'])1514 self.Meadow_WT_O['A_below'] = float(self.Meadow_WT_O['A_below'])1515 self.Meadow_WT_O['B_below'] = float(self.Meadow_WT_O['B_below'])1516 self.Meadow_WT_O['HillB_above'] = float(self.Meadow_WT_O['HillB_above'])1517 self.Meadow_WT_O['HillN_above'] = float(self.Meadow_WT_O['HillN_above'])1518 self.Meadow_WT_O['HillB_below'] = float(self.Meadow_WT_O['HillB_below'])1519 self.Meadow_WT_O['HillN_below'] = float(self.Meadow_WT_O['HillN_below'])1520 self.Meadow_WT_O['max_terrain_transition'] = \1521 float(self.Meadow_WT_O['max_terrain_transition'])1522 self.Meadow_WT_O['ice_slope_poor'] = float(self.Meadow_WT_O['ice_slope_poor'])1523 self.Meadow_WT_O['ice_slope_pore'] = float(self.Meadow_WT_O['ice_slope_pore'])1524 self.Meadow_WT_O['ice_slope_wedge'] = float(self.Meadow_WT_O['ice_slope_wedge'])1525 self.Meadow_WT_O['ice_slope_massive'] = float(self.Meadow_WT_O['ice_slope_massive'])1526 self.Meadow_WT_O['porosity'] = float(self.Meadow_WT_O['porosity']) 1527#====================================================================================1528def NoData_WT(self):1529 1530 print ' ..Reading Wetland Tundra No Data Parameters'1531 """ Read files from the input directory """1532 if self.Simulation_area.lower() == 'barrow':1533 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\1534 self.Control_directory)1535 elif self.Simulation_area.lower() == 'arctic_coast':1536 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic/'+\1537 self.Control_directory)1538 elif self.Simulation_area.lower() == 'tanana':1539 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\1540 self.Control_directory)1541 elif self.Simulation_area.lower() == 'yukon':1542 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\1543 self.Control_directory)1544 elif self.Simulation_area.lower() == 'aiem':1545 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM/'+\1546 self.Control_directory)1547 elif self.Simulation_area.lower() == 'ngee':1548 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE/'+\1549 self.Control_directory)1550 # - - - - - - - - - - - - - - - - - - - - - - - - -1551 # Reading Old Age Parameters from Control file1552 # - - - - - - - - - - - - - - - - - - - - - - - - -1553 self.NoData_WT_O = {}1554 with open(self.NoData_WT_O_Control, 'r') as f:1555 for line in f:1556 if line.startswith('#'):1557 continue1558 else:1559 (key, val) = line.split()1560 self.NoData_WT_O[(key)] = val1561 # Convert strings to floats as necessary1562 self.NoData_WT_O['A1_above'] = float(self.NoData_WT_O['A1_above'])1563 self.NoData_WT_O['A2_above'] = float(self.NoData_WT_O['A2_above'])1564 self.NoData_WT_O['x0_above'] = float(self.NoData_WT_O['x0_above'])1565 self.NoData_WT_O['dx_above'] = float(self.NoData_WT_O['dx_above'])1566 self.NoData_WT_O['A1_below'] = float(self.NoData_WT_O['A1_below'])1567 self.NoData_WT_O['A2_below'] = float(self.NoData_WT_O['A2_below'])1568 self.NoData_WT_O['x0_below'] = float(self.NoData_WT_O['x0_below'])1569 self.NoData_WT_O['dx_below'] = float(self.NoData_WT_O['dx_below'])1570 self.NoData_WT_O['a_above'] = float(self.NoData_WT_O['a_above'])1571 self.NoData_WT_O['b_above'] = float(self.NoData_WT_O['b_above'])1572 self.NoData_WT_O['a_below'] = float(self.NoData_WT_O['a_below'])1573 self.NoData_WT_O['b_below'] = float(self.NoData_WT_O['b_below'])1574 self.NoData_WT_O['K_above'] = float(self.NoData_WT_O['K_above'])1575 self.NoData_WT_O['C_above'] = float(self.NoData_WT_O['C_above'])1576 self.NoData_WT_O['A_above'] = float(self.NoData_WT_O['A_above'])1577 self.NoData_WT_O['B_above'] = float(self.NoData_WT_O['B_above'])1578 self.NoData_WT_O['K_below'] = float(self.NoData_WT_O['K_below'])1579 self.NoData_WT_O['C_below'] = float(self.NoData_WT_O['C_below'])1580 self.NoData_WT_O['A_below'] = float(self.NoData_WT_O['A_below'])1581 self.NoData_WT_O['B_below'] = float(self.NoData_WT_O['B_below'])1582 self.NoData_WT_O['HillB_above'] = float(self.NoData_WT_O['HillB_above'])1583 self.NoData_WT_O['HillN_above'] = float(self.NoData_WT_O['HillN_above'])1584 self.NoData_WT_O['HillB_below'] = float(self.NoData_WT_O['HillB_below'])1585 self.NoData_WT_O['HillN_below'] = float(self.NoData_WT_O['HillN_below'])1586 self.NoData_WT_O['max_terrain_transition'] = \1587 float(self.NoData_WT_O['max_terrain_transition'])1588 self.NoData_WT_O['ice_slope_poor'] = float(self.NoData_WT_O['ice_slope_poor'])1589 self.NoData_WT_O['ice_slope_pore'] = float(self.NoData_WT_O['ice_slope_pore'])1590 self.NoData_WT_O['ice_slope_wedge'] = float(self.NoData_WT_O['ice_slope_wedge'])1591 self.NoData_WT_O['ice_slope_massive'] = float(self.NoData_WT_O['ice_slope_massive'])1592 self.NoData_WT_O['porosity'] = float(self.NoData_WT_O['porosity'])1593#====================================================================================1594def SandDunes_WT(self):1595 1596 print ' ..Reading Wetland Tundra Sand Dune Parameters'1597 """ Read files from the input directory """1598 if self.Simulation_area.lower() == 'barrow':1599 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\1600 self.Control_directory)1601 elif self.Simulation_area.lower() == 'arctic_coast':1602 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic/'+\1603 self.Control_directory)1604 elif self.Simulation_area.lower() == 'tanana':1605 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\1606 self.Control_directory)1607 elif self.Simulation_area.lower() == 'yukon':1608 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\1609 self.Control_directory)1610 elif self.Simulation_area.lower() == 'aiem':1611 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM/'+\1612 self.Control_directory)1613 elif self.Simulation_area.lower() == 'ngee':1614 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE/'+\1615 self.Control_directory)1616 # - - - - - - - - - - - - - - - - - - - - - - - - -1617 # Reading Young Age Parameters from Control file1618 # - - - - - - - - - - - - - - - - - - - - - - - - -1619 print ' .. Young age parameters'1620 1621 self.SandDunes_WT_Y = {}1622 with open(self.SandDunes_WT_Y_Control, 'r') as f:1623 for line in f:1624 if line.startswith('#'):1625 continue1626 else:1627 (key, val) = line.split()1628 self.SandDunes_WT_Y[(key)] = val1629 # Convert strings to floats as necessary1630 self.SandDunes_WT_Y['A1_above'] = float(self.SandDunes_WT_Y['A1_above'])1631 self.SandDunes_WT_Y['A2_above'] = float(self.SandDunes_WT_Y['A2_above'])1632 self.SandDunes_WT_Y['x0_above'] = float(self.SandDunes_WT_Y['x0_above'])1633 self.SandDunes_WT_Y['dx_above'] = float(self.SandDunes_WT_Y['dx_above'])1634 self.SandDunes_WT_Y['A1_below'] = float(self.SandDunes_WT_Y['A1_below'])1635 self.SandDunes_WT_Y['A2_below'] = float(self.SandDunes_WT_Y['A2_below'])1636 self.SandDunes_WT_Y['x0_below'] = float(self.SandDunes_WT_Y['x0_below'])1637 self.SandDunes_WT_Y['dx_below'] = float(self.SandDunes_WT_Y['dx_below'])1638 self.SandDunes_WT_Y['a_above'] = float(self.SandDunes_WT_Y['a_above'])1639 self.SandDunes_WT_Y['b_above'] = float(self.SandDunes_WT_Y['b_above'])1640 self.SandDunes_WT_Y['a_below'] = float(self.SandDunes_WT_Y['a_below'])1641 self.SandDunes_WT_Y['b_below'] = float(self.SandDunes_WT_Y['b_below'])1642 self.SandDunes_WT_Y['K_above'] = float(self.SandDunes_WT_Y['K_above'])1643 self.SandDunes_WT_Y['C_above'] = float(self.SandDunes_WT_Y['C_above'])1644 self.SandDunes_WT_Y['A_above'] = float(self.SandDunes_WT_Y['A_above'])1645 self.SandDunes_WT_Y['B_above'] = float(self.SandDunes_WT_Y['B_above'])1646 self.SandDunes_WT_Y['K_below'] = float(self.SandDunes_WT_Y['K_below'])1647 self.SandDunes_WT_Y['C_below'] = float(self.SandDunes_WT_Y['C_below'])1648 self.SandDunes_WT_Y['A_below'] = float(self.SandDunes_WT_Y['A_below'])1649 self.SandDunes_WT_Y['B_below'] = float(self.SandDunes_WT_Y['B_below'])1650 self.SandDunes_WT_Y['HillB_above'] = float(self.SandDunes_WT_Y['HillB_above'])1651 self.SandDunes_WT_Y['HillN_above'] = float(self.SandDunes_WT_Y['HillN_above'])1652 self.SandDunes_WT_Y['HillB_below'] = float(self.SandDunes_WT_Y['HillB_below'])1653 self.SandDunes_WT_Y['HillN_below'] = float(self.SandDunes_WT_Y['HillN_below'])1654 self.SandDunes_WT_Y['max_terrain_transition'] = \1655 float(self.SandDunes_WT_Y['max_terrain_transition'])1656 self.SandDunes_WT_Y['ice_slope_poor'] = float(self.SandDunes_WT_Y['ice_slope_poor'])1657 self.SandDunes_WT_Y['ice_slope_pore'] = float(self.SandDunes_WT_Y['ice_slope_pore'])1658 self.SandDunes_WT_Y['ice_slope_wedge'] = float(self.SandDunes_WT_Y['ice_slope_wedge'])1659 self.SandDunes_WT_Y['ice_slope_massive'] = float(self.SandDunes_WT_Y['ice_slope_massive'])1660 self.SandDunes_WT_Y['porosity'] = float(self.SandDunes_WT_Y['porosity']) 1661 # - - - - - - - - - - - - - - - - - - - - - - - - -1662 # Reading Medium Age Parameters from Control file1663 # - - - - - - - - - - - - - - - - - - - - - - - - -1664 print ' .. Medium age parameters'1665 1666 self.SandDunes_WT_M = {}1667 with open(self.SandDunes_WT_M_Control, 'r') as f:1668 for line in f:1669 if line.startswith('#'):1670 continue1671 else:1672 (key, val) = line.split()1673 self.SandDunes_WT_M[(key)] = val1674 # Convert strings to floats as necessary1675 self.SandDunes_WT_M['A1_above'] = float(self.SandDunes_WT_M['A1_above'])1676 self.SandDunes_WT_M['A2_above'] = float(self.SandDunes_WT_M['A2_above'])1677 self.SandDunes_WT_M['x0_above'] = float(self.SandDunes_WT_M['x0_above'])1678 self.SandDunes_WT_M['dx_above'] = float(self.SandDunes_WT_M['dx_above'])1679 self.SandDunes_WT_M['A1_below'] = float(self.SandDunes_WT_M['A1_below'])1680 self.SandDunes_WT_M['A2_below'] = float(self.SandDunes_WT_M['A2_below'])1681 self.SandDunes_WT_M['x0_below'] = float(self.SandDunes_WT_M['x0_below'])1682 self.SandDunes_WT_M['dx_below'] = float(self.SandDunes_WT_M['dx_below'])1683 self.SandDunes_WT_M['a_above'] = float(self.SandDunes_WT_M['a_above'])1684 self.SandDunes_WT_M['b_above'] = float(self.SandDunes_WT_M['b_above'])1685 self.SandDunes_WT_M['a_below'] = float(self.SandDunes_WT_M['a_below'])1686 self.SandDunes_WT_M['b_below'] = float(self.SandDunes_WT_M['b_below'])1687 self.SandDunes_WT_M['K_above'] = float(self.SandDunes_WT_M['K_above'])1688 self.SandDunes_WT_M['C_above'] = float(self.SandDunes_WT_M['C_above'])1689 self.SandDunes_WT_M['A_above'] = float(self.SandDunes_WT_M['A_above'])1690 self.SandDunes_WT_M['B_above'] = float(self.SandDunes_WT_M['B_above'])1691 self.SandDunes_WT_M['K_below'] = float(self.SandDunes_WT_M['K_below'])1692 self.SandDunes_WT_M['C_below'] = float(self.SandDunes_WT_M['C_below'])1693 self.SandDunes_WT_M['A_below'] = float(self.SandDunes_WT_M['A_below'])1694 self.SandDunes_WT_M['B_below'] = float(self.SandDunes_WT_M['B_below'])1695 self.SandDunes_WT_M['HillB_above'] = float(self.SandDunes_WT_M['HillB_above'])1696 self.SandDunes_WT_M['HillN_above'] = float(self.SandDunes_WT_M['HillN_above'])1697 self.SandDunes_WT_M['HillB_below'] = float(self.SandDunes_WT_M['HillB_below'])1698 self.SandDunes_WT_M['HillN_below'] = float(self.SandDunes_WT_M['HillN_below'])1699 self.SandDunes_WT_M['max_terrain_transition'] = \1700 float(self.SandDunes_WT_M['max_terrain_transition'])1701 self.SandDunes_WT_M['ice_slope_poor'] = float(self.SandDunes_WT_M['ice_slope_poor'])1702 self.SandDunes_WT_M['ice_slope_pore'] = float(self.SandDunes_WT_M['ice_slope_pore'])1703 self.SandDunes_WT_M['ice_slope_wedge'] = float(self.SandDunes_WT_M['ice_slope_wedge'])1704 self.SandDunes_WT_M['ice_slope_massive'] = float(self.SandDunes_WT_M['ice_slope_massive'])1705 self.SandDunes_WT_M['porosity'] = float(self.SandDunes_WT_M['porosity']) 1706 # - - - - - - - - - - - - - - - - - - - - - - - - -1707 # Reading Old Age Parameters from Control file1708 # - - - - - - - - - - - - - - - - - - - - - - - - -1709 print ' .. Old age parameters'1710 1711 self.SandDunes_WT_O = {}1712 with open(self.SandDunes_WT_O_Control, 'r') as f:1713 for line in f:1714 if line.startswith('#'):1715 continue1716 else:1717 (key, val) = line.split()1718 self.SandDunes_WT_O[(key)] = val1719 # Convert strings to floats as necessary1720 self.SandDunes_WT_O['A1_above'] = float(self.SandDunes_WT_O['A1_above'])1721 self.SandDunes_WT_O['A2_above'] = float(self.SandDunes_WT_O['A2_above'])1722 self.SandDunes_WT_O['x0_above'] = float(self.SandDunes_WT_O['x0_above'])1723 self.SandDunes_WT_O['dx_above'] = float(self.SandDunes_WT_O['dx_above'])1724 self.SandDunes_WT_O['A1_below'] = float(self.SandDunes_WT_O['A1_below'])1725 self.SandDunes_WT_O['A2_below'] = float(self.SandDunes_WT_O['A2_below'])1726 self.SandDunes_WT_O['x0_below'] = float(self.SandDunes_WT_O['x0_below'])1727 self.SandDunes_WT_O['dx_below'] = float(self.SandDunes_WT_O['dx_below'])1728 self.SandDunes_WT_O['a_above'] = float(self.SandDunes_WT_O['a_above'])1729 self.SandDunes_WT_O['b_above'] = float(self.SandDunes_WT_O['b_above'])1730 self.SandDunes_WT_O['a_below'] = float(self.SandDunes_WT_O['a_below'])1731 self.SandDunes_WT_O['b_below'] = float(self.SandDunes_WT_O['b_below'])1732 self.SandDunes_WT_O['K_above'] = float(self.SandDunes_WT_O['K_above'])1733 self.SandDunes_WT_O['C_above'] = float(self.SandDunes_WT_O['C_above'])1734 self.SandDunes_WT_O['A_above'] = float(self.SandDunes_WT_O['A_above'])1735 self.SandDunes_WT_O['B_above'] = float(self.SandDunes_WT_O['B_above'])1736 self.SandDunes_WT_O['K_below'] = float(self.SandDunes_WT_O['K_below'])1737 self.SandDunes_WT_O['C_below'] = float(self.SandDunes_WT_O['C_below'])1738 self.SandDunes_WT_O['A_below'] = float(self.SandDunes_WT_O['A_below'])1739 self.SandDunes_WT_O['B_below'] = float(self.SandDunes_WT_O['B_below'])1740 self.SandDunes_WT_O['HillB_above'] = float(self.SandDunes_WT_O['HillB_above'])1741 self.SandDunes_WT_O['HillN_above'] = float(self.SandDunes_WT_O['HillN_above'])1742 self.SandDunes_WT_O['HillB_below'] = float(self.SandDunes_WT_O['HillB_below'])1743 self.SandDunes_WT_O['HillN_below'] = float(self.SandDunes_WT_O['HillN_below'])1744 self.SandDunes_WT_O['max_terrain_transition'] = \1745 float(self.SandDunes_WT_O['max_terrain_transition'])1746 self.SandDunes_WT_O['ice_slope_poor'] = float(self.SandDunes_WT_O['ice_slope_poor'])1747 self.SandDunes_WT_O['ice_slope_pore'] = float(self.SandDunes_WT_O['ice_slope_pore'])1748 self.SandDunes_WT_O['ice_slope_wedge'] = float(self.SandDunes_WT_O['ice_slope_wedge'])1749 self.SandDunes_WT_O['ice_slope_massive'] = float(self.SandDunes_WT_O['ice_slope_massive'])1750 self.SandDunes_WT_O['porosity'] = float(self.SandDunes_WT_O['porosity']) 1751 1752#====================================================================================1753def SaturatedBarrens_WT(self):1754 1755 print ' ..Reading Wetland Tundra Saturated Barren Parameters'1756 """ Read files from the input directory """1757 if self.Simulation_area.lower() == 'barrow':1758 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\1759 self.Control_directory)1760 elif self.Simulation_area.lower() == 'arctic_coast':1761 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic/'+\1762 self.Control_directory)1763 elif self.Simulation_area.lower() == 'tanana':1764 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\1765 self.Control_directory)1766 elif self.Simulation_area.lower() == 'yukon':1767 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\1768 self.Control_directory)1769 elif self.Simulation_area.lower() == 'aiem':1770 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM/'+\1771 self.Control_directory)1772 elif self.Simulation_area.lower() == 'ngee':1773 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE/'+\1774 self.Control_directory)1775 # - - - - - - - - - - - - - - - - - - - - - - - - -1776 # Reading Young Age Parameters from Control file1777 # - - - - - - - - - - - - - - - - - - - - - - - - -1778 print ' .. Young age parameters'1779 1780 self.SaturatedBarrens_WT_Y = {}1781 with open(self.SaturatedBarrens_WT_Y_Control, 'r') as f:1782 for line in f:1783 if line.startswith('#'):1784 continue1785 else:1786 (key, val) = line.split()1787 self.SaturatedBarrens_WT_Y[(key)] = val1788 # Convert strings to floats as necessary1789 self.SaturatedBarrens_WT_Y['A1_above'] = float(self.SaturatedBarrens_WT_Y['A1_above'])1790 self.SaturatedBarrens_WT_Y['A2_above'] = float(self.SaturatedBarrens_WT_Y['A2_above'])1791 self.SaturatedBarrens_WT_Y['x0_above'] = float(self.SaturatedBarrens_WT_Y['x0_above'])1792 self.SaturatedBarrens_WT_Y['dx_above'] = float(self.SaturatedBarrens_WT_Y['dx_above'])1793 self.SaturatedBarrens_WT_Y['A1_below'] = float(self.SaturatedBarrens_WT_Y['A1_below'])1794 self.SaturatedBarrens_WT_Y['A2_below'] = float(self.SaturatedBarrens_WT_Y['A2_below'])1795 self.SaturatedBarrens_WT_Y['x0_below'] = float(self.SaturatedBarrens_WT_Y['x0_below'])1796 self.SaturatedBarrens_WT_Y['dx_below'] = float(self.SaturatedBarrens_WT_Y['dx_below'])1797 self.SaturatedBarrens_WT_Y['a_above'] = float(self.SaturatedBarrens_WT_Y['a_above'])1798 self.SaturatedBarrens_WT_Y['b_above'] = float(self.SaturatedBarrens_WT_Y['b_above'])1799 self.SaturatedBarrens_WT_Y['a_below'] = float(self.SaturatedBarrens_WT_Y['a_below'])1800 self.SaturatedBarrens_WT_Y['b_below'] = float(self.SaturatedBarrens_WT_Y['b_below'])1801 self.SaturatedBarrens_WT_Y['K_above'] = float(self.SaturatedBarrens_WT_Y['K_above'])1802 self.SaturatedBarrens_WT_Y['C_above'] = float(self.SaturatedBarrens_WT_Y['C_above'])1803 self.SaturatedBarrens_WT_Y['A_above'] = float(self.SaturatedBarrens_WT_Y['A_above'])1804 self.SaturatedBarrens_WT_Y['B_above'] = float(self.SaturatedBarrens_WT_Y['B_above'])1805 self.SaturatedBarrens_WT_Y['K_below'] = float(self.SaturatedBarrens_WT_Y['K_below'])1806 self.SaturatedBarrens_WT_Y['C_below'] = float(self.SaturatedBarrens_WT_Y['C_below'])1807 self.SaturatedBarrens_WT_Y['A_below'] = float(self.SaturatedBarrens_WT_Y['A_below'])1808 self.SaturatedBarrens_WT_Y['B_below'] = float(self.SaturatedBarrens_WT_Y['B_below'])1809 self.SaturatedBarrens_WT_Y['HillB_above'] = float(self.SaturatedBarrens_WT_Y['HillB_above'])1810 self.SaturatedBarrens_WT_Y['HillN_above'] = float(self.SaturatedBarrens_WT_Y['HillN_above'])1811 self.SaturatedBarrens_WT_Y['HillB_below'] = float(self.SaturatedBarrens_WT_Y['HillB_below'])1812 self.SaturatedBarrens_WT_Y['HillN_below'] = float(self.SaturatedBarrens_WT_Y['HillN_below'])1813 self.SaturatedBarrens_WT_Y['max_terrain_transition'] = \1814 float(self.SaturatedBarrens_WT_Y['max_terrain_transition'])1815 self.SaturatedBarrens_WT_Y['ice_slope_poor'] = float(self.SaturatedBarrens_WT_Y['ice_slope_poor'])1816 self.SaturatedBarrens_WT_Y['ice_slope_pore'] = float(self.SaturatedBarrens_WT_Y['ice_slope_pore'])1817 self.SaturatedBarrens_WT_Y['ice_slope_wedge'] = float(self.SaturatedBarrens_WT_Y['ice_slope_wedge'])1818 self.SaturatedBarrens_WT_Y['ice_slope_massive'] = float(self.SaturatedBarrens_WT_Y['ice_slope_massive'])1819 self.SaturatedBarrens_WT_Y['porosity'] = float(self.SaturatedBarrens_WT_Y['porosity']) 1820 # - - - - - - - - - - - - - - - - - - - - - - - - -1821 # Reading Medium Age Parameters from Control file1822 # - - - - - - - - - - - - - - - - - - - - - - - - -1823 print ' .. Medium age parameters'1824 1825 self.SaturatedBarrens_WT_M = {}1826 with open(self.SaturatedBarrens_WT_M_Control, 'r') as f:1827 for line in f:1828 if line.startswith('#'):1829 continue1830 else:1831 (key, val) = line.split()1832 self.SaturatedBarrens_WT_M[(key)] = val1833 # Convert strings to floats as necessary1834 self.SaturatedBarrens_WT_M['A1_above'] = float(self.SaturatedBarrens_WT_M['A1_above'])1835 self.SaturatedBarrens_WT_M['A2_above'] = float(self.SaturatedBarrens_WT_M['A2_above'])1836 self.SaturatedBarrens_WT_M['x0_above'] = float(self.SaturatedBarrens_WT_M['x0_above'])1837 self.SaturatedBarrens_WT_M['dx_above'] = float(self.SaturatedBarrens_WT_M['dx_above'])1838 self.SaturatedBarrens_WT_M['A1_below'] = float(self.SaturatedBarrens_WT_M['A1_below'])1839 self.SaturatedBarrens_WT_M['A2_below'] = float(self.SaturatedBarrens_WT_M['A2_below'])1840 self.SaturatedBarrens_WT_M['x0_below'] = float(self.SaturatedBarrens_WT_M['x0_below'])1841 self.SaturatedBarrens_WT_M['dx_below'] = float(self.SaturatedBarrens_WT_M['dx_below'])1842 self.SaturatedBarrens_WT_M['a_above'] = float(self.SaturatedBarrens_WT_M['a_above'])1843 self.SaturatedBarrens_WT_M['b_above'] = float(self.SaturatedBarrens_WT_M['b_above'])1844 self.SaturatedBarrens_WT_M['a_below'] = float(self.SaturatedBarrens_WT_M['a_below'])1845 self.SaturatedBarrens_WT_M['b_below'] = float(self.SaturatedBarrens_WT_M['b_below'])1846 self.SaturatedBarrens_WT_M['K_above'] = float(self.SaturatedBarrens_WT_M['K_above'])1847 self.SaturatedBarrens_WT_M['C_above'] = float(self.SaturatedBarrens_WT_M['C_above'])1848 self.SaturatedBarrens_WT_M['A_above'] = float(self.SaturatedBarrens_WT_M['A_above'])1849 self.SaturatedBarrens_WT_M['B_above'] = float(self.SaturatedBarrens_WT_M['B_above'])1850 self.SaturatedBarrens_WT_M['K_below'] = float(self.SaturatedBarrens_WT_M['K_below'])1851 self.SaturatedBarrens_WT_M['C_below'] = float(self.SaturatedBarrens_WT_M['C_below'])1852 self.SaturatedBarrens_WT_M['A_below'] = float(self.SaturatedBarrens_WT_M['A_below'])1853 self.SaturatedBarrens_WT_M['B_below'] = float(self.SaturatedBarrens_WT_M['B_below'])1854 self.SaturatedBarrens_WT_M['HillB_above'] = float(self.SaturatedBarrens_WT_M['HillB_above'])1855 self.SaturatedBarrens_WT_M['HillN_above'] = float(self.SaturatedBarrens_WT_M['HillN_above'])1856 self.SaturatedBarrens_WT_M['HillB_below'] = float(self.SaturatedBarrens_WT_M['HillB_below'])1857 self.SaturatedBarrens_WT_M['HillN_below'] = float(self.SaturatedBarrens_WT_M['HillN_below'])1858 self.SaturatedBarrens_WT_M['max_terrain_transition'] = \1859 float(self.SaturatedBarrens_WT_M['max_terrain_transition'])1860 self.SaturatedBarrens_WT_M['ice_slope_poor'] = float(self.SaturatedBarrens_WT_M['ice_slope_poor'])1861 self.SaturatedBarrens_WT_M['ice_slope_pore'] = float(self.SaturatedBarrens_WT_M['ice_slope_pore'])1862 self.SaturatedBarrens_WT_M['ice_slope_wedge'] = float(self.SaturatedBarrens_WT_M['ice_slope_wedge'])1863 self.SaturatedBarrens_WT_M['ice_slope_massive'] = float(self.SaturatedBarrens_WT_M['ice_slope_massive'])1864 self.SaturatedBarrens_WT_M['porosity'] = float(self.SaturatedBarrens_WT_M['porosity']) 1865 # - - - - - - - - - - - - - - - - - - - - - - - - -1866 # Reading Old Age Parameters from Control file1867 # - - - - - - - - - - - - - - - - - - - - - - - - -1868 print ' .. Old age parameters'1869 1870 self.SaturatedBarrens_WT_O = {}1871 with open(self.SaturatedBarrens_WT_O_Control, 'r') as f:1872 for line in f:1873 if line.startswith('#'):1874 continue1875 else:1876 (key, val) = line.split()1877 self.SaturatedBarrens_WT_O[(key)] = val1878 # Convert strings to floats as necessary1879 self.SaturatedBarrens_WT_O['A1_above'] = float(self.SaturatedBarrens_WT_O['A1_above'])1880 self.SaturatedBarrens_WT_O['A2_above'] = float(self.SaturatedBarrens_WT_O['A2_above'])1881 self.SaturatedBarrens_WT_O['x0_above'] = float(self.SaturatedBarrens_WT_O['x0_above'])1882 self.SaturatedBarrens_WT_O['dx_above'] = float(self.SaturatedBarrens_WT_O['dx_above'])1883 self.SaturatedBarrens_WT_O['A1_below'] = float(self.SaturatedBarrens_WT_O['A1_below'])1884 self.SaturatedBarrens_WT_O['A2_below'] = float(self.SaturatedBarrens_WT_O['A2_below'])1885 self.SaturatedBarrens_WT_O['x0_below'] = float(self.SaturatedBarrens_WT_O['x0_below'])1886 self.SaturatedBarrens_WT_O['dx_below'] = float(self.SaturatedBarrens_WT_O['dx_below'])1887 self.SaturatedBarrens_WT_O['a_above'] = float(self.SaturatedBarrens_WT_O['a_above'])1888 self.SaturatedBarrens_WT_O['b_above'] = float(self.SaturatedBarrens_WT_O['b_above'])1889 self.SaturatedBarrens_WT_O['a_below'] = float(self.SaturatedBarrens_WT_O['a_below'])1890 self.SaturatedBarrens_WT_O['b_below'] = float(self.SaturatedBarrens_WT_O['b_below'])1891 self.SaturatedBarrens_WT_O['K_above'] = float(self.SaturatedBarrens_WT_O['K_above'])1892 self.SaturatedBarrens_WT_O['C_above'] = float(self.SaturatedBarrens_WT_O['C_above'])1893 self.SaturatedBarrens_WT_O['A_above'] = float(self.SaturatedBarrens_WT_O['A_above'])1894 self.SaturatedBarrens_WT_O['B_above'] = float(self.SaturatedBarrens_WT_O['B_above'])1895 self.SaturatedBarrens_WT_O['K_below'] = float(self.SaturatedBarrens_WT_O['K_below'])1896 self.SaturatedBarrens_WT_O['C_below'] = float(self.SaturatedBarrens_WT_O['C_below'])1897 self.SaturatedBarrens_WT_O['A_below'] = float(self.SaturatedBarrens_WT_O['A_below'])1898 self.SaturatedBarrens_WT_O['B_below'] = float(self.SaturatedBarrens_WT_O['B_below'])1899 self.SaturatedBarrens_WT_O['HillB_above'] = float(self.SaturatedBarrens_WT_O['HillB_above'])1900 self.SaturatedBarrens_WT_O['HillN_above'] = float(self.SaturatedBarrens_WT_O['HillN_above'])1901 self.SaturatedBarrens_WT_O['HillB_below'] = float(self.SaturatedBarrens_WT_O['HillB_below'])1902 self.SaturatedBarrens_WT_O['HillN_below'] = float(self.SaturatedBarrens_WT_O['HillN_below'])1903 self.SaturatedBarrens_WT_O['max_terrain_transition'] = \1904 float(self.SaturatedBarrens_WT_O['max_terrain_transition'])1905 self.SaturatedBarrens_WT_O['ice_slope_poor'] = float(self.SaturatedBarrens_WT_O['ice_slope_poor'])1906 self.SaturatedBarrens_WT_O['ice_slope_pore'] = float(self.SaturatedBarrens_WT_O['ice_slope_pore'])1907 self.SaturatedBarrens_WT_O['ice_slope_wedge'] = float(self.SaturatedBarrens_WT_O['ice_slope_wedge'])1908 self.SaturatedBarrens_WT_O['ice_slope_massive'] = float(self.SaturatedBarrens_WT_O['ice_slope_massive'])1909 self.SaturatedBarrens_WT_O['porosity'] = float(self.SaturatedBarrens_WT_O['porosity']) 1910 1911#====================================================================================1912def Shrubs_WT(self):1913 1914 print ' ..Reading Wetland Tundra Shrub Parameters'1915 """ Read files from the input directory """1916 if self.Simulation_area.lower() == 'barrow':1917 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+1918 self.Control_directory)1919 elif self.Simulation_area.lower() == 'arctic_coast':1920 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic/'+\1921 self.Control_directory)1922 elif self.Simulation_area.lower() == 'tanana':1923 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\1924 self.Control_directory)1925 elif self.Simulation_area.lower() == 'yukon':1926 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\1927 self.Control_directory)1928 elif self.Simulation_area.lower() == 'aiem':1929 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM/'+\1930 self.Control_directory)1931 elif self.Simulation_area.lower() == 'ngee':1932 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE/'+\1933 self.Control_directory)1934 # - - - - - - - - - - - - - - - - - - - - - - - - -1935 # Reading Old Age Parameters from Control file1936 # - - - - - - - - - - - - - - - - - - - - - - - - -1937 self.Shrubs_WT_O = {}1938 with open(self.Shrubs_WT_O_Control, 'r') as f:1939 for line in f:1940 if line.startswith('#'):1941 continue1942 else:1943 (key, val) = line.split()1944 self.Shrubs_WT_O[(key)] = val1945 # Convert strings to floats as necessary1946 self.Shrubs_WT_O['A1_above'] = float(self.Shrubs_WT_O['A1_above'])1947 self.Shrubs_WT_O['A2_above'] = float(self.Shrubs_WT_O['A2_above'])1948 self.Shrubs_WT_O['x0_above'] = float(self.Shrubs_WT_O['x0_above'])1949 self.Shrubs_WT_O['dx_above'] = float(self.Shrubs_WT_O['dx_above'])1950 self.Shrubs_WT_O['A1_below'] = float(self.Shrubs_WT_O['A1_below'])1951 self.Shrubs_WT_O['A2_below'] = float(self.Shrubs_WT_O['A2_below'])1952 self.Shrubs_WT_O['x0_below'] = float(self.Shrubs_WT_O['x0_below'])1953 self.Shrubs_WT_O['dx_below'] = float(self.Shrubs_WT_O['dx_below'])1954 self.Shrubs_WT_O['a_above'] = float(self.Shrubs_WT_O['a_above'])1955 self.Shrubs_WT_O['b_above'] = float(self.Shrubs_WT_O['b_above'])1956 self.Shrubs_WT_O['a_below'] = float(self.Shrubs_WT_O['a_below'])1957 self.Shrubs_WT_O['b_below'] = float(self.Shrubs_WT_O['b_below'])1958 self.Shrubs_WT_O['K_above'] = float(self.Shrubs_WT_O['K_above'])1959 self.Shrubs_WT_O['C_above'] = float(self.Shrubs_WT_O['C_above'])1960 self.Shrubs_WT_O['A_above'] = float(self.Shrubs_WT_O['A_above'])1961 self.Shrubs_WT_O['B_above'] = float(self.Shrubs_WT_O['B_above'])1962 self.Shrubs_WT_O['K_below'] = float(self.Shrubs_WT_O['K_below'])1963 self.Shrubs_WT_O['C_below'] = float(self.Shrubs_WT_O['C_below'])1964 self.Shrubs_WT_O['A_below'] = float(self.Shrubs_WT_O['A_below'])1965 self.Shrubs_WT_O['B_below'] = float(self.Shrubs_WT_O['B_below'])1966 self.Shrubs_WT_O['HillB_above'] = float(self.Shrubs_WT_O['HillB_above'])1967 self.Shrubs_WT_O['HillN_above'] = float(self.Shrubs_WT_O['HillN_above'])1968 self.Shrubs_WT_O['HillB_below'] = float(self.Shrubs_WT_O['HillB_below'])1969 self.Shrubs_WT_O['HillN_below'] = float(self.Shrubs_WT_O['HillN_below'])1970 self.Shrubs_WT_O['max_terrain_transition'] = \1971 float(self.Shrubs_WT_O['max_terrain_transition'])1972 self.Shrubs_WT_O['ice_slope_poor'] = float(self.Shrubs_WT_O['ice_slope_poor'])1973 self.Shrubs_WT_O['ice_slope_pore'] = float(self.Shrubs_WT_O['ice_slope_pore'])1974 self.Shrubs_WT_O['ice_slope_wedge'] = float(self.Shrubs_WT_O['ice_slope_wedge'])1975 self.Shrubs_WT_O['ice_slope_massive'] = float(self.Shrubs_WT_O['ice_slope_massive'])1976 self.Shrubs_WT_O['porosity'] = float(self.Shrubs_WT_O['porosity'])1977#====================================================================================1978def Urban_WT(self):1979 1980 print ' ..Reading Wetland Tundra Urban Parameters'1981 """ Read files from the input directory """1982 if self.Simulation_area.lower() == 'barrow':1983 os.chdir(self.control['Run_dir']+self.Input_directory+'/Barrow/'+\1984 self.Control_directory)1985 elif self.Simulation_area.lower() == 'arctic_coast':1986 os.chdir(self.control['Run_dir']+self.Input_directory+'/Arctic/'+\1987 self.Control_directory)1988 elif self.Simulation_area.lower() == 'tanana':1989 os.chdir(self.control['Run_dir']+self.Input_directory+'/Tanana/'+\1990 self.Control_directory)1991 elif self.Simulation_area.lower() == 'yukon':1992 os.chdir(self.control['Run_dir']+self.Input_directory+'/Yukon/'+\1993 self.Control_directory)1994 elif self.Simulation_area.lower() == 'aiem':1995 os.chdir(self.control['Run_dir']+self.Input_directory+'/AIEM/'+\1996 self.Control_directory)1997 elif self.Simulation_area.lower() == 'ngee':1998 os.chdir(self.control['Run_dir']+self.Input_directory+'/NGEE/'+\1999 self.Control_directory)2000 # - - - - - - - - - - - - - - - - - - - - - - - - -2001 # Reading Old Age Parameters from Control file2002 # - - - - - - - - - - - - - - - - - - - - - - - - -2003 self.Urban_WT = {}2004 with open(self.Urban_WT_Control, 'r') as f:2005 for line in f:2006 if line.startswith('#'):2007 continue2008 else:2009 (key, val) = line.split()2010 self.Urban_WT[(key)] = val2011 # Convert strings to floats as necessary2012 self.Urban_WT['A1_above'] = float(self.Urban_WT['A1_above'])2013 self.Urban_WT['A2_above'] = float(self.Urban_WT['A2_above'])2014 self.Urban_WT['x0_above'] = float(self.Urban_WT['x0_above'])2015 self.Urban_WT['dx_above'] = float(self.Urban_WT['dx_above'])2016 self.Urban_WT['A1_below'] = float(self.Urban_WT['A1_below'])2017 self.Urban_WT['A2_below'] = float(self.Urban_WT['A2_below'])2018 self.Urban_WT['x0_below'] = float(self.Urban_WT['x0_below'])2019 self.Urban_WT['dx_below'] = float(self.Urban_WT['dx_below'])2020 self.Urban_WT['a_above'] = float(self.Urban_WT['a_above'])2021 self.Urban_WT['b_above'] = float(self.Urban_WT['b_above'])2022 self.Urban_WT['a_below'] = float(self.Urban_WT['a_below'])2023 self.Urban_WT['b_below'] = float(self.Urban_WT['b_below'])2024 self.Urban_WT['K_above'] = float(self.Urban_WT['K_above'])2025 self.Urban_WT['C_above'] = float(self.Urban_WT['C_above'])2026 self.Urban_WT['A_above'] = float(self.Urban_WT['A_above'])2027 self.Urban_WT['B_above'] = float(self.Urban_WT['B_above'])2028 self.Urban_WT['K_below'] = float(self.Urban_WT['K_below'])2029 self.Urban_WT['C_below'] = float(self.Urban_WT['C_below'])2030 self.Urban_WT['A_below'] = float(self.Urban_WT['A_below'])2031 self.Urban_WT['B_below'] = float(self.Urban_WT['B_below'])2032 self.Urban_WT['HillB_above'] = float(self.Urban_WT['HillB_above'])2033 self.Urban_WT['HillN_above'] = float(self.Urban_WT['HillN_above'])2034 self.Urban_WT['HillB_below'] = float(self.Urban_WT['HillB_below'])2035 self.Urban_WT['HillN_below'] = float(self.Urban_WT['HillN_below'])2036 self.Urban_WT['max_terrain_transition'] = \2037 float(self.Urban_WT['max_terrain_transition'])2038 self.Urban_WT['ice_slope_poor'] = float(self.Urban_WT['ice_slope_poor'])2039 self.Urban_WT['ice_slope_pore'] = float(self.Urban_WT['ice_slope_pore'])2040 self.Urban_WT['ice_slope_wedge'] = float(self.Urban_WT['ice_slope_wedge'])2041 self.Urban_WT['ice_slope_massive'] = float(self.Urban_WT['ice_slope_massive'])...
checkout.js
Source:checkout.js
12var altship = 0;3{TPL_VAR_COUNTRY_OPTIONS}4{TPL_VAR_COUNTRY_OPTIONS2}56 function loadvalues()7 {8 stateName = Array();9 stateVal = Array();10 stateName[-1] = Array();11 stateVal[-1] = Array();12 stateName[0] = Array();13 stateVal[0] = Array();14 stateName[100] = Array();15 stateVal[100] = Array();16 stateName[100][-1] = "Select below";17 stateVal[100][-1] = "-1";18 stateName[100][-1] = "Select below";19 stateName[100][0] = "Others";20 stateVal[100][0] = "0";21 stateName[251] = Array();22 stateVal[251] = Array();23 stateName[251][-1] = "Select below";24 stateVal[251][-1] = "-1";25 stateName[251][-1] = "Select below";26 stateName[251][0] = "Others";27 stateVal[251][0] = "0";28 stateName[1] = Array();29 stateVal[1] = Array();30 stateName[1][-1] = "Select below";31 stateVal[1][-1] = "-1";32 stateName[1][-1] = "Select below";33 stateName[1][0] = "Others";34 stateVal[1][0] = "0";35 stateName[22] = Array();36 stateVal[22] = Array();37 stateName[22][-1] = "Select below";38 stateVal[22][-1] = "-1";39 stateName[22][-1] = "Select below";40 stateName[22][0] = "Others";41 stateVal[22][0] = "0";42 stateName[23] = Array();43 stateVal[23] = Array();44 stateName[23][-1] = "Select below";45 stateVal[23][-1] = "-1";46 stateName[23][-1] = "Select below";47 stateName[23][0] = "Others";48 stateVal[23][0] = "0";49 stateName[24] = Array();50 stateVal[24] = Array();51 stateName[24][-1] = "Select below";52 stateVal[24][-1] = "-1";53 stateName[24][-1] = "Select below";54 stateName[24][0] = "Others";55 stateVal[24][0] = "0";56 stateName[25] = Array();57 stateVal[25] = Array();58 stateName[25][-1] = "Select below";59 stateVal[25][-1] = "-1";60 stateName[25][-1] = "Select below";61 stateName[25][0] = "Others";62 stateVal[25][0] = "0";63 stateName[26] = Array();64 stateVal[26] = Array();65 stateName[26][-1] = "Select below";66 stateVal[26][-1] = "-1";67 stateName[26][-1] = "Select below";68 stateName[26][0] = "Others";69 stateVal[26][0] = "0";70 stateName[27] = Array();71 stateVal[27] = Array();72 stateName[27][-1] = "Select below";73 stateVal[27][-1] = "-1";74 stateName[27][-1] = "Select below";75 stateName[27][0] = "Others";76 stateVal[27][0] = "0";77 stateName[2] = Array();78 stateVal[2] = Array();79 stateName[2][-1] = "Select below";80 stateVal[2][-1] = "-1";81 stateName[2][-1] = "Select below";82 stateName[2][0] = "Others";83 stateVal[2][0] = "0";84 stateName[29] = Array();85 stateVal[29] = Array();86 stateName[29][-1] = "Select below";87 stateVal[29][-1] = "-1";88 stateName[29][-1] = "Select below";89 stateName[29][0] = "Others";90 stateVal[29][0] = "0";91 stateName[30] = Array();92 stateVal[30] = Array();93 stateName[30][-1] = "Select below";94 stateVal[30][-1] = "-1";95 stateName[30][-1] = "Select below";96 stateName[30][0] = "Others";97 stateVal[30][0] = "0";98 stateName[280] = Array();99 stateVal[280] = Array();100 stateName[280][-1] = "Select below";101 stateVal[280][-1] = "-1";102 stateName[280][-1] = "Select below";103 stateName[280][0] = "Others";104 stateVal[280][0] = "0";105 stateName[32] = Array();106 stateVal[32] = Array();107 stateName[32][-1] = "Select below";108 stateVal[32][-1] = "-1";109 stateName[32][-1] = "Select below";110 stateName[32][0] = "Others";111 stateVal[32][0] = "0";112 stateName[31] = Array();113 stateVal[31] = Array();114 stateName[31][-1] = "Select below";115 stateVal[31][-1] = "-1";116 stateName[31][-1] = "Select below";117 stateName[31][0] = "Others";118 stateVal[31][0] = "0";119 stateName[33] = Array();120 stateVal[33] = Array();121 stateName[33][-1] = "Select below";122 stateVal[33][-1] = "-1";123 stateName[33][-1] = "Select below";124 stateName[33][0] = "Others";125 stateVal[33][0] = "0";126 stateName[34] = Array();127 stateVal[34] = Array();128 stateName[34][-1] = "Select below";129 stateVal[34][-1] = "-1";130 stateName[34][-1] = "Select below";131 stateName[34][0] = "Others";132 stateVal[34][0] = "0";133 stateName[35] = Array();134 stateVal[35] = Array();135 stateName[35][-1] = "Select below";136 stateVal[35][-1] = "-1";137 stateName[35][-1] = "Select below";138 stateName[35][0] = "Others";139 stateVal[35][0] = "0";140 stateName[36] = Array();141 stateVal[36] = Array();142 stateName[36][-1] = "Select below";143 stateVal[36][-1] = "-1";144 stateName[36][-1] = "Select below";145 stateName[36][0] = "Others";146 stateVal[36][0] = "0";147 stateName[38] = Array();148 stateVal[38] = Array();149 stateName[38][-1] = "Select below";150 stateVal[38][-1] = "-1";151 stateName[38][-1] = "Select below";152 stateName[38][0] = "Others";153 stateVal[38][0] = "0";154 stateName[39] = Array();155 stateVal[39] = Array();156 stateName[39][-1] = "Select below";157 stateVal[39][-1] = "-1";158 stateName[39][-1] = "Select below";159 stateName[39][0] = "Others";160 stateVal[39][0] = "0";161 stateName[40] = Array();162 stateVal[40] = Array();163 stateName[40][-1] = "Select below";164 stateVal[40][-1] = "-1";165 stateName[40][-1] = "Select below";166 stateName[40][0] = "Others";167 stateVal[40][0] = "0";168 stateName[41] = Array();169 stateVal[41] = Array();170 stateName[41][-1] = "Select below";171 stateVal[41][-1] = "-1";172 stateName[41][-1] = "Select below";173 stateName[41][0] = "Others";174 stateVal[41][0] = "0";175 stateName[42] = Array();176 stateVal[42] = Array();177 stateName[42][-1] = "Select below";178 stateVal[42][-1] = "-1";179 stateName[42][-1] = "Select below";180 stateName[42][0] = "Others";181 stateVal[42][0] = "0";182 stateName[43] = Array();183 stateVal[43] = Array();184 stateName[43][-1] = "Select below";185 stateVal[43][-1] = "-1";186 stateName[43][-1] = "Select below";187 stateName[43][0] = "Others";188 stateVal[43][0] = "0";189 stateName[44] = Array();190 stateVal[44] = Array();191 stateName[44][-1] = "Select below";192 stateVal[44][-1] = "-1";193 stateName[44][-1] = "Select below";194 stateName[44][0] = "Others";195 stateVal[44][0] = "0";196 stateName[45] = Array();197 stateVal[45] = Array();198 stateName[45][-1] = "Select below";199 stateVal[45][-1] = "-1";200 stateName[45][-1] = "Select below";201 stateName[45][0] = "Others";202 stateVal[45][0] = "0";203 stateName[46] = Array();204 stateVal[46] = Array();205 stateName[46][-1] = "Select below";206 stateVal[46][-1] = "-1";207 stateName[46][-1] = "Select below";208 stateName[46][0] = "Others";209 stateVal[46][0] = "0";210 stateName[266] = Array();211 stateVal[266] = Array();212 stateName[266][-1] = "Select below";213 stateVal[266][-1] = "-1";214 stateName[266][-1] = "Select below";215 stateName[266][0] = "Others";216 stateVal[266][0] = "0";217 stateName[47] = Array();218 stateVal[47] = Array();219 stateName[47][-1] = "Select below";220 stateVal[47][-1] = "-1";221 stateName[47][-1] = "Select below";222 stateName[47][0] = "Others";223 stateVal[47][0] = "0";224 stateName[48] = Array();225 stateVal[48] = Array();226 stateName[48][-1] = "Select below";227 stateVal[48][-1] = "-1";228 stateName[48][-1] = "Select below";229 stateName[48][0] = "Others";230 stateVal[48][0] = "0";231 stateName[49] = Array();232 stateVal[49] = Array();233 stateName[49][-1] = "Select below";234 stateVal[49][-1] = "-1";235 stateName[49][-1] = "Select below";236 stateName[49][0] = "Others";237 stateVal[49][0] = "0";238 stateName[265] = Array();239 stateVal[265] = Array();240 stateName[265][-1] = "Select below";241 stateVal[265][-1] = "-1";242 stateName[265][-1] = "Select below";243 stateName[265][0] = "Others";244 stateVal[265][0] = "0";245 stateName[50] = Array();246 stateVal[50] = Array();247 stateName[50][-1] = "Select below";248 stateVal[50][-1] = "-1";249 stateName[50][-1] = "Select below";250 stateName[50][0] = "Others";251 stateVal[50][0] = "0";252 stateName[51] = Array();253 stateVal[51] = Array();254 stateName[51][-1] = "Select below";255 stateVal[51][-1] = "-1";256 stateName[51][-1] = "Select below";257 stateName[51][0] = "Others";258 stateVal[51][0] = "0";259 stateName[52] = Array();260 stateVal[52] = Array();261 stateName[52][-1] = "Select below";262 stateVal[52][-1] = "-1";263 stateName[52][-1] = "Select below";264 stateName[52][0] = "Others";265 stateVal[52][0] = "0";266 stateName[53] = Array();267 stateVal[53] = Array();268 stateName[53][-1] = "Select below";269 stateVal[53][-1] = "-1";270 stateName[53][-1] = "Select below";271 stateName[53][0] = "Others";272 stateVal[53][0] = "0";273 stateName[54] = Array();274 stateVal[54] = Array();275 stateName[54][-1] = "Select below";276 stateVal[54][-1] = "-1";277 stateName[54][-1] = "Select below";278 stateName[54][0] = "Others";279 stateVal[54][0] = "0";280 stateName[55] = Array();281 stateVal[55] = Array();282 stateName[55][-1] = "Select below";283 stateVal[55][-1] = "-1";284 stateName[55][-1] = "Select below";285 stateName[55][0] = "Others";286 stateVal[55][0] = "0";287 stateName[57] = Array();288 stateVal[57] = Array();289 stateName[57][-1] = "Select below";290 stateVal[57][-1] = "-1";291 stateName[57][-1] = "Select below";292 stateName[57][0] = "Others";293 stateVal[57][0] = "0";294 stateName[58] = Array();295 stateVal[58] = Array();296 stateName[58][-1] = "Select below";297 stateVal[58][-1] = "-1";298 stateName[58][-1] = "Select below";299 stateName[58][0] = "Others";300 stateVal[58][0] = "0";301 stateName[267] = Array();302 stateVal[267] = Array();303 stateName[267][-1] = "Select below";304 stateVal[267][-1] = "-1";305 stateName[267][-1] = "Select below";306 stateName[267][0] = "Others";307 stateVal[267][0] = "0";308 stateName[59] = Array();309 stateVal[59] = Array();310 stateName[59][-1] = "Select below";311 stateVal[59][-1] = "-1";312 stateName[59][-1] = "Select below";313 stateName[59][0] = "Others";314 stateVal[59][0] = "0";315 stateName[60] = Array();316 stateVal[60] = Array();317 stateName[60][-1] = "Select below";318 stateVal[60][-1] = "-1";319 stateName[60][-1] = "Select below";320 stateName[60][0] = "Others";321 stateVal[60][0] = "0";322 stateName[61] = Array();323 stateVal[61] = Array();324 stateName[61][-1] = "Select below";325 stateVal[61][-1] = "-1";326 stateName[61][-1] = "Select below";327 stateName[61][0] = "Others";328 stateVal[61][0] = "0";329 stateName[62] = Array();330 stateVal[62] = Array();331 stateName[62][-1] = "Select below";332 stateVal[62][-1] = "-1";333 stateName[62][-1] = "Select below";334 stateName[62][0] = "Others";335 stateVal[62][0] = "0";336 stateName[63] = Array();337 stateVal[63] = Array();338 stateName[63][-1] = "Select below";339 stateVal[63][-1] = "-1";340 stateName[63][-1] = "Select below";341 stateName[63][0] = "Others";342 stateVal[63][0] = "0";343 stateName[64] = Array();344 stateVal[64] = Array();345 stateName[64][-1] = "Select below";346 stateVal[64][-1] = "-1";347 stateName[64][-1] = "Select below";348 stateName[64][0] = "Others";349 stateVal[64][0] = "0";350 stateName[65] = Array();351 stateVal[65] = Array();352 stateName[65][-1] = "Select below";353 stateVal[65][-1] = "-1";354 stateName[65][-1] = "Select below";355 stateName[65][0] = "Others";356 stateVal[65][0] = "0";357 stateName[66] = Array();358 stateVal[66] = Array();359 stateName[66][-1] = "Select below";360 stateVal[66][-1] = "-1";361 stateName[66][-1] = "Select below";362 stateName[66][0] = "Others";363 stateVal[66][0] = "0";364 stateName[268] = Array();365 stateVal[268] = Array();366 stateName[268][-1] = "Select below";367 stateVal[268][-1] = "-1";368 stateName[268][-1] = "Select below";369 stateName[268][0] = "Others";370 stateVal[268][0] = "0";371 stateName[67] = Array();372 stateVal[67] = Array();373 stateName[67][-1] = "Select below";374 stateVal[67][-1] = "-1";375 stateName[67][-1] = "Select below";376 stateName[67][0] = "Others";377 stateVal[67][0] = "0";378 stateName[68] = Array();379 stateVal[68] = Array();380 stateName[68][-1] = "Select below";381 stateVal[68][-1] = "-1";382 stateName[68][-1] = "Select below";383 stateName[68][0] = "Others";384 stateVal[68][0] = "0";385 stateName[269] = Array();386 stateVal[269] = Array();387 stateName[269][-1] = "Select below";388 stateVal[269][-1] = "-1";389 stateName[269][-1] = "Select below";390 stateName[269][0] = "Others";391 stateVal[269][0] = "0";392 stateName[88] = Array();393 stateVal[88] = Array();394 stateName[88][-1] = "Select below";395 stateVal[88][-1] = "-1";396 stateName[88][-1] = "Select below";397 stateName[88][0] = "Others";398 stateVal[88][0] = "0";399 stateName[89] = Array();400 stateVal[89] = Array();401 stateName[89][-1] = "Select below";402 stateVal[89][-1] = "-1";403 stateName[89][-1] = "Select below";404 stateName[89][0] = "Others";405 stateVal[89][0] = "0";406 stateName[90] = Array();407 stateVal[90] = Array();408 stateName[90][-1] = "Select below";409 stateVal[90][-1] = "-1";410 stateName[90][-1] = "Select below";411 stateName[90][0] = "Others";412 stateVal[90][0] = "0";413 stateName[91] = Array();414 stateVal[91] = Array();415 stateName[91][-1] = "Select below";416 stateVal[91][-1] = "-1";417 stateName[91][-1] = "Select below";418 stateName[91][0] = "Others";419 stateVal[91][0] = "0";420 stateName[92] = Array();421 stateVal[92] = Array();422 stateName[92][-1] = "Select below";423 stateVal[92][-1] = "-1";424 stateName[92][-1] = "Select below";425 stateName[92][0] = "Others";426 stateVal[92][0] = "0";427 stateName[93] = Array();428 stateVal[93] = Array();429 stateName[93][-1] = "Select below";430 stateVal[93][-1] = "-1";431 stateName[93][-1] = "Select below";432 stateName[93][0] = "Others";433 stateVal[93][0] = "0";434 stateName[94] = Array();435 stateVal[94] = Array();436 stateName[94][-1] = "Select below";437 stateVal[94][-1] = "-1";438 stateName[94][-1] = "Select below";439 stateName[94][0] = "Others";440 stateVal[94][0] = "0";441 stateName[95] = Array();442 stateVal[95] = Array();443 stateName[95][-1] = "Select below";444 stateVal[95][-1] = "-1";445 stateName[95][-1] = "Select below";446 stateName[95][0] = "Others";447 stateVal[95][0] = "0";448 stateName[97] = Array();449 stateVal[97] = Array();450 stateName[97][-1] = "Select below";451 stateVal[97][-1] = "-1";452 stateName[97][-1] = "Select below";453 stateName[97][0] = "Others";454 stateVal[97][0] = "0";455 stateName[98] = Array();456 stateVal[98] = Array();457 stateName[98][-1] = "Select below";458 stateVal[98][-1] = "-1";459 stateName[98][-1] = "Select below";460 stateName[98][0] = "Others";461 stateVal[98][0] = "0";462 stateName[99] = Array();463 stateVal[99] = Array();464 stateName[99][-1] = "Select below";465 stateVal[99][-1] = "-1";466 stateName[99][-1] = "Select below";467 stateName[99][0] = "Others";468 stateVal[99][0] = "0";469 stateName[101] = Array();470 stateVal[101] = Array();471 stateName[101][-1] = "Select below";472 stateVal[101][-1] = "-1";473 stateName[101][-1] = "Select below";474 stateName[101][0] = "Others";475 stateVal[101][0] = "0";476 stateName[102] = Array();477 stateVal[102] = Array();478 stateName[102][-1] = "Select below";479 stateVal[102][-1] = "-1";480 stateName[102][-1] = "Select below";481 stateName[102][0] = "Others";482 stateVal[102][0] = "0";483 stateName[103] = Array();484 stateVal[103] = Array();485 stateName[103][-1] = "Select below";486 stateVal[103][-1] = "-1";487 stateName[103][-1] = "Select below";488 stateName[103][0] = "Others";489 stateVal[103][0] = "0";490 stateName[104] = Array();491 stateVal[104] = Array();492 stateName[104][-1] = "Select below";493 stateVal[104][-1] = "-1";494 stateName[104][-1] = "Select below";495 stateName[104][0] = "Others";496 stateVal[104][0] = "0";497 stateName[105] = Array();498 stateVal[105] = Array();499 stateName[105][-1] = "Select below";500 stateVal[105][-1] = "-1";501 stateName[105][-1] = "Select below";502 stateName[105][0] = "Others";503 stateVal[105][0] = "0";504 stateName[106] = Array();505 stateVal[106] = Array();506 stateName[106][-1] = "Select below";507 stateVal[106][-1] = "-1";508 stateName[106][-1] = "Select below";509 stateName[106][0] = "Others";510 stateVal[106][0] = "0";511 stateName[107] = Array();512 stateVal[107] = Array();513 stateName[107][-1] = "Select below";514 stateVal[107][-1] = "-1";515 stateName[107][-1] = "Select below";516 stateName[107][0] = "Others";517 stateVal[107][0] = "0";518 stateName[108] = Array();519 stateVal[108] = Array();520 stateName[108][-1] = "Select below";521 stateVal[108][-1] = "-1";522 stateName[108][-1] = "Select below";523 stateName[108][0] = "Others";524 stateVal[108][0] = "0";525 stateName[109] = Array();526 stateVal[109] = Array();527 stateName[109][-1] = "Select below";528 stateVal[109][-1] = "-1";529 stateName[109][-1] = "Select below";530 stateName[109][0] = "Others";531 stateVal[109][0] = "0";532 stateName[110] = Array();533 stateVal[110] = Array();534 stateName[110][-1] = "Select below";535 stateVal[110][-1] = "-1";536 stateName[110][-1] = "Select below";537 stateName[110][0] = "Others";538 stateVal[110][0] = "0";539 stateName[111] = Array();540 stateVal[111] = Array();541 stateName[111][-1] = "Select below";542 stateVal[111][-1] = "-1";543 stateName[111][-1] = "Select below";544 stateName[111][0] = "Others";545 stateVal[111][0] = "0";546 stateName[112] = Array();547 stateVal[112] = Array();548 stateName[112][-1] = "Select below";549 stateVal[112][-1] = "-1";550 stateName[112][-1] = "Select below";551 stateName[112][0] = "Others";552 stateVal[112][0] = "0";553 stateName[113] = Array();554 stateVal[113] = Array();555 stateName[113][-1] = "Select below";556 stateVal[113][-1] = "-1";557 stateName[113][-1] = "Select below";558 stateName[113][0] = "Others";559 stateVal[113][0] = "0";560 stateName[114] = Array();561 stateVal[114] = Array();562 stateName[114][-1] = "Select below";563 stateVal[114][-1] = "-1";564 stateName[114][-1] = "Select below";565 stateName[114][0] = "Others";566 stateVal[114][0] = "0";567 stateName[115] = Array();568 stateVal[115] = Array();569 stateName[115][-1] = "Select below";570 stateVal[115][-1] = "-1";571 stateName[115][-1] = "Select below";572 stateName[115][0] = "Others";573 stateVal[115][0] = "0";574 stateName[116] = Array();575 stateVal[116] = Array();576 stateName[116][-1] = "Select below";577 stateVal[116][-1] = "-1";578 stateName[116][-1] = "Select below";579 stateName[116][0] = "Others";580 stateVal[116][0] = "0";581 stateName[117] = Array();582 stateVal[117] = Array();583 stateName[117][-1] = "Select below";584 stateVal[117][-1] = "-1";585 stateName[117][-1] = "Select below";586 stateName[117][0] = "Others";587 stateVal[117][0] = "0";588 stateName[118] = Array();589 stateVal[118] = Array();590 stateName[118][-1] = "Select below";591 stateVal[118][-1] = "-1";592 stateName[118][-1] = "Select below";593 stateName[118][0] = "Others";594 stateVal[118][0] = "0";595 stateName[119] = Array();596 stateVal[119] = Array();597 stateName[119][-1] = "Select below";598 stateVal[119][-1] = "-1";599 stateName[119][-1] = "Select below";600 stateName[119][0] = "Others";601 stateVal[119][0] = "0";602 stateName[120] = Array();603 stateVal[120] = Array();604 stateName[120][-1] = "Select below";605 stateVal[120][-1] = "-1";606 stateName[120][-1] = "Select below";607 stateName[120][0] = "Others";608 stateVal[120][0] = "0";609 stateName[121] = Array();610 stateVal[121] = Array();611 stateName[121][-1] = "Select below";612 stateVal[121][-1] = "-1";613 stateName[121][-1] = "Select below";614 stateName[121][0] = "Others";615 stateVal[121][0] = "0";616 stateName[122] = Array();617 stateVal[122] = Array();618 stateName[122][-1] = "Select below";619 stateVal[122][-1] = "-1";620 stateName[122][-1] = "Select below";621 stateName[122][0] = "Others";622 stateVal[122][0] = "0";623 stateName[123] = Array();624 stateVal[123] = Array();625 stateName[123][-1] = "Select below";626 stateVal[123][-1] = "-1";627 stateName[123][-1] = "Select below";628 stateName[123][0] = "Others";629 stateVal[123][0] = "0";630 stateName[124] = Array();631 stateVal[124] = Array();632 stateName[124][-1] = "Select below";633 stateVal[124][-1] = "-1";634 stateName[124][-1] = "Select below";635 stateName[124][0] = "Others";636 stateVal[124][0] = "0";637 stateName[125] = Array();638 stateVal[125] = Array();639 stateName[125][-1] = "Select below";640 stateVal[125][-1] = "-1";641 stateName[125][-1] = "Select below";642 stateName[125][0] = "Others";643 stateVal[125][0] = "0";644 stateName[126] = Array();645 stateVal[126] = Array();646 stateName[126][-1] = "Select below";647 stateVal[126][-1] = "-1";648 stateName[126][-1] = "Select below";649 stateName[126][0] = "Others";650 stateVal[126][0] = "0";651 stateName[127] = Array();652 stateVal[127] = Array();653 stateName[127][-1] = "Select below";654 stateVal[127][-1] = "-1";655 stateName[127][-1] = "Select below";656 stateName[127][0] = "Others";657 stateVal[127][0] = "0";658 stateName[270] = Array();659 stateVal[270] = Array();660 stateName[270][-1] = "Select below";661 stateVal[270][-1] = "-1";662 stateName[270][-1] = "Select below";663 stateName[270][0] = "Others";664 stateVal[270][0] = "0";665 stateName[128] = Array();666 stateVal[128] = Array();667 stateName[128][-1] = "Select below";668 stateVal[128][-1] = "-1";669 stateName[128][-1] = "Select below";670 stateName[128][0] = "Others";671 stateVal[128][0] = "0";672 stateName[129] = Array();673 stateVal[129] = Array();674 stateName[129][-1] = "Select below";675 stateVal[129][-1] = "-1";676 stateName[129][-1] = "Select below";677 stateName[129][0] = "Others";678 stateVal[129][0] = "0";679 stateName[130] = Array();680 stateVal[130] = Array();681 stateName[130][-1] = "Select below";682 stateVal[130][-1] = "-1";683 stateName[130][-1] = "Select below";684 stateName[130][0] = "Others";685 stateVal[130][0] = "0";686 stateName[131] = Array();687 stateVal[131] = Array();688 stateName[131][-1] = "Select below";689 stateVal[131][-1] = "-1";690 stateName[131][-1] = "Select below";691 stateName[131][0] = "Others";692 stateVal[131][0] = "0";693 stateName[132] = Array();694 stateVal[132] = Array();695 stateName[132][-1] = "Select below";696 stateVal[132][-1] = "-1";697 stateName[132][-1] = "Select below";698 stateName[132][0] = "Others";699 stateVal[132][0] = "0";700 stateName[133] = Array();701 stateVal[133] = Array();702 stateName[133][-1] = "Select below";703 stateVal[133][-1] = "-1";704 stateName[133][-1] = "Select below";705 stateName[133][0] = "Others";706 stateVal[133][0] = "0";707 stateName[134] = Array();708 stateVal[134] = Array();709 stateName[134][-1] = "Select below";710 stateVal[134][-1] = "-1";711 stateName[134][-1] = "Select below";712 stateName[134][0] = "Others";713 stateVal[134][0] = "0";714 stateName[135] = Array();715 stateVal[135] = Array();716 stateName[135][-1] = "Select below";717 stateVal[135][-1] = "-1";718 stateName[135][-1] = "Select below";719 stateName[135][0] = "Others";720 stateVal[135][0] = "0";721 stateName[136] = Array();722 stateVal[136] = Array();723 stateName[136][-1] = "Select below";724 stateVal[136][-1] = "-1";725 stateName[136][-1] = "Select below";726 stateName[136][0] = "Others";727 stateVal[136][0] = "0";728 stateName[137] = Array();729 stateVal[137] = Array();730 stateName[137][-1] = "Select below";731 stateVal[137][-1] = "-1";732 stateName[137][-1] = "Select below";733 stateName[137][0] = "Others";734 stateVal[137][0] = "0";735 stateName[138] = Array();736 stateVal[138] = Array();737 stateName[138][-1] = "Select below";738 stateVal[138][-1] = "-1";739 stateName[138][-1] = "Select below";740 stateName[138][0] = "Others";741 stateVal[138][0] = "0";742 stateName[139] = Array();743 stateVal[139] = Array();744 stateName[139][-1] = "Select below";745 stateVal[139][-1] = "-1";746 stateName[139][-1] = "Select below";747 stateName[139][0] = "Others";748 stateVal[139][0] = "0";749 stateName[140] = Array();750 stateVal[140] = Array();751 stateName[140][-1] = "Select below";752 stateVal[140][-1] = "-1";753 stateName[140][-1] = "Select below";754 stateName[140][0] = "Others";755 stateVal[140][0] = "0";756 stateName[141] = Array();757 stateVal[141] = Array();758 stateName[141][-1] = "Select below";759 stateVal[141][-1] = "-1";760 stateName[141][-1] = "Select below";761 stateName[141][0] = "Others";762 stateVal[141][0] = "0";763 stateName[142] = Array();764 stateVal[142] = Array();765 stateName[142][-1] = "Select below";766 stateVal[142][-1] = "-1";767 stateName[142][-1] = "Select below";768 stateName[142][0] = "Others";769 stateVal[142][0] = "0";770 stateName[143] = Array();771 stateVal[143] = Array();772 stateName[143][-1] = "Select below";773 stateVal[143][-1] = "-1";774 stateName[143][-1] = "Select below";775 stateName[143][0] = "Others";776 stateVal[143][0] = "0";777 stateName[144] = Array();778 stateVal[144] = Array();779 stateName[144][-1] = "Select below";780 stateVal[144][-1] = "-1";781 stateName[144][-1] = "Select below";782 stateName[144][0] = "Others";783 stateVal[144][0] = "0";784 stateName[146] = Array();785 stateVal[146] = Array();786 stateName[146][-1] = "Select below";787 stateVal[146][-1] = "-1";788 stateName[146][-1] = "Select below";789 stateName[146][0] = "Others";790 stateVal[146][0] = "0";791 stateName[282] = Array();792 stateVal[282] = Array();793 stateName[282][-1] = "Select below";794 stateVal[282][-1] = "-1";795 stateName[282][-1] = "Select below";796 stateName[282][0] = "Others";797 stateVal[282][0] = "0";798 stateName[147] = Array();799 stateVal[147] = Array();800 stateName[147][-1] = "Select below";801 stateVal[147][-1] = "-1";802 stateName[147][-1] = "Select below";803 stateName[147][0] = "Others";804 stateVal[147][0] = "0";805 stateName[148] = Array();806 stateVal[148] = Array();807 stateName[148][-1] = "Select below";808 stateVal[148][-1] = "-1";809 stateName[148][-1] = "Select below";810 stateName[148][0] = "Others";811 stateVal[148][0] = "0";812 stateName[296] = Array();813 stateVal[296] = Array();814 stateName[296][-1] = "Select below";815 stateVal[296][-1] = "-1";816 stateName[296][-1] = "Select below";817 stateName[296][0] = "Others";818 stateVal[296][0] = "0";819 stateName[149] = Array();820 stateVal[149] = Array();821 stateName[149][-1] = "Select below";822 stateVal[149][-1] = "-1";823 stateName[149][-1] = "Select below";824 stateName[149][0] = "Others";825 stateVal[149][0] = "0";826 stateName[150] = Array();827 stateVal[150] = Array();828 stateName[150][-1] = "Select below";829 stateVal[150][-1] = "-1";830 stateName[150][-1] = "Select below";831 stateName[150][0] = "Others";832 stateVal[150][0] = "0";833 stateName[151] = Array();834 stateVal[151] = Array();835 stateName[151][-1] = "Select below";836 stateVal[151][-1] = "-1";837 stateName[151][-1] = "Select below";838 stateName[151][0] = "Others";839 stateVal[151][0] = "0";840 stateName[152] = Array();841 stateVal[152] = Array();842 stateName[152][-1] = "Select below";843 stateVal[152][-1] = "-1";844 stateName[152][-1] = "Select below";845 stateName[152][0] = "Others";846 stateVal[152][0] = "0";847 stateName[153] = Array();848 stateVal[153] = Array();849 stateName[153][-1] = "Select below";850 stateVal[153][-1] = "-1";851 stateName[153][-1] = "Select below";852 stateName[153][0] = "Others";853 stateVal[153][0] = "0";854 stateName[154] = Array();855 stateVal[154] = Array();856 stateName[154][-1] = "Select below";857 stateVal[154][-1] = "-1";858 stateName[154][-1] = "Select below";859 stateName[154][0] = "Others";860 stateVal[154][0] = "0";861 stateName[155] = Array();862 stateVal[155] = Array();863 stateName[155][-1] = "Select below";864 stateVal[155][-1] = "-1";865 stateName[155][-1] = "Select below";866 stateName[155][0] = "Others";867 stateVal[155][0] = "0";868 stateName[156] = Array();869 stateVal[156] = Array();870 stateName[156][-1] = "Select below";871 stateVal[156][-1] = "-1";872 stateName[156][-1] = "Select below";873 stateName[156][0] = "Others";874 stateVal[156][0] = "0";875 stateName[157] = Array();876 stateVal[157] = Array();877 stateName[157][-1] = "Select below";878 stateVal[157][-1] = "-1";879 stateName[157][-1] = "Select below";880 stateName[157][0] = "Others";881 stateVal[157][0] = "0";882 stateName[158] = Array();883 stateVal[158] = Array();884 stateName[158][-1] = "Select below";885 stateVal[158][-1] = "-1";886 stateName[158][-1] = "Select below";887 stateName[158][0] = "Others";888 stateVal[158][0] = "0";889 stateName[159] = Array();890 stateVal[159] = Array();891 stateName[159][-1] = "Select below";892 stateVal[159][-1] = "-1";893 stateName[159][-1] = "Select below";894 stateName[159][0] = "Others";895 stateVal[159][0] = "0";896 stateName[160] = Array();897 stateVal[160] = Array();898 stateName[160][-1] = "Select below";899 stateVal[160][-1] = "-1";900 stateName[160][-1] = "Select below";901 stateName[160][0] = "Others";902 stateVal[160][0] = "0";903 stateName[161] = Array();904 stateVal[161] = Array();905 stateName[161][-1] = "Select below";906 stateVal[161][-1] = "-1";907 stateName[161][-1] = "Select below";908 stateName[161][0] = "Others";909 stateVal[161][0] = "0";910 stateName[162] = Array();911 stateVal[162] = Array();912 stateName[162][-1] = "Select below";913 stateVal[162][-1] = "-1";914 stateName[162][-1] = "Select below";915 stateName[162][0] = "Others";916 stateVal[162][0] = "0";917 stateName[163] = Array();918 stateVal[163] = Array();919 stateName[163][-1] = "Select below";920 stateVal[163][-1] = "-1";921 stateName[163][-1] = "Select below";922 stateName[163][0] = "Others";923 stateVal[163][0] = "0";924 stateName[164] = Array();925 stateVal[164] = Array();926 stateName[164][-1] = "Select below";927 stateVal[164][-1] = "-1";928 stateName[164][-1] = "Select below";929 stateName[164][0] = "Others";930 stateVal[164][0] = "0";931 stateName[165] = Array();932 stateVal[165] = Array();933 stateName[165][-1] = "Select below";934 stateVal[165][-1] = "-1";935 stateName[165][-1] = "Select below";936 stateName[165][0] = "Others";937 stateVal[165][0] = "0";938 stateName[166] = Array();939 stateVal[166] = Array();940 stateName[166][-1] = "Select below";941 stateVal[166][-1] = "-1";942 stateName[166][-1] = "Select below";943 stateName[166][0] = "Others";944 stateVal[166][0] = "0";945 stateName[167] = Array();946 stateVal[167] = Array();947 stateName[167][-1] = "Select below";948 stateVal[167][-1] = "-1";949 stateName[167][-1] = "Select below";950 stateName[167][0] = "Others";951 stateVal[167][0] = "0";952 stateName[168] = Array();953 stateVal[168] = Array();954 stateName[168][-1] = "Select below";955 stateVal[168][-1] = "-1";956 stateName[168][-1] = "Select below";957 stateName[168][0] = "Others";958 stateVal[168][0] = "0";959 stateName[169] = Array();960 stateVal[169] = Array();961 stateName[169][-1] = "Select below";962 stateVal[169][-1] = "-1";963 stateName[169][-1] = "Select below";964 stateName[169][0] = "Others";965 stateVal[169][0] = "0";966 stateName[170] = Array();967 stateVal[170] = Array();968 stateName[170][-1] = "Select below";969 stateVal[170][-1] = "-1";970 stateName[170][-1] = "Select below";971 stateName[170][0] = "Others";972 stateVal[170][0] = "0";973 stateName[171] = Array();974 stateVal[171] = Array();975 stateName[171][-1] = "Select below";976 stateVal[171][-1] = "-1";977 stateName[171][-1] = "Select below";978 stateName[171][0] = "Others";979 stateVal[171][0] = "0";980 stateName[172] = Array();981 stateVal[172] = Array();982 stateName[172][-1] = "Select below";983 stateVal[172][-1] = "-1";984 stateName[172][-1] = "Select below";985 stateName[172][0] = "Others";986 stateVal[172][0] = "0";987 stateName[173] = Array();988 stateVal[173] = Array();989 stateName[173][-1] = "Select below";990 stateVal[173][-1] = "-1";991 stateName[173][-1] = "Select below";992 stateName[173][0] = "Others";993 stateVal[173][0] = "0";994 stateName[174] = Array();995 stateVal[174] = Array();996 stateName[174][-1] = "Select below";997 stateVal[174][-1] = "-1";998 stateName[174][-1] = "Select below";999 stateName[174][0] = "Others";1000 stateVal[174][0] = "0";1001 stateName[175] = Array();1002 stateVal[175] = Array();1003 stateName[175][-1] = "Select below";1004 stateVal[175][-1] = "-1";1005 stateName[175][-1] = "Select below";1006 stateName[175][0] = "Others";1007 stateVal[175][0] = "0";1008 stateName[176] = Array();1009 stateVal[176] = Array();1010 stateName[176][-1] = "Select below";1011 stateVal[176][-1] = "-1";1012 stateName[176][-1] = "Select below";1013 stateName[176][0] = "Others";1014 stateVal[176][0] = "0";1015 stateName[177] = Array();1016 stateVal[177] = Array();1017 stateName[177][-1] = "Select below";1018 stateVal[177][-1] = "-1";1019 stateName[177][-1] = "Select below";1020 stateName[177][0] = "Others";1021 stateVal[177][0] = "0";1022 stateName[178] = Array();1023 stateVal[178] = Array();1024 stateName[178][-1] = "Select below";1025 stateVal[178][-1] = "-1";1026 stateName[178][-1] = "Select below";1027 stateName[178][0] = "Others";1028 stateVal[178][0] = "0";1029 stateName[179] = Array();1030 stateVal[179] = Array();1031 stateName[179][-1] = "Select below";1032 stateVal[179][-1] = "-1";1033 stateName[179][-1] = "Select below";1034 stateName[179][0] = "Others";1035 stateVal[179][0] = "0";1036 stateName[180] = Array();1037 stateVal[180] = Array();1038 stateName[180][-1] = "Select below";1039 stateVal[180][-1] = "-1";1040 stateName[180][-1] = "Select below";1041 stateName[180][0] = "Others";1042 stateVal[180][0] = "0";1043 stateName[181] = Array();1044 stateVal[181] = Array();1045 stateName[181][-1] = "Select below";1046 stateVal[181][-1] = "-1";1047 stateName[181][-1] = "Select below";1048 stateName[181][0] = "Others";1049 stateVal[181][0] = "0";1050 stateName[182] = Array();1051 stateVal[182] = Array();1052 stateName[182][-1] = "Select below";1053 stateVal[182][-1] = "-1";1054 stateName[182][-1] = "Select below";1055 stateName[182][0] = "Others";1056 stateVal[182][0] = "0";1057 stateName[183] = Array();1058 stateVal[183] = Array();1059 stateName[183][-1] = "Select below";1060 stateVal[183][-1] = "-1";1061 stateName[183][-1] = "Select below";1062 stateName[183][0] = "Others";1063 stateVal[183][0] = "0";1064 stateName[184] = Array();1065 stateVal[184] = Array();1066 stateName[184][-1] = "Select below";1067 stateVal[184][-1] = "-1";1068 stateName[184][-1] = "Select below";1069 stateName[184][0] = "Others";1070 stateVal[184][0] = "0";1071 stateName[185] = Array();1072 stateVal[185] = Array();1073 stateName[185][-1] = "Select below";1074 stateVal[185][-1] = "-1";1075 stateName[185][-1] = "Select below";1076 stateName[185][0] = "Others";1077 stateVal[185][0] = "0";1078 stateName[186] = Array();1079 stateVal[186] = Array();1080 stateName[186][-1] = "Select below";1081 stateVal[186][-1] = "-1";1082 stateName[186][-1] = "Select below";1083 stateName[186][0] = "Others";1084 stateVal[186][0] = "0";1085 stateName[271] = Array();1086 stateVal[271] = Array();1087 stateName[271][-1] = "Select below";1088 stateVal[271][-1] = "-1";1089 stateName[271][-1] = "Select below";1090 stateName[271][0] = "Others";1091 stateVal[271][0] = "0";1092 stateName[188] = Array();1093 stateVal[188] = Array();1094 stateName[188][-1] = "Select below";1095 stateVal[188][-1] = "-1";1096 stateName[188][-1] = "Select below";1097 stateName[188][0] = "Others";1098 stateVal[188][0] = "0";1099 stateName[145] = Array();1100 stateVal[145] = Array();1101 stateName[145][-1] = "Select below";1102 stateVal[145][-1] = "-1";1103 stateName[145][-1] = "Select below";1104 stateName[145][0] = "Others";1105 stateVal[145][0] = "0";1106 stateName[191] = Array();1107 stateVal[191] = Array();1108 stateName[191][-1] = "Select below";1109 stateVal[191][-1] = "-1";1110 stateName[191][-1] = "Select below";1111 stateName[191][0] = "Others";1112 stateVal[191][0] = "0";1113 stateName[192] = Array();1114 stateVal[192] = Array();1115 stateName[192][-1] = "Select below";1116 stateVal[192][-1] = "-1";1117 stateName[192][-1] = "Select below";1118 stateName[192][0] = "Others";1119 stateVal[192][0] = "0";1120 stateName[193] = Array();1121 stateVal[193] = Array();1122 stateName[193][-1] = "Select below";1123 stateVal[193][-1] = "-1";1124 stateName[193][-1] = "Select below";1125 stateName[193][0] = "Others";1126 stateVal[193][0] = "0";1127 stateName[194] = Array();1128 stateVal[194] = Array();1129 stateName[194][-1] = "Select below";1130 stateVal[194][-1] = "-1";1131 stateName[194][-1] = "Select below";1132 stateName[194][0] = "Others";1133 stateVal[194][0] = "0";1134 stateName[272] = Array();1135 stateVal[272] = Array();1136 stateName[272][-1] = "Select below";1137 stateVal[272][-1] = "-1";1138 stateName[272][-1] = "Select below";1139 stateName[272][0] = "Others";1140 stateVal[272][0] = "0";1141 stateName[195] = Array();1142 stateVal[195] = Array();1143 stateName[195][-1] = "Select below";1144 stateVal[195][-1] = "-1";1145 stateName[195][-1] = "Select below";1146 stateName[195][0] = "Others";1147 stateVal[195][0] = "0";1148 stateName[196] = Array();1149 stateVal[196] = Array();1150 stateName[196][-1] = "Select below";1151 stateVal[196][-1] = "-1";1152 stateName[196][-1] = "Select below";1153 stateName[196][0] = "Others";1154 stateVal[196][0] = "0";1155 stateName[197] = Array();1156 stateVal[197] = Array();1157 stateName[197][-1] = "Select below";1158 stateVal[197][-1] = "-1";1159 stateName[197][-1] = "Select below";1160 stateName[197][0] = "Others";1161 stateVal[197][0] = "0";1162 stateName[198] = Array();1163 stateVal[198] = Array();1164 stateName[198][-1] = "Select below";1165 stateVal[198][-1] = "-1";1166 stateName[198][-1] = "Select below";1167 stateName[198][0] = "Others";1168 stateVal[198][0] = "0";1169 stateName[199] = Array();1170 stateVal[199] = Array();1171 stateName[199][-1] = "Select below";1172 stateVal[199][-1] = "-1";1173 stateName[199][-1] = "Select below";1174 stateName[199][0] = "Others";1175 stateVal[199][0] = "0";1176 stateName[273] = Array();1177 stateVal[273] = Array();1178 stateName[273][-1] = "Select below";1179 stateVal[273][-1] = "-1";1180 stateName[273][-1] = "Select below";1181 stateName[273][0] = "Others";1182 stateVal[273][0] = "0";1183 stateName[201] = Array();1184 stateVal[201] = Array();1185 stateName[201][-1] = "Select below";1186 stateVal[201][-1] = "-1";1187 stateName[201][-1] = "Select below";1188 stateName[201][0] = "Others";1189 stateVal[201][0] = "0";1190 stateName[202] = Array();1191 stateVal[202] = Array();1192 stateName[202][-1] = "Select below";1193 stateVal[202][-1] = "-1";1194 stateName[202][-1] = "Select below";1195 stateName[202][0] = "Others";1196 stateVal[202][0] = "0";1197 stateName[274] = Array();1198 stateVal[274] = Array();1199 stateName[274][-1] = "Select below";1200 stateVal[274][-1] = "-1";1201 stateName[274][-1] = "Select below";1202 stateName[274][0] = "Others";1203 stateVal[274][0] = "0";1204 stateName[204] = Array();1205 stateVal[204] = Array();1206 stateName[204][-1] = "Select below";1207 stateVal[204][-1] = "-1";1208 stateName[204][-1] = "Select below";1209 stateName[204][0] = "Others";1210 stateVal[204][0] = "0";1211 stateName[206] = Array();1212 stateVal[206] = Array();1213 stateName[206][-1] = "Select below";1214 stateVal[206][-1] = "-1";1215 stateName[206][-1] = "Select below";1216 stateName[206][0] = "Others";1217 stateVal[206][0] = "0";1218 stateName[207] = Array();1219 stateVal[207] = Array();1220 stateName[207][-1] = "Select below";1221 stateVal[207][-1] = "-1";1222 stateName[207][-1] = "Select below";1223 stateName[207][0] = "Others";1224 stateVal[207][0] = "0";1225 stateName[208] = Array();1226 stateVal[208] = Array();1227 stateName[208][-1] = "Select below";1228 stateVal[208][-1] = "-1";1229 stateName[208][-1] = "Select below";1230 stateName[208][0] = "Others";1231 stateVal[208][0] = "0";1232 stateName[275] = Array();1233 stateVal[275] = Array();1234 stateName[275][-1] = "Select below";1235 stateVal[275][-1] = "-1";1236 stateName[275][-1] = "Select below";1237 stateName[275][0] = "Others";1238 stateVal[275][0] = "0";1239 stateName[276] = Array();1240 stateVal[276] = Array();1241 stateName[276][-1] = "Select below";1242 stateVal[276][-1] = "-1";1243 stateName[276][-1] = "Select below";1244 stateName[276][0] = "Others";1245 stateVal[276][0] = "0";1246 stateName[209] = Array();1247 stateVal[209] = Array();1248 stateName[209][-1] = "Select below";1249 stateVal[209][-1] = "-1";1250 stateName[209][-1] = "Select below";1251 stateName[209][0] = "Others";1252 stateVal[209][0] = "0";1253 stateName[277] = Array();1254 stateVal[277] = Array();1255 stateName[277][-1] = "Select below";1256 stateVal[277][-1] = "-1";1257 stateName[277][-1] = "Select below";1258 stateName[277][0] = "Others";1259 stateVal[277][0] = "0";1260 stateName[278] = Array();1261 stateVal[278] = Array();1262 stateName[278][-1] = "Select below";1263 stateVal[278][-1] = "-1";1264 stateName[278][-1] = "Select below";1265 stateName[278][0] = "Others";1266 stateVal[278][0] = "0";1267 stateName[210] = Array();1268 stateVal[210] = Array();1269 stateName[210][-1] = "Select below";1270 stateVal[210][-1] = "-1";1271 stateName[210][-1] = "Select below";1272 stateName[210][0] = "Others";1273 stateVal[210][0] = "0";1274 stateName[211] = Array();1275 stateVal[211] = Array();1276 stateName[211][-1] = "Select below";1277 stateVal[211][-1] = "-1";1278 stateName[211][-1] = "Select below";1279 stateName[211][0] = "Others";1280 stateVal[211][0] = "0";1281 stateName[279] = Array();1282 stateVal[279] = Array();1283 stateName[279][-1] = "Select below";1284 stateVal[279][-1] = "-1";1285 stateName[279][-1] = "Select below";1286 stateName[279][0] = "Others";1287 stateVal[279][0] = "0";1288 stateName[212] = Array();1289 stateVal[212] = Array();1290 stateName[212][-1] = "Select below";1291 stateVal[212][-1] = "-1";1292 stateName[212][-1] = "Select below";1293 stateName[212][0] = "Others";1294 stateVal[212][0] = "0";1295 stateName[214] = Array();1296 stateVal[214] = Array();1297 stateName[214][-1] = "Select below";1298 stateVal[214][-1] = "-1";1299 stateName[214][-1] = "Select below";1300 stateName[214][0] = "Others";1301 stateVal[214][0] = "0";1302 stateName[292] = Array();1303 stateVal[292] = Array();1304 stateName[292][-1] = "Select below";1305 stateVal[292][-1] = "-1";1306 stateName[292][-1] = "Select below";1307 stateName[292][0] = "Others";1308 stateVal[292][0] = "0";1309 stateName[215] = Array();1310 stateVal[215] = Array();1311 stateName[215][-1] = "Select below";1312 stateVal[215][-1] = "-1";1313 stateName[215][-1] = "Select below";1314 stateName[215][0] = "Others";1315 stateVal[215][0] = "0";1316 stateName[216] = Array();1317 stateVal[216] = Array();1318 stateName[216][-1] = "Select below";1319 stateVal[216][-1] = "-1";1320 stateName[216][-1] = "Select below";1321 stateName[216][0] = "Others";1322 stateVal[216][0] = "0";1323 stateName[217] = Array();1324 stateVal[217] = Array();1325 stateName[217][-1] = "Select below";1326 stateVal[217][-1] = "-1";1327 stateName[217][-1] = "Select below";1328 stateName[217][0] = "Others";1329 stateVal[217][0] = "0";1330 stateName[218] = Array();1331 stateVal[218] = Array();1332 stateName[218][-1] = "Select below";1333 stateVal[218][-1] = "-1";1334 stateName[218][-1] = "Select below";1335 stateName[218][0] = "Others";1336 stateVal[218][0] = "0";1337 stateName[219] = Array();1338 stateVal[219] = Array();1339 stateName[219][-1] = "Select below";1340 stateVal[219][-1] = "-1";1341 stateName[219][-1] = "Select below";1342 stateName[219][0] = "Others";1343 stateVal[219][0] = "0";1344 stateName[220] = Array();1345 stateVal[220] = Array();1346 stateName[220][-1] = "Select below";1347 stateVal[220][-1] = "-1";1348 stateName[220][-1] = "Select below";1349 stateName[220][0] = "Others";1350 stateVal[220][0] = "0";1351 stateName[221] = Array();1352 stateVal[221] = Array();1353 stateName[221][-1] = "Select below";1354 stateVal[221][-1] = "-1";1355 stateName[221][-1] = "Select below";1356 stateName[221][0] = "Others";1357 stateVal[221][0] = "0";1358 stateName[222] = Array();1359 stateVal[222] = Array();1360 stateName[222][-1] = "Select below";1361 stateVal[222][-1] = "-1";1362 stateName[222][-1] = "Select below";1363 stateName[222][0] = "Others";1364 stateVal[222][0] = "0";1365 stateName[281] = Array();1366 stateVal[281] = Array();1367 stateName[281][-1] = "Select below";1368 stateVal[281][-1] = "-1";1369 stateName[281][-1] = "Select below";1370 stateName[281][0] = "Others";1371 stateVal[281][0] = "0";1372 stateName[225] = Array();1373 stateVal[225] = Array();1374 stateName[225][-1] = "Select below";1375 stateVal[225][-1] = "-1";1376 stateName[225][-1] = "Select below";1377 stateName[225][0] = "Others";1378 stateVal[225][0] = "0";1379 stateName[226] = Array();1380 stateVal[226] = Array();1381 stateName[226][-1] = "Select below";1382 stateVal[226][-1] = "-1";1383 stateName[226][-1] = "Select below";1384 stateName[226][0] = "Others";1385 stateVal[226][0] = "0";1386 stateName[228] = Array();1387 stateVal[228] = Array();1388 stateName[228][-1] = "Select below";1389 stateVal[228][-1] = "-1";1390 stateName[228][-1] = "Select below";1391 stateName[228][0] = "Others";1392 stateVal[228][0] = "0";1393 stateName[229] = Array();1394 stateVal[229] = Array();1395 stateName[229][-1] = "Select below";1396 stateVal[229][-1] = "-1";1397 stateName[229][-1] = "Select below";1398 stateName[229][0] = "Others";1399 stateVal[229][0] = "0";1400 stateName[283] = Array();1401 stateVal[283] = Array();1402 stateName[283][-1] = "Select below";1403 stateVal[283][-1] = "-1";1404 stateName[283][-1] = "Select below";1405 stateName[283][0] = "Others";1406 stateVal[283][0] = "0";1407 stateName[230] = Array();1408 stateVal[230] = Array();1409 stateName[230][-1] = "Select below";1410 stateVal[230][-1] = "-1";1411 stateName[230][-1] = "Select below";1412 stateName[230][0] = "Others";1413 stateVal[230][0] = "0";1414 stateName[231] = Array();1415 stateVal[231] = Array();1416 stateName[231][-1] = "Select below";1417 stateVal[231][-1] = "-1";1418 stateName[231][-1] = "Select below";1419 stateName[231][0] = "Others";1420 stateVal[231][0] = "0";1421 stateName[232] = Array();1422 stateVal[232] = Array();1423 stateName[232][-1] = "Select below";1424 stateVal[232][-1] = "-1";1425 stateName[232][-1] = "Select below";1426 stateName[232][0] = "Others";1427 stateVal[232][0] = "0";1428 stateName[233] = Array();1429 stateVal[233] = Array();1430 stateName[233][-1] = "Select below";1431 stateVal[233][-1] = "-1";1432 stateName[233][-1] = "Select below";1433 stateName[233][0] = "Others";1434 stateVal[233][0] = "0";1435 stateName[234] = Array();1436 stateVal[234] = Array();1437 stateName[234][-1] = "Select below";1438 stateVal[234][-1] = "-1";1439 stateName[234][-1] = "Select below";1440 stateName[234][0] = "Others";1441 stateVal[234][0] = "0";1442 stateName[235] = Array();1443 stateVal[235] = Array();1444 stateName[235][-1] = "Select below";1445 stateVal[235][-1] = "-1";1446 stateName[235][-1] = "Select below";1447 stateName[235][0] = "Others";1448 stateVal[235][0] = "0";1449 stateName[236] = Array();1450 stateVal[236] = Array();1451 stateName[236][-1] = "Select below";1452 stateVal[236][-1] = "-1";1453 stateName[236][-1] = "Select below";1454 stateName[236][0] = "Others";1455 stateVal[236][0] = "0";1456 stateName[237] = Array();1457 stateVal[237] = Array();1458 stateName[237][-1] = "Select below";1459 stateVal[237][-1] = "-1";1460 stateName[237][-1] = "Select below";1461 stateName[237][0] = "Others";1462 stateVal[237][0] = "0";1463 stateName[284] = Array();1464 stateVal[284] = Array();1465 stateName[284][-1] = "Select below";1466 stateVal[284][-1] = "-1";1467 stateName[284][-1] = "Select below";1468 stateName[284][0] = "Others";1469 stateVal[284][0] = "0";1470 stateName[285] = Array();1471 stateVal[285] = Array();1472 stateName[285][-1] = "Select below";1473 stateVal[285][-1] = "-1";1474 stateName[285][-1] = "Select below";1475 stateName[285][0] = "Others";1476 stateVal[285][0] = "0";1477 stateName[286] = Array();1478 stateVal[286] = Array();1479 stateName[286][-1] = "Select below";1480 stateVal[286][-1] = "-1";1481 stateName[286][-1] = "Select below";1482 stateName[286][0] = "Others";1483 stateVal[286][0] = "0";1484 stateName[241] = Array();1485 stateVal[241] = Array();1486 stateName[241][-1] = "Select below";1487 stateVal[241][-1] = "-1";1488 stateName[241][-1] = "Select below";1489 stateName[241][0] = "Others";1490 stateVal[241][0] = "0";1491 stateName[287] = Array();1492 stateVal[287] = Array();1493 stateName[287][-1] = "Select below";1494 stateVal[287][-1] = "-1";1495 stateName[287][-1] = "Select below";1496 stateName[287][0] = "Others";1497 stateVal[287][0] = "0";1498 stateName[243] = Array();1499 stateVal[243] = Array();1500 stateName[243][-1] = "Select below";1501 stateVal[243][-1] = "-1";1502 stateName[243][-1] = "Select below";1503 stateName[243][0] = "Others";1504 stateVal[243][0] = "0";1505 stateName[244] = Array();1506 stateVal[244] = Array();1507 stateName[244][-1] = "Select below";1508 stateVal[244][-1] = "-1";1509 stateName[244][-1] = "Select below";1510 stateName[244][0] = "Others";1511 stateVal[244][0] = "0";1512 stateName[245] = Array();1513 stateVal[245] = Array();1514 stateName[245][-1] = "Select below";1515 stateVal[245][-1] = "-1";1516 stateName[245][-1] = "Select below";1517 stateName[245][0] = "Others";1518 stateVal[245][0] = "0";1519 stateName[247] = Array();1520 stateVal[247] = Array();1521 stateName[247][-1] = "Select below";1522 stateVal[247][-1] = "-1";1523 stateName[247][-1] = "Select below";1524 stateName[247][0] = "Others";1525 stateVal[247][0] = "0";1526 stateName[248] = Array();1527 stateVal[248] = Array();1528 stateName[248][-1] = "Select below";1529 stateVal[248][-1] = "-1";1530 stateName[248][-1] = "Select below";1531 stateName[248][0] = "Others";1532 stateVal[248][0] = "0";1533 stateName[249] = Array();1534 stateVal[249] = Array();1535 stateName[249][-1] = "Select below";1536 stateVal[249][-1] = "-1";1537 stateName[249][-1] = "Select below";1538 stateName[249][0] = "Others";1539 stateVal[249][0] = "0";1540 stateName[250] = Array();1541 stateVal[250] = Array();1542 stateName[250][-1] = "Select below";1543 stateVal[250][-1] = "-1";1544 stateName[250][-1] = "Select below";1545 stateName[250][0] = "Others";1546 stateVal[250][0] = "0";1547 stateName[288] = Array();1548 stateVal[288] = Array();1549 stateName[288][-1] = "Select below";1550 stateVal[288][-1] = "-1";1551 stateName[288][-1] = "Select below";1552 stateName[288][0] = "Others";1553 stateVal[288][0] = "0";1554 stateName[252] = Array();1555 stateVal[252] = Array();1556 stateName[252][-1] = "Select below";1557 stateVal[252][-1] = "-1";1558 stateName[252][-1] = "Select below";1559 stateName[252][0] = "Others";1560 stateVal[252][0] = "0";1561 stateName[253] = Array();1562 stateVal[253] = Array();1563 stateName[253][-1] = "Select below";1564 stateVal[253][-1] = "-1";1565 stateName[253][-1] = "Select below";1566 stateName[253][0] = "Others";1567 stateVal[253][0] = "0";1568 stateName[254] = Array();1569 stateVal[254] = Array();1570 stateName[254][-1] = "Select below";1571 stateVal[254][-1] = "-1";1572 stateName[254][-1] = "Select below";1573 stateName[254][0] = "Others";1574 stateVal[254][0] = "0";1575 stateName[255] = Array();1576 stateVal[255] = Array();1577 stateName[255][-1] = "Select below";1578 stateVal[255][-1] = "-1";1579 stateName[255][-1] = "Select below";1580 stateName[255][0] = "Others";1581 stateVal[255][0] = "0";1582 stateName[256] = Array();1583 stateVal[256] = Array();1584 stateName[256][-1] = "Select below";1585 stateVal[256][-1] = "-1";1586 stateName[256][-1] = "Select below";1587 stateName[256][0] = "Others";1588 stateVal[256][0] = "0";1589 stateName[257] = Array();1590 stateVal[257] = Array();1591 stateName[257][-1] = "Select below";1592 stateVal[257][-1] = "-1";1593 stateName[257][-1] = "Select below";1594 stateName[257][0] = "Others";1595 stateVal[257][0] = "0";1596 stateName[258] = Array();1597 stateVal[258] = Array();1598 stateName[258][-1] = "Select below";1599 stateVal[258][-1] = "-1";1600 stateName[258][-1] = "Select below";1601 stateName[258][0] = "Others";1602 stateVal[258][0] = "0";1603 stateName[289] = Array();1604 stateVal[289] = Array();1605 stateName[289][-1] = "Select below";1606 stateVal[289][-1] = "-1";1607 stateName[289][-1] = "Select below";1608 stateName[289][0] = "Others";1609 stateVal[289][0] = "0";1610 stateName[290] = Array();1611 stateVal[290] = Array();1612 stateName[290][-1] = "Select below";1613 stateVal[290][-1] = "-1";1614 stateName[290][-1] = "Select below";1615 stateName[290][0] = "Others";1616 stateVal[290][0] = "0";1617 stateName[291] = Array();1618 stateVal[291] = Array();1619 stateName[291][-1] = "Select below";1620 stateVal[291][-1] = "-1";1621 stateName[291][-1] = "Select below";1622 stateName[291][0] = "Others";1623 stateVal[291][0] = "0";1624 stateName[260] = Array();1625 stateVal[260] = Array();1626 stateName[260][-1] = "Select below";1627 stateVal[260][-1] = "-1";1628 stateName[260][-1] = "Select below";1629 stateName[260][0] = "Others";1630 stateVal[260][0] = "0";1631 stateName[263] = Array();1632 stateVal[263] = Array();1633 stateName[263][-1] = "Select below";1634 stateVal[263][-1] = "-1";1635 stateName[263][-1] = "Select below";1636 stateName[263][0] = "Others";1637 stateVal[263][0] = "0";1638 stateName[264] = Array();1639 stateVal[264] = Array();1640 stateName[264][-1] = "Select below";1641 stateVal[264][-1] = "-1";1642 stateName[264][-1] = "Select below";1643 stateName[264][0] = "Others";1644 stateVal[264][0] = "0";1645 stateName[0][0] = "Others";1646 stateVal[0][0] = "0";1647 stateName[100][0] = "Aberdeenshire"1648 stateVal[100][0] = "138"1649 stateName[100][1] = "Anglesey"1650 stateVal[100][1] = "139"1651 stateName[100][2] = "Angus"1652 stateVal[100][2] = "140"1653 stateName[100][3] = "Antrim"1654 stateVal[100][3] = "141"1655 stateName[100][4] = "Any"1656 stateVal[100][4] = "254"1657 stateName[100][5] = "Argyll"1658 stateVal[100][5] = "197"1659 stateName[100][6] = "Argyllshire"1660 stateVal[100][6] = "142"1661 stateName[100][7] = "Armagh"1662 stateVal[100][7] = "143"1663 stateName[100][8] = "Avon"1664 stateVal[100][8] = "198"1665 stateName[100][9] = "Ayrshire"1666 stateVal[100][9] = "144"1667 stateName[100][10] = "Banffshire"1668 stateVal[100][10] = "145"1669 stateName[100][11] = "Bedfordshire"1670 stateVal[100][11] = "65"1671 stateName[100][12] = "Berkshire"1672 stateVal[100][12] = "66"1673 stateName[100][13] = "Berwickshire"1674 stateVal[100][13] = "146"1675 stateName[100][14] = "Brecknockshire"1676 stateVal[100][14] = "147"1677 stateName[100][15] = "Buckinghamshire"1678 stateVal[100][15] = "67"1679 stateName[100][16] = "Buteshire"1680 stateVal[100][16] = "148"1681 stateName[100][17] = "Caernarfonshire"1682 stateVal[100][17] = "149"1683 stateName[100][18] = "Caithness"1684 stateVal[100][18] = "150"1685 stateName[100][19] = "Cambridgeshire"1686 stateVal[100][19] = "68"1687 stateName[100][20] = "Cardiganshire"1688 stateVal[100][20] = "151"1689 stateName[100][21] = "Carmarthenshire"1690 stateVal[100][21] = "152"1691 stateName[100][22] = "Cheshire"1692 stateVal[100][22] = "69"1693 stateName[100][23] = "Clackmannanshire"1694 stateVal[100][23] = "153"1695 stateName[100][24] = "Cleveland"1696 stateVal[100][24] = "199"1697 stateName[100][25] = "Clwyd"1698 stateVal[100][25] = "200"1699 stateName[100][26] = "Cornwall"1700 stateVal[100][26] = "70"1701 stateName[100][27] = "County Antrim"1702 stateVal[100][27] = "201"1703 stateName[100][28] = "County Down"1704 stateVal[100][28] = "203"1705 stateName[100][29] = "County Durham"1706 stateVal[100][29] = "204"1707 stateName[100][30] = "County Fermanagh"1708 stateVal[100][30] = "205"1709 stateName[100][31] = "County Londonderry"1710 stateVal[100][31] = "206"1711 stateName[100][32] = "County rmagh"1712 stateVal[100][32] = "202"1713 stateName[100][33] = "County Tyrone"1714 stateVal[100][33] = "207"1715 stateName[100][34] = "Cromartyshire"1716 stateVal[100][34] = "154"1717 stateName[100][35] = "Cumberland"1718 stateVal[100][35] = "71"1719 stateName[100][36] = "Cumbria"1720 stateVal[100][36] = "208"1721 stateName[100][37] = "Denbighshire"1722 stateVal[100][37] = "155"1723 stateName[100][38] = "Derbyshire"1724 stateVal[100][38] = "72"1725 stateName[100][39] = "Devon"1726 stateVal[100][39] = "156"1727 stateName[100][40] = "Dorset"1728 stateVal[100][40] = "74"1729 stateName[100][41] = "Down"1730 stateVal[100][41] = "157"1731 stateName[100][42] = "Dumfriesshire"1732 stateVal[100][42] = "158"1733 stateName[100][43] = "Dunbartonshire"1734 stateVal[100][43] = "159"1735 stateName[100][44] = "Durham"1736 stateVal[100][44] = "75"1737 stateName[100][45] = "Dyfed"1738 stateVal[100][45] = "209"1739 stateName[100][46] = "East Lothian"1740 stateVal[100][46] = "160"1741 stateName[100][47] = "East Sussex"1742 stateVal[100][47] = "210"1743 stateName[100][48] = "Essex"1744 stateVal[100][48] = "76"1745 stateName[100][49] = "Fermanagh"1746 stateVal[100][49] = "161"1747 stateName[100][50] = "Fife"1748 stateVal[100][50] = "162"1749 stateName[100][51] = "Flintshire"1750 stateVal[100][51] = "163"1751 stateName[100][52] = "Glamorgan"1752 stateVal[100][52] = "164"1753 stateName[100][53] = "Gloucestershire"1754 stateVal[100][53] = "77"1755 stateName[100][54] = "Guernsey"1756 stateVal[100][54] = "211"1757 stateName[100][55] = "Gwent"1758 stateVal[100][55] = "212"1759 stateName[100][56] = "Gwynedd"1760 stateVal[100][56] = "213"1761 stateName[100][57] = "Hampshire"1762 stateVal[100][57] = "78"1763 stateName[100][58] = "Herefordshire"1764 stateVal[100][58] = "79"1765 stateName[100][59] = "Hertfordshire"1766 stateVal[100][59] = "80"1767 stateName[100][60] = "Huntingdonshire"1768 stateVal[100][60] = "81"1769 stateName[100][61] = "Inverness-shire"1770 stateVal[100][61] = "165"1771 stateName[100][62] = "Isle Of Arran"1772 stateVal[100][62] = "214"1773 stateName[100][63] = "Isle Of Barra"1774 stateVal[100][63] = "215"1775 stateName[100][64] = "Isle Of Benbecula"1776 stateVal[100][64] = "216"1777 stateName[100][65] = "Isle Of Bute"1778 stateVal[100][65] = "217"1779 stateName[100][66] = "Isle Of Canna"1780 stateVal[100][66] = "218"1781 stateName[100][67] = "Isle Of Coll"1782 stateVal[100][67] = "219"1783 stateName[100][68] = "Isle Of Cumbrae"1784 stateVal[100][68] = "221"1785 stateName[100][69] = "Isle Of Eigg"1786 stateVal[100][69] = "222"1787 stateName[100][70] = "Isle Of Gigha"1788 stateVal[100][70] = "223"1789 stateName[100][71] = "Isle Of Harris"1790 stateVal[100][71] = "224"1791 stateName[100][72] = "Isle Of Iona"1792 stateVal[100][72] = "225"1793 stateName[100][73] = "Isle Of Islay"1794 stateVal[100][73] = "226"1795 stateName[100][74] = "Isle Of Jura"1796 stateVal[100][74] = "227"1797 stateName[100][75] = "Isle Of Lewis"1798 stateVal[100][75] = "228"1799 stateName[100][76] = "Isle Of Man"1800 stateVal[100][76] = "229"1801 stateName[100][77] = "Isle Of Mull"1802 stateVal[100][77] = "230"1803 stateName[100][78] = "Isle Of North Uist"1804 stateVal[100][78] = "231"1805 stateName[100][79] = "Isle Of olonsay"1806 stateVal[100][79] = "220"1807 stateName[100][80] = "Isle Of Rum"1808 stateVal[100][80] = "232"1809 stateName[100][81] = "Isle Of Scalpay"1810 stateVal[100][81] = "233"1811 stateName[100][82] = "Isle Of Skye"1812 stateVal[100][82] = "234"1813 stateName[100][83] = "Isle Of South ist"1814 stateVal[100][83] = "235"1815 stateName[100][84] = "Isle Of Tiree"1816 stateVal[100][84] = "236"1817 stateName[100][85] = "Isle Of Wight"1818 stateVal[100][85] = "237"1819 stateName[100][86] = "Isles Of Scilly"1820 stateVal[100][86] = "238"1821 stateName[100][87] = "Jersey"1822 stateVal[100][87] = "239"1823 stateName[100][88] = "Kent"1824 stateVal[100][88] = "82"1825 stateName[100][89] = "Kincardineshire"1826 stateVal[100][89] = "166"1827 stateName[100][90] = "Kinross"1828 stateVal[100][90] = "167"1829 stateName[100][91] = "Kinross-Shire"1830 stateVal[100][91] = "240"1831 stateName[100][92] = "Kirkcudbrightshire"1832 stateVal[100][92] = "168"1833 stateName[100][93] = "Lanarkshire"1834 stateVal[100][93] = "169"1835 stateName[100][94] = "Lancashire"1836 stateVal[100][94] = "83"1837 stateName[100][95] = "Leicestershire"1838 stateVal[100][95] = "84"1839 stateName[100][96] = "Lincolnshire"1840 stateVal[100][96] = "85"1841 stateName[100][97] = "London"1842 stateVal[100][97] = "241"1843 stateName[100][98] = "Londonderry"1844 stateVal[100][98] = "170"1845 stateName[100][99] = "Merioneth"1846 stateVal[100][99] = "171"1847 stateName[100][100] = "Merseyside"1848 stateVal[100][100] = "195"1849 stateName[100][101] = "Mid Glamorgan"1850 stateVal[100][101] = "242"1851 stateName[100][102] = "Middlesex"1852 stateVal[100][102] = "86"1853 stateName[100][103] = "Midlothian"1854 stateVal[100][103] = "172"1855 stateName[100][104] = "Monmouthshire"1856 stateVal[100][104] = "173"1857 stateName[100][105] = "Montgomeryshire"1858 stateVal[100][105] = "174"1859 stateName[100][106] = "Morayshire"1860 stateVal[100][106] = "175"1861 stateName[100][107] = "Nairnshire"1862 stateVal[100][107] = "176"1863 stateName[100][108] = "Norfolk"1864 stateVal[100][108] = "87"1865 stateName[100][109] = "North Humberside"1866 stateVal[100][109] = "243"1867 stateName[100][110] = "North Yorkshire"1868 stateVal[100][110] = "244"1869 stateName[100][111] = "Northamptonshire"1870 stateVal[100][111] = "88"1871 stateName[100][112] = "Northumberland"1872 stateVal[100][112] = "89"1873 stateName[100][113] = "Nottinghamshire"1874 stateVal[100][113] = "90"1875 stateName[100][114] = "Orkney"1876 stateVal[100][114] = "177"1877 stateName[100][115] = "Other"1878 stateVal[100][115] = "196"1879 stateName[100][116] = "Oxfordshire"1880 stateVal[100][116] = "91"1881 stateName[100][117] = "Peeblesshire"1882 stateVal[100][117] = "178"1883 stateName[100][118] = "Pembrokeshire"1884 stateVal[100][118] = "179"1885 stateName[100][119] = "Perthshire"1886 stateVal[100][119] = "180"1887 stateName[100][120] = "Powys"1888 stateVal[100][120] = "245"1889 stateName[100][121] = "Radnorshire"1890 stateVal[100][121] = "181"1891 stateName[100][122] = "Renfrewshire"1892 stateVal[100][122] = "182"1893 stateName[100][123] = "Ross-shire"1894 stateVal[100][123] = "183"1895 stateName[100][124] = "Roxburghshire"1896 stateVal[100][124] = "184"1897 stateName[100][125] = "Rutland"1898 stateVal[100][125] = "92"1899 stateName[100][126] = "Selkirkshire"1900 stateVal[100][126] = "185"1901 stateName[100][127] = "Shetland"1902 stateVal[100][127] = "186"1903 stateName[100][128] = "Shetland Islands"1904 stateVal[100][128] = "246"1905 stateName[100][129] = "Shropshire"1906 stateVal[100][129] = "93"1907 stateName[100][130] = "Somerset"1908 stateVal[100][130] = "94"1909 stateName[100][131] = "South Humberside"1910 stateVal[100][131] = "248"1911 stateName[100][132] = "South lamorgan"1912 stateVal[100][132] = "247"1913 stateName[100][133] = "South Yorkshire"1914 stateVal[100][133] = "249"1915 stateName[100][134] = "Staffordshire"1916 stateVal[100][134] = "95"1917 stateName[100][135] = "Stirlingshire"1918 stateVal[100][135] = "187"1919 stateName[100][136] = "Suffolk"1920 stateVal[100][136] = "96"1921 stateName[100][137] = "Surrey"1922 stateVal[100][137] = "97"1923 stateName[100][138] = "Sussex"1924 stateVal[100][138] = "98"1925 stateName[100][139] = "Sutherland"1926 stateVal[100][139] = "188"1927 stateName[100][140] = "Tyne and Wear"1928 stateVal[100][140] = "192"1929 stateName[100][141] = "Tyrone"1930 stateVal[100][141] = "189"1931 stateName[100][142] = "Value Added Tax"1932 stateVal[100][142] = "194"1933 stateName[100][143] = "Warwickshire"1934 stateVal[100][143] = "99"1935 stateName[100][144] = "West Glamorgan"1936 stateVal[100][144] = "250"1937 stateName[100][145] = "West Lothian"1938 stateVal[100][145] = "190"1939 stateName[100][146] = "West Midlands"1940 stateVal[100][146] = "251"1941 stateName[100][147] = "West Sussex"1942 stateVal[100][147] = "252"1943 stateName[100][148] = "West Yorkshire"1944 stateVal[100][148] = "253"1945 stateName[100][149] = "Wigtownshire"1946 stateVal[100][149] = "191"1947 stateName[100][150] = "Wiltshire"1948 stateVal[100][150] = "101"1949 stateName[100][151] = "Worcestershire"1950 stateVal[100][151] = "102"1951 stateName[100][152] = "Yorkshire"1952 stateVal[100][152] = "103"1953 stateName[251][0] = "Alabama"1954 stateVal[251][0] = "3"1955 stateName[251][1] = "Alaska"1956 stateVal[251][1] = "1"1957 stateName[251][2] = "Arizona"1958 stateVal[251][2] = "4"1959 stateName[251][3] = "Arkansas"1960 stateVal[251][3] = "2"1961 stateName[251][4] = "California"1962 stateVal[251][4] = "5"1963 stateName[251][5] = "Colorado"1964 stateVal[251][5] = "6"1965 stateName[251][6] = "Connecticut"1966 stateVal[251][6] = "7"1967 stateName[251][7] = "Delaware"1968 stateVal[251][7] = "9"1969 stateName[251][8] = "Florida"1970 stateVal[251][8] = "10"1971 stateName[251][9] = "Georgia"1972 stateVal[251][9] = "12"1973 stateName[251][10] = "Hawaii"1974 stateVal[251][10] = "14"1975 stateName[251][11] = "Idaho"1976 stateVal[251][11] = "16"1977 stateName[251][12] = "Illinois"1978 stateVal[251][12] = "17"1979 stateName[251][13] = "Indiana"1980 stateVal[251][13] = "18"1981 stateName[251][14] = "Iowa"1982 stateVal[251][14] = "15"1983 stateName[251][15] = "Kansas"1984 stateVal[251][15] = "19"1985 stateName[251][16] = "Kentucky"1986 stateVal[251][16] = "20"1987 stateName[251][17] = "Louisiana"1988 stateVal[251][17] = "21"1989 stateName[251][18] = "Maine"1990 stateVal[251][18] = "24"1991 stateName[251][19] = "Maryland"1992 stateVal[251][19] = "23"1993 stateName[251][20] = "Massachusetts"1994 stateVal[251][20] = "22"1995 stateName[251][21] = "Michigan"1996 stateVal[251][21] = "26"1997 stateName[251][22] = "Minnesota"1998 stateVal[251][22] = "27"1999 stateName[251][23] = "Mississippi"2000 stateVal[251][23] = "30"2001 stateName[251][24] = "Missouri"2002 stateVal[251][24] = "28"2003 stateName[251][25] = "Montana"2004 stateVal[251][25] = "31"2005 stateName[251][26] = "Nebraska"2006 stateVal[251][26] = "34"2007 stateName[251][27] = "Nevada"2008 stateVal[251][27] = "38"2009 stateName[251][28] = "New Hampshire"2010 stateVal[251][28] = "35"2011 stateName[251][29] = "New Jersey"2012 stateVal[251][29] = "36"2013 stateName[251][30] = "New Mexico"2014 stateVal[251][30] = "37"2015 stateName[251][31] = "New York"2016 stateVal[251][31] = "39"2017 stateName[251][32] = "North Carolina"2018 stateVal[251][32] = "32"2019 stateName[251][33] = "North Dakota"2020 stateVal[251][33] = "33"2021 stateName[251][34] = "Ohio"2022 stateVal[251][34] = "40"2023 stateName[251][35] = "Oklahoma"2024 stateVal[251][35] = "41"2025 stateName[251][36] = "Oregon"2026 stateVal[251][36] = "42"2027 stateName[251][37] = "Pennsylvania"2028 stateVal[251][37] = "43"2029 stateName[251][38] = "Rhode Island"2030 stateVal[251][38] = "46"2031 stateName[251][39] = "South Carolina"2032 stateVal[251][39] = "47"2033 stateName[251][40] = "South Dakota"2034 stateVal[251][40] = "48"2035 stateName[251][41] = "Tennessee"2036 stateVal[251][41] = "49"2037 stateName[251][43] = "Texas"2038 stateVal[251][43] = "50"2039 stateName[251][44] = "Utah"2040 stateVal[251][44] = "52"2041 stateName[251][45] = "Vermont"2042 stateVal[251][45] = "55"2043 stateName[251][46] = "Virginia"2044 stateVal[251][46] = "53"2045 stateName[251][47] = "Washington"2046 stateVal[251][47] = "56"2047 stateName[251][48] = "West Virginia"2048 stateVal[251][48] = "58"2049 stateName[251][49] = "Wisconsin"2050 stateVal[251][49] = "57"2051 stateName[251][50] = "Wyoming"2052 stateVal[251][50] = "59"2053 }2054 function validateForm1()20552056 {20572058 if(isNull(document.form1.first_name.value) || document.form1.first_name.value=='first name'){20592060 alert("Please enter your First Name...");20612062 acc1.openPanel(0);20632064 document.form1.first_name.focus();20652066 return false;20672068 }20692070 if(isNull(document.form1.last_name.value) || document.form1.last_name.value=='last name'){20712072 alert("Please enter your Last Name...");20732074 acc1.openPanel(0);20752076 document.form1.last_name.focus();20772078 return false;20792080 }20812082 if(!checkEmail(document.form1.email.value)){20832084 alert("Please enter a valid Email Address...");20852086 acc1.openPanel(0);20872088 document.form1.email.focus();20892090 return false;20912092 }20932094 if(isNull(document.form1.address1.value) || document.form1.address1.value=='address 1'){20952096 alert("Please enter your Address 1...");20972098 acc1.openPanel(0);20992100 document.form1.address1.focus();21012102 return false;21032104 }21052106 if(isNull(document.form1.city.value) || document.form1.city.value=='city'){21072108 alert("Please enter your City...");21092110 acc1.openPanel(0);21112112 document.form1.city.focus();21132114 return false;21152116 }21172118 index = document.form1.bill_country_id.value;21192120 if(stateName[index].length > 1){21212122 if(isNull(document.form1.bill_state_id.value) || document.form1.bill_state_id.value == -1){21232124 alert("Please select your County/State...");21252126 acc1.openPanel(0);21272128 document.form1.bill_state_id.focus();21292130 return false;21312132 }21332134 }else{21352136 if(isNull(document.form1.bill_state.value) || document.form1.bill_state.value==''){21372138 alert("Please enter your County/State...");21392140 acc1.openPanel(0);21412142 document.form1.bill_state.focus();21432144 return false;21452146 }21472148 }21492150 if(isNull(document.form1.zip.value) || document.form1.zip.value=='postcode/zip'){21512152 alert("Please enter Postcode/Zip...");21532154 acc1.openPanel(0);21552156 document.form1.zip.focus();21572158 return false;21592160 }21612162 if(isNull(document.form1.phone.value) || document.form1.phone.value=='telephone'){21632164 alert("Please enter your Telephone...");21652166 acc1.openPanel(0);21672168 document.form1.phone.focus();21692170 return false;21712172 }21732174 return true;21752176 }21772178 21792180 function validateForm2()21812182 {21832184 21852186 21872188 // Alternative address validations.21892190 if(altship == 1)21912192 {21932194 if(isNull(document.form2.alt_fName.value) || document.form2.alt_fName.value=='full name')21952196 {21972198 alert("Please enter your Full Name...");21992200 acc1.openPanel(1);22012202 document.form2.alt_fName.focus();22032204 return false;22052206 }22072208 if(isNull(document.form2.alt_address1.value) || document.form2.alt_address1.value=='address 1'){22092210 alert("Please enter your Delivery Address 1...");22112212 acc1.openPanel(1);22132214 document.form2.alt_address1.focus();22152216 return false;22172218 }22192220 if(isNull(document.form2.alt_city.value) || document.form2.alt_city.value=='city'){22212222 alert("Please enter your Delivery City...");22232224 acc1.openPanel(1);22252226 document.form2.alt_city.focus();22272228 return false;22292230 }22312232 index = document.form2.ship_country_id.value;22332234 if(stateName[index].length > 1){22352236 if(isNull(document.form2.ship_state_id.value) || document.form2.ship_state_id.value == -1){22372238 alert("Please select your shipping County/State...");22392240 acc1.openPanel(1);22412242 document.form2.ship_state_id.focus();22432244 return false;22452246 }22472248 }else{22492250 if(isNull(document.form2.ship_state.value) || document.form2.ship_state.value==''){22512252 alert("Please enter your shipping County/State...");22532254 acc1.openPanel(1);22552256 document.form2.ship_state.focus();22572258 return false;22592260 }22612262 }22632264 if(isNull(document.form2.alt_zip.value) || document.form2.alt_zip.value=='postcode/zip'){22652266 alert("Please enter your Delivery Postcode/Zip...");22672268 acc1.openPanel(1);22692270 document.form2.alt_zip.focus();22712272 return false;22732274 }22752276 if(isNull(document.form2.alt_phone.value) || document.form2.alt_phone.value=='telephone'){22772278 alert("Please enter your Delivery Telephone...");22792280 acc1.openPanel(1);22812282 document.form2.alt_phone.focus();22832284 return false;22852286 }22872288 }22892290 22912292 return true;22932294 }22952296 function validateForm3()22972298 {22992300 if(!document.form3.terms_agree.checked){23012302 alert("You must agree to the terms and conditions...");23032304 acc1.openPanel(2);23052306 document.form3.terms_agree.focus();23072308 return false;23092310 }23112312 if (jQuery('#form3 input:checked').length) {2313 return true;2314 }2315 else23162317 {23182319 return false;23202321 }23222323 return true;23242325 }23262327 function setbillstate(index,fstatus)23282329 {23302331 loadvalues();23322333 document.getElementById('form1').bill_state_id.length=1;2334233523362337 if(index>-1)23382339 {23402341 for(i=-1;i<stateName[index].length;i++)23422343 {23442345 document.getElementById('form1').bill_state_id.options[i+1]=new Option(stateName[index][i],stateVal[index][i]);23462347 } 2348234923502351 if(stateName[index].length==1)23522353 {23542355 document.getElementById('form1').bill_state_id.options[1].selected=true;23562357 }23582359 if(stateName[index].length>1)23602361 {23622363 document.getElementById("bill_state").style.background="#E8E8E8";23642365 document.getElementById('form1').bill_state.value="";23662367 document.getElementById('form1').bill_state.disabled=true;23682369 document.getElementById("bill_state_id").style.background="#FFFFFF";23702371 document.getElementById('form1').bill_state_id.disabled=false;23722373 if(fstatus==2)23742375 {23762377 document.getElementById('form1').bill_state_id.focus();23782379 }23802381 }23822383 else23842385 {23862387 document.getElementById("bill_state").style.background="#FFFFFF";23882389 document.getElementById('form1').bill_state.disabled=false;23902391 document.getElementById("bill_state_id").style.background="#E8E8E8";23922393 document.getElementById('form1').bill_state_id.disabled=true;23942395 if(fstatus==2)23962397 {23982399 document.getElementById('form1').bill_state.focus();24002401 }24022403 }24042405 }2406 if(altship != 1)2407 {2408 UpdateOptions(jQuery('#country').val());2409 }2410 }24112412function setshipstate(index,fstatus)24132414 {24152416 loadvalues();24172418 document.form2.ship_state_id.length=1;24192420 for(i=-1;i<stateName[index].length;i++)24212422 {24232424 document.form2.ship_state_id.options[i+1]=new Option(stateName[index][i],stateVal[index][i]);24252426 }24272428 if(stateName[index].length==1)24292430 {24312432 document.form2.ship_state_id.options[1].selected=true;24332434 }24352436 if(stateName[index].length>1)24372438 {24392440 document.getElementById("ship_state").style.background="#E8E8E8";24412442 document.getElementById('form2').ship_state.value="";24432444 document.getElementById('form2').ship_state.disabled=true;24452446 document.getElementById("ship_state_id").style.background="#FFFFFF";24472448 document.getElementById('form2').ship_state_id.disabled=false;24492450 if(fstatus==2)24512452 {24532454 try {24552456 document.form2.ship_state_id.focus();24572458 } catch(err){24592460 }24612462 }24632464 }24652466 else24672468 {24692470 document.getElementById("ship_state").style.background="#ffffff";24712472 document.form2.ship_state.disabled=false;24732474 document.getElementById("ship_state_id").style.background="#E8E8E8";24752476 document.form2.ship_state_id.disabled=true;24772478 if(fstatus==2)24792480 {24812482 document.form2.ship_state.focus();24832484 }24852486 }248724882489 UpdateOptions(jQuery('#ship_country_id').val());2490 }24912492 function disableField(field,stat) {24932494 field.disabled = stat;24952496 } 24972498 function isEmail(s){24992500 var i = 1;25012502 var sLength = s.length;25032504 while ((i < sLength) && (s.charAt(i) != "@")){ i++ }25052506 if ((i >= sLength) || (s.charAt(i) != "@")) return false;25072508 else i += 2;25092510 while ((i < sLength) && (s.charAt(i) != ".")){ i++ }25112512 if ((i >= sLength - 1) || (s.charAt(i) != ".")) return false;25132514 else return true;25152516 }25172518 function getValue(frm, fieldname){25192520 var field = eval("document." + frm + "."+fieldname);25212522 if(isdefined(field)){25232524 return field.value;25252526 }else{25272528 return false;25292530 }25312532 }25332534 function trimchar(pstr)25352536 {25372538 var lenstr = pstr.length;25392540 for(var i = 0 ; pstr.charAt(i) == " "; i++);25412542 for(var j = pstr.length - 1; pstr.charAt(j)== " "; j--);25432544 j++;25452546 if (i > j)25472548 pstr = "";25492550 else25512552 pstr = pstr.substring(i,j);25532554 return pstr;25552556 }25572558 function mod10 (strNum) {25592560 var nCheck = 0;25612562 var nDigit = 0;25632564 var bEven = false;25652566 25672568 for (n = strNum.length - 1; n >= 0; n--)25692570 {25712572 var cDigit = strNum.charAt (n);25732574 if (isDigit (cDigit))25752576 {25772578 var nDigit = parseInt(cDigit, 10);25792580 if (bEven)25812582 {25832584 if ((nDigit *= 2) > 9)25852586 nDigit -= 9;25872588 }25892590 nCheck += nDigit;25912592 bEven = ! bEven;25932594 }25952596 else if (cDigit != ' ' && cDigit != '.' && cDigit != '-')25972598 {25992600 return false;26012602 }26032604 }26052606 return (nCheck % 10) == 0;26072608 }26092610 function expired( month, year )26112612 {26132614 var now = new Date();26152616 var expiresIn = new Date(year,month,0,0,0);26172618 expiresIn.setMonth(expiresIn.getMonth()+1);26192620 if( now.getTime() < expiresIn.getTime() ) return false;26212622 return true; 26232624 }26252626 //29-05-06:RUS added this function to validate start date26272628 function isBeforeNow(cardStartMonth, cardStartYear)26292630 {26312632 var now = new Date();26332634 var startsIn = new Date(cardStartYear,cardStartMonth,0,0,0);26352636 startsIn.setMonth(startsIn.getMonth()-1);26372638 if(startsIn.getTime() < now.getTime() ) 26392640 {26412642 return false;26432644 }26452646 return true;26472648 }26492650 function validatefields(pstCardStartMonth,pstCardStartYear,pstIssuenumber) {26512652 if (pstIssuenumber !="") { // filled in, so we need to verify26532654 if(isNaN(parseInt(pstIssuenumber))) {26552656 alert("Sorry! Please enter a valid issue number.");26572658 return false;26592660 }else if(pstIssuenumber.length!=2) {26612662 alert("Sorry! Please enter a valid issue number.");26632664 return false;26652666 }26672668 }26692670 if (pstCardStartMonth!="" && pstCardStartYear !="")26712672 { // filled in, so we need to verify26732674 if (isBeforeNow(pstCardStartMonth, pstCardStartYear))26752676 { 26772678 alert("Sorry! The start date you have entered would make this card invalid.");26792680 return false;26812682 }26832684 }26852686 return true; 26872688 }26892690 //29-05-06:RUS updated this function to add parameters for start date and issue number26912692 function validateCard(cc_number,cardType,cardMonth,cardYear,cardStartMonth, cardStartYear, issuenumber, pstCardType, cv2) {26932694 if( cc_number.length == 0 ) { 26952696 alert("Please enter a valid card number.");26972698 return false; 26992700 }27012702 for( var i = 0; i < cc_number.length; ++i ) { 27032704 var c = cc_number.charAt(i);27052706 if( c < '0' || c > '9' ) {27072708 alert("Please enter a valid card number. Use only digits. Do not use spaces or hyphens.");27092710 return false;27112712 }27132714 }27152716 var length = cc_number.length;27172718 switch( cardType ) {27192720 case 'm':27212722 case 'MC':27232724 case 'Mastercard':27252726 if( length != 16 ) {27272728 alert("Please enter a valid MasterCard number.");27292730 return;27312732 }27332734 var prefix = parseInt( cc_number.substring(0,2));27352736 if( prefix < 51 || prefix > 55) {27372738 alert("Please enter a valid MasterCard Card number.");27392740 return;27412742 }27432744 break;27452746 case 'v':27472748 case 'VISA':27492750 if(length != 16 && length != 13) {27512752 alert("Please enter a valid Visa Card number.");27532754 return;27552756 }27572758 var prefix = parseInt( cc_number.substring(0,1)); 27592760 if( prefix != 4 ) {27612762 alert("Please enter a valid Visa Card number.");27632764 return;27652766 }27672768 // 26-06-06: DPI:GSM added validation for cv227692770 if(isNull(cv2) || !isNumeric(cv2)){27712772 alert("Please enter a valid security code.");27732774 return false;27752776 }27772778 break;27792780 case 'a': 27812782 case 'AMEX':27832784 if( length != 15 ) {27852786 alert("Please enter a valid American Express Card number.");27872788 return;27892790 }27912792 var prefix = parseInt( cc_number.substring(0,2)); 27932794 if(prefix != 34 && prefix != 37 ) {27952796 alert("Please enter a valid American Express Card number.");27972798 return;27992800 }28012802 break;28032804 case 'd':28052806 case 'DISCOVER':28072808 if( length != 16 ) {28092810 alert("Please enter a valid Discover Card number.");28112812 return;28132814 }28152816 var prefix = parseInt( cc_number.substring(0,4)); 28172818 if( prefix != 6011 ) {28192820 alert("Please enter a valid Discover Card number.");28212822 return;28232824 }28252826 break;28272828 case 'DinnersClub':28292830 if( length != 14 ) {28312832 alert("Please enter a valid Dinners Club Card number.");28332834 return;28352836 }28372838 var prefix = parseInt( cc_number.substring(0,3)); 28392840 if((prefix < 300 || prefix > 305) || (prefix != 36 && prefix != 38 )) {28412842 alert("Please enter a valid Discover Card number.");28432844 return;28452846 }28472848 break;28492850 28512852 }28532854 if( !mod10( cc_number ) ) { 28552856 alert("Sorry! this is not a valid credit card number.");28572858 return false;28592860 }28612862 // 26-06-06: DPI:GSM added validation for cv228632864 if(isNull(cv2) || !isNumeric(cv2)){28652866 alert("Please enter a valid security code.");28672868 return false;28692870 }28712872 //29-05-06:RUS added this code to check the expiry date is not empty28732874 if(cardMonth == "" || cardYear == "")28752876 {28772878 alert("Please enter the expiry date for this card.");28792880 return false;28812882 }28832884 else28852886 {28872888 if( expired( cardMonth, cardYear ) ) { 28892890 alert("Sorry! The expiry date you have entered would make this card invalid.");28912892 return false;28932894 }28952896 }28972898 //END 28992900 /*29-05-06:RUS added this code to check start date and/or issue number depending upon card type29012902 if card type is maestro/switch/solo*/29032904 if (pstCardType == "SWITCH" || pstCardType == "Maestro" || pstCardType == "SOLO") 29052906 {29072908 if ((cardStartMonth !="" && cardStartYear !="") || issuenumber !="") 29092910 { 29112912 if( validatefields(cardStartMonth,cardStartYear,issuenumber)){29132914 return true;29152916 }29172918 else {29192920 return false;29212922 } 29232924 }29252926 else29272928 {29292930 alert("Please enter an issue number or start date for this card.");29312932 return false;29332934 }29352936 return true; 29372938 }29392940 else29412942 {29432944 if( validatefields(cardStartMonth,cardStartYear,issuenumber)){29452946 return true;29472948 }29492950 else {29512952 return false;29532954 }29552956 }29572958 return true;29592960 }29612962function getCKDRadio(radio) {29632964 var selected = false;29652966 var ckVal = "none";29672968 if(radio.length)29692970 {29712972 for (var i = 0; i < radio.length; i++) 29732974 {29752976 if (radio[i].checked) 29772978 {29792980 selected = true;29812982 ckVal = radio[i].value;29832984 break;29852986 }29872988 }29892990 }29912992 else29932994 {29952996 selected = true;29972998 }29993000 <!-- BEGIN TPL_NOMETHOD_BLK1 -->30013002 if(radio.paymethods.value=='no')30033004 {30053006 selected = true;30073008 ckVal='notpay';30093010 }30113012 <!-- END TPL_NOMETHOD_BLK1 -->30133014 if (selected == false)30153016 {30173018 alert("Please select a payment option.");30193020 }30213022 return ckVal;30233024}30253026function checkPAY(form){30273028 if(getCKDRadio(form)!="none"){30293030 var ckVal = getCKDRadio(form);30313032 if(ckVal == "cc"){30333034 if(form.cc_number.value != ""){3035303630373038 if(!isdefined(form.cc_type)){30393040 cardType='norequired';30413042 }else{30433044 var cardType = form.cc_type[form.cc_type.selectedIndex].value;30453046 }30473048 if(cardType != "")30493050 {30513052 if(!isdefined(form.cc_start_month))30533054 {30553056 ccstartmonth="";30573058 ccstartyear="";30593060 issuenumber="";30613062 }30633064 else30653066 {30673068 ccstartmonth=form.cc_start_month.value;30693070 ccstartyear=form.cc_start_year.value30713072 issuenumber=trimchar(form.issuenumber.value);30733074 }30753076 if (validateCard(30773078 form.cc_number.value,30793080 cardType,30813082 form.cc_month.options[form.cc_month.selectedIndex].value,30833084 form.cc_year.options[form.cc_year.selectedIndex].value,30853086 ccstartmonth,30873088 ccstartyear,30893090 issuenumber,cardType,30913092 form.cv2.value30933094 )) {30953096 return true;30973098 } else {30993100 acc1.openPanel(2);31013102 alert("Please be sure to fill in all of your payment method information");31033104 return false;31053106 }31073108 31093110 } else {31113112 acc1.openPanel(2);31133114 alert("Please select a credit card type.");31153116 form.cc_type.focus();31173118 return false;31193120 }31213122 } else {31233124 acc1.openPanel(2);31253126 alert("Please enter a Credit Card Number");31273128 form.cc_number.focus();31293130 return false;31313132 }31333134 } 31353136 else if(ckVal == "eft")31373138 {31393140 if(form.acct.value != "")31413142 {31433144 if(form.aba.value != "")31453146 {31473148 return true;31493150 }31513152 else 31533154 {31553156 acc1.openPanel(2);31573158 alert("Please enter your ABA Account number.");31593160 form.aba.focus();31613162 return false;31633164 }31653166 }31673168 else 31693170 {31713172 acc1.openPanel(2);31733174 alert("Please enter Checking Account number.");31753176 form.acct.focus();31773178 return false;31793180 }31813182 } else return true;31833184 } else return false;31853186}31873188 31893190//END31913192//-->3193319431953196 function ToggleVisibility(id)31973198 {31993200 if(id == '1')32013202 {32033204 if(document.getElementById("inp1")!='null'){var objInp = document.getElementById("inp1");}32053206 var objForm = document.getElementById("thediv");32073208 }32093210 if(objInp!=null){ 32113212 if (objInp.checked)32133214 { 32153216 objForm.style.display = "none";32173218 }else32193220 {32213222 objForm.style.display = "block";32233224 }32253226 }32273228 } 32293230 32313232 //window.onload = function() 32333234 //{32353236 //ToggleVisibility(1);32373238 //}32393240 32413242 var http = false;32433244 if(navigator.appName == "Microsoft Internet Explorer") {32453246 http = new ActiveXObject("Microsoft.XMLHTTP");32473248 } else {32493250 http = new XMLHttpRequest();32513252 }32533254 function sndReq(countryid) {32553256 http.open('GET','{TPL_VAR_SITEURL}ecom/index.php?action=ecom.changepostage&countryid='+countryid);32573258 http.onreadystatechange = changepostage;32593260 http.send(null);32613262 }3263326432653266 function changepostage(){32673268 if(http.readyState == 4){32693270 var response = http.responseText;32713272 var update = new Array();32733274 if(response.indexOf('*' != -1)) { 32753276 update = response.split('*');32773278 document.getElementById(update[1]).innerHTML= update[0];32793280 document.getElementById('postagepricedefault').innerHTML= update[0];32813282 document.getElementById('specialdelivery').innerHTML= update[8];32833284 document.getElementByName('ship_total[0]').value= update[0];32853286 32873288 }32893290 } 32913292 }3293329432953296 function sndReq2(stateid){32973298 var countryid = document.form2.ship_country_id.value;32993300 http.open('GET','{TPL_VAR_SITEURL}ecom/index.php?action=ecom.changepostage&countryid='+countryid+'&stateid='+stateid);33013302 http.onreadystatechange = changepostage2;33033304 http.send(null);33053306 }3307330833093310 function changepostage2(){33113312 if(http.readyState == 4){33133314 var response = http.responseText;33153316 var update = new Array();33173318 if(response.indexOf('*' != -1)) { 33193320 update = response.split('*');33213322 document.getElementById(update[1]).innerHTML= update[0];33233324 document.getElementById('postagepricedefault').innerHTML= update[0];33253326 document.getElementById('specialdelivery').innerHTML= update[8];33273328 document.getElementByName('ship_total[0]').value= update[0];33293330 }33313332 } 33333334 }33353336 // DOCUMENT.FORMNAME.FIELDNAME.VALUE = DOCUMENT.FORMNAME.FIELDNAME.VALUE (text fields)33373338 function transfer_acct(ck) {33393340 if(ck.checked){33413342 setshipstate(document.form1.bill_country_id.value,2);33433344 33453346 document.form2.alt_fName.value= document.form1.first_name.value;33473348 document.form2.alt_company.value= document.form1.company.value;33493350 document.form2.alt_lName.value = document.form1.last_name.value;33513352 document.form2.alt_address1.value = document.form1.address1.value;33533354 document.form2.alt_address2.value = document.form1.address2.value;33553356 document.form2.alt_city.value = document.form1.city.value;33573358 document.form2.ship_state.value = document.form1.bill_state.value;33593360 document.form2.ship_state_id.value = document.form1.bill_state_id.value;33613362 document.form2.ship_country_id.value = document.form1.bill_country_id.value;33633364 document.form2.alt_zip.value = document.form1.zip.value;33653366 document.form2.alt_phone.value = document.form1.phone.value;33673368 } else {33693370 document.form2.alt_company.value=''33713372 document.form2.alt_fName.value=''33733374 document.form2.alt_lName.value = ''33753376 document.form2.alt_address1.value = ''33773378 document.form2.alt_address2.value = ''33793380 document.form2.alt_city.value = ''33813382 document.form2.ship_state.value = ''33833384 document.form2.ship_state_id.value='-1';33853386 document.form2.ship_country_id.value ='{BILL_COUNTRY_SELECT}';33873388 document.form2.alt_zip.value = ''33893390 document.form2.alt_phone.value = ''33913392 }33933394 }33953396 function sameShipping()33973398 {33993400 if(document.getElementById('inp1').checked)34013402 {34033404 sndReq(document.form1.bill_country_id.value);34053406 }34073408 }34093410 function sameShipping2()34113412 { 34133414 if(document.getElementById('inp1').checked)34153416 {34173418 sndReq2(document.form1.bill_state_id.value);34193420 }34213422 }34233424jQuery(window).load(function() {34253426if(document.form1.bill_country_id.value=="" || document.form1.bill_country_id.value<=0) {34273428 setbillstate({selbillcountid},2);34293430 }34313432 else34333434 {34353436 setbillstate(document.getElementById('form1').bill_country_id.value,2);34373438 }34393440 34413442 for(var i=0;i<document.getElementById('form1').bill_state_id.options.length;i++)34433444 {34453446 if(document.form1.bill_state_id.options[i].value == '{selbillstateid}')34473448 document.form1.bill_state_id.options[i].selected = true;34493450 }34513452 if(isdefined(document.form2.ship_state_id))34533454 {3455345634573458 if(document.form2.ship_country_id.value=="" || document.form2.ship_country_id.value<=0)34593460 {34613462 setshipstate({selshipcountid},1);34633464 }34653466 else34673468 {34693470 setshipstate(document.form2.ship_country_id.value,2);34713472 }34733474 34753476 for(var i=0;i<document.form2.ship_state_id.options.length;i++)34773478 {34793480 if(document.form2.ship_state_id.options[i].value == '{selshipstateid}')34813482 document.form2.ship_state_id.options[i].selected = true;34833484 }34853486 }34873488 scroll(0,0);34893490});34913492</script>3493349434953496<script type='text/javascript'>34973498//accid = index number of active34993500 function nextAcc(accid,ignorecheck)35013502 {35033504 var previous = acc1.getCurrentPanelIndex() + 1;35053506 if(previous == 1)35073508 {35093510 var status = validateForm1();35113512 }35133514 else if(previous == 2)35153516 {35173518 var status = validateForm2();35193520 }35213522 else if(previous == 3 && ignorecheck != 1)35233524 {35253526 var status = validateForm3();35273528 }35293530 if(status == false)35313532 {35333534 return false;35353536 }35373538 var http = false;35393540 if(navigator.appName == "Microsoft Internet Explorer") {35413542 http = new ActiveXObject("Microsoft.XMLHTTP");35433544 } else {35453546 http = new XMLHttpRequest();35473548 } 35493550 //Page to Open35513552 //parameters to send go here35533554 form1values = jQuery('#form1').serialize();35553556 form2values = jQuery('#form2').serialize();35573558 form3values = jQuery('#form3').serialize();35593560 formvalues = form1values + "&" + form2values + "&" + form3values;35613562 //alert(formvalues);35633564 if(previous == 3)35653566 {35673568 http.open('POST','{TPL_VAR_SITEURL}ecom/index.php?action=checkout.addBillShipInfo',true);35693570 http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");3571 http.onreadystatechange = function()35723573 {35743575 if (http.readyState==4)35763577 {35783579 //Response35803581 var response = http.responseText;35823583 //alert(response);35843585 var errorcheck = response.split("||",5);35863587 if(errorcheck[2] == "1")35883589 {35903591 jQuery("#err").html(errorcheck[3]);35923593 nextAcc(0,1);35943595 }35963597 else35983599 {36003601 jQuery("#err").html("");36023603 var newhtml = response.substring((75 + response.search(/<div\sid="start">/i)),(response.search(/<div\sid="end">/i)-1));36043605 if(newhtml.length == 0 || newhtml == null)36063607 {36083609 newhtml = "Loading... Click <a href='index.php?action=checkout.reviewit'>here</a> if this doesn't change.";36103611 }36123613 document.getElementById('paymentMethod').innerHTML = newhtml;36143615 }36163617 }36183619 } 36203621 //alert(formvalues);36223623 http.send(formvalues);36243625 }36263627 jQuery("#heading" + (previous)).removeClass("h2on");36283629 jQuery("#heading" + (previous)).addClass("h2off");36303631 jQuery("#heading" + (previous)).children(".circleon").addClass("circleoff");36323633 jQuery("#heading" + (previous)).children(".circleon").removeClass("circleon");36343635 jQuery("#heading" + (previous)).children(".inputoff").css("display","inline");36363637 if(previous ==1)36383639 {36403641 if(postage == "zones" || postage == "cities")36423643 {36443645 if(altship == 0 )36463647 {36483649 var mybillcountry = jQuery('#country').val();36503651 var mybillstate = jQuery('#bill_state_id').val();36523653 }36543655 }36563657 }36583659 acc1.openPanel(accid);36603661 if(acc1.getCurrentPanelIndex() + 1 ==2)36623663 {36643665 if(postage == "zones" || postage == "cities")36663667 {36683669 if(altship == 0 )36703671 {36723673 UpdatePostageCost(mybillstate,mybillcountry);36743675 }36763677 }36783679 }36803681 jQuery("#heading" + (accid + 1)).removeClass("h2off");36823683 jQuery("#heading" + (accid + 1)).addClass("h2on"); 36843685 jQuery("#heading" + (accid + 1)).children(".circleoff").addClass("circleon");36863687 jQuery("#heading" + (accid + 1)).children(".circleoff").removeClass("circleoff");36883689 jQuery("#heading" + (accid + 1)).children(".inputoff").css("display","none");36903691 36923693 }36943695 var postage = "{TPL_VAR_PTYPE}";36963697 jQuery(document).ready(function(){36983699 if(postage == "zones" || postage == "cities")37003701 {37023703 if(altship == 1 )37043705 {37063707 jQuery('#ship_state_id').change(function(){37083709 UpdatePostageCost(jQuery(this).val(),jQuery('#ship_country_id').val());37103711 });37123713 }37143715 }37163717 });37183719 function UpdatePostageCost(thestate,thecountry)37203721 {37223723 $.post("{TPL_VAR_SITEURL}ecom/index.php?action=ecom.updateviewcart","bill_country_id="+thecountry+"&bill_state_id="+thestate+"&getpostagecost=1",function(data){37243725 //alert(data);37263727 var temparray = data.split("&");37283729 temparray = temparray[0].split("->");37303731 //alert(temparray[0]);37323733 temparray = temparray[1].split("*");37343735 jQuery('#postagepricedefault').html(temparray[0]);37363737 jQuery('#postageprice').html(temparray[0]);37383739 });37403741 }3742 3743 function UpdateOptions(id){3744 if(nooptions != 1)3745 {3746 var temp = countryoptions[id].split(',');3747 var temp2 = '';3748 var first = 1;3749 var checked;3750 jQuery(temp).each(function(index){3751 var tempprice = postageOptions[temp[index]][1];3752 tempprice = tempprice.toFixed(2)3753 if(first == 1)3754 {3755 checked = ' checked';3756 first = 0;3757 }3758 else3759 {3760 checked = '';3761 }3762 temp2 = temp2 + '<div class="postage_option"><input type="radio"'+checked+' class="formRadio" name="postagemethod" value="'+temp[index]+'"/>'+postageOptions[temp[index]][0]+' {TPL_VAR_CURRENCY}'+tempprice+'</div>';3763 });3764 temp2 = temp2 + '</div>';3765 jQuery('#postage').html(temp2);3766 }3767 }
...
fontdata-beta.js
Source:fontdata-beta.js
1/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */2/* vim: set ts=2 et sw=2 tw=80: */3/*************************************************************4 *5 * MathJax/jax/output/HTML-CSS/font/STIX/fontdata-beta.js6 * 7 * Patches the STIX font data to work with the beta version of8 * the STIX fonts (as opposed to the release version, assuming9 * there ever is one).10 *11 * ---------------------------------------------------------------------12 * 13 * Copyright (c) 2010-2015 The MathJax Consortium14 *15 * Licensed under the Apache License, Version 2.0 (the "License");16 * you may not use this file except in compliance with the License.17 * You may obtain a copy of the License at18 *19 * http://www.apache.org/licenses/LICENSE-2.020 *21 * Unless required by applicable law or agreed to in writing, software22 * distributed under the License is distributed on an "AS IS" BASIS,23 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.24 * See the License for the specific language governing permissions and25 * limitations under the License.26 */27(function (HTMLCSS,TEX) {28 29 HTMLCSS.FONTDATA.STIXversion = "1.0-beta";30 31 var GENERAL = "STIXGeneral",32 BOLD = "STIXGeneral-bold",33 ITALIC = "STIXGeneral-italic",34// NONUNI = "STIXNonUnicode",35 SIZE1 = "STIXSizeOneSym",36 SIZE2 = "STIXSizeTwoSym",37 SIZE3 = "STIXSizeThreeSym",38 SIZE4 = "STIXSizeFourSym",39 SIZE5 = "STIXSizeFiveSym";40 var REPLACE = function (name,data) {41 var FONT = HTMLCSS.FONTDATA.FONTS[name];42 for (var id in data) {if (data.hasOwnProperty(id)) {FONT[id] = data[id]}}43 };44 REPLACE(GENERAL,{45 0x300: [678,-507,0,109,333], // COMBINING GRAVE ACCENT46 0x301: [678,-507,0,109,333], // COMBINING ACUTE ACCENT47 0x302: [674,-507,0,94,405], // COMBINING CIRCUMFLEX ACCENT48 0x303: [638,-532,0,85,415], // COMBINING TILDE49 0x304: [601,-547,0,95,406], // COMBINING MACRON50 0x305: [820,-770,0,0,500], // COMBINING OVERLINE51 0x306: [664,-507,0,107,388], // COMBINING BREVE52 0x307: [622,-523,0,200,299], // COMBINING DOT ABOVE53 0x308: [622,-523,0,101,399], // COMBINING DIAERESIS54 0x309: [751,-492,0,173,362], // COMBINING HOOK ABOVE55 0x30A: [711,-512,0,151,350], // COMBINING RING ABOVE56 0x30B: [678,-507,0,79,458], // COMBINING DOUBLE ACUTE ACCENT57 0x30C: [674,-507,0,95,406], // COMBINING CARON58 0x30D: [700,-500,0,230,285], // COMBINING VERTICAL LINE ABOVE59 0x30E: [700,-500,0,154,347], // COMBINING DOUBLE VERTICAL LINE ABOVE60 0x30F: [678,-507,0,79,458], // COMBINING DOUBLE GRAVE ACCENT61 0x310: [767,-507,0,107,388], // COMBINING CANDRABINDU62 0x311: [664,-507,0,107,388], // COMBINING INVERTED BREVE63 0x312: [745,-502,0,181,320], // COMBINING TURNED COMMA ABOVE64 0x313: [745,-502,0,181,320], // COMBINING COMMA ABOVE65 0x314: [745,-502,0,181,320], // COMBINING REVERSED COMMA ABOVE66 0x315: [745,-502,0,395,534], // COMBINING COMMA ABOVE RIGHT67 0x316: [-53,224,0,109,333], // COMBINING GRAVE ACCENT BELOW68 0x317: [-53,224,0,109,333], // COMBINING ACUTE ACCENT BELOW69 0x318: [-53,283,0,83,270], // COMBINING LEFT TACK BELOW70 0x319: [-53,283,0,83,270], // COMBINING RIGHT TACK BELOW71 0x31A: [735,-531,0,100,400], // COMBINING LEFT ANGLE ABOVE72 0x31B: [474,-345,0,436,531], // COMBINING HORN73 0x31C: [-71,266,0,120,248], // COMBINING LEFT HALF RING BELOW74 0x31D: [-53,240,0,135,365], // COMBINING UP TACK BELOW75 0x31E: [-53,240,0,135,365], // COMBINING DOWN TACK BELOW76 0x31F: [-53,250,0,154,346], // COMBINING PLUS SIGN BELOW77 0x320: [-124,168,0,154,346], // COMBINING MINUS SIGN BELOW78 0x321: [75,287,0,245,481], // COMBINING PALATALIZED HOOK BELOW79 0x322: [75,287,0,426,662], // COMBINING RETROFLEX HOOK BELOW80 0x323: [-118,217,0,200,299], // COMBINING DOT BELOW81 0x324: [-119,218,0,101,399], // COMBINING DIAERESIS BELOW82 0x325: [-69,268,0,151,350], // COMBINING RING BELOW83 0x326: [-110,353,0,181,320], // COMBINING COMMA BELOW84 0x327: [0,215,0,146,355], // COMBINING CEDILLA85 0x328: [0,165,0,158,343], // COMBINING OGONEK86 0x329: [-102,234,0,230,270], // COMBINING VERTICAL LINE BELOW87 0x32A: [-98,235,0,95,407], // COMBINING BRIDGE BELOW88 0x32B: [-110,227,0,100,405], // COMBINING INVERTED DOUBLE ARCH BELOW89 0x32C: [-73,240,0,95,406], // COMBINING CARON BELOW90 0x32D: [-73,240,0,95,406], // COMBINING CIRCUMFLEX ACCENT BELOW91 0x32E: [-68,225,0,110,391], // COMBINING BREVE BELOW92 0x32F: [-59,216,0,110,391], // COMBINING INVERTED BREVE BELOW93 0x330: [-113,219,0,85,415], // COMBINING TILDE BELOW94 0x331: [-141,195,0,95,406], // COMBINING MACRON BELOW95 0x332: [-141,191,0,0,500], // COMBINING LOW LINE96 0x333: [-141,300,0,0,500], // COMBINING DOUBLE LOW LINE97 0x334: [320,-214,0,79,409], // COMBINING TILDE OVERLAY98 0x335: [274,-230,0,96,402], // COMBINING SHORT STROKE OVERLAY99 0x336: [274,-230,0,0,500], // COMBINING LONG STROKE OVERLAY100 0x337: [580,74,0,100,439], // COMBINING SHORT SOLIDUS OVERLAY101 0x338: [662,156,0,100,511], // COMBINING LONG SOLIDUS OVERLAY102 0x339: [-71,266,0,120,248], // COMBINING RIGHT HALF RING BELOW103 0x33A: [-53,190,0,95,407], // COMBINING INVERTED BRIDGE BELOW104 0x33B: [-53,227,0,167,333], // COMBINING SQUARE BELOW105 0x33C: [-65,189,0,100,401], // COMBINING SEAGULL BELOW106 0x33D: [715,-525,0,154,345], // COMBINING X ABOVE107 0x33E: [829,-499,0,197,303], // COMBINING VERTICAL TILDE108 0x33F: [928,-770,0,0,500], // COMBINING DOUBLE OVERLINE109 0x346: [681,-538,0,0,282], // COMBINING BRIDGE ABOVE110 0x34C: [777,-532,0,94,424], // COMBINING ALMOST EQUAL TO ABOVE111 0x359: [-65,367,0,123,393], // COMBINING ASTERISK BELOW112 0x35C: [-76,233,0,107,775], // COMBINING DOUBLE BREVE BELOW113 0x360: [633,-517,0,85,845], // COMBINING DOUBLE TILDE114 0x361: [664,-507,0,107,775], // COMBINING DOUBLE INVERTED BREVE115 0x362: [-65,270,0,85,835], // COMBINING DOUBLE RIGHTWARDS ARROW BELOW116 0x20D0: [760,-627,0,27,463], // COMBINING LEFT HARPOON ABOVE117 0x20D1: [760,-627,0,27,463], // COMBINING RIGHT HARPOON ABOVE118 0x20D2: [662,156,0,238,288], // COMBINING LONG VERTICAL LINE OVERLAY119 0x20D6: [760,-548,0,27,463], // COMBINING LEFT ARROW ABOVE120 0x20D7: [760,-548,0,27,463], // COMBINING RIGHT ARROW ABOVE121 0x20DB: [622,-523,0,18,515], // COMBINING THREE DOTS ABOVE122 0x20DC: [622,-523,0,0,696], // COMBINING FOUR DOTS ABOVE123 0x20DD: [725,221,1000,27,973], // COMBINING ENCLOSING CIRCLE124 0x20DE: [780,180,0,0,960], // COMBINING ENCLOSING SQUARE125 0x20DF: [843,341,0,0,1184], // COMBINING ENCLOSING DIAMOND126 0x20E1: [760,-548,0,27,505], // COMBINING LEFT RIGHT ARROW ABOVE127 0x20E4: [1023,155,1510,25,1485], // COMBINING ENCLOSING UPWARD POINTING TRIANGLE128 0x20E5: [662,156,0,50,440], // COMBINING REVERSE SOLIDUS OVERLAY129 0x20E6: [662,156,0,145,378], // COMBINING DOUBLE VERTICAL STROKE OVERLAY130 0x20E7: [725,178,0,0,816], // COMBINING ANNUITY SYMBOL131 0x20E8: [-119,218,0,18,515], // COMBINING TRIPLE UNDERDOT132 0x20E9: [681,-538,0,0,533], // COMBINING WIDE BRIDGE ABOVE133 0x20EA: [419,-87,0,-178,598], // COMBINING LEFTWARDS ARROW OVERLAY134 0x20EB: [756,217,0,32,673], // COMBINING LONG DOUBLE SOLIDUS OVERLAY135 0x20EC: [-119,252,0,27,463], // COMBINING RIGHTWARDS HARPOON WITH BARB DOWNWARDS136 0x20ED: [-119,252,0,27,463], // COMBINING LEFTWARDS HARPOON WITH BARB DOWNWARDS137 0x20EE: [-40,252,0,27,463], // COMBINING LEFT ARROW BELOW138 0x20EF: [-40,252,0,27,463], // COMBINING RIGHT ARROW BELOW139 0x20F0: [819,-517,0,123,393] // COMBINING ASTERISK ABOVE140 });141 142 REPLACE(BOLD,{143 0x300: [713,-528,0,141,379], // COMBINING GRAVE ACCENT144 0x301: [713,-528,0,141,379], // COMBINING ACUTE ACCENT145 0x302: [704,-528,0,92,429], // COMBINING CIRCUMFLEX ACCENT146 0x303: [674,-547,0,78,443], // COMBINING TILDE147 0x304: [637,-565,0,95,425], // COMBINING MACRON148 0x305: [838,-788,0,10,510], // COMBINING OVERLINE149 0x306: [691,-528,0,109,412], // COMBINING BREVE150 0x307: [666,-537,0,196,325], // COMBINING DOT ABOVE151 0x308: [666,-537,0,91,430], // COMBINING DIAERESIS152 0x309: [751,-491,0,174,379], // COMBINING HOOK ABOVE153 0x30A: [750,-537,0,154,367], // COMBINING RING ABOVE154 0x30B: [713,-528,0,41,479], // COMBINING DOUBLE ACUTE ACCENT155 0x30C: [704,-528,0,92,429], // COMBINING CARON156 0x30D: [730,-530,0,233,299], // COMBINING VERTICAL LINE ABOVE157 0x30E: [730,-530,0,152,368], // COMBINING DOUBLE VERTICAL LINE ABOVE158 0x30F: [713,-528,0,41,479], // COMBINING DOUBLE GRAVE ACCENT159 0x310: [828,-528,0,109,412], // COMBINING CANDRABINDU160 0x311: [691,-528,0,109,412], // COMBINING INVERTED BREVE161 0x312: [867,-532,0,168,352], // COMBINING TURNED COMMA ABOVE162 0x313: [867,-532,0,168,352], // COMBINING COMMA ABOVE163 0x314: [867,-532,0,168,352], // COMBINING REVERSED COMMA ABOVE164 0x315: [867,-532,0,394,578], // COMBINING COMMA ABOVE RIGHT165 0x316: [-70,255,0,141,379], // COMBINING GRAVE ACCENT BELOW166 0x317: [-70,255,0,141,379], // COMBINING ACUTE ACCENT BELOW167 0x318: [-58,288,0,85,287], // COMBINING LEFT TACK BELOW168 0x319: [-58,288,0,232,434], // COMBINING RIGHT TACK BELOW169 0x31A: [752,-531,0,100,417], // COMBINING LEFT ANGLE ABOVE170 0x31B: [505,-352,0,448,576], // COMBINING HORN171 0x31C: [-33,313,0,135,320], // COMBINING LEFT HALF RING BELOW172 0x31D: [-70,272,0,145,375], // COMBINING UP TACK BELOW173 0x31E: [-70,272,0,145,375], // COMBINING DOWN TACK BELOW174 0x31F: [-70,287,0,154,366], // COMBINING PLUS SIGN BELOW175 0x320: [-140,206,0,154,366], // COMBINING MINUS SIGN BELOW176 0x321: [75,287,0,269,488], // COMBINING PALATALIZED HOOK BELOW177 0x322: [75,287,0,416,635], // COMBINING RETROFLEX HOOK BELOW178 0x323: [-109,238,0,196,325], // COMBINING DOT BELOW179 0x324: [-109,238,0,91,430], // COMBINING DIAERESIS BELOW180 0x325: [-66,279,0,154,367], // COMBINING RING BELOW181 0x326: [-88,423,0,168,352], // COMBINING COMMA BELOW182 0x327: [0,218,0,147,373], // COMBINING CEDILLA183 0x328: [44,173,0,146,375], // COMBINING OGONEK184 0x329: [-107,239,0,233,288], // COMBINING VERTICAL LINE BELOW185 0x32A: [-86,260,0,85,417], // COMBINING BRIDGE BELOW186 0x32B: [-104,242,0,90,415], // COMBINING INVERTED DOUBLE ARCH BELOW187 0x32C: [-83,259,0,92,429], // COMBINING CARON BELOW188 0x32D: [-85,261,0,92,429], // COMBINING CIRCUMFLEX ACCENT BELOW189 0x32E: [-78,241,0,109,412], // COMBINING BREVE BELOW190 0x32F: [-78,241,0,109,412], // COMBINING INVERTED BREVE BELOW191 0x330: [-108,235,0,78,443], // COMBINING TILDE BELOW192 0x331: [-137,209,0,95,425], // COMBINING MACRON BELOW193 0x332: [-137,187,0,10,510], // COMBINING LOW LINE194 0x333: [-137,287,0,10,510], // COMBINING DOUBLE LOW LINE195 0x334: [316,-189,0,78,443], // COMBINING TILDE OVERLAY196 0x335: [282,-224,0,96,402], // COMBINING SHORT STROKE OVERLAY197 0x336: [282,-224,0,0,500], // COMBINING LONG STROKE OVERLAY198 0x337: [580,74,0,100,467], // COMBINING SHORT SOLIDUS OVERLAY199 0x338: [662,156,0,100,541], // COMBINING LONG SOLIDUS OVERLAY200 0x339: [-33,313,0,135,320], // COMBINING RIGHT HALF RING BELOW201 0x33A: [-71,245,0,85,417], // COMBINING INVERTED BRIDGE BELOW202 0x33B: [-70,264,0,157,343], // COMBINING SQUARE BELOW203 0x33C: [-89,234,0,100,401], // COMBINING SEAGULL BELOW204 0x33D: [719,-520,0,160,360], // COMBINING X ABOVE205 0x33E: [881,-516,0,196,323], // COMBINING VERTICAL TILDE206 0x33F: [938,-788,0,10,510], // COMBINING DOUBLE OVERLINE207 0x346: [717,-544,0,0,303], // COMBINING BRIDGE ABOVE208 0x34C: [837,-547,333,-16,349], // COMBINING ALMOST EQUAL TO ABOVE209 0x359: [-66,368,0,151,421], // COMBINING ASTERISK BELOW210 0x35C: [-79,242,0,109,810], // COMBINING DOUBLE BREVE BELOW211 0x360: [674,-529,0,78,908], // COMBINING DOUBLE TILDE212 0x361: [691,-534,0,107,775], // COMBINING DOUBLE INVERTED BREVE213 0x362: [-54,293,0,78,887], // COMBINING DOUBLE RIGHTWARDS ARROW BELOW214 0x20D0: [846,-637,0,40,524], // COMBINING LEFT HARPOON ABOVE215 0x20D1: [846,-637,0,40,524], // COMBINING RIGHT HARPOON ABOVE216 0x20D2: [662,156,0,232,307], // COMBINING LONG VERTICAL LINE OVERLAY217 0x20D6: [846,-508,0,40,524], // COMBINING LEFT ARROW ABOVE218 0x20D7: [846,-508,0,40,524], // COMBINING RIGHT ARROW ABOVE219 0x20DB: [666,-537,0,-2,547], // COMBINING THREE DOTS ABOVE220 0x20DC: [666,-537,0,-2,757], // COMBINING FOUR DOTS ABOVE221 0x20DD: [760,254,1073,32,1041], // COMBINING ENCLOSING CIRCLE222 0x20E1: [846,-508,0,35,629], // COMBINING LEFT RIGHT ARROW ABOVE223 0x20E4: [1055,169,1581,32,1549], // COMBINING ENCLOSING UPWARD POINTING TRIANGLE224 0x20E5: [662,155,0,40,522], // COMBINING REVERSE SOLIDUS OVERLAY225 0x20E6: [662,156,0,130,409], // COMBINING DOUBLE VERTICAL STROKE OVERLAY226 0x20E7: [760,172,0,67,910], // COMBINING ANNUITY SYMBOL227 0x20E8: [-109,238,0,-2,547], // COMBINING TRIPLE UNDERDOT228 0x20E9: [717,-544,0,0,564], // COMBINING WIDE BRIDGE ABOVE229 0x20EA: [441,-65,1073,-178,658], // COMBINING LEFTWARDS ARROW OVERLAY230 0x20EB: [775,235,0,25,738], // COMBINING LONG DOUBLE SOLIDUS OVERLAY231 0x20EC: [-166,375,0,40,524], // COMBINING RIGHTWARDS HARPOON WITH BARB DOWNWARDS232 0x20ED: [-166,375,0,40,524], // COMBINING LEFTWARDS HARPOON WITH BARB DOWNWARDS233 0x20EE: [-35,373,0,40,524], // COMBINING LEFT ARROW BELOW234 0x20EF: [-35,373,0,40,524], // COMBINING RIGHT ARROW BELOW235 0x20F0: [845,-543,0,125,395] // COMBINING ASTERISK ABOVE236 });237 238 REPLACE(ITALIC,{239 0x20D0: [760,-627,0,27,463], // COMBINING LEFT HARPOON ABOVE240 0x20D1: [760,-627,0,54,490], // COMBINING RIGHT HARPOON ABOVE241 0x20D2: [662,156,266,100,166], // COMBINING LONG VERTICAL LINE OVERLAY242 0x20D6: [760,-548,0,27,463], // COMBINING LEFT ARROW ABOVE243 0x20D7: [760,-548,0,27,463], // COMBINING RIGHT ARROW ABOVE244 0x20DB: [622,-523,0,27,524], // COMBINING THREE DOTS ABOVE245 0x20DC: [622,-523,0,18,714], // COMBINING FOUR DOTS ABOVE246 0x20DD: [725,221,1000,27,973], // COMBINING ENCLOSING CIRCLE247 0x20E1: [760,-548,0,27,505], // COMBINING LEFT RIGHT ARROW ABOVE248 0x20E4: [1023,155,1510,25,1485], // COMBINING ENCLOSING UPWARD POINTING TRIANGLE249 0x20E5: [662,156,506,50,456], // COMBINING REVERSE SOLIDUS OVERLAY250 0x20E6: [662,156,523,129,394], // COMBINING DOUBLE VERTICAL STROKE OVERLAY251 0x20E7: [725,178,926,55,871], // COMBINING ANNUITY SYMBOL252 0x20E8: [-119,218,0,18,515], // COMBINING TRIPLE UNDERDOT253 0x20E9: [681,-538,0,2,535], // COMBINING WIDE BRIDGE ABOVE254 0x20EA: [419,-87,1000,27,973], // COMBINING LEFTWARDS ARROW OVERLAY255 0x20EC: [681,-548,0,27,463], // COMBINING RIGHTWARDS HARPOON WITH BARB DOWNWARDS256 0x20ED: [681,-548,0,27,463], // COMBINING LEFTWARDS HARPOON WITH BARB DOWNWARDS257 0x20EE: [-40,252,490,27,463], // COMBINING LEFT ARROW BELOW258 0x20EF: [-40,252,490,27,463] // COMBINING RIGHT ARROW BELOW259 });260 261 REPLACE(SIZE1,{262 0x302: [767,-554,0,0,560], // COMBINING CIRCUMFLEX ACCENT263 0x303: [750,-598,0,-2,558], // COMBINING TILDE264 0x305: [820,-770,0,0,1000], // COMBINING OVERLINE265 0x30C: [767,-554,0,0,560], // COMBINING CARON266 0x330: [-117,269,0,-2,558], // COMBINING TILDE BELOW267 0x332: [-127,177,0,0,1000], // COMBINING LOW LINE268 0x338: [532,21,0,0,563], // COMBINING LONG SOLIDUS OVERLAY269 0x20D0: [749,-584,0,28,899], // COMBINING LEFT HARPOON ABOVE270 0x20D1: [749,-584,0,27,898], // COMBINING RIGHT HARPOON ABOVE271 0x20D6: [735,-482,0,27,899], // COMBINING LEFT ARROW ABOVE272 0x20D7: [736,-482,0,27,899], // COMBINING RIGHT ARROW ABOVE273 0x20EC: [-123,288,0,27,898], // COMBINING RIGHTWARDS HARPOON WITH BARB DOWNWARDS274 0x20ED: [-123,288,0,28,899], // COMBINING LEFTWARDS HARPOON WITH BARB DOWNWARDS275 0x20EE: [-26,279,0,27,899], // COMBINING LEFT ARROW BELOW276 0x20EF: [-25,279,0,27,899] // COMBINING RIGHT ARROW BELOW277 });278 279 REPLACE(SIZE2,{280 0x302: [777,-564,0,0,979], // COMBINING CIRCUMFLEX ACCENT281 0x303: [760,-608,0,-2,977], // COMBINING TILDE282 0x305: [820,-770,0,0,1500], // COMBINING OVERLINE283 0x30C: [777,-564,0,0,979], // COMBINING CARON284 0x330: [-117,269,0,-2,977], // COMBINING TILDE BELOW285 0x332: [-127,177,0,0,1000], // COMBINING LOW LINE286 0x338: [662,0,0,0,714], // COMBINING LONG SOLIDUS OVERLAY287 0x20D0: [749,-584,0,27,1335], // COMBINING LEFT HARPOON ABOVE288 0x20D1: [749,-584,0,27,1335], // COMBINING RIGHT HARPOON ABOVE289 0x20D6: [735,-482,0,27,1335], // COMBINING LEFT ARROW ABOVE290 0x20D7: [735,-482,0,27,1335], // COMBINING RIGHT ARROW ABOVE291 0x20EC: [-123,288,0,27,1335], // COMBINING RIGHTWARDS HARPOON WITH BARB DOWNWARDS292 0x20ED: [-123,288,0,27,1335], // COMBINING LEFTWARDS HARPOON WITH BARB DOWNWARDS293 0x20EE: [-26,279,0,27,1335], // COMBINING LEFT ARROW BELOW294 0x20EF: [-26,279,0,27,1335] // COMBINING RIGHT ARROW BELOW295 });296 297 REPLACE(SIZE3,{298 0x302: [777,-564,0,0,1460], // COMBINING CIRCUMFLEX ACCENT299 0x303: [774,-608,0,-2,1458], // COMBINING TILDE300 0x305: [820,-770,0,0,2000], // COMBINING OVERLINE301 0x30C: [777,-564,0,0,1460], // COMBINING CARON302 0x330: [-117,283,0,-2,1458], // COMBINING TILDE BELOW303 0x332: [-127,177,0,0,2000], // COMBINING LOW LINE304 0x338: [662,156,0,137,548], // COMBINING LONG SOLIDUS OVERLAY305 0x20D0: [749,-584,0,27,1771], // COMBINING LEFT HARPOON ABOVE306 0x20D1: [749,-584,0,27,1771], // COMBINING RIGHT HARPOON ABOVE307 0x20D6: [735,-482,0,27,1771], // COMBINING LEFT ARROW ABOVE308 0x20D7: [735,-482,0,27,1771], // COMBINING RIGHT ARROW ABOVE309 0x20EC: [-123,288,0,27,1771], // COMBINING RIGHTWARDS HARPOON WITH BARB DOWNWARDS310 0x20ED: [-123,288,0,27,1771], // COMBINING LEFTWARDS HARPOON WITH BARB DOWNWARDS311 0x20EE: [-26,279,0,27,1771], // COMBINING LEFT ARROW BELOW312 0x20EF: [-26,279,0,27,1771] // COMBINING RIGHT ARROW BELOW313 });314 315 REPLACE(SIZE4,{316 0x302: [796,-573,0,0,1886], // COMBINING CIRCUMFLEX ACCENT317 0x303: [771,-608,0,0,1886], // COMBINING TILDE318 0x305: [820,-770,0,0,2500], // COMBINING OVERLINE319 0x30C: [796,-573,0,0,1886], // COMBINING CARON320 0x330: [-117,280,0,0,1886], // COMBINING TILDE BELOW321 0x332: [-127,177,0,0,2500], // COMBINING LOW LINE322 0x338: [731,228,0,170,491], // COMBINING LONG SOLIDUS OVERLAY323 0x20D0: [749,-584,0,27,2207], // COMBINING LEFT HARPOON ABOVE324 0x20D1: [749,-584,0,27,2207], // COMBINING RIGHT HARPOON ABOVE325 0x20D6: [735,-482,0,27,2207], // COMBINING LEFT ARROW ABOVE326 0x20D7: [735,-482,0,27,2207], // COMBINING RIGHT ARROW ABOVE327 0x20EC: [-123,288,0,27,2207], // COMBINING RIGHTWARDS HARPOON WITH BARB DOWNWARDS328 0x20ED: [-123,288,0,27,2207], // COMBINING LEFTWARDS HARPOON WITH BARB DOWNWARDS329 0x20EE: [-26,279,0,27,2207], // COMBINING LEFT ARROW BELOW330 0x20EF: [-26,279,0,27,2207] // COMBINING RIGHT ARROW BELOW331 });332 333 REPLACE(SIZE5,{334 0x302: [816,-572,0,0,2328], // COMBINING CIRCUMFLEX ACCENT335 0x303: [780,-617,0,0,2328], // COMBINING TILDE336 0x305: [820,-770,0,0,3000], // COMBINING OVERLINE337 0x30C: [816,-572,0,0,2328], // COMBINING CARON338 0x330: [-117,280,0,0,2328], // COMBINING TILDE BELOW339 0x332: [-127,177,0,0,3000], // COMBINING LOW LINE340 0x338: [960,454,0,119,557], // COMBINING LONG SOLIDUS OVERLAY341 0x20D0: [749,-584,0,0,3000], // COMBINING LEFT HARPOON ABOVE342 0x20D1: [749,-584,0,0,3000], // COMBINING RIGHT HARPOON ABOVE343 0x20D6: [735,-482,0,0,3000], // COMBINING LEFT ARROW ABOVE344 0x20D7: [735,-482,0,0,3000], // COMBINING RIGHT ARROW ABOVE345 0x20EC: [-123,288,0,0,3000], // COMBINING RIGHTWARDS HARPOON WITH BARB DOWNWARDS346 0x20ED: [-123,288,0,0,3000], // COMBINING LEFTWARDS HARPOON WITH BARB DOWNWARDS347 0x20EE: [-26,279,0,0,3000], // COMBINING LEFT ARROW BELOW348 0x20EF: [-26,279,0,0,3000] // COMBINING RIGHT ARROW BELOW349 });350 351 MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/General/BoldItalic/CombDiactForSymbols.js",352 function () {353 REPLACE("STIXGeneral-bold-italic",{354 0x20DD: [760,254,1073,32,1041] // COMBINING ENCLOSING CIRCLE355 });356 }357 );358 359 var SIZES = [SIZE1,SIZE2,SIZE3,SIZE4];360 var CHARS = [0x2C6,0x2C7,0x2DC,0x2E7];361 362 for (var i = 0; i < SIZES.length; i++) {363 for (var j = 0; j < CHARS.length; j++) {364 delete HTMLCSS.FONTDATA.FONTS[SIZES[i]][j];365 }366 }367 368 369 MathJax.Ajax.loadComplete(HTMLCSS.fontDir+"/fontdata-beta.js");...
hear_beat_code.py
Source:hear_beat_code.py
1activityM={'Athlete':52,'Excellent':57.5,'Good':63.5,'Above Average':67.5,'Average':71.5,2 'Below Average':77.5,'Poor':82}3activityM2={'Athlete':51.5,'Excellent':58,'Good':63.5,'Above Average':68,'Average':72.5,4 'Below Average':78,'Poor':82}5activityM3={'Athlete':58,'Excellent':59.5,'Good':64.5,'Above Average':68,6 'Average':73,'Below Average':79,'Poor':83}7activityM4={'Athlete':58.5,'Excellent':60.5,'Good':65.5,'Above Average':69.5,8 'Average':74.5,'Below Average':80,'Poor':84}9activityM5={'Athlete':53.5,'Excellent':59,'Good':63.5,'Above Average':67.5,10 'Average':72.5,'Below Average':76.5,'Poor':80}11activityM6={'Athlete':52.5,'Excellent':58.5,'Good':63.5,12 'Above Average':67.5,13 'Average':71.5,'Below Average':76.5,'Poor':80}1415activityF={'Athlete':57,'Excellent':63,'Good':67.5,16 'Above Average':71.5,'Average':76,'Below Average':81.5,17 'Poor':85}18activityF2={'Athlete':56.5,'Excellent':62,'Good':66.5,'Above Average':70.5,19 'Average':72.5,20 'Below Average':74.5,'Poor':83}21activityF3={'Athlete':56.5,'Excellent':62,'Good':67,'Above Average':71.5,22 'Average':73,'Below Average':79,'Poor':85}23activityF4={'Athlete':57,'Excellent':63,'Good':67.5,24 'Above Average':71.5,25 'Average':56.5,'Below Average':80.5,'Poor':84}26activityF5={'Athlete':56.5,'Excellent':62,'Good':66.5,'Above Average':71,27 'Average':72.5,'Below Average':80.5,'Poor':84}28activityF6={'Athlete':56.5,'Excellent':62,'Good':66.5,'Above Average':70.5,29 'Average':74.5,'Below Average':80.5,'Poor':84}30#1: male 0: Female Ladkiya jhooth hi hai bc31def appropriate_H_R(gender,age,reading):32 if gender:33 if age>=18 and age<=25:34 if reading<=activityM['Athlete']:35 fitness_level='Athlete'36 elif reading>activityM['Athlete'] and reading<=activityM['Excellent']:37 fitness_level='Excellent'38 elif reading>activityM['Excellent'] and reading<=activityM['Good']:39 fitness_level='Good'40 elif reading>activityM['Good'] and reading<=activityM['Above Average']:41 fitness_level='Above Average'42 elif reading>activityM['Above Average'] and reading<=activityM['Average']:43 fitness_level='Average'44 elif reading>activityM['Average'] and reading<=activityM['Below Average']:45 fitness_level='Below Average'46 elif reading>activityM['Below Average'] and reading<=activityM['Poor']:47 fitness_level='Poor'48 if age>25 and age<=35:49 #print('here')50 #print(activityM2['Excellent'],activityM2['Athlete'])51 #print(reading)52 if reading<=activityM2['Athlete']:53 fitness_level='Athlete'54 elif reading>activityM2['Athlete'] and reading<=activityM2['Excellent']:55 #print('hhhere')56 fitness_level='Excellent'57 elif reading>activityM2['Excellent'] and reading<=activityM2['Good']:58 59 #print('here')60 fitness_level='Good'61 elif reading>activityM2['Good'] and reading<=activityM2['Above Average']:62 fitness_level='Above Average'63 elif reading>activityM2['Above Average'] and reading<=activityM2['Average']:64 fitness_level='Average'65 elif reading>activityM2['Average'] and reading<=activityM2['Below Average']:66 fitness_level='Below Average'67 elif reading>activityM2['Below Average'] and reading<=activityM2['Poor']:68 fitness_level='Poor'69 if age>35 and age<=45:70 if reading<=activityM3['Athlete']:71 fitness_level='Athlete'72 elif reading>activityM3['Athlete'] and reading<=activityM3['Excellent']:73 fitness_level='Excellent'74 elif reading>activityM3['Excellent'] and reading<=activityM3['Good']:75 fitness_level='Good'76 elif reading>activityM3['Good'] and reading<=activityM3['Above Average']:77 fitness_level='Above Average'78 elif reading>activityM3['Above Average'] and reading<=activityM3['Average']:79 fitness_level='Average'80 elif reading>activityM3['Average'] and reading<=activityM3['Below Average']:81 fitness_level='Below Average'82 elif reading>activityM3['Below Average'] and reading<=activityM3['Poor']:83 fitness_level='Poor'84 if age>55 and age<=65:85 if reading<=activityM4['Athlete']:86 fitness_level='Athlete'87 elif reading>activityM4['Athlete'] and reading<=activityM4['Excellent']:88 fitness_level='Excellent'89 elif reading>activityM4['Excellent'] and reading<=activityM4['Good']:90 fitness_level='Good'91 elif reading>activityM4['Good'] and reading<=activityM4['Above Average']:92 fitness_level='Above Average'93 elif reading>activityM4['Above Average'] and reading<=activityM4['Average']:94 fitness_level='Average'95 elif reading>activityM4['Average'] and reading<=activityM4['Below Average']:96 fitness_level='Below Average'97 elif reading>activityM4['Below Average'] and reading<=activityM4['Poor']:98 fitness_level='Poor'99 if age>65 and age<=75:100 if reading<=activityM5['Athlete']:101 fitness_level='Athlete'102 elif reading>activityM5['Athlete'] and reading<=activityM5['Excellent']:103 fitness_level='Excellent'104 elif reading>activityM5['Excellent'] and reading<=activityM5['Good']:105 fitness_level='Good'106 elif reading>activityM5['Good'] and reading<=activityM5['Above Average']:107 fitness_level='Above Average'108 elif reading>activityM5['Above Average'] and reading<=activityM5['Average']:109 fitness_level='Average'110 elif reading>activityM5['Average'] and reading<=activityM5['Below Average']:111 fitness_level='Below Average'112 elif reading>activityM5['Below Average'] and reading<=activityM5['Poor']:113 fitness_level='Poor'114 if age>75:115 if reading<=activityM6['Athlete']:116 fitness_level='Athlete'117 elif reading>activityM6['Athlete'] and reading<=activityM6['Excellent']:118 fitness_level='Excellent'119 elif reading>activityM6['Excellent'] and reading<=activityM6['Good']:120 fitness_level='Good'121 elif reading>activityM6['Good'] and reading<=activityM6['Above Average']:122 fitness_level='Above Average'123 elif reading>activityM6['Above Average'] and reading<=activityM6['Average']:124 fitness_level='Average'125 elif reading>activityM6['Average'] and reading<=activityM6['Below Average']:126 fitness_level='Below Average'127 elif reading>activityM6['Below Average'] and reading<=activityM6['Poor']:128 fitness_level='Poor'129 return(fitness_level)130 else:131 if age>=18 and age<=25:132 if reading<=activityF['Athlete']:133 fitness_level='Athlete'134 elif reading>activityF['Athlete'] and reading<=activityF['Excellent']:135 fitness_level='Excellent'136 elif reading>activityF['Excellent'] and reading<=activityF['Good']:137 fitness_level='Good'138 elif reading>activityF['Good'] and reading<=activityF['Above Average']:139 fitness_level='Above Average'140 elif reading>activityF['Above Average'] and reading<=activityF['Average']:141 fitness_level='Average'142 elif reading>activityF['Average'] and reading<=activityF['Below Average']:143 fitness_level='Below Average'144 elif reading>activityF['Below Average'] and reading<=activityF['Poor']:145 fitness_level='Poor'146 if age>25 and age<=35:147 if reading<=activityF2['Athlete']:148 fitness_level='Athlete'149 elif reading>activityF2['Athlete'] and reading<=activityF2['Excellent']:150 fitness_level='Excellent'151 elif reading>activityF2['Excellent'] and reading<=activityF2['Good']:152 fitness_level='Good'153 elif reading>activityF2['Good'] and reading<=activityF2['Above Average']:154 fitness_level='Above Average'155 elif reading>activityF2['Above Average'] and reading<=activityF2['Average']:156 fitness_level='Average'157 elif reading>activityF2['Average'] and reading<=activityF2['Below Average']:158 fitness_level='Below Average'159 elif reading>activityF2['Below Average'] and reading<=activityF2['Poor']:160 fitness_level='Poor'161 if age>35 and age<=45:162 if reading<=activityF3['Athlete']:163 fitness_level='Athlete'164 elif reading>activityF3['Athlete'] and reading<=activityF3['Excellent']:165 fitness_level='Excellent'166 elif reading>activityF3['Excellent'] and reading<=activityF3['Good']:167 fitness_level='Good'168 elif reading>activityF3['Good'] and reading<=activityF3['Above Average']:169 fitness_level='Above Average'170 elif reading>activityF3['Above Average'] and reading<=activityF3['Average']:171 fitness_level='Average'172 elif reading>activityF3['Average'] and reading<=activityF3['Below Average']:173 fitness_level='Below Average'174 elif reading>activityF3['Below Average'] and reading<=activityF3['Poor']:175 fitness_level='Poor'176 if age>55 and age<=65:177 if reading<=activityF4['Athlete']:178 fitness_level='Athlete'179 elif reading>activityF4['Athlete'] and reading<=activityF4['Excellent']:180 fitness_level='Excellent'181 elif reading>activityF4['Excellent'] and reading<=activityF4['Good']:182 fitness_level='Good'183 elif reading>activityF4['Good'] and reading<=activityF4['Above Average']:184 fitness_level='Above Average'185 elif reading>activityF4['Above Average'] and reading<=activityF4['Average']:186 fitness_level='Average'187 elif reading>activityF4['Average'] and reading<=activityF4['Below Average']:188 fitness_level='Below Average'189 elif reading>activityF4['Below Average'] and reading<=activityF4['Poor']:190 fitness_level='Poor'191 if age>65 and age<=75:192 if reading<=activityF5['Athlete']:193 fitness_level='Athlete'194 elif reading>activityF5['Athlete'] and reading<=activityF5['Excellent']:195 fitness_level='Excellent'196 elif reading>activityF5['Excellent'] and reading<=activityF5['Good']:197 fitness_level='Good'198 elif reading>activityF5['Good'] and reading<=activityF5['Above Average']:199 fitness_level='Above Average'200 elif reading>activityF5['Above Average'] and reading<=activityF5['Average']:201 fitness_level='Average'202 elif reading>activityF5['Average'] and reading<=activityF5['Below Average']:203 fitness_level='Below Average'204 elif reading>activityF5['Below Average'] and reading<=activityF5['Poor']:205 fitness_level='Poor'206 if age>75:207 if reading<=activityF6['Athlete']:208 fitness_level='Athlete'209 elif reading>activityF6['Athlete'] and reading<=activityF6['Excellent']:210 fitness_level='Excellent'211 elif reading>activityF6['Excellent'] and reading<=activityF6['Good']:212 fitness_level='Good'213 elif reading>activityF6['Good'] and reading<=activityF6['Above Average']:214 fitness_level='Above Average'215 elif reading>activityF6['Above Average'] and reading<=activityF6['Average']:216 fitness_level='Average'217 elif reading>activityF6['Average'] and reading<=activityF6['Below Average']:218 fitness_level='Below Average'219 elif reading>activityF6['Below Average'] and reading<=activityF6['Poor']:220 fitness_level='Poor'221 return(fitness_level)222223##x=appropriate_H_R(0,26,58)224##print(x)225import time226def count_heart_beats_per_minute(thresh=512):227 start=time.time()228 beats=0229 while time.time()-start<=60:230 val=getValue()231 if val>=thresh:232 beats+=1
...
heart_beat_code.py
Source:heart_beat_code.py
1activityM={'Athlete':52,'Excellent':57.5,'Good':63.5,'Above Average':67.5,'Average':71.5,2 'Below Average':77.5,'Poor':82}3activityM2={'Athlete':51.5,'Excellent':58,'Good':63.5,'Above Average':68,'Average':72.5,4 'Below Average':78,'Poor':82}5activityM3={'Athlete':58,'Excellent':59.5,'Good':64.5,'Above Average':68,6 'Average':73,'Below Average':79,'Poor':83}7activityM4={'Athlete':58.5,'Excellent':60.5,'Good':65.5,'Above Average':69.5,8 'Average':74.5,'Below Average':80,'Poor':84}9activityM5={'Athlete':53.5,'Excellent':59,'Good':63.5,'Above Average':67.5,10 'Average':72.5,'Below Average':76.5,'Poor':80}11activityM6={'Athlete':52.5,'Excellent':58.5,'Good':63.5,12 'Above Average':67.5,13 'Average':71.5,'Below Average':76.5,'Poor':80}1415activityF={'Athlete':57,'Excellent':63,'Good':67.5,16 'Above Average':71.5,'Average':76,'Below Average':81.5,17 'Poor':85}18activityF2={'Athlete':56.5,'Excellent':62,'Good':66.5,'Above Average':70.5,19 'Average':72.5,20 'Below Average':74.5,'Poor':83}21activityF3={'Athlete':56.5,'Excellent':62,'Good':67,'Above Average':71.5,22 'Average':73,'Below Average':79,'Poor':85}23activityF4={'Athlete':57,'Excellent':63,'Good':67.5,24 'Above Average':71.5,25 'Average':56.5,'Below Average':80.5,'Poor':84}26activityF5={'Athlete':56.5,'Excellent':62,'Good':66.5,'Above Average':71,27 'Average':72.5,'Below Average':80.5,'Poor':84}28activityF6={'Athlete':56.5,'Excellent':62,'Good':66.5,'Above Average':70.5,29 'Average':74.5,'Below Average':80.5,'Poor':84}30#1: male 0: Female Ladkiya jhooth hi hai bc31def appropriate_H_R(gender,age,reading):32 if gender:33 if age>=18 and age<=25:34 if reading<=activityM['Athlete']:35 fitness_level='Athlete'36 elif reading>activityM['Athlete'] and reading<=activityM['Excellent']:37 fitness_level='Excellent'38 elif reading>activityM['Excellent'] and reading<=activityM['Good']:39 fitness_level='Good'40 elif reading>activityM['Good'] and reading<=activityM['Above Average']:41 fitness_level='Above Average'42 elif reading>activityM['Above Average'] and reading<=activityM['Average']:43 fitness_level='Average'44 elif reading>activityM['Average'] and reading<=activityM['Below Average']:45 fitness_level='Below Average'46 elif reading>activityM['Below Average'] and reading<=activityM['Poor']:47 fitness_level='Poor'48 if age>25 and age<=35:49 #print('here')50 #print(activityM2['Excellent'],activityM2['Athlete'])51 #print(reading)52 if reading<=activityM2['Athlete']:53 fitness_level='Athlete'54 elif reading>activityM2['Athlete'] and reading<=activityM2['Excellent']:55 #print('hhhere')56 fitness_level='Excellent'57 elif reading>activityM2['Excellent'] and reading<=activityM2['Good']:58 59 #print('here')60 fitness_level='Good'61 elif reading>activityM2['Good'] and reading<=activityM2['Above Average']:62 fitness_level='Above Average'63 elif reading>activityM2['Above Average'] and reading<=activityM2['Average']:64 fitness_level='Average'65 elif reading>activityM2['Average'] and reading<=activityM2['Below Average']:66 fitness_level='Below Average'67 elif reading>activityM2['Below Average'] and reading<=activityM2['Poor']:68 fitness_level='Poor'69 if age>35 and age<=45:70 if reading<=activityM3['Athlete']:71 fitness_level='Athlete'72 elif reading>activityM3['Athlete'] and reading<=activityM3['Excellent']:73 fitness_level='Excellent'74 elif reading>activityM3['Excellent'] and reading<=activityM3['Good']:75 fitness_level='Good'76 elif reading>activityM3['Good'] and reading<=activityM3['Above Average']:77 fitness_level='Above Average'78 elif reading>activityM3['Above Average'] and reading<=activityM3['Average']:79 fitness_level='Average'80 elif reading>activityM3['Average'] and reading<=activityM3['Below Average']:81 fitness_level='Below Average'82 elif reading>activityM3['Below Average'] and reading<=activityM3['Poor']:83 fitness_level='Poor'84 if age>55 and age<=65:85 if reading<=activityM4['Athlete']:86 fitness_level='Athlete'87 elif reading>activityM4['Athlete'] and reading<=activityM4['Excellent']:88 fitness_level='Excellent'89 elif reading>activityM4['Excellent'] and reading<=activityM4['Good']:90 fitness_level='Good'91 elif reading>activityM4['Good'] and reading<=activityM4['Above Average']:92 fitness_level='Above Average'93 elif reading>activityM4['Above Average'] and reading<=activityM4['Average']:94 fitness_level='Average'95 elif reading>activityM4['Average'] and reading<=activityM4['Below Average']:96 fitness_level='Below Average'97 elif reading>activityM4['Below Average'] and reading<=activityM4['Poor']:98 fitness_level='Poor'99 if age>65 and age<=75:100 if reading<=activityM5['Athlete']:101 fitness_level='Athlete'102 elif reading>activityM5['Athlete'] and reading<=activityM5['Excellent']:103 fitness_level='Excellent'104 elif reading>activityM5['Excellent'] and reading<=activityM5['Good']:105 fitness_level='Good'106 elif reading>activityM5['Good'] and reading<=activityM5['Above Average']:107 fitness_level='Above Average'108 elif reading>activityM5['Above Average'] and reading<=activityM5['Average']:109 fitness_level='Average'110 elif reading>activityM5['Average'] and reading<=activityM5['Below Average']:111 fitness_level='Below Average'112 elif reading>activityM5['Below Average'] and reading<=activityM5['Poor']:113 fitness_level='Poor'114 if age>75:115 if reading<=activityM6['Athlete']:116 fitness_level='Athlete'117 elif reading>activityM6['Athlete'] and reading<=activityM6['Excellent']:118 fitness_level='Excellent'119 elif reading>activityM6['Excellent'] and reading<=activityM6['Good']:120 fitness_level='Good'121 elif reading>activityM6['Good'] and reading<=activityM6['Above Average']:122 fitness_level='Above Average'123 elif reading>activityM6['Above Average'] and reading<=activityM6['Average']:124 fitness_level='Average'125 elif reading>activityM6['Average'] and reading<=activityM6['Below Average']:126 fitness_level='Below Average'127 elif reading>activityM6['Below Average'] and reading<=activityM6['Poor']:128 fitness_level='Poor'129 return(fitness_level)130 else:131 if age>=18 and age<=25:132 if reading<=activityF['Athlete']:133 fitness_level='Athlete'134 elif reading>activityF['Athlete'] and reading<=activityF['Excellent']:135 fitness_level='Excellent'136 elif reading>activityF['Excellent'] and reading<=activityF['Good']:137 fitness_level='Good'138 elif reading>activityF['Good'] and reading<=activityF['Above Average']:139 fitness_level='Above Average'140 elif reading>activityF['Above Average'] and reading<=activityF['Average']:141 fitness_level='Average'142 elif reading>activityF['Average'] and reading<=activityF['Below Average']:143 fitness_level='Below Average'144 elif reading>activityF['Below Average'] and reading<=activityF['Poor']:145 fitness_level='Poor'146 if age>25 and age<=35:147 if reading<=activityF2['Athlete']:148 fitness_level='Athlete'149 elif reading>activityF2['Athlete'] and reading<=activityF2['Excellent']:150 fitness_level='Excellent'151 elif reading>activityF2['Excellent'] and reading<=activityF2['Good']:152 fitness_level='Good'153 elif reading>activityF2['Good'] and reading<=activityF2['Above Average']:154 fitness_level='Above Average'155 elif reading>activityF2['Above Average'] and reading<=activityF2['Average']:156 fitness_level='Average'157 elif reading>activityF2['Average'] and reading<=activityF2['Below Average']:158 fitness_level='Below Average'159 elif reading>activityF2['Below Average'] and reading<=activityF2['Poor']:160 fitness_level='Poor'161 if age>35 and age<=45:162 if reading<=activityF3['Athlete']:163 fitness_level='Athlete'164 elif reading>activityF3['Athlete'] and reading<=activityF3['Excellent']:165 fitness_level='Excellent'166 elif reading>activityF3['Excellent'] and reading<=activityF3['Good']:167 fitness_level='Good'168 elif reading>activityF3['Good'] and reading<=activityF3['Above Average']:169 fitness_level='Above Average'170 elif reading>activityF3['Above Average'] and reading<=activityF3['Average']:171 fitness_level='Average'172 elif reading>activityF3['Average'] and reading<=activityF3['Below Average']:173 fitness_level='Below Average'174 elif reading>activityF3['Below Average'] and reading<=activityF3['Poor']:175 fitness_level='Poor'176 if age>55 and age<=65:177 if reading<=activityF4['Athlete']:178 fitness_level='Athlete'179 elif reading>activityF4['Athlete'] and reading<=activityF4['Excellent']:180 fitness_level='Excellent'181 elif reading>activityF4['Excellent'] and reading<=activityF4['Good']:182 fitness_level='Good'183 elif reading>activityF4['Good'] and reading<=activityF4['Above Average']:184 fitness_level='Above Average'185 elif reading>activityF4['Above Average'] and reading<=activityF4['Average']:186 fitness_level='Average'187 elif reading>activityF4['Average'] and reading<=activityF4['Below Average']:188 fitness_level='Below Average'189 elif reading>activityF4['Below Average'] and reading<=activityF4['Poor']:190 fitness_level='Poor'191 if age>65 and age<=75:192 if reading<=activityF5['Athlete']:193 fitness_level='Athlete'194 elif reading>activityF5['Athlete'] and reading<=activityF5['Excellent']:195 fitness_level='Excellent'196 elif reading>activityF5['Excellent'] and reading<=activityF5['Good']:197 fitness_level='Good'198 elif reading>activityF5['Good'] and reading<=activityF5['Above Average']:199 fitness_level='Above Average'200 elif reading>activityF5['Above Average'] and reading<=activityF5['Average']:201 fitness_level='Average'202 elif reading>activityF5['Average'] and reading<=activityF5['Below Average']:203 fitness_level='Below Average'204 elif reading>activityF5['Below Average'] and reading<=activityF5['Poor']:205 fitness_level='Poor'206 if age>75:207 if reading<=activityF6['Athlete']:208 fitness_level='Athlete'209 elif reading>activityF6['Athlete'] and reading<=activityF6['Excellent']:210 fitness_level='Excellent'211 elif reading>activityF6['Excellent'] and reading<=activityF6['Good']:212 fitness_level='Good'213 elif reading>activityF6['Good'] and reading<=activityF6['Above Average']:214 fitness_level='Above Average'215 elif reading>activityF6['Above Average'] and reading<=activityF6['Average']:216 fitness_level='Average'217 elif reading>activityF6['Average'] and reading<=activityF6['Below Average']:218 fitness_level='Below Average'219 elif reading>activityF6['Below Average'] and reading<=activityF6['Poor']:220 fitness_level='Poor'221 return(fitness_level)222223##x=appropriate_H_R(0,26,58)224##print(x)225import time226def count_heart_beats_per_minute(val,thresh=550):227 start=time.time()228 beats=0229 while time.time()-start<=60:230 if val>=thresh:231 beats+=1
...
CombDiacritMarks.js
Source:CombDiacritMarks.js
1/*************************************************************2 *3 * MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/CombDiacritMarks.js4 *5 * Copyright (c) 2009-2015 The MathJax Consortium6 *7 * Licensed under the Apache License, Version 2.0 (the "License");8 * you may not use this file except in compliance with the License.9 * You may obtain a copy of the License at10 *11 * http://www.apache.org/licenses/LICENSE-2.012 *13 * Unless required by applicable law or agreed to in writing, software14 * distributed under the License is distributed on an "AS IS" BASIS,15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.16 * See the License for the specific language governing permissions and17 * limitations under the License.18 *19 */20MathJax.Hub.Insert(21 MathJax.OutputJax['HTML-CSS'].FONTDATA.FONTS['STIXGeneral'],22 {23 0x305: [820,-770,0,-480,20], // COMBINING OVERLINE24 0x309: [751,-492,0,-307,-118], // COMBINING HOOK ABOVE25 0x30D: [700,-500,0,-250,-195], // COMBINING VERTICAL LINE ABOVE26 0x30E: [700,-500,0,-326,-133], // COMBINING DOUBLE VERTICAL LINE ABOVE27 0x30F: [678,-507,0,-401,-22], // COMBINING DOUBLE GRAVE ACCENT28 0x310: [767,-507,0,-373,-92], // COMBINING CANDRABINDU29 0x311: [664,-507,0,-373,-92], // COMBINING INVERTED BREVE30 0x312: [745,-502,0,-299,-160], // COMBINING TURNED COMMA ABOVE31 0x313: [745,-502,0,-299,-160], // COMBINING COMMA ABOVE32 0x314: [745,-502,0,-299,-160], // COMBINING REVERSED COMMA ABOVE33 0x315: [745,-502,0,-85,54], // COMBINING COMMA ABOVE RIGHT34 0x316: [-53,224,0,-351,-127], // COMBINING GRAVE ACCENT BELOW35 0x317: [-53,224,0,-371,-147], // COMBINING ACUTE ACCENT BELOW36 0x318: [-53,283,0,-397,-210], // COMBINING LEFT TACK BELOW37 0x319: [-53,283,0,-267,-80], // COMBINING RIGHT TACK BELOW38 0x31A: [735,-531,0,-380,-80], // COMBINING LEFT ANGLE ABOVE39 0x31B: [474,-345,0,-44,51], // COMBINING HORN40 0x31C: [-71,266,0,-360,-232], // COMBINING LEFT HALF RING BELOW41 0x31D: [-53,240,0,-345,-115], // COMBINING UP TACK BELOW42 0x31E: [-53,240,0,-345,-115], // COMBINING DOWN TACK BELOW43 0x31F: [-53,250,0,-326,-134], // COMBINING PLUS SIGN BELOW44 0x320: [-124,168,0,-326,-134], // COMBINING MINUS SIGN BELOW45 0x321: [75,287,0,-235,1], // COMBINING PALATALIZED HOOK BELOW46 0x322: [75,287,0,-54,182], // COMBINING RETROFLEX HOOK BELOW47 0x323: [-118,217,0,-280,-181], // COMBINING DOT BELOW48 0x324: [-119,218,0,-379,-81], // COMBINING DIAERESIS BELOW49 0x325: [-69,268,0,-329,-130], // COMBINING RING BELOW50 0x326: [-110,353,0,-299,-160], // COMBINING COMMA BELOW51 0x327: [0,215,0,-334,-125], // COMBINING CEDILLA52 0x328: [0,165,0,-322,-137], // COMBINING OGONEK53 0x329: [-102,234,0,-250,-210], // COMBINING VERTICAL LINE BELOW54 0x32A: [-98,235,0,-385,-73], // COMBINING BRIDGE BELOW55 0x32B: [-110,227,0,-380,-75], // COMBINING INVERTED DOUBLE ARCH BELOW56 0x32C: [-73,240,0,-385,-74], // COMBINING CARON BELOW57 0x32D: [-73,240,0,-385,-74], // COMBINING CIRCUMFLEX ACCENT BELOW58 0x32E: [-68,225,0,-370,-89], // COMBINING BREVE BELOW59 0x32F: [-59,216,0,-370,-89], // COMBINING INVERTED BREVE BELOW60 0x330: [-113,219,0,-395,-65], // COMBINING TILDE BELOW61 0x331: [-141,195,0,-385,-74], // COMBINING MACRON BELOW62 0x332: [-141,191,0,-480,20], // COMBINING LOW LINE63 0x333: [-141,300,0,-480,20], // COMBINING DOUBLE LOW LINE64 0x334: [320,-214,0,-401,-71], // COMBINING TILDE OVERLAY65 0x335: [274,-230,0,-384,-78], // COMBINING SHORT STROKE OVERLAY66 0x336: [274,-230,0,-480,20], // COMBINING LONG STROKE OVERLAY67 0x337: [580,74,0,-380,-41], // COMBINING SHORT SOLIDUS OVERLAY68 0x339: [-71,266,0,-280,-152], // COMBINING RIGHT HALF RING BELOW69 0x33A: [-53,190,0,-385,-73], // COMBINING INVERTED BRIDGE BELOW70 0x33B: [-53,227,0,-313,-147], // COMBINING SQUARE BELOW71 0x33C: [-65,189,0,-380,-79], // COMBINING SEAGULL BELOW72 0x33D: [715,-525,0,-326,-135], // COMBINING X ABOVE73 0x33E: [829,-499,0,-283,-177], // COMBINING VERTICAL TILDE74 0x33F: [928,-770,0,-480,20], // COMBINING DOUBLE OVERLINE75 0x346: [681,-538,0,-350,-68], // COMBINING BRIDGE ABOVE76 0x347: [-140,292,1,11,323], // ??77 0x34C: [777,-532,0,-386,-56], // COMBINING ALMOST EQUAL TO ABOVE78 0x359: [-65,367,0,-357,-87], // COMBINING ASTERISK BELOW79 0x35C: [-76,233,0,-373,295], // COMBINING DOUBLE BREVE BELOW80 0x360: [633,-517,0,-395,365], // COMBINING DOUBLE TILDE81 0x361: [664,-507,0,-373,295], // COMBINING DOUBLE INVERTED BREVE82 0x362: [-65,270,0,-395,355] // COMBINING DOUBLE RIGHTWARDS ARROW BELOW83 }84);...
Using AI Code Generation
1const { openBrowser, goto, closeBrowser } = require('taiko');2(async () => {3 try {4 await openBrowser();5 await goto("google.com");6 } catch (e) {7 console.error(e);8 } finally {9 await closeBrowser();10 }11})();12const { openBrowser, goto, closeBrowser } = require('taiko');13(async () => {14 try {15 await openBrowser();16 await goto("google.com");17 } catch (e) {18 console.error(e);19 } finally {20 await closeBrowser();21 }22})();23const { openBrowser, goto, closeBrowser } = require('taiko');24(async () => {25 try {26 await openBrowser();27 await goto("google.com");28 } catch (e) {29 console.error(e);30 } finally {31 await closeBrowser();32 }33})();34const { openBrowser, goto, closeBrowser } = require('taiko');35(async () => {36 try {37 await openBrowser();38 await goto("google.com");39 } catch (e) {40 console.error(e);41 } finally {42 await closeBrowser();43 }44})();45const { openBrowser, goto, closeBrowser } = require('taiko');46(async () => {47 try {48 await openBrowser();49 await goto("google.com");50 } catch (e) {51 console.error(e);52 } finally {53 await closeBrowser();54 }55})();56const { openBrowser, goto, closeBrowser } = require('taiko');57(async () => {58 try {59 await openBrowser();60 await goto("google.com");61 } catch (e) {62 console.error(e);63 } finally {64 await closeBrowser();65 }66})();67const { openBrowser, goto, closeBrowser } = require('taiko');68(async () => {69 try {70 await openBrowser();71 await goto("google.com");72 } catch (e) {73 console.error(e);74 } finally {75 await closeBrowser();76 }77})();78const { openBrowser, goto, closeBrowser } = require('taiko
Using AI Code Generation
1const { openBrowser, goto, click, closeBrowser } = require('taiko');2(async () => {3 try {4 await openBrowser();5 await goto("google.com");6 await click("Sign in");7 await click("Sign in",below("Sign in"));8 await closeBrowser();9 } catch (e) {10 console.error(e);11 } finally {12 }13})();14const { openBrowser, goto, click, closeBrowser } = require('taiko');15(async () => {16 try {17 await openBrowser();18 await goto("google.com");19 await click("Sign in");20 await click("Sign in",below("Sign in"));21 await closeBrowser();22 } catch (e) {23 console.error(e);24 } finally {25 }26})();27const { openBrowser, goto, click, closeBrowser } = require('taiko');28(async () => {29 try {30 await openBrowser();31 await goto("google.com");32 await click("Sign in");33 await click("Sign in",below("Sign in"));34 await closeBrowser();35 } catch (e) {36 console.error(e);37 } finally {38 }39})();40const { openBrowser, goto, click, closeBrowser } = require('taiko');41(async () => {42 try {43 await openBrowser();44 await goto("google.com");45 await click("Sign in");46 await click("Sign in",below("Sign in"));47 await closeBrowser();48 } catch (e) {49 console.error(e);50 } finally {51 }52})();53const { openBrowser, goto, click, closeBrowser } = require('taiko');54(async () => {55 try {56 await openBrowser();57 await goto("google.com");58 await click("Sign in");59 await click("Sign in",below("Sign in"));60 await closeBrowser();61 } catch (e) {62 console.error(e);63 } finally {64 }65})();66const { openBrowser, goto, click, closeBrowser } = require('taiko');67(async () => {68 try {69 await openBrowser();70 await goto("google.com");71 await click("Sign in");72 await click("
Using AI Code Generation
1const { openBrowser, goto, link, closeBrowser } = require('taiko');2(async () => {3 try {4 await openBrowser();5 await goto("www.google.com");6 await link("Gmail").exists();7 } catch (e) {8 console.error(e);9 } finally {10 await closeBrowser();11 }12})();
Using AI Code Generation
1import { openBrowser, goto, link, closeBrowser, below, write } from 'taiko';2(async () => {3 try {4 await openBrowser();5 await write('Taiko');6 await press('Enter');7 await link('Taiko - A Node.js library to automate end-to-end testing of web applications', below('Taiko is a Node.js library to automate end-to-end testing of web applications. It is a developer friendly tool that helps you to write tests in simple English.')).exists();8 } catch (e) {9 console.error(e);10 } finally {11 await closeBrowser();12 }13})();14import { openBrowser, goto, link, closeBrowser, below, write } from 'taiko';15(async () => {16 try {17 await openBrowser();18 await write('Taiko');19 await press('Enter');20 await link('Taiko - A Node.js library to automate end-to-end testing of web applications').exists();21 } catch (e) {22 console.error(e);23 } finally {24 await closeBrowser();25 }26})();27Is there a way to use the below() method?28link('Taiko - A Node.js library to automate end-to-end testing of web applications', below('Taiko is a Node.js library to automate end-to-end testing of web applications. It is a developer friendly tool that helps you to write tests in simple English.')).exists();29github.com/getgauge/taiko Issue: below() is not working properly when there is a link with same text in the page. Below is the code snippet to reproduce the issue. link('Taiko - A Node.js library to automate end-to-end testing of web applications', below('Taiko is a Node.js library to automate end-to-end testing of web applications. It
Using AI Code Generation
1import { openBrowser, goto, closeBrowser, write, click, link, screenshot, text, textBox, button, } from 'taiko';2(async () => {3 try {4 await openBrowser({ headless: false });5 await write("Taiko", into(textBox()));6 await click(button("Google Search"));7 await click(link("Taiko"))8 await screenshot({ path: 'screenshot.png' });9 await closeBrowser();10 } catch (error) {11 console.error(error);12 } finally {13 }14})();15import { openBrowser, goto, closeBrowser, write, click, link, screenshot, text, textBox, button, } from 'taiko';16(async () => {17 try {18 await openBrowser({ headless: false });19 await write("Taiko", into(textBox()));20 await click(button("Google Search"));21 await click(link("Taiko"))22 await screenshot({ path: 'screenshot.png' });23 await closeBrowser();24 } catch (error) {25 console.error(error);26 } finally {27 }28})();29await click(link("Taiko"))30await screenshot({ path: 'screenshot.png' });31await click(link("Taiko"))32await screenshot({ path: 'screenshot.png' });33await click(link("Taiko"))34await screenshot({ path: 'screenshot.png' });35await click(link("Taiko"))36await screenshot({ path: 'screenshot.png' });37await click(link("Taiko"))38await screenshot({ path: 's
Using AI Code Generation
1const { openBrowser, goto, closeBrowser, below, toRightOf, textBox, write, button, click, link, $, text, dropDown, select, image } = require('taiko');2(async () => {3 try {4 await openBrowser({ headless: false });5 await write("John", into(textBox(below("Name"))));6 await write("
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!