pro CPL_L2LAY_HDF5_READER, filename ; This subroutine ingests the HDF5 filename of the CPL L2LAY product starting with V1-01 and ; then reads and stores all file parameters flagged in the CPL_L2LAY_HDF5_READER.CONFIG include file. ; These parameters are passed back in the multiple commons in the CPL_L2LAY_PARMS_COMMON.pro and ; CPL_L2SHARED_PARMS_COMMON.pro include files. ; V1-01 adapts to subfolders used in the variable names in the HDF layer file. ; Use Linix command "h5dump -n filepath+filename" to dump a list of all variable names in the HDF5 file. @/cpl/dhlavka/Cpl/Source/Vfm-L2/cpl_l2lay_parms_common.pro ; parms unique to LAY file @/cpl/dhlavka/Cpl/Source/Vfm-L2/cpl_l2shared_parms_common.pro ; parms common to PROF and LAY file_id = H5F_OPEN(filename) ; Include configuration file which maps which parameters are read. @/cpl/dhlavka/Cpl/Source/Vfm-L2/cpl_l2lay_hdf5_reader.config for id= 0,nparms-1 do begin ; nparms from config file if (var_map(id) eq 1) then begin dataset_id = H5D_OPEN(file_id, var_name(id)) parm = H5D_READ(dataset_id) ;max_lay= 10, numrecs= 4165 H5D_CLOSE, dataset_id if (id eq 0) then Aerosol_Type= parm ;INT = Array[10, 4165] if (id eq 1) then Att_Backscatter_Stats_1064= parm ;FLOAT = Array[4, 10, 4165] if (id eq 2) then Att_Backscatter_Stats_532= parm ;FLOAT = Array[4, 10, 4165] if (id eq 3) then Att_Backscatter_Stats_355= parm ;FLOAT = Array[4, 10, 4165] if (id eq 4) then Att_Tot_Color_Ratio_Stats= parm ;FLOAT = Array[4, 10, 4165] if (id eq 5) then Bin_Altitude_Array= parm ;FLOAT = Array[900] if (id eq 6) then Bin_Size= parm ;FLOAT = 0.0299800 if (id eq 7) then CPL_Angle= parm ;DOUBLE = Array[4165] if (id eq 8) then CPL_Latitude= parm ;FLOAT = Array[3, 4165] if (id eq 9) then CPL_Longitude= parm ;FLOAT = Array[3, 4165] if (id eq 10) then Cloud_Phase= parm ;INT = Array[10, 4165] if (id eq 11) then Cloud_Phase_Score= parm ;INT = Array[10, 4165] if (id eq 12) then DEM_Surface_Alt= parm ;FLOAT = Array[4165] if (id eq 13) then Ext_QC_Flg_1064= parm ;FLOAT = Array[10, 4165] if (id eq 14) then Ext_QC_Flg_532= parm ;FLOAT = Array[10, 4165] if (id eq 15) then Ext_QC_Flg_355= parm ;FLOAT = Array[10, 4165] if (id eq 16) then Lay_Optical_Depth_355= parm ;FLOAT = Array[10, 4165] if (id eq 17) then Lay_Optical_Depth_532= parm if (id eq 18) then Lay_Optical_Depth_1064= parm if (id eq 19) then Lay_Optical_Depth_Uncertainty_1064= parm ;FLOAT = Array[10, 4165] if (id eq 20) then Lay_Optical_Depth_Uncertainty_532= parm if (id eq 21) then Lay_Optical_Depth_Uncertainty_355= parm if (id eq 22) then Lay_Type= parm ;INT = Array[10, 4165] if (id eq 23) then Lay_Type_Score= parm ;INT = Array[10, 4165] if (id eq 24) then File_Start_DateTim= parm ;STRING = '21 Jul 2014 18:27:37' if (id eq 25) then File_Start_Latitude= parm ;FLOAT = 30.7590 if (id eq 26) then File_Start_Longitude= parm ;FLOAT = 43.7347 if (id eq 27) then File_Stop_Tim= parm ;STRING = '00:26:19' if (id eq 28) then File_Stop_Latitude= parm ;FLOAT = -33.9026 if (id eq 29) then File_Stop_Longitude= parm ;FLOAT = -151.732 if (id eq 30) then File_Year= parm ;STRING = '2014' if (id eq 31) then Horiz_Res= parm ;FLOAT = 1.0 (km) if (id eq 32) then Ice_Water_Path_1064= parm ;FLOAT = Array[10, 4165] if (id eq 33) then Ice_Water_Path_1064_Uncertainty= parm ;FLOAT = Array[10, 4165] if (id eq 34) then Ice_Water_Path_532= parm ;FLOAT = Array[10, 4165] if (id eq 35) then Ice_Water_Path_532_Uncertainty= parm ;FLOAT = Array[10, 4165] if (id eq 36) then Ice_Water_Path_355= parm ;FLOAT = Array[10, 4165] if (id eq 37) then Ice_Water_Path_355_Uncertainty= parm ;FLOAT = Array[10, 4165] if (id eq 38) then Index_Top_Bin= parm ;INT = Array[4165] if (id eq 39) then Integrated_Att_Backscatter_1064= parm ;FLOAT = Array[10, 4165] if (id eq 40) then Integrated_Att_Backscatter_532= parm ;FLOAT = Array[10, 4165] if (id eq 41) then Integrated_Att_Backscatter_355= parm ;FLOAT = Array[10, 4165] if (id eq 42) then Integrated_Att_Backscatter_Uncertainty_1064= parm ;FLOAT = Array[10, 4165] if (id eq 43) then Integrated_Att_Backscatter_Uncertainty_532= parm ;FLOAT = Array[10, 4165] if (id eq 44) then Integrated_Att_Backscatter_Uncertainty_355= parm ;FLOAT = Array[10, 4165] if (id eq 45) then Integrated_Att_Total_Color_Ratio= parm ;FLOAT = Array[10, 4165] if (id eq 46) then Integrated_Att_Total_Color_Ratio_Uncertainty= parm ;FLOAT = Array[10, 4165] if (id eq 47) then Integrated_Vol_Depol_Ratio_1064= parm ;FLOAT = Array[10, 4165] if (id eq 48) then Integrated_Vol_Depol_Ratio_Uncertainty_1064= parm ;FLOAT = Array[10, 4165] if (id eq 49) then Lay_Base_Alt= parm ;FLOAT = Array[10, 4165] if (id eq 50) then Lay_Base_Bin= parm ;INT = Array[10, 4165] if (id eq 51) then Lay_Base_Press= parm ;FLOAT = Array[10, 4165] if (id eq 52) then Lay_Base_Temp= parm ;FLOAT = Array[10, 4165] if (id eq 53) then Lay_Eff_MSF_1064= parm ;FLOAT = Array[10, 4165] if (id eq 54) then Lay_Eff_MSF_532= parm ;FLOAT = Array[10, 4165] if (id eq 55) then Lay_Eff_MSF_355= parm ;FLOAT = Array[10, 4165] if (id eq 56) then Lay_Top_Alt= parm ;FLOAT = Array[10, 4165] if (id eq 57) then Lay_Top_Bin= parm ;INT = Array[10, 4165] if (id eq 58) then Lay_Top_Press= parm ;FLOAT = Array[10, 4165] if (id eq 59) then Lay_Top_Temp= parm ;FLOAT = Array[10, 4165] if (id eq 60) then Lidar_Ratio_1064= parm ;FLOAT = Array[10, 4165] if (id eq 61) then Lidar_Ratio_532= parm ;FLOAT = Array[10, 4165] if (id eq 62) then Lidar_Ratio_355= parm ;FLOAT = Array[10, 4165] if (id eq 63) then Lidar_Ratio_Method_1064= parm ;FLOAT = Array[10, 4165] if (id eq 64) then Lidar_Ratio_Method_532= parm ;FLOAT = Array[10, 4165] if (id eq 65) then Lidar_Ratio_Method_355= parm ;FLOAT = Array[10, 4165] if (id eq 66) then Lidar_Surface_Alt= parm ;FLOAT = Array[4165] if (id eq 67) then Max_Num_Lay= parm ;INT = 10 if (id eq 68) then Two_Way_Trans_1064= parm ;FLOAT = Array[10, 4165] if (id eq 69) then Two_Way_Trans_532= parm ;FLOAT = Array[10, 4165] if (id eq 70) then Two_Way_Trans_355= parm ;FLOAT = Array[10, 4165] if (id eq 71) then Two_Way_Trans_Uncertainty_1064= parm ;FLOAT = Array[10, 4165] if (id eq 72) then Two_Way_Trans_Uncertainty_532= parm ;FLOAT = Array[10, 4165] if (id eq 73) then Two_Way_Trans_Uncertainty_355= parm ;FLOAT = Array[10, 4165] if (id eq 74) then Num_1km_Prof= parm ;LONG = 4165 if (id eq 75) then Num_Bins= parm ;LONG = 900 if (id eq 76) then Num_Lay= parm ;INT = Array[4165] if (id eq 77) then Opacity= parm ;BYTE = Array[10, 4165] if (id eq 78) then Product_Creation_Date= parm ;STRING = 'Mon Aug 24 22:56:28 2015' if (id eq 79) then Product_Version_Number= parm ;STRING = '1-01' if (id eq 80) then Prof_Dec_Jday= parm ;DOUBLE = Array[3, 4165] if (id eq 81) then Solar_Azimuth_Ang= parm ;DOUBLE = Array[4165] if (id eq 82) then Solar_Zenith_Ang= parm ;FLOAT = Array[4165] if (id eq 83) then Sky_Cond= parm ;INT = Array[4165] if (id eq 84) then Surface_Type= parm ;INT = Array[4165] if (id eq 85) then Two_Way_Trans_Measurement_Region= parm ;FLOAT = Array[10, 4165] if (id eq 86) then Vol_Depol_Ratio_Stats_1064= parm ;FLOAT = Array[4, 10, 4165] if (id eq 87) then ConstrainedS_Proc_Flg= parm ;INT = Array[2, 10, 4165, 3] ;print, id & help, parm endif endfor parm= 0B H5F_CLOSE, file_id xx = n_elements(CPL_Angle) if (xx ne Num_1km_Prof) then stop, "Size of test parm does not match Num recs!" print, "CPL L2LAY File Read Complete, Numrecs= ", Num_1km_Prof return end