Skip to content

Commit

Permalink
Changed default OpenMP flag to false on account of overhead analysis …
Browse files Browse the repository at this point in the history
…needed before general reccomendations
  • Loading branch information
David Topping authored and David Topping committed Jul 19, 2018
1 parent fad9aa1 commit 20be6d6
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 68 deletions.
13 changes: 8 additions & 5 deletions Gas_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@
#-------------------------------------------------------------------------------------

#1)Define starting ambient conditions
temp=288.15 # Kelvin
temp=298.15 # Kelvin
RH=0.5 # RH/100% [0 - 0.99]
#Define a start time
hour_of_day=12.0 # 24 hr format
start_time=hour_of_day*60*60 # seconds, used as t0 in solver
simulation_time= 7200.0 # seconds
simulation_time= 10800.0 # seconds
batch_step=100.0 # seconds
#2)Generate constants used in rate of reaction calculations
#Convert RH to concentration of water vapour molecules [this will change when in Parcel model mode]
Expand Down Expand Up @@ -159,6 +159,9 @@
Parse_eqn_file.write_reactants_indices(filename,equations,num_species,species_dict2array,rate_dict_reactants,loss_dict)
Parse_eqn_file.write_loss_gain_matrix(filename,equations,num_species,loss_dict,gain_dict,species_dict2array)

print("Creating Python-Numba Jacobian")
Parse_eqn_file.write_gas_jacobian_numba(filename,equations,num_species,loss_dict,gain_dict,species_dict2array,rate_dict_reactants)

# Create .npy file with indices for all RO2 species
print("Creating file that holds RO2 species indices")
Parse_eqn_file.write_RO2_indices(filename,species_dict2array)
Expand All @@ -183,9 +186,9 @@
#-------------------------------------------------------------------------------------
# Define initial concentrations, in pbb, of species using names from KPP file
species_initial_conc=dict()
species_initial_conc['O3']=18.0
species_initial_conc['APINENE']=30.0
species_initial_conc['O3']=60.0
species_initial_conc['APINENE']=40.0

# Save this information to a dictionary to pass to ODE solver
input_dict=dict()
input_dict['species_dict']=species_dict
Expand Down

0 comments on commit 20be6d6

Please sign in to comment.