pro CPL_L2PROF_HDF5_READER, filename ; This subroutine ingests the HDF5 filename of the CPL L2PROF product starting with V1-01 and ; then reads and stores all file parameters flagged in the CPL_L2PROF_HDF5_READER.CONFIG include file. ; These parameters are passed back in the multiple commons in CPL_L2PROF_PARMS_COMMON.pro ; and CPL_L2SHARED_PARMS_COMMON.pro include files. There are two unused slots. ; This version adapts to subfolders used in the variable names in the HDF PROF 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_l2prof_parms_common.pro ; parms unique to PROF 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_l2prof_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) ;num_bins= 900, numrecs= 4165 H5D_CLOSE, dataset_id if (id eq 0) then Aer_Optical_Depth_1064= parm ;FLOAT = Array[4165] if (id eq 1) then Aer_Optical_Depth_532= parm ;FLOAT = Array[4165] if (id eq 2) then Aer_Optical_Depth_355= parm ;FLOAT = Array[4165] if (id eq 3) then Aer_Optical_Depth_Uncertainty_1064= parm ;FLOAT = Array[4165] if (id eq 4) then Aer_Optical_Depth_Uncertainty_532= parm ;FLOAT = Array[4165] if (id eq 5) then Aer_Optical_Depth_Uncertainty_355= parm ;FLOAT = Array[4165] if (id eq 6) then Aer_Type= parm ;INT = Array[4165, 900] if (id eq 7) then Atmos_Press= parm ;FLOAT = Array[900, 4165] if (id eq 8) then Atmos_RH= parm ;FLOAT = Array[900, 4165] if (id eq 9) then Atmos_Temp= parm ;FLOAT = Array[900, 4165] if (id eq 10) then Tropopause_Ht= parm ;FLOAT = Array[4165] if (id eq 11) then Bin_Altitude_Array= parm ;FLOAT = Array[900] if (id eq 12) then Bin_Size= parm ;FLOAT = 0.0299800 if (id eq 13) then CPL_Ang= parm ;DOUBLE = Array[4165] if (id eq 14) then CPL_Lat= parm ;FLOAT = Array[3, 4165] if (id eq 15) then CPL_Lon= parm ;FLOAT = Array[3, 4165] if (id eq 16) then Cld_Optical_Depth_1064= parm ;FLOAT = Array[4165] if (id eq 17) then Cld_Optical_Depth_532= parm ;FLOAT = Array[4165] if (id eq 18) then Cld_Optical_Depth_355= parm ;FLOAT = Array[4165] if (id eq 19) then Cld_Optical_Depth_Uncertainty_1064= parm ;FLOAT = Array[4165] if (id eq 20) then Cld_Optical_Depth_Uncertainty_532= parm ;FLOAT = Array[4165] if (id eq 21) then Cld_Optical_Depth_Uncertainty_355= parm ;FLOAT = Array[4165] if (id eq 22) then Cld_Phase= parm ;INT = Array[4165, 900] if (id eq 23) then Cld_Phase_Score= parm ;INT = Array[4165, 900] if (id eq 24) then Column_Optical_Depth_1064= parm ;FLOAT = Array[4165] if (id eq 25) then Column_Optical_Depth_532= parm ;FLOAT = Array[4165] if (id eq 26) then Column_Optical_Depth_355= parm ;FLOAT = Array[4165] if (id eq 27) then Column_Optical_Depth_Uncertainty_1064= parm ;FLOAT = Array[4165] if (id eq 28) then Column_Optical_Depth_Uncertainty_532= parm ;FLOAT = Array[4165] if (id eq 29) then Column_Optical_Depth_Uncertainty_355= parm ;FLOAT = Array[4165] if (id eq 30) then DEM_Sfc_Alt= parm ;FLOAT = Array[4165] if (id eq 31) then blank= parm ;N/A if (id eq 32) then Ext_Coeff_1064= parm ;FLOAT = Array[4165, 900] if (id eq 33) then Ext_Coeff_532= parm ;FLOAT = Array[4165, 900] if (id eq 34) then Ext_Coeff_355= parm ;FLOAT = Array[4165, 900] if (id eq 35) then Ext_Coeff_Uncertainty_1064= parm ;FLOAT = Array[4165, 900] if (id eq 36) then Ext_Coeff_Uncertainty_532= parm ;FLOAT = Array[4165, 900] if (id eq 37) then Ext_Coeff_Uncertainty_355= parm ;FLOAT = Array[4165, 900] if (id eq 38) then Ext_QC_Flag_1064= parm ;FLOAT = Array[4165, 900] if (id eq 39) then Ext_QC_Flag_532= parm ;FLOAT = Array[4165, 900] if (id eq 40) then Ext_QC_Flag_355= parm ;FLOAT = Array[4165, 900] if (id eq 41) then Feat_Type= parm ;INT = Array[4165, 900] if (id eq 42) then Feat_Type_Score= parm ;INT = Array[4165, 900] if (id eq 43) then File_Start_DateTime= parm ;STRING = '21 Jul 2014 18:27:37' if (id eq 44) then File_Stop_Time= parm ;STRING = '00:26:19' if (id eq 45) then File_Start_Lat= parm ;FLOAT = -32.3340 if (id eq 46) then File_Stop_Lat= parm ;FLOAT = -39.4130 if (id eq 47) then File_Start_Lon= parm ;FLOAT = -132.3340' if (id eq 48) then File_Stop_Lon= parm ;FLOAT = -139.4130' if (id eq 49) then Year= parm ;STRING = '2014' if (id eq 50) then Horiz_Res= parm ;FLOAT = 1.0 if (id eq 51) then IWC_1064= parm ;FLOAT = Array[4165, 900] if (id eq 52) then IWC_1064_Uncertainty= parm ;FLOAT = Array[4165, 900] if (id eq 53) then IWC_532= parm ;FLOAT = Array[4165, 900] if (id eq 54) then IWC_532_Uncertainty= parm ;FLOAT = Array[4165, 900] if (id eq 55) then IWC_355= parm ;FLOAT = Array[4165, 900] if (id eq 56) then IWC_355_Uncertainty= parm ;FLOAT = Array[4165, 900] if (id eq 57) then Index_Top_Bin= parm ;INT = Array[4165] if (id eq 58) then Lidar_Sfc_Alt= parm ;FLOAT = Array[4165] if (id eq 59) then MSF_1064= parm ;FLOAT = Array[4165, 900] if (id eq 60) then MSF_532= parm ;FLOAT = Array[4165, 900] if (id eq 61) then MSF_355= parm ;FLOAT = Array[4165, 900] if (id eq 62) then Num_1km_Profiles= parm ;LONG = 4165 if (id eq 63) then Num_Bins= parm ;LONG = 900 if (id eq 64) then Particulate_Backscatter_Coeff_1064= parm ;FLOAT = Array[4165, 900] if (id eq 65) then Particulate_Backscatter_Coeff_532= parm ;FLOAT = Array[4165, 900] if (id eq 66) then Particulate_Backscatter_Coeff_355= parm ;FLOAT = Array[4165, 900] if (id eq 67) then Particulate_Backscatter_Coeff_Uncertainty_1064= parm ;FLOAT = Array[4165, 900] if (id eq 68) then Particulate_Backscatter_Coeff_Uncertainty_532= parm ;FLOAT = Array[4165, 900] if (id eq 69) then Particulate_Backscatter_Coeff_Uncertainty_355= parm ;FLOAT = Array[4165, 900] if (id eq 70) then Prod_Creation_Date= parm ;STRING = 'Mon Aug 24 22:56:28 2015' if (id eq 71) then Product_Version_Num= parm ;STRING = '1-01' if (id eq 72) then blank= parm ;N/A if (id eq 73) then Profile_Dec_Jday= parm ;DOUBLE = Array[3, 4165] if (id eq 74) then Sky_Cond= parm ;INT = Array[4165] if (id eq 75) then Solar_Azimuth_Ang= parm ;DOUBLE = Array[4165] if (id eq 76) then Solar_Zenith_Ang= parm ;FLOAT = Array[4165] if (id eq 77) then Surface_Type= parm ;INT = Array[4165] if (id eq 78) then Tot_Depol_Ratio_1064= parm ;FLOAT = Array[4165, 900] if (id eq 79) then Tot_Depol_Ratio_Uncertainty_1064= parm ;FLOAT = Array[4165, 900] ;print, id & help, parm endif endfor parm= 0B H5F_CLOSE, file_id xx = n_elements(CPL_Ang) if (xx ne Num_1km_Profiles) then stop, "Size of test parm does not match Num recs!" print, "CPL L2PROF File Read Complete, Numrecs= ", Num_1km_Profiles return end