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

Improve the scripts in charge of generating velocity files for the different experiments #24

Closed bearecinos closed 2 years ago

bearecinos commented 2 years ago

@dngoldberg

I am making this PR, and this long comment to come back and document this changes on the wiki after the holidays.

This PR improves the way I name and produce velocity files. As we are going to start doing several experiments is nice to have a good naming convention for such files (even if the name turns out to be a bit long):

There are basically 3 different scripts in the 02_gridded_data folder to generate velocity files:

generate_vel_files.py

This is my original file to generate velocities from two different data products: MEaSUREs and ITSLive.

Options for the composite velocity mosaic:

Options for the cloud point velocity:

The code generates a .h5 file, with the corresponding velocity file suffix, depending on what has been chosen as data: e.g. *_itslive-comp_itslive-cloud_error-factor-1E+0

generate_subsampling_vel_files.py

This generates the subsampling of data (training and test files) and we can alter the std by a given factor if we wanted to.

Options for the composite velocity mosaic:

Options for the cloud point velocity (this script will always add cloud point data):

The code generates two .h5 files, with the corresponding velocity file suffix, depending on what has been chosen as data: e.g. *_itslive-comp_itslive-cloud_subsample-training-step-1E+1_error-factor-1E+0.h5 e.g. *_itslive-comp_itslive-cloud_subsample-test-step-1E+1_error-factor-1E+0.h5

generate_itslive_std_adjusted.py

This generates ITSLive velocity data only, with the STD of VX and VY adjusted to the absolute difference between MEaSUREs (interpolated to ITSLive grid) and ITSLive.

Options for the composite velocity mosaic:

Options for the cloud point velocity:

The code generates one or two .h5 files (if a step is chosen) with the corresponding velocity file suffix: e.g. *_itslive-comp_std-adjusted-cloud_subsample-training_step-1E+1.h5 e.g. *_itslive-comp_std-adjusted-cloud_subsample-test_step-1E+1.h5

If there is no subsampling: e.g. *_itslive-comp_std-adjusted-cloud_subsample-none_step-0E+0.h5

the * means that they all have the run name: smith_obs_vel_ as the beginning of the name

This PR also tides up some functions in velocity.py and adds a new function to write the tuple velocity files, in order to eliminate duplicate code .

Solves issues #23 #21 #18