; This is a simple demo program that reads an NASA AURA MLS file ; and plots a vertical profile on a certain location. ; ; AUTHORS: ; Hyo-Kyung Lee (hyoklee@hdfgroup.org) ; ; REQUIRES: ; IDL 7.0 or Greater ; ; Copyright (C) 2009 The HDF Group ; All rights reserved. ;; Give a local MLS file name. ;; We assume that the file is located at the current working directory. file_name = 'MLS-Aura_L2GP-CO_v02-23-c02_2008d277.he5' ;; Please pay attention to the version number of MLS file since ;; the H5F_OPEN() of IDL 7.0 will give segmentation fault ;; on older MLS file (e.g., 'MLS-Aura_L2GP-BrO_v02-20-c01_2005d027.he5'). file_id = H5F_OPEN(file_name) ;; Open the latitude / longitude dataset. ;; Change the "/CO/" to "/BrO/" if you open BrO MLS file. dataset_id_lat = H5D_OPEN(file_id, '/HDFEOS/SWATHS/CO/Geolocation Fields/Latitude') lat = H5D_Read(dataset_id_lat) H5D_CLOSE, dataset_id_lat dataset_id_lon = H5D_OPEN(file_id, '/HDFEOS/SWATHS/CO/Geolocation Fields/Longitude') lon = H5D_Read(dataset_id_lon) H5D_CLOSE, dataset_id_lon ;; Open the pressure dataset. dataset_id_lev = H5D_OPEN(file_id, '/HDFEOS/SWATHS/CO/Geolocation Fields/Pressure') lev = H5D_Read(dataset_id_lev) H5D_CLOSE, dataset_id_lev ;; Open the swath value dataset. dataset_id_val = H5D_OPEN(file_id, '/HDFEOS/SWATHS/CO/Data Fields/L2gpValue') val = H5D_Read(dataset_id_val) H5D_CLOSE, dataset_id_val ;; Put together to generate a vertical profile plot ;; Change the array index "0" to other value if you want to plot a different location. la0 = lat[0] lo0 = lon[0] x = val[*,0] z = alog10(lev) a = 10000000 * x plot, a, z, xtitle='CO (1.0e-07 vmr)', ytitle='Pressure (log hPa)', title='lat:' + STRTRIM(la0) + ' lon:' + STRTRIM(lo0), xrange=[-5, 5] ;; Close the file H5F_CLOSE, file_id