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

change the way velocity files are being named #18

Closed bearecinos closed 2 years ago

bearecinos commented 2 years ago

At the moment we have two velocity file generators:

which name the files based on composite product, cloud product and error factor enhancement (args.error_factor: Enlarge error in observation by a factor):

composite = args.composite + '-comp_'
if args.add_cloud_data:
    file_suffix = composite + 'cloud' + "{:.0E}".format(Decimal(args.error_factor)) +'.h5'
else:
    file_suffix = args.composite + '-comp' + "{:.0E}".format(Decimal(args.error_factor)) + '.h5'

file_name = os.path.join(MAIN_PATH, config['smith_vel_obs']+file_suffix)
print(file_name)

which name the files based on composite product, cloud product and subsampling step (args.step: Sub-box size for the subsample):

composite = args.composite + '-comp'
if args.add_cloud_data:
    file_suffix = composite + 'cloud_subsampled' + "{:.0E}".format(Decimal(args.step)) +'.h5'
else:
    file_suffix = args.composite + '-comp' + "{:.0E}".format(Decimal(args.step)) + '.h5'

file_name = os.path.join(MAIN_PATH, config['smith_vel_obs']+file_suffix)
print(file_name)

file_test = os.path.join(MAIN_PATH, config['smith_vel_obs']+ '_test_data_' + file_suffix)

This is confusing me as I can confuse the decimal format string with the error factor and panic thinking I introduced an error factor in the sub-sampling when I haven't!

Fix solution add error_f or step_f to the names might help!

bearecinos commented 2 years ago

I just wanted to add this has been fixed in PR #24