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

linearity test plot #45

Closed bearecinos closed 1 year ago

bearecinos commented 1 year ago

I added a script under the path: /smith_glacier/scripts/post_processing/test_for_linearity.py

This script uses the function from utils_funcs.py compute_vertex_for_dV_components(), in order to compute the sensitivity components of each control parameter, then the dot product is calculated in the lines highlighted here.

Another thing I did in the script is that we need to interpolate the years for which we dont have data. I do the same thing as for VAF and sigma VAF. I use x and sigma_t for this.

x = dQ_t_c

and sigma_t comes from ...

    with open(sigmafile_c, 'rb') as f:
        out = pickle.load(f)
    sigma_vals_c = out[0]
    sigma_t_c = out[1]

I use numpy interp. for that...

dot_alpha_line = np.interp(qoi_dict_il['x'], qoi_dict_il['sigma_t'], results_dot_alpha)
dot_beta_line = np.interp(qoi_dict_il['x'], qoi_dict_il['sigma_t'], results_dot_beta)

Hopefully in the script you can follow the process. Let me know if I need to correct something...

bearecinos commented 1 year ago

@dngoldberg Ok I think I have addressed all your concerns regarding the linearity test and the labels for the sigma plots... check in overleaf the latest images

bearecinos commented 1 year ago

Ok I'm merging this because I need to work on the other two plots...