bearecinos / smith_glacier

Experiments with Fenics_ice over Smith, Pope, and Kohler Glaciers; three narrow ∼ 10 km wide, interconnected West Antarctic ice streams (Note: this repository documentation is still a work in progress).
1 stars 0 forks source link

organize tomls, generalize paths, better_names for configs #25

Closed bearecinos closed 2 years ago

bearecinos commented 2 years ago

@dngoldberg

This is a big PR just because I had to change several files in order to organize the repository. This is a good thing as we need to keep the code clean for all the many experiments to come.

data_products_exp_tomls

The old experiments toml's have been moved to /smith_glacier/scripts/run_experiments/run_workflow/data_products_exp_tomls, here we have:

itslive_exp_tomls

All the toml's for the experiments that only use itslive 2014 cloud data are now here /smith_glacier/scripts/run_experiments/run_workflow/itslive_exp_tomls/. Here we have a sub-folder with the toml's for the first itslive experiments:

  • subsampling (old priors and original std): smith_cloud_subsampling.toml
  • itslive complete but with the error enhance by a error factor 100, 10000 etc: smith_cloud_itslive_std_times_ef.toml

And in the main folder are the experiments that I will run over the next week:

  • smith_cloud_complete_std_adjusted_old_priors.toml
  • smith_cloud_subsampling_std_adjusted.toml
  • smith_cloud_subsampling_std_adjusted_new_priors.toml

new dependency: toml-cli

I also addressed issue #20 : potential inconsistency between paths in .toml and in bash scripts I fixed this by installing a new library: pip install toml-cli, I think is a very elegant way of not having to identify strings with sed but rather just replace an attribute directly.

This library allows to get and edit from the command line variables inside toml files, and automatically changes the file. All the shell scripts have been modified and now we will automatically change the toml's [io] input and output directories according to whatever is set in set_paths.sh:

toml set --toml-path $2 io.input_dir "$input_run_inv"
toml set --toml-path $2 io.output_dir "$run_inv_output_dir/output"
toml set --toml-path $2 io.diagnostics_dir "$run_inv_output_dir/diagnostics"

Now we can leave the directory paths empty in the toml:

input_dir = ""
output_dir = ""
diagnostics_dir = ""

This PR also addresses the new velocity file naming convention solving issue #18. The phase_suffix for each configuration file has also been address to match the run configuration solving issue #19

Also in all the configurations now we make sure we turn this on for the eigendecomposition test_ed = true