;docformat='rst' ;+ ; Create an unzipped copy of a zipped netCDF file, read it, delete the ; temporary copy, and dereference any pointers in the data structure ; that has been read before returning it. ; ; :Author: ; Bill Barrett ; ; :Params: ; filename : string ; the path to the file name to be read ; ; :Keywords: ; structure : structure ; an optional structure used to interpret what is read from netcdf ; ; :Examples: ; To get the data from a level 2a cloud file: ; retrieval_structure = get_retrieval_structure(!VERSION_2, /cloud) ; cld_data = uncompress_and_expand_struct(cld_file, structure=retrieval_structure) ; To get the data from a level 2a etc file where there is no retrieval structure: ; etc_data = uncompress_and_expand_struct(etc_file) ;- function uncompress_and_expand_struct, filename, structure=structure ; the 'decompress' function creates a temporary copy of a zipped file. ; while leaving the zipped file unchanged. new_filename = decompress(filename) read_netcdf, new_filename, data, attributes, status, structure=structure ; delete the temporary copy created by 'decompress' FILE_DELETE, new_filename ; Return a copy of the structure where all pointers have been dereferenced. return_data = copy_structure( data, /no_pointers) return, return_data end