Modeling Tools

 
Using the High Dimensional Model Representation (HDMR) method to generate a reduced model for studying tropospheric alkane photochemistry*

Section I contains file downloads along with descriptions of files.
Section II contains procedures for running the code.

Section I: Computer codes and associated input data for download

A. fullmodel.tar contains the following code and related input data:

fullmodel.f the original box-model code of the full tropospheric alkane photochemistry
temperature.data diurnal temperature profile of the simulation
photo.data photochemical rate constants
rate.data andalrate.data other reaction rate constants
initial_full.dat initial conditions of the input chemical species
lsode2.o the compiled object of LSODE solver
B. dcalmodel.tar contains the following code and related input data:

dcal.f the code for solving the kinetic equations of reduced Direct Constrained Approximate Lumping (DCAL) mechanism of the tropospheric alkane photochemistry
temperature.data diurnal temperature profile of the simulation
photo.data photochemical rate constants
rate.data andalrate.data other reaction rate constants
initial_full.dat initial conditions of the input chemical species
C. hdmr.tar contains the following code and related input data:

hdmr.f the code for generating the tables of hierachical cut points in the high dimensional input variable space according to the cut-High Dimensional Model Representation (cut-HDMR) methodology
par_ranges.dat dynamic ranges for the input parameters
dcal_1st.f the dcal model code for generating the output responses according to the hierarchical input cut points up to 1st order HDMR expansion
dcal_2nd.f the dcal model code for generating the output responses according to the hierarchical input cut points for the 2nd order HDMR expansion
hdmrtab.f the code for processing the model outputs generated by dcal_1st.f and dcal_2nd.f with the cut-HDMR input points to generate the look-up tables of the HDMR expansion
feom1.f the code for performing the algebraic manipulation of the HDMR expansion terms from the 0th order to 1st order for predicting the kinetic outputs
feom2.f the code for performing the algebraic manipulation of the HDMR expansion terms from the 0th order to 2nd order for predicting the kinetic outputs
initial_lumped.dat the initial conditions of the lumped input species, which are produced by multiplying the full initial conditions (initial_full.dat) with the dcal lumping matrix
D. plots.tar contains the codes for generating diurnal concentration-time profiles for 4 different inorganic species using GNUPLOT

o3.gnu comparison of O3 profiles for full model, DCAL, and 1st order HDMR outputs
no2.gnu comparison of NO2 profiles for full model, DCAL, and 1st order HDMR outputs
no.gnu comparison of NO profiles for full model, DCAL, and 1st order HDMR outputs
oh.gnu comparison of OH profiles for full model, DCAL, and 1st order HDMR outputs

Section II: Procedures for running the code

A. Running the full model

The initial conditions of the 52 explicit chemical species are in the file initial_full.dat
Compile the code using f77 Fortran compiler: f77 –o full fullmodel.f lsode2.o
Submit the job by typing the executable filename: full
The simulation outputs are in the file fullmodel.out, which includes the diurnal profiles of the 52 explicit chemical species of the original full mechanism.
B. Running the dcal model

The initial conditions are the same as the full model (initial_full.dat)
Compile the code using f77 Fortran compiler: f77 –o dcal dcal.f lsode2.o
Submit the job by typing the executable filename: dcal
The simulation outputs are in the file dcal.out, which includes the diurnal profiles of the 25 species of the DCAL mechanism (21 explicit inorganic species, methane, and 3 lumped alkane species).
C. Running the HDMR code

Specify the number of input variables, dynamic ranges of the inputs (in this demonstration case, there are 6 inputs and the ranges are specified in par_ranges.dat)
Generate the sampling points in the input variable space by running the code of hdmr.f (in this demonstration case, two tables are produced, rhd1.in and rhd2.in, corresponding to the 1st and 2nd order HDMR expansion terms)
Perform the original model runs according to the sampling input points (in this demonstration case, the dcal_1st.f and dcal_2nd.f, are used to generate 1st order and 2nd order HDMR output responses, respectively)
Generate the HDMR look-up tables by running the code of hdmrtab.f (in this demonstration case, the outputs generated by dcal_1st.f and dcal_2nd.f [rhd1.out and rhd2.out] are processed by hdmrtab.f to produce the 1st and 2nd order HDMR look-up tables)
Perform the 1st order HDMR-reduced model simulation by running the code of feom1.f (the required inputs are the ranges of the inputs and the initial conditions of input species, which are the files par_ranges.dat and initial_lumped.dat for this demonstration case). The outputs are stored in the file dcal-feom1.out.
Perform the 2nd order HDMR-reduced model simulation by running the code of feom2.f (the required inputs are the ranges of the inputs and the initial conditions of input species, which are the files of par_ranges.dat and initial_lumped.dat for this demonstration case). The outputs are stored in the file of dcal-feom2.out.
D. Visualization of the simulation outputs

The scripts of plotting the diurnal concentration-time profiles for O3, NO2, NO, and OH are provided in the plot.tar.

*For further details of the study and HDMR methodology, refer to: Wang S.W., Balakrishnan S. and Georgopoulos P.G. (2005). Fast equivalent operational model of tropospheric alkane photochemistry.American Institute of Chemical Engineers Journal 51(4): 1297-1303 [DOI link]


facebooktwittergoogle_pluslinkedinmail