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
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:
MEaSUREs
ITSLIVE
Options for the cloud point velocity:
Measures without filling gaps 2014
ITSLIVE without filling gaps 2014
It is possible to enhance the STD velocity error by a factor X by specifying -error_factor, as default this is equal to one.
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:
MEaSUREs
ITSLIVE
Options for the cloud point velocity (this script will always add cloud point data):
MEaSUREs without filling gaps 2014
ITSLIVE without filling gaps 2014
It is possible to subsample each cloud data set by selecting the top left value of every sub-grid box, which size is determined by the variable input: -step
It is possible to enhance the STD velocity error by a factor X, by specifying -error_factor as default this is equal to one (no enhancement).
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:
ITSLIVE only
Options for the cloud point velocity:
ITSLIVE 2014 (original)
ITSLIVE 2014 with STDvx and STDvy adjusted according to the following formula np.maxima(vx_err_s, np.abs(vx_s-vx_mi_s)), where vx_s-vx_mi_s is the absolute velocity difference between ITslive 2014 and MEaSUREs 2014 (MEaSUREs was interpolated to the itslive grid).
It is possible to subsample this data too, by selecting the top left value of every sub-grid box, which size is determined by the variable input: -step
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 .
@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:
-error_factor
, as default this is equal to one.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):
-step
-error_factor
as default this is equal to one (no enhancement).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:
np.maxima(vx_err_s, np.abs(vx_s-vx_mi_s))
, wherevx_s-vx_mi_s
is the absolute velocity difference between ITslive 2014 and MEaSUREs 2014 (MEaSUREs was interpolated to the itslive grid).-step
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 nameThis 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