Skip to content

Scripts for computing polynomial chaos expansion emulators of droplet activation using DAKOTA

Notifications You must be signed in to change notification settings

darothen/single_mode_chaos

Repository files navigation

Title Author Date
Single-mode Activation Parameterization using PCM / DAKOTA
Daniel Rothenberg
June 8, 2015

File Summary

Note that deprecated or non-maintained scripts are denoted with italics. Outputs enumerated here are those directly created by various scripts, which may be intercepted later on by postprocessing.ipynb (see [above][Output])

PCE Scripts

  1. dakota_poly.py: Representation of polynomial output by DAKOTA PCE routines in order to analyze coefficients, save for future use, or evaluate directly in Python.

  2. dist_tools.py: Collection of functions mapping various distributions to one another; design_lhs_exp() for performing LHS experiments.

  3. gen_scripts.py: Read a pre-configured PCE experiment from the data saved by the notebook and generate the DAKOTA and Python scripts for running the model.

    OUTPUT

    • model_run.py: Python interface to the model being analyzed via chaos expansion
    • model_pce.in: Driver script for DAKOTA chaos expansion
  4. process_outputs.py: Read the output from a DAKOTA PCE experiment in order to extract fitted polynomial.

  5. pce_experiment.ipynb: Main driver for customizing/tweaking PCE experiment.

    OUTPUT

    • ${exp_name}_exp.dict: dictionary with the setup of the PCE experiment, including the experiment name, the variables (and their parameter-space definitions), the body/name of the function, and the directive passed to DAKOTA
    • config.p: similar to above, but for a single particular PCE computation to be saved in its archive directory
    • ${exp_name}_results.dict: mapping of the iterated experiment results from DAKOTA, indicating which timestamped folder in the overall save/ directory archives the simulation results
  6. gen_nc.py: Convert chaos expansion output into a format readable by the CESM-MARC initialization routines OUTPUT

    • ${exp_name}.nc
  7. Templates

    • model_pce_parallel.template: Run DAKOTA in batch mode with asynchronous parcel model evaluations, driving the model with file I/O mode
    • model_pce.template: Use a direct Python interface to sequentially perform model evaluations
    • model_run_script.template: Run the model by reading an input file and writing an output file in order to interface with DAKOTA
    • model_run_linked.template: Run the model directly through a Python function call

Analysis Scripts

  1. pce_sample.py: Perform an LHS experiment over the parameter space defined for a simulation, running the model n_samples times. Saves the design (sample) points, their projection in z_space for evaluating with the PCE, and the results of evaluating hte model on the design points.

    OUTPUT

    • ${exp_name}_LHS_design.csv: A CSV containing the sample dataset points for all variables evaluating as part of the sampling study
    • ${exp_name}_LHS_design_result.csv: A CSV mapping the parameter samples from the design dataset to output for the model, chaos expansions, and alternative parameterizations
  2. pce_vis.py/pce_vis_old.py: Create some visualizations detailing the performance of a given PCE against the LHS study. Requires that pce_sample.py has been run on the same ${exp_name}!

  3. pcm_param.py: Generate a portable HDF5 file containing the data necessary to evaluate a polynomial chaos expansion; also implements the logic to quickly retrieve and evaluate the parameterization

    OUTPUT

    • pcm_param.h5: an HDF5 file containing the coefficient and term order vectors/matrices for a given sets of experiments with given expansion orders
  4. proc_sobol.py Process the output DAKOTA file for a set of experiments and produce DataFrames summarizing the Sobol indices for all the terms.

    OUTPUT

    • ${exp_name}_sobol.dict
    • sobol.df

Source Code

This code is archived on github.

About

Scripts for computing polynomial chaos expansion emulators of droplet activation using DAKOTA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages