diff --git a/.gitignore b/.gitignore index e562f0397..334a67108 100644 --- a/.gitignore +++ b/.gitignore @@ -120,6 +120,9 @@ venv.bak/ *.zarr *.tif +# data file expection for test folder +!icepyx/tests/test_data/* + # data file exception for tracking info !clones.csv !views.csv diff --git a/icepyx/core/variables.py b/icepyx/core/variables.py index 58e5a1e8f..ffce55ca1 100644 --- a/icepyx/core/variables.py +++ b/icepyx/core/variables.py @@ -17,7 +17,7 @@ def list_of_dict_vals(input_dict): # REFACTOR: class needs better docstrings -# DevNote: currently this class is not tested +# DevNote: currently this class is partially tested class Variables: """ Get, create, interact, and manipulate lists of variables and variable paths diff --git a/icepyx/tests/expected_outputs/vars_avail_processed_ATL06_20191130112041_09860505_006_01.h5.txt b/icepyx/tests/expected_outputs/vars_avail_processed_ATL06_20191130112041_09860505_006_01.h5.txt new file mode 100644 index 000000000..2bb377f0a --- /dev/null +++ b/icepyx/tests/expected_outputs/vars_avail_processed_ATL06_20191130112041_09860505_006_01.h5.txt @@ -0,0 +1,594 @@ +ancillary_data/atlas_sdp_gps_epoch +ancillary_data/control +ancillary_data/data_end_utc +ancillary_data/data_start_utc +ancillary_data/end_cycle +ancillary_data/end_delta_time +ancillary_data/end_geoseg +ancillary_data/end_gpssow +ancillary_data/end_gpsweek +ancillary_data/end_orbit +ancillary_data/end_region +ancillary_data/end_rgt +ancillary_data/granule_end_utc +ancillary_data/granule_start_utc +ancillary_data/land_ice/dt_hist +ancillary_data/land_ice/fit_maxiter +ancillary_data/land_ice/fpb_maxiter +ancillary_data/land_ice/max_res_ids +ancillary_data/land_ice/min_dist +ancillary_data/land_ice/min_gain_th +ancillary_data/land_ice/min_n_pe +ancillary_data/land_ice/min_n_sel +ancillary_data/land_ice/min_signal_conf +ancillary_data/land_ice/n_hist +ancillary_data/land_ice/n_sigmas +ancillary_data/land_ice/nhist_bins +ancillary_data/land_ice/proc_interval +ancillary_data/land_ice/qs_lim_bsc +ancillary_data/land_ice/qs_lim_hrs +ancillary_data/land_ice/qs_lim_hsigma +ancillary_data/land_ice/qs_lim_msw +ancillary_data/land_ice/qs_lim_snr +ancillary_data/land_ice/qs_lim_sss +ancillary_data/land_ice/rbin_width +ancillary_data/land_ice/sigma_beam +ancillary_data/land_ice/sigma_tx +ancillary_data/land_ice/t_dead +ancillary_data/land_ice/txp_maxiter +ancillary_data/qa_at_interval +ancillary_data/release +ancillary_data/start_cycle +ancillary_data/start_delta_time +ancillary_data/start_geoseg +ancillary_data/start_gpssow +ancillary_data/start_gpsweek +ancillary_data/start_orbit +ancillary_data/start_region +ancillary_data/start_rgt +ancillary_data/version +gt1l/land_ice_segments/atl06_quality_summary +gt1l/land_ice_segments/bias_correction/fpb_mean_corr +gt1l/land_ice_segments/bias_correction/fpb_mean_corr_sigma +gt1l/land_ice_segments/bias_correction/fpb_med_corr +gt1l/land_ice_segments/bias_correction/fpb_med_corr_sigma +gt1l/land_ice_segments/bias_correction/fpb_n_corr +gt1l/land_ice_segments/bias_correction/med_r_fit +gt1l/land_ice_segments/bias_correction/tx_mean_corr +gt1l/land_ice_segments/bias_correction/tx_med_corr +gt1l/land_ice_segments/delta_time +gt1l/land_ice_segments/dem/dem_flag +gt1l/land_ice_segments/dem/dem_h +gt1l/land_ice_segments/dem/geoid_free2mean +gt1l/land_ice_segments/dem/geoid_h +gt1l/land_ice_segments/fit_statistics/dh_fit_dx +gt1l/land_ice_segments/fit_statistics/dh_fit_dx_sigma +gt1l/land_ice_segments/fit_statistics/dh_fit_dy +gt1l/land_ice_segments/fit_statistics/h_expected_rms +gt1l/land_ice_segments/fit_statistics/h_mean +gt1l/land_ice_segments/fit_statistics/h_rms_misfit +gt1l/land_ice_segments/fit_statistics/h_robust_sprd +gt1l/land_ice_segments/fit_statistics/n_fit_photons +gt1l/land_ice_segments/fit_statistics/n_seg_pulses +gt1l/land_ice_segments/fit_statistics/sigma_h_mean +gt1l/land_ice_segments/fit_statistics/signal_selection_source +gt1l/land_ice_segments/fit_statistics/signal_selection_source_status +gt1l/land_ice_segments/fit_statistics/snr +gt1l/land_ice_segments/fit_statistics/snr_significance +gt1l/land_ice_segments/fit_statistics/w_surface_window_final +gt1l/land_ice_segments/geophysical/bckgrd +gt1l/land_ice_segments/geophysical/bsnow_conf +gt1l/land_ice_segments/geophysical/bsnow_h +gt1l/land_ice_segments/geophysical/bsnow_od +gt1l/land_ice_segments/geophysical/cloud_flg_asr +gt1l/land_ice_segments/geophysical/cloud_flg_atm +gt1l/land_ice_segments/geophysical/dac +gt1l/land_ice_segments/geophysical/e_bckgrd +gt1l/land_ice_segments/geophysical/layer_flag +gt1l/land_ice_segments/geophysical/msw_flag +gt1l/land_ice_segments/geophysical/neutat_delay_total +gt1l/land_ice_segments/geophysical/r_eff +gt1l/land_ice_segments/geophysical/solar_azimuth +gt1l/land_ice_segments/geophysical/solar_elevation +gt1l/land_ice_segments/geophysical/tide_earth +gt1l/land_ice_segments/geophysical/tide_earth_free2mean +gt1l/land_ice_segments/geophysical/tide_equilibrium +gt1l/land_ice_segments/geophysical/tide_load +gt1l/land_ice_segments/geophysical/tide_ocean +gt1l/land_ice_segments/geophysical/tide_pole +gt1l/land_ice_segments/ground_track/ref_azimuth +gt1l/land_ice_segments/ground_track/ref_coelv +gt1l/land_ice_segments/ground_track/seg_azimuth +gt1l/land_ice_segments/ground_track/sigma_geo_at +gt1l/land_ice_segments/ground_track/sigma_geo_r +gt1l/land_ice_segments/ground_track/sigma_geo_xt +gt1l/land_ice_segments/ground_track/x_atc +gt1l/land_ice_segments/ground_track/y_atc +gt1l/land_ice_segments/h_li +gt1l/land_ice_segments/h_li_sigma +gt1l/land_ice_segments/latitude +gt1l/land_ice_segments/longitude +gt1l/land_ice_segments/segment_id +gt1l/land_ice_segments/sigma_geo_h +gt1l/residual_histogram/bckgrd_per_m +gt1l/residual_histogram/bin_top_h +gt1l/residual_histogram/count +gt1l/residual_histogram/delta_time +gt1l/residual_histogram/ds_segment_id +gt1l/residual_histogram/lat_mean +gt1l/residual_histogram/lon_mean +gt1l/residual_histogram/pulse_count +gt1l/residual_histogram/segment_id_list +gt1l/residual_histogram/x_atc_mean +gt1l/segment_quality/delta_time +gt1l/segment_quality/record_number +gt1l/segment_quality/reference_pt_lat +gt1l/segment_quality/reference_pt_lon +gt1l/segment_quality/segment_id +gt1l/segment_quality/signal_selection_source +gt1l/segment_quality/signal_selection_status/signal_selection_status_all +gt1l/segment_quality/signal_selection_status/signal_selection_status_backup +gt1l/segment_quality/signal_selection_status/signal_selection_status_confident +gt1r/land_ice_segments/atl06_quality_summary +gt1r/land_ice_segments/bias_correction/fpb_mean_corr +gt1r/land_ice_segments/bias_correction/fpb_mean_corr_sigma +gt1r/land_ice_segments/bias_correction/fpb_med_corr +gt1r/land_ice_segments/bias_correction/fpb_med_corr_sigma +gt1r/land_ice_segments/bias_correction/fpb_n_corr +gt1r/land_ice_segments/bias_correction/med_r_fit +gt1r/land_ice_segments/bias_correction/tx_mean_corr +gt1r/land_ice_segments/bias_correction/tx_med_corr +gt1r/land_ice_segments/delta_time +gt1r/land_ice_segments/dem/dem_flag +gt1r/land_ice_segments/dem/dem_h +gt1r/land_ice_segments/dem/geoid_free2mean +gt1r/land_ice_segments/dem/geoid_h +gt1r/land_ice_segments/fit_statistics/dh_fit_dx +gt1r/land_ice_segments/fit_statistics/dh_fit_dx_sigma +gt1r/land_ice_segments/fit_statistics/dh_fit_dy +gt1r/land_ice_segments/fit_statistics/h_expected_rms +gt1r/land_ice_segments/fit_statistics/h_mean +gt1r/land_ice_segments/fit_statistics/h_rms_misfit +gt1r/land_ice_segments/fit_statistics/h_robust_sprd +gt1r/land_ice_segments/fit_statistics/n_fit_photons +gt1r/land_ice_segments/fit_statistics/n_seg_pulses +gt1r/land_ice_segments/fit_statistics/sigma_h_mean +gt1r/land_ice_segments/fit_statistics/signal_selection_source +gt1r/land_ice_segments/fit_statistics/signal_selection_source_status +gt1r/land_ice_segments/fit_statistics/snr +gt1r/land_ice_segments/fit_statistics/snr_significance +gt1r/land_ice_segments/fit_statistics/w_surface_window_final +gt1r/land_ice_segments/geophysical/bckgrd +gt1r/land_ice_segments/geophysical/bsnow_conf +gt1r/land_ice_segments/geophysical/bsnow_h +gt1r/land_ice_segments/geophysical/bsnow_od +gt1r/land_ice_segments/geophysical/cloud_flg_asr +gt1r/land_ice_segments/geophysical/cloud_flg_atm +gt1r/land_ice_segments/geophysical/dac +gt1r/land_ice_segments/geophysical/e_bckgrd +gt1r/land_ice_segments/geophysical/layer_flag +gt1r/land_ice_segments/geophysical/msw_flag +gt1r/land_ice_segments/geophysical/neutat_delay_total +gt1r/land_ice_segments/geophysical/r_eff +gt1r/land_ice_segments/geophysical/solar_azimuth +gt1r/land_ice_segments/geophysical/solar_elevation +gt1r/land_ice_segments/geophysical/tide_earth +gt1r/land_ice_segments/geophysical/tide_earth_free2mean +gt1r/land_ice_segments/geophysical/tide_equilibrium +gt1r/land_ice_segments/geophysical/tide_load +gt1r/land_ice_segments/geophysical/tide_ocean +gt1r/land_ice_segments/geophysical/tide_pole +gt1r/land_ice_segments/ground_track/ref_azimuth +gt1r/land_ice_segments/ground_track/ref_coelv +gt1r/land_ice_segments/ground_track/seg_azimuth +gt1r/land_ice_segments/ground_track/sigma_geo_at +gt1r/land_ice_segments/ground_track/sigma_geo_r +gt1r/land_ice_segments/ground_track/sigma_geo_xt +gt1r/land_ice_segments/ground_track/x_atc +gt1r/land_ice_segments/ground_track/y_atc +gt1r/land_ice_segments/h_li +gt1r/land_ice_segments/h_li_sigma +gt1r/land_ice_segments/latitude +gt1r/land_ice_segments/longitude +gt1r/land_ice_segments/segment_id +gt1r/land_ice_segments/sigma_geo_h +gt1r/residual_histogram/bckgrd_per_m +gt1r/residual_histogram/bin_top_h +gt1r/residual_histogram/count +gt1r/residual_histogram/delta_time +gt1r/residual_histogram/ds_segment_id +gt1r/residual_histogram/lat_mean +gt1r/residual_histogram/lon_mean +gt1r/residual_histogram/pulse_count +gt1r/residual_histogram/segment_id_list +gt1r/residual_histogram/x_atc_mean +gt1r/segment_quality/delta_time +gt1r/segment_quality/record_number +gt1r/segment_quality/reference_pt_lat +gt1r/segment_quality/reference_pt_lon +gt1r/segment_quality/segment_id +gt1r/segment_quality/signal_selection_source +gt1r/segment_quality/signal_selection_status/signal_selection_status_all +gt1r/segment_quality/signal_selection_status/signal_selection_status_backup +gt1r/segment_quality/signal_selection_status/signal_selection_status_confident +gt2l/land_ice_segments/atl06_quality_summary +gt2l/land_ice_segments/bias_correction/fpb_mean_corr +gt2l/land_ice_segments/bias_correction/fpb_mean_corr_sigma +gt2l/land_ice_segments/bias_correction/fpb_med_corr +gt2l/land_ice_segments/bias_correction/fpb_med_corr_sigma +gt2l/land_ice_segments/bias_correction/fpb_n_corr +gt2l/land_ice_segments/bias_correction/med_r_fit +gt2l/land_ice_segments/bias_correction/tx_mean_corr +gt2l/land_ice_segments/bias_correction/tx_med_corr +gt2l/land_ice_segments/delta_time +gt2l/land_ice_segments/dem/dem_flag +gt2l/land_ice_segments/dem/dem_h +gt2l/land_ice_segments/dem/geoid_free2mean +gt2l/land_ice_segments/dem/geoid_h +gt2l/land_ice_segments/fit_statistics/dh_fit_dx +gt2l/land_ice_segments/fit_statistics/dh_fit_dx_sigma +gt2l/land_ice_segments/fit_statistics/dh_fit_dy +gt2l/land_ice_segments/fit_statistics/h_expected_rms +gt2l/land_ice_segments/fit_statistics/h_mean +gt2l/land_ice_segments/fit_statistics/h_rms_misfit +gt2l/land_ice_segments/fit_statistics/h_robust_sprd +gt2l/land_ice_segments/fit_statistics/n_fit_photons +gt2l/land_ice_segments/fit_statistics/n_seg_pulses +gt2l/land_ice_segments/fit_statistics/sigma_h_mean +gt2l/land_ice_segments/fit_statistics/signal_selection_source +gt2l/land_ice_segments/fit_statistics/signal_selection_source_status +gt2l/land_ice_segments/fit_statistics/snr +gt2l/land_ice_segments/fit_statistics/snr_significance +gt2l/land_ice_segments/fit_statistics/w_surface_window_final +gt2l/land_ice_segments/geophysical/bckgrd +gt2l/land_ice_segments/geophysical/bsnow_conf +gt2l/land_ice_segments/geophysical/bsnow_h +gt2l/land_ice_segments/geophysical/bsnow_od +gt2l/land_ice_segments/geophysical/cloud_flg_asr +gt2l/land_ice_segments/geophysical/cloud_flg_atm +gt2l/land_ice_segments/geophysical/dac +gt2l/land_ice_segments/geophysical/e_bckgrd +gt2l/land_ice_segments/geophysical/layer_flag +gt2l/land_ice_segments/geophysical/msw_flag +gt2l/land_ice_segments/geophysical/neutat_delay_total +gt2l/land_ice_segments/geophysical/r_eff +gt2l/land_ice_segments/geophysical/solar_azimuth +gt2l/land_ice_segments/geophysical/solar_elevation +gt2l/land_ice_segments/geophysical/tide_earth +gt2l/land_ice_segments/geophysical/tide_earth_free2mean +gt2l/land_ice_segments/geophysical/tide_equilibrium +gt2l/land_ice_segments/geophysical/tide_load +gt2l/land_ice_segments/geophysical/tide_ocean +gt2l/land_ice_segments/geophysical/tide_pole +gt2l/land_ice_segments/ground_track/ref_azimuth +gt2l/land_ice_segments/ground_track/ref_coelv +gt2l/land_ice_segments/ground_track/seg_azimuth +gt2l/land_ice_segments/ground_track/sigma_geo_at +gt2l/land_ice_segments/ground_track/sigma_geo_r +gt2l/land_ice_segments/ground_track/sigma_geo_xt +gt2l/land_ice_segments/ground_track/x_atc +gt2l/land_ice_segments/ground_track/y_atc +gt2l/land_ice_segments/h_li +gt2l/land_ice_segments/h_li_sigma +gt2l/land_ice_segments/latitude +gt2l/land_ice_segments/longitude +gt2l/land_ice_segments/segment_id +gt2l/land_ice_segments/sigma_geo_h +gt2l/residual_histogram/bckgrd_per_m +gt2l/residual_histogram/bin_top_h +gt2l/residual_histogram/count +gt2l/residual_histogram/delta_time +gt2l/residual_histogram/ds_segment_id +gt2l/residual_histogram/lat_mean +gt2l/residual_histogram/lon_mean +gt2l/residual_histogram/pulse_count +gt2l/residual_histogram/segment_id_list +gt2l/residual_histogram/x_atc_mean +gt2l/segment_quality/delta_time +gt2l/segment_quality/record_number +gt2l/segment_quality/reference_pt_lat +gt2l/segment_quality/reference_pt_lon +gt2l/segment_quality/segment_id +gt2l/segment_quality/signal_selection_source +gt2l/segment_quality/signal_selection_status/signal_selection_status_all +gt2l/segment_quality/signal_selection_status/signal_selection_status_backup +gt2l/segment_quality/signal_selection_status/signal_selection_status_confident +gt2r/land_ice_segments/atl06_quality_summary +gt2r/land_ice_segments/bias_correction/fpb_mean_corr +gt2r/land_ice_segments/bias_correction/fpb_mean_corr_sigma +gt2r/land_ice_segments/bias_correction/fpb_med_corr +gt2r/land_ice_segments/bias_correction/fpb_med_corr_sigma +gt2r/land_ice_segments/bias_correction/fpb_n_corr +gt2r/land_ice_segments/bias_correction/med_r_fit +gt2r/land_ice_segments/bias_correction/tx_mean_corr +gt2r/land_ice_segments/bias_correction/tx_med_corr +gt2r/land_ice_segments/delta_time +gt2r/land_ice_segments/dem/dem_flag +gt2r/land_ice_segments/dem/dem_h +gt2r/land_ice_segments/dem/geoid_free2mean +gt2r/land_ice_segments/dem/geoid_h +gt2r/land_ice_segments/fit_statistics/dh_fit_dx +gt2r/land_ice_segments/fit_statistics/dh_fit_dx_sigma +gt2r/land_ice_segments/fit_statistics/dh_fit_dy +gt2r/land_ice_segments/fit_statistics/h_expected_rms +gt2r/land_ice_segments/fit_statistics/h_mean +gt2r/land_ice_segments/fit_statistics/h_rms_misfit +gt2r/land_ice_segments/fit_statistics/h_robust_sprd +gt2r/land_ice_segments/fit_statistics/n_fit_photons +gt2r/land_ice_segments/fit_statistics/n_seg_pulses +gt2r/land_ice_segments/fit_statistics/sigma_h_mean +gt2r/land_ice_segments/fit_statistics/signal_selection_source +gt2r/land_ice_segments/fit_statistics/signal_selection_source_status +gt2r/land_ice_segments/fit_statistics/snr +gt2r/land_ice_segments/fit_statistics/snr_significance +gt2r/land_ice_segments/fit_statistics/w_surface_window_final +gt2r/land_ice_segments/geophysical/bckgrd +gt2r/land_ice_segments/geophysical/bsnow_conf +gt2r/land_ice_segments/geophysical/bsnow_h +gt2r/land_ice_segments/geophysical/bsnow_od +gt2r/land_ice_segments/geophysical/cloud_flg_asr +gt2r/land_ice_segments/geophysical/cloud_flg_atm +gt2r/land_ice_segments/geophysical/dac +gt2r/land_ice_segments/geophysical/e_bckgrd +gt2r/land_ice_segments/geophysical/layer_flag +gt2r/land_ice_segments/geophysical/msw_flag +gt2r/land_ice_segments/geophysical/neutat_delay_total +gt2r/land_ice_segments/geophysical/r_eff +gt2r/land_ice_segments/geophysical/solar_azimuth +gt2r/land_ice_segments/geophysical/solar_elevation +gt2r/land_ice_segments/geophysical/tide_earth +gt2r/land_ice_segments/geophysical/tide_earth_free2mean +gt2r/land_ice_segments/geophysical/tide_equilibrium +gt2r/land_ice_segments/geophysical/tide_load +gt2r/land_ice_segments/geophysical/tide_ocean +gt2r/land_ice_segments/geophysical/tide_pole +gt2r/land_ice_segments/ground_track/ref_azimuth +gt2r/land_ice_segments/ground_track/ref_coelv +gt2r/land_ice_segments/ground_track/seg_azimuth +gt2r/land_ice_segments/ground_track/sigma_geo_at +gt2r/land_ice_segments/ground_track/sigma_geo_r +gt2r/land_ice_segments/ground_track/sigma_geo_xt +gt2r/land_ice_segments/ground_track/x_atc +gt2r/land_ice_segments/ground_track/y_atc +gt2r/land_ice_segments/h_li +gt2r/land_ice_segments/h_li_sigma +gt2r/land_ice_segments/latitude +gt2r/land_ice_segments/longitude +gt2r/land_ice_segments/segment_id +gt2r/land_ice_segments/sigma_geo_h +gt2r/residual_histogram/bckgrd_per_m +gt2r/residual_histogram/bin_top_h +gt2r/residual_histogram/count +gt2r/residual_histogram/delta_time +gt2r/residual_histogram/ds_segment_id +gt2r/residual_histogram/lat_mean +gt2r/residual_histogram/lon_mean +gt2r/residual_histogram/pulse_count +gt2r/residual_histogram/segment_id_list +gt2r/residual_histogram/x_atc_mean +gt2r/segment_quality/delta_time +gt2r/segment_quality/record_number +gt2r/segment_quality/reference_pt_lat +gt2r/segment_quality/reference_pt_lon +gt2r/segment_quality/segment_id +gt2r/segment_quality/signal_selection_source +gt2r/segment_quality/signal_selection_status/signal_selection_status_all +gt2r/segment_quality/signal_selection_status/signal_selection_status_backup +gt2r/segment_quality/signal_selection_status/signal_selection_status_confident +gt3l/land_ice_segments/atl06_quality_summary +gt3l/land_ice_segments/bias_correction/fpb_mean_corr +gt3l/land_ice_segments/bias_correction/fpb_mean_corr_sigma +gt3l/land_ice_segments/bias_correction/fpb_med_corr +gt3l/land_ice_segments/bias_correction/fpb_med_corr_sigma +gt3l/land_ice_segments/bias_correction/fpb_n_corr +gt3l/land_ice_segments/bias_correction/med_r_fit +gt3l/land_ice_segments/bias_correction/tx_mean_corr +gt3l/land_ice_segments/bias_correction/tx_med_corr +gt3l/land_ice_segments/delta_time +gt3l/land_ice_segments/dem/dem_flag +gt3l/land_ice_segments/dem/dem_h +gt3l/land_ice_segments/dem/geoid_free2mean +gt3l/land_ice_segments/dem/geoid_h +gt3l/land_ice_segments/fit_statistics/dh_fit_dx +gt3l/land_ice_segments/fit_statistics/dh_fit_dx_sigma +gt3l/land_ice_segments/fit_statistics/dh_fit_dy +gt3l/land_ice_segments/fit_statistics/h_expected_rms +gt3l/land_ice_segments/fit_statistics/h_mean +gt3l/land_ice_segments/fit_statistics/h_rms_misfit +gt3l/land_ice_segments/fit_statistics/h_robust_sprd +gt3l/land_ice_segments/fit_statistics/n_fit_photons +gt3l/land_ice_segments/fit_statistics/n_seg_pulses +gt3l/land_ice_segments/fit_statistics/sigma_h_mean +gt3l/land_ice_segments/fit_statistics/signal_selection_source +gt3l/land_ice_segments/fit_statistics/signal_selection_source_status +gt3l/land_ice_segments/fit_statistics/snr +gt3l/land_ice_segments/fit_statistics/snr_significance +gt3l/land_ice_segments/fit_statistics/w_surface_window_final +gt3l/land_ice_segments/geophysical/bckgrd +gt3l/land_ice_segments/geophysical/bsnow_conf +gt3l/land_ice_segments/geophysical/bsnow_h +gt3l/land_ice_segments/geophysical/bsnow_od +gt3l/land_ice_segments/geophysical/cloud_flg_asr +gt3l/land_ice_segments/geophysical/cloud_flg_atm +gt3l/land_ice_segments/geophysical/dac +gt3l/land_ice_segments/geophysical/e_bckgrd +gt3l/land_ice_segments/geophysical/layer_flag +gt3l/land_ice_segments/geophysical/msw_flag +gt3l/land_ice_segments/geophysical/neutat_delay_total +gt3l/land_ice_segments/geophysical/r_eff +gt3l/land_ice_segments/geophysical/solar_azimuth +gt3l/land_ice_segments/geophysical/solar_elevation +gt3l/land_ice_segments/geophysical/tide_earth +gt3l/land_ice_segments/geophysical/tide_earth_free2mean +gt3l/land_ice_segments/geophysical/tide_equilibrium +gt3l/land_ice_segments/geophysical/tide_load +gt3l/land_ice_segments/geophysical/tide_ocean +gt3l/land_ice_segments/geophysical/tide_pole +gt3l/land_ice_segments/ground_track/ref_azimuth +gt3l/land_ice_segments/ground_track/ref_coelv +gt3l/land_ice_segments/ground_track/seg_azimuth +gt3l/land_ice_segments/ground_track/sigma_geo_at +gt3l/land_ice_segments/ground_track/sigma_geo_r +gt3l/land_ice_segments/ground_track/sigma_geo_xt +gt3l/land_ice_segments/ground_track/x_atc +gt3l/land_ice_segments/ground_track/y_atc +gt3l/land_ice_segments/h_li +gt3l/land_ice_segments/h_li_sigma +gt3l/land_ice_segments/latitude +gt3l/land_ice_segments/longitude +gt3l/land_ice_segments/segment_id +gt3l/land_ice_segments/sigma_geo_h +gt3l/residual_histogram/bckgrd_per_m +gt3l/residual_histogram/bin_top_h +gt3l/residual_histogram/count +gt3l/residual_histogram/delta_time +gt3l/residual_histogram/ds_segment_id +gt3l/residual_histogram/lat_mean +gt3l/residual_histogram/lon_mean +gt3l/residual_histogram/pulse_count +gt3l/residual_histogram/segment_id_list +gt3l/residual_histogram/x_atc_mean +gt3l/segment_quality/delta_time +gt3l/segment_quality/record_number +gt3l/segment_quality/reference_pt_lat +gt3l/segment_quality/reference_pt_lon +gt3l/segment_quality/segment_id +gt3l/segment_quality/signal_selection_source +gt3l/segment_quality/signal_selection_status/signal_selection_status_all +gt3l/segment_quality/signal_selection_status/signal_selection_status_backup +gt3l/segment_quality/signal_selection_status/signal_selection_status_confident +gt3r/land_ice_segments/atl06_quality_summary +gt3r/land_ice_segments/bias_correction/fpb_mean_corr +gt3r/land_ice_segments/bias_correction/fpb_mean_corr_sigma +gt3r/land_ice_segments/bias_correction/fpb_med_corr +gt3r/land_ice_segments/bias_correction/fpb_med_corr_sigma +gt3r/land_ice_segments/bias_correction/fpb_n_corr +gt3r/land_ice_segments/bias_correction/med_r_fit +gt3r/land_ice_segments/bias_correction/tx_mean_corr +gt3r/land_ice_segments/bias_correction/tx_med_corr +gt3r/land_ice_segments/delta_time +gt3r/land_ice_segments/dem/dem_flag +gt3r/land_ice_segments/dem/dem_h +gt3r/land_ice_segments/dem/geoid_free2mean +gt3r/land_ice_segments/dem/geoid_h +gt3r/land_ice_segments/fit_statistics/dh_fit_dx +gt3r/land_ice_segments/fit_statistics/dh_fit_dx_sigma +gt3r/land_ice_segments/fit_statistics/dh_fit_dy +gt3r/land_ice_segments/fit_statistics/h_expected_rms +gt3r/land_ice_segments/fit_statistics/h_mean +gt3r/land_ice_segments/fit_statistics/h_rms_misfit +gt3r/land_ice_segments/fit_statistics/h_robust_sprd +gt3r/land_ice_segments/fit_statistics/n_fit_photons +gt3r/land_ice_segments/fit_statistics/n_seg_pulses +gt3r/land_ice_segments/fit_statistics/sigma_h_mean +gt3r/land_ice_segments/fit_statistics/signal_selection_source +gt3r/land_ice_segments/fit_statistics/signal_selection_source_status +gt3r/land_ice_segments/fit_statistics/snr +gt3r/land_ice_segments/fit_statistics/snr_significance +gt3r/land_ice_segments/fit_statistics/w_surface_window_final +gt3r/land_ice_segments/geophysical/bckgrd +gt3r/land_ice_segments/geophysical/bsnow_conf +gt3r/land_ice_segments/geophysical/bsnow_h +gt3r/land_ice_segments/geophysical/bsnow_od +gt3r/land_ice_segments/geophysical/cloud_flg_asr +gt3r/land_ice_segments/geophysical/cloud_flg_atm +gt3r/land_ice_segments/geophysical/dac +gt3r/land_ice_segments/geophysical/e_bckgrd +gt3r/land_ice_segments/geophysical/layer_flag +gt3r/land_ice_segments/geophysical/msw_flag +gt3r/land_ice_segments/geophysical/neutat_delay_total +gt3r/land_ice_segments/geophysical/r_eff +gt3r/land_ice_segments/geophysical/solar_azimuth +gt3r/land_ice_segments/geophysical/solar_elevation +gt3r/land_ice_segments/geophysical/tide_earth +gt3r/land_ice_segments/geophysical/tide_earth_free2mean +gt3r/land_ice_segments/geophysical/tide_equilibrium +gt3r/land_ice_segments/geophysical/tide_load +gt3r/land_ice_segments/geophysical/tide_ocean +gt3r/land_ice_segments/geophysical/tide_pole +gt3r/land_ice_segments/ground_track/ref_azimuth +gt3r/land_ice_segments/ground_track/ref_coelv +gt3r/land_ice_segments/ground_track/seg_azimuth +gt3r/land_ice_segments/ground_track/sigma_geo_at +gt3r/land_ice_segments/ground_track/sigma_geo_r +gt3r/land_ice_segments/ground_track/sigma_geo_xt +gt3r/land_ice_segments/ground_track/x_atc +gt3r/land_ice_segments/ground_track/y_atc +gt3r/land_ice_segments/h_li +gt3r/land_ice_segments/h_li_sigma +gt3r/land_ice_segments/latitude +gt3r/land_ice_segments/longitude +gt3r/land_ice_segments/segment_id +gt3r/land_ice_segments/sigma_geo_h +gt3r/residual_histogram/bckgrd_per_m +gt3r/residual_histogram/bin_top_h +gt3r/residual_histogram/count +gt3r/residual_histogram/delta_time +gt3r/residual_histogram/ds_segment_id +gt3r/residual_histogram/lat_mean +gt3r/residual_histogram/lon_mean +gt3r/residual_histogram/pulse_count +gt3r/residual_histogram/segment_id_list +gt3r/residual_histogram/x_atc_mean +gt3r/segment_quality/delta_time +gt3r/segment_quality/record_number +gt3r/segment_quality/reference_pt_lat +gt3r/segment_quality/reference_pt_lon +gt3r/segment_quality/segment_id +gt3r/segment_quality/signal_selection_source +gt3r/segment_quality/signal_selection_status/signal_selection_status_all +gt3r/segment_quality/signal_selection_status/signal_selection_status_backup +gt3r/segment_quality/signal_selection_status/signal_selection_status_confident +orbit_info/bounding_polygon_lat1 +orbit_info/bounding_polygon_lon1 +orbit_info/crossing_time +orbit_info/cycle_number +orbit_info/lan +orbit_info/orbit_number +orbit_info/rgt +orbit_info/sc_orient +orbit_info/sc_orient_time +quality_assessment/gt1l/delta_time +quality_assessment/gt1l/lat_mean +quality_assessment/gt1l/lon_mean +quality_assessment/gt1l/signal_selection_source_fraction_0 +quality_assessment/gt1l/signal_selection_source_fraction_1 +quality_assessment/gt1l/signal_selection_source_fraction_2 +quality_assessment/gt1l/signal_selection_source_fraction_3 +quality_assessment/gt1r/delta_time +quality_assessment/gt1r/lat_mean +quality_assessment/gt1r/lon_mean +quality_assessment/gt1r/signal_selection_source_fraction_0 +quality_assessment/gt1r/signal_selection_source_fraction_1 +quality_assessment/gt1r/signal_selection_source_fraction_2 +quality_assessment/gt1r/signal_selection_source_fraction_3 +quality_assessment/gt2l/delta_time +quality_assessment/gt2l/lat_mean +quality_assessment/gt2l/lon_mean +quality_assessment/gt2l/signal_selection_source_fraction_0 +quality_assessment/gt2l/signal_selection_source_fraction_1 +quality_assessment/gt2l/signal_selection_source_fraction_2 +quality_assessment/gt2l/signal_selection_source_fraction_3 +quality_assessment/gt2r/delta_time +quality_assessment/gt2r/lat_mean +quality_assessment/gt2r/lon_mean +quality_assessment/gt2r/signal_selection_source_fraction_0 +quality_assessment/gt2r/signal_selection_source_fraction_1 +quality_assessment/gt2r/signal_selection_source_fraction_2 +quality_assessment/gt2r/signal_selection_source_fraction_3 +quality_assessment/gt3l/delta_time +quality_assessment/gt3l/lat_mean +quality_assessment/gt3l/lon_mean +quality_assessment/gt3l/signal_selection_source_fraction_0 +quality_assessment/gt3l/signal_selection_source_fraction_1 +quality_assessment/gt3l/signal_selection_source_fraction_2 +quality_assessment/gt3l/signal_selection_source_fraction_3 +quality_assessment/gt3r/delta_time +quality_assessment/gt3r/lat_mean +quality_assessment/gt3r/lon_mean +quality_assessment/gt3r/signal_selection_source_fraction_0 +quality_assessment/gt3r/signal_selection_source_fraction_1 +quality_assessment/gt3r/signal_selection_source_fraction_2 +quality_assessment/gt3r/signal_selection_source_fraction_3 +quality_assessment/qa_granule_fail_reason +quality_assessment/qa_granule_pass_fail \ No newline at end of file diff --git a/icepyx/tests/expected_outputs/vars_default_processed_ATL06_20191130112041_09860505_006_01.json b/icepyx/tests/expected_outputs/vars_default_processed_ATL06_20191130112041_09860505_006_01.json new file mode 100644 index 000000000..f41296d6c --- /dev/null +++ b/icepyx/tests/expected_outputs/vars_default_processed_ATL06_20191130112041_09860505_006_01.json @@ -0,0 +1,282 @@ +{ + "sc_orient": [ + "orbit_info/sc_orient" + ], + "atlas_sdp_gps_epoch": [ + "ancillary_data/atlas_sdp_gps_epoch" + ], + "cycle_number": [ + "orbit_info/cycle_number" + ], + "rgt": [ + "orbit_info/rgt" + ], + "data_start_utc": [ + "ancillary_data/data_start_utc" + ], + "data_end_utc": [ + "ancillary_data/data_end_utc" + ], + "delta_time": [ + "gt1l/land_ice_segments/delta_time", + "gt1l/residual_histogram/delta_time", + "gt1l/segment_quality/delta_time", + "gt1r/land_ice_segments/delta_time", + "gt1r/residual_histogram/delta_time", + "gt1r/segment_quality/delta_time", + "gt2l/land_ice_segments/delta_time", + "gt2l/residual_histogram/delta_time", + "gt2l/segment_quality/delta_time", + "gt2r/land_ice_segments/delta_time", + "gt2r/residual_histogram/delta_time", + "gt2r/segment_quality/delta_time", + "gt3l/land_ice_segments/delta_time", + "gt3l/residual_histogram/delta_time", + "gt3l/segment_quality/delta_time", + "gt3r/land_ice_segments/delta_time", + "gt3r/residual_histogram/delta_time", + "gt3r/segment_quality/delta_time", + "quality_assessment/gt1l/delta_time", + "quality_assessment/gt1r/delta_time", + "quality_assessment/gt2l/delta_time", + "quality_assessment/gt2r/delta_time", + "quality_assessment/gt3l/delta_time", + "quality_assessment/gt3r/delta_time" + ], + "latitude": [ + "gt1l/land_ice_segments/latitude", + "gt1r/land_ice_segments/latitude", + "gt2l/land_ice_segments/latitude", + "gt2r/land_ice_segments/latitude", + "gt3l/land_ice_segments/latitude", + "gt3r/land_ice_segments/latitude" + ], + "longitude": [ + "gt1l/land_ice_segments/longitude", + "gt1r/land_ice_segments/longitude", + "gt2l/land_ice_segments/longitude", + "gt2r/land_ice_segments/longitude", + "gt3l/land_ice_segments/longitude", + "gt3r/land_ice_segments/longitude" + ], + "h_li": [ + "gt1l/land_ice_segments/h_li", + "gt1r/land_ice_segments/h_li", + "gt2l/land_ice_segments/h_li", + "gt2r/land_ice_segments/h_li", + "gt3l/land_ice_segments/h_li", + "gt3r/land_ice_segments/h_li" + ], + "h_li_sigma": [ + "gt1l/land_ice_segments/h_li_sigma", + "gt1r/land_ice_segments/h_li_sigma", + "gt2l/land_ice_segments/h_li_sigma", + "gt2r/land_ice_segments/h_li_sigma", + "gt3l/land_ice_segments/h_li_sigma", + "gt3r/land_ice_segments/h_li_sigma" + ], + "atl06_quality_summary": [ + "gt1l/land_ice_segments/atl06_quality_summary", + "gt1r/land_ice_segments/atl06_quality_summary", + "gt2l/land_ice_segments/atl06_quality_summary", + "gt2r/land_ice_segments/atl06_quality_summary", + "gt3l/land_ice_segments/atl06_quality_summary", + "gt3r/land_ice_segments/atl06_quality_summary" + ], + "segment_id": [ + "gt1l/land_ice_segments/segment_id", + "gt1l/segment_quality/segment_id", + "gt1r/land_ice_segments/segment_id", + "gt1r/segment_quality/segment_id", + "gt2l/land_ice_segments/segment_id", + "gt2l/segment_quality/segment_id", + "gt2r/land_ice_segments/segment_id", + "gt2r/segment_quality/segment_id", + "gt3l/land_ice_segments/segment_id", + "gt3l/segment_quality/segment_id", + "gt3r/land_ice_segments/segment_id", + "gt3r/segment_quality/segment_id" + ], + "sigma_geo_h": [ + "gt1l/land_ice_segments/sigma_geo_h", + "gt1r/land_ice_segments/sigma_geo_h", + "gt2l/land_ice_segments/sigma_geo_h", + "gt2r/land_ice_segments/sigma_geo_h", + "gt3l/land_ice_segments/sigma_geo_h", + "gt3r/land_ice_segments/sigma_geo_h" + ], + "x_atc": [ + "gt1l/land_ice_segments/ground_track/x_atc", + "gt1r/land_ice_segments/ground_track/x_atc", + "gt2l/land_ice_segments/ground_track/x_atc", + "gt2r/land_ice_segments/ground_track/x_atc", + "gt3l/land_ice_segments/ground_track/x_atc", + "gt3r/land_ice_segments/ground_track/x_atc" + ], + "y_atc": [ + "gt1l/land_ice_segments/ground_track/y_atc", + "gt1r/land_ice_segments/ground_track/y_atc", + "gt2l/land_ice_segments/ground_track/y_atc", + "gt2r/land_ice_segments/ground_track/y_atc", + "gt3l/land_ice_segments/ground_track/y_atc", + "gt3r/land_ice_segments/ground_track/y_atc" + ], + "seg_azimuth": [ + "gt1l/land_ice_segments/ground_track/seg_azimuth", + "gt1r/land_ice_segments/ground_track/seg_azimuth", + "gt2l/land_ice_segments/ground_track/seg_azimuth", + "gt2r/land_ice_segments/ground_track/seg_azimuth", + "gt3l/land_ice_segments/ground_track/seg_azimuth", + "gt3r/land_ice_segments/ground_track/seg_azimuth" + ], + "sigma_geo_at": [ + "gt1l/land_ice_segments/ground_track/sigma_geo_at", + "gt1r/land_ice_segments/ground_track/sigma_geo_at", + "gt2l/land_ice_segments/ground_track/sigma_geo_at", + "gt2r/land_ice_segments/ground_track/sigma_geo_at", + "gt3l/land_ice_segments/ground_track/sigma_geo_at", + "gt3r/land_ice_segments/ground_track/sigma_geo_at" + ], + "sigma_geo_xt": [ + "gt1l/land_ice_segments/ground_track/sigma_geo_xt", + "gt1r/land_ice_segments/ground_track/sigma_geo_xt", + "gt2l/land_ice_segments/ground_track/sigma_geo_xt", + "gt2r/land_ice_segments/ground_track/sigma_geo_xt", + "gt3l/land_ice_segments/ground_track/sigma_geo_xt", + "gt3r/land_ice_segments/ground_track/sigma_geo_xt" + ], + "dh_fit_dx": [ + "gt1l/land_ice_segments/fit_statistics/dh_fit_dx", + "gt1r/land_ice_segments/fit_statistics/dh_fit_dx", + "gt2l/land_ice_segments/fit_statistics/dh_fit_dx", + "gt2r/land_ice_segments/fit_statistics/dh_fit_dx", + "gt3l/land_ice_segments/fit_statistics/dh_fit_dx", + "gt3r/land_ice_segments/fit_statistics/dh_fit_dx" + ], + "dh_fit_dx_sigma": [ + "gt1l/land_ice_segments/fit_statistics/dh_fit_dx_sigma", + "gt1r/land_ice_segments/fit_statistics/dh_fit_dx_sigma", + "gt2l/land_ice_segments/fit_statistics/dh_fit_dx_sigma", + "gt2r/land_ice_segments/fit_statistics/dh_fit_dx_sigma", + "gt3l/land_ice_segments/fit_statistics/dh_fit_dx_sigma", + "gt3r/land_ice_segments/fit_statistics/dh_fit_dx_sigma" + ], + "h_mean": [ + "gt1l/land_ice_segments/fit_statistics/h_mean", + "gt1r/land_ice_segments/fit_statistics/h_mean", + "gt2l/land_ice_segments/fit_statistics/h_mean", + "gt2r/land_ice_segments/fit_statistics/h_mean", + "gt3l/land_ice_segments/fit_statistics/h_mean", + "gt3r/land_ice_segments/fit_statistics/h_mean" + ], + "dh_fit_dy": [ + "gt1l/land_ice_segments/fit_statistics/dh_fit_dy", + "gt1r/land_ice_segments/fit_statistics/dh_fit_dy", + "gt2l/land_ice_segments/fit_statistics/dh_fit_dy", + "gt2r/land_ice_segments/fit_statistics/dh_fit_dy", + "gt3l/land_ice_segments/fit_statistics/dh_fit_dy", + "gt3r/land_ice_segments/fit_statistics/dh_fit_dy" + ], + "h_rms_misfit": [ + "gt1l/land_ice_segments/fit_statistics/h_rms_misfit", + "gt1r/land_ice_segments/fit_statistics/h_rms_misfit", + "gt2l/land_ice_segments/fit_statistics/h_rms_misfit", + "gt2r/land_ice_segments/fit_statistics/h_rms_misfit", + "gt3l/land_ice_segments/fit_statistics/h_rms_misfit", + "gt3r/land_ice_segments/fit_statistics/h_rms_misfit" + ], + "h_robust_sprd": [ + "gt1l/land_ice_segments/fit_statistics/h_robust_sprd", + "gt1r/land_ice_segments/fit_statistics/h_robust_sprd", + "gt2l/land_ice_segments/fit_statistics/h_robust_sprd", + "gt2r/land_ice_segments/fit_statistics/h_robust_sprd", + "gt3l/land_ice_segments/fit_statistics/h_robust_sprd", + "gt3r/land_ice_segments/fit_statistics/h_robust_sprd" + ], + "n_fit_photons": [ + "gt1l/land_ice_segments/fit_statistics/n_fit_photons", + "gt1r/land_ice_segments/fit_statistics/n_fit_photons", + "gt2l/land_ice_segments/fit_statistics/n_fit_photons", + "gt2r/land_ice_segments/fit_statistics/n_fit_photons", + "gt3l/land_ice_segments/fit_statistics/n_fit_photons", + "gt3r/land_ice_segments/fit_statistics/n_fit_photons" + ], + "signal_selection_source": [ + "gt1l/land_ice_segments/fit_statistics/signal_selection_source", + "gt1l/segment_quality/signal_selection_source", + "gt1r/land_ice_segments/fit_statistics/signal_selection_source", + "gt1r/segment_quality/signal_selection_source", + "gt2l/land_ice_segments/fit_statistics/signal_selection_source", + "gt2l/segment_quality/signal_selection_source", + "gt2r/land_ice_segments/fit_statistics/signal_selection_source", + "gt2r/segment_quality/signal_selection_source", + "gt3l/land_ice_segments/fit_statistics/signal_selection_source", + "gt3l/segment_quality/signal_selection_source", + "gt3r/land_ice_segments/fit_statistics/signal_selection_source", + "gt3r/segment_quality/signal_selection_source" + ], + "snr_significance": [ + "gt1l/land_ice_segments/fit_statistics/snr_significance", + "gt1r/land_ice_segments/fit_statistics/snr_significance", + "gt2l/land_ice_segments/fit_statistics/snr_significance", + "gt2r/land_ice_segments/fit_statistics/snr_significance", + "gt3l/land_ice_segments/fit_statistics/snr_significance", + "gt3r/land_ice_segments/fit_statistics/snr_significance" + ], + "w_surface_window_final": [ + "gt1l/land_ice_segments/fit_statistics/w_surface_window_final", + "gt1r/land_ice_segments/fit_statistics/w_surface_window_final", + "gt2l/land_ice_segments/fit_statistics/w_surface_window_final", + "gt2r/land_ice_segments/fit_statistics/w_surface_window_final", + "gt3l/land_ice_segments/fit_statistics/w_surface_window_final", + "gt3r/land_ice_segments/fit_statistics/w_surface_window_final" + ], + "bsnow_conf": [ + "gt1l/land_ice_segments/geophysical/bsnow_conf", + "gt1r/land_ice_segments/geophysical/bsnow_conf", + "gt2l/land_ice_segments/geophysical/bsnow_conf", + "gt2r/land_ice_segments/geophysical/bsnow_conf", + "gt3l/land_ice_segments/geophysical/bsnow_conf", + "gt3r/land_ice_segments/geophysical/bsnow_conf" + ], + "bsnow_h": [ + "gt1l/land_ice_segments/geophysical/bsnow_h", + "gt1r/land_ice_segments/geophysical/bsnow_h", + "gt2l/land_ice_segments/geophysical/bsnow_h", + "gt2r/land_ice_segments/geophysical/bsnow_h", + "gt3l/land_ice_segments/geophysical/bsnow_h", + "gt3r/land_ice_segments/geophysical/bsnow_h" + ], + "cloud_flg_asr": [ + "gt1l/land_ice_segments/geophysical/cloud_flg_asr", + "gt1r/land_ice_segments/geophysical/cloud_flg_asr", + "gt2l/land_ice_segments/geophysical/cloud_flg_asr", + "gt2r/land_ice_segments/geophysical/cloud_flg_asr", + "gt3l/land_ice_segments/geophysical/cloud_flg_asr", + "gt3r/land_ice_segments/geophysical/cloud_flg_asr" + ], + "cloud_flg_atm": [ + "gt1l/land_ice_segments/geophysical/cloud_flg_atm", + "gt1r/land_ice_segments/geophysical/cloud_flg_atm", + "gt2l/land_ice_segments/geophysical/cloud_flg_atm", + "gt2r/land_ice_segments/geophysical/cloud_flg_atm", + "gt3l/land_ice_segments/geophysical/cloud_flg_atm", + "gt3r/land_ice_segments/geophysical/cloud_flg_atm" + ], + "r_eff": [ + "gt1l/land_ice_segments/geophysical/r_eff", + "gt1r/land_ice_segments/geophysical/r_eff", + "gt2l/land_ice_segments/geophysical/r_eff", + "gt2r/land_ice_segments/geophysical/r_eff", + "gt3l/land_ice_segments/geophysical/r_eff", + "gt3r/land_ice_segments/geophysical/r_eff" + ], + "tide_ocean": [ + "gt1l/land_ice_segments/geophysical/tide_ocean", + "gt1r/land_ice_segments/geophysical/tide_ocean", + "gt2l/land_ice_segments/geophysical/tide_ocean", + "gt2r/land_ice_segments/geophysical/tide_ocean", + "gt3l/land_ice_segments/geophysical/tide_ocean", + "gt3r/land_ice_segments/geophysical/tide_ocean" + ] +} \ No newline at end of file diff --git a/icepyx/tests/test_data/processed_ATL06_20191130112041_09860505_006_01.h5 b/icepyx/tests/test_data/processed_ATL06_20191130112041_09860505_006_01.h5 new file mode 100644 index 000000000..59b105c15 Binary files /dev/null and b/icepyx/tests/test_data/processed_ATL06_20191130112041_09860505_006_01.h5 differ diff --git a/icepyx/tests/test_variables.py b/icepyx/tests/test_variables.py index 69406e143..de3c485a9 100644 --- a/icepyx/tests/test_variables.py +++ b/icepyx/tests/test_variables.py @@ -1,6 +1,27 @@ +import json + +import pytest + +from icepyx.core.variables import Variables +from icepyx.core.query import Query import icepyx.core.variables as variables +@pytest.fixture() +def variables_obj_atl06(): + return Variables( + "file", + path='./test_data/processed_ATL06_20191130112041_09860505_006_01.h5', + product='ATL06' + ) + +@pytest.fixture() +def avail_vars_atl06(): + expected_path = './expected_outputs/vars_avail_processed_ATL06_20191130112041_09860505_006_01.h5.txt' + with open(expected_path, 'r') as f: + expected = f.read().splitlines() + return expected + def test_list_of_dict_vals(): testdict = { "sc_orient": ["orbit_info/sc_orient"], @@ -22,3 +43,60 @@ def test_list_of_dict_vals(): ] assert obs == exp + +def test_avail_from_file(variables_obj_atl06, avail_vars_atl06): + assert variables_obj_atl06.avail() == avail_vars_atl06 + + +def test_avail_from_order(avail_vars_atl06): + region = Query('ATL06',[-45, 74, -44,75],['2019-11-30','2019-11-30'], \ + start_time='00:00:00', end_time='23:59:59') + # This login method assumes you have a .netrc with your EDL credentials + region.earthdata_login() + + # The Query above should only ever return 1 granule. If this is ever not true, + # raise an error + if region.avail_granules()['Number of available granules'] != 1: + raise TypeError('More or less than one matching granule found.') + + assert region.order_vars.avail().sort() == avail_vars_atl06.sort() + +def test_append_default_vars(variables_obj_atl06): + variables_obj_atl06.append(defaults=True) + + expected_path = './expected_outputs/vars_default_processed_ATL06_20191130112041_09860505_006_01.json' + with open(expected_path, 'r') as f: + expected = json.load(f) + + assert variables_obj_atl06.wanted == expected + +def test_remove_wanted_vars(variables_obj_atl06): + variables_obj_atl06.append(defaults=True) + variables_obj_atl06.remove(all=True) + + assert variables_obj_atl06.wanted == None + +def test_append_list_vars(variables_obj_atl06): + expected = { + 'sc_orient': ['orbit_info/sc_orient'], + 'atlas_sdp_gps_epoch': ['ancillary_data/atlas_sdp_gps_epoch'], + 'cycle_number': ['orbit_info/cycle_number'], + 'rgt': ['orbit_info/rgt'], + 'data_start_utc': ['ancillary_data/data_start_utc'], + 'data_end_utc': ['ancillary_data/data_end_utc'], + 'latitude': ['gt1l/land_ice_segments/latitude', + 'gt1r/land_ice_segments/latitude', + 'gt2l/land_ice_segments/latitude', + 'gt2r/land_ice_segments/latitude', + 'gt3l/land_ice_segments/latitude', + 'gt3r/land_ice_segments/latitude'], + 'longitude': ['gt1l/land_ice_segments/longitude', + 'gt1r/land_ice_segments/longitude', + 'gt2l/land_ice_segments/longitude', + 'gt2r/land_ice_segments/longitude', + 'gt3l/land_ice_segments/longitude', + 'gt3r/land_ice_segments/longitude'] + } + variables_obj_atl06.append(var_list=['latitude','longitude']) + + assert variables_obj_atl06.wanted == expected