pro sofie_read_summary_s2,file,idump,$ version,remarks,hemisphere,season,nevent,nz,missing, $ orbit,event,mode,date,time,lat,lon,lst,doy,dfs,los_head, $ ice_pres,nlay,ztop,zmax,zbot,zbota,ztop2,zmax2,zbot2,zbota2, $ zmes,tmes, z,p,t,h2o,o3, tmax,pmax, o3_col,o3_zhi,$ iwc,mice,mice_zmax,h2o_ice,h2o_ice_zmax,aro,aro_zmax,arp,arp_zmax,aro2,aro2_zmax,icet,icet_zmax,$ con,con_zmax,rm,rm_zmax,dr,dr_zmax,re,re_zmax,con_mre,con_mre_zmax,col_nden,$ od,waves,oddv,con_od,rm_od,dr_od,re_od,$ ex_b2,ex_b3,ex_b4,ex_b9,ex_b10,ex_c2,$ nlay_lo,ztop_lo,zmax_lo,zbot_lo ;-------------------------------------------------------------------------------------------------------------------- ; ; Routine reads a SOFIE NetCDF summary file and returns the named variables. ; ; The SOFIE summary file containes data for one PMC season and gives many derived ; ice properties, as described below. ; ; Input: ; ; file.......path + name of the SOFIE netcdf summary file ; idump......1 = echo the variable names, 0 = be quiet ; ; Output: ; ; Scalar header info: ; ; version.....SOFIE data product version, string, scalar ; hemisphere..hemisphere (NH = north, SH = south) ; season......e.g. 2007 or 2007-2008 ; nevent......number of events in this file, scalar ; nz..........number of altitude points in profiles, scalar ; miss........missing data value ; ; Vectors with 1 value per event: ; ; orbit.....AIM orbit number ; event.....SOFIE event number ; mode......occultation mode, 0 = sunrise, 1 = sunset ; date......date as yyyyddd ; time......time at 83 km tangent point, seconds since UNIX epoch ; lat.......latitude (deg, -90 to 90), @ 83 km tangent point ; lon.......longitude (deg E, 0 to 360), @ 83 km tangent point ; lst.......local solar time (decimal hours) ; doy.......day of year (decimal day) ; dfs.......days from summer solstice (decimal day) ; los_head..line-of-sight heading (degrees) ; ; ice_pres...1 = ice present somewhere in profile, 0 = no ice present ; nlay......# of ice layers ; ; ztop......ice layer top altitude (km), brightest layer, 0 if no ice present ; zmax......altitude of peak 3.064 micron ice extinction (km), brightest layer, 0 if no ice present ; zbot......ice layer bottom altitude (km), brightest layer, 0 if no ice present ; zbota.....ice layer bottom altitude (km), brightest layer, defined where h2o_ice < 0.1 ppmv below Zmax ; ; ztop2.....ice layer top altitude (km), 2nd layer, 0 if no ice present ; zmax2.....altitude of peak 3.064 micron ice extinction (km), 2nd layer, 0 if no ice present ; zbot2.....ice layer bottom altitude (km), 2nd layer, 0 if no ice present ; zbota2....ice layer bottom altitude (km), 2nd layer, defined where h2o_ice < 0.1 ppmv below Zmax ; ; nlay_lo...# of low ice layers, these are within the near or far LOS ; ztop_lo...ice layer top altitude (km), low layers, fltarr( max # low layer, event) ; zmax_lo...altitude of peak 3.064 micron ice extinction (km), low layers, fltarr( max # low layer, event) ; zbot_lo...ice layer bottom altitude (km), brightest layer, low layers, fltarr( max # low layer, event) ; zmes......mesopause altitude (km) ; tmes......mesopause temperature (K) ; IWC.......column ice water content (ug/m2 = g/km2) ; o3_col....column ozone abundance for Z > 60 km (#/cm2) ; tmax......temperature at ice Zmax (K) ; pmax......pressure at ice Zmax (hPa) ; ; col_nden..vertical column ice number density (#/cm2), this is the vertical integral of concentration ("con" below) vs. altitude ; ; Ice parameters at the altitude of Zmax (vectors with 1 value per event): ; ; mice_zmax.....ice mass density (ng / m3 = g / km3) ; aro_zmax.......axial ratio of oblate spheroid (note the SOFIE solution allows oblate or prolate) ; arp_zmax.......axial ratio of prolate spheroid (note the SOFIE solution allows oblate or prolate) ; re_zmax.......effective radius (nm) ; h2o_ice_zmax..gas phase equivalent H2O in ice (ppmv) ; con_zmax......Gaussian particle concentration (#/cm3) ; rm_zmax.......Gaussian median radius (nm) ; dr_zmax.......Gaussian width (nm) ; con_mre_zmax..particle concentration from Mice & re (#/cm3) ; icet_zmax.....ice temperature (K) ; aro2_zmax.....axial ratio of oblate spheroid, retrieved simultaneously with iceT ; ; PMC vertical optical depth (OD) parameters & variables retrieved from OD (1 per event): ; ; pmc_od.......PMC vertical OD from the radiometers (unitless), arr(event,wavelength) ; wave.........SOFIE wavelengths coresponding to pmc_od (microns), arr(wavelength) ; pmc_od_dv....PMC vertical OD from chan. 2 dV (unitless), arr(event) ; ; con_od.......vertical column ice number density from OD (#/cm2), arr(event) ; rm_od........median radius from OD (nm), arr(event) ; dr_od........width from OD (nm), arr(event) ; re_od........effective radius (nm) from band 9 / chan 2 ODs, arr(event) ; ; The common altitude grid for all profile data: ; ; z.........altitude vector (km), arr(nz) ; ; Profile data, arrays of arr(nz,nevent): ; ; p.........pressure (hPa) ; t.........temperature (K) ; h2o.......water vapor mixing ratio (ppmv) ; o3........ozone mixing ratio (ppmv) ; ; mice......ice mass density (ng/m3) ; h2o_ice...gas phase equivalent H2O in the ice phase (ppmv) ; ; aro.......axial ratio of oblate spheroid (note the SOFIE solution allows oblate or prolate) ; arp.......axial ratio of prolate spheroid (note the SOFIE solution allows oblate or prolate) ; aro2......axial ratio of oblate spheroid, retrieved simultaneously with iceT ; icet......ice temperature (K), the temperature of ice retrieved from the band 8, 9, & 10 extinctions ; ; re........effective radius (nm), from band 9 / chan 2 ; ; con_mre...particle concentration from Mice & re (#/cm3) ; con.......Gaussian particle concentration (#/cm3) ; rm........Gaussian median radius (nm) ; dr........Gaussian width (nm) ; ; ex_b2.....band 2 extinction, 0.330 microns wavelength (1/km) ; ex_b3.....band 3 extinction, 0.867 microns wavelength (1/km) ; ex_b4.....band 4 extinction, 1.037 microns wavelength (1/km) ; ex_b9.....band 9 extinction, 3.064 microns wavelength (1/km) ; ex_b10....band 10 extinction, 3.186 microns wavelength (1/km) ; ex_c2.....channel 2 (dV) extinction, 1.037 microns wavelength (1/km) ; ; Source: Mark Hervig, GATS Inc. ; ; Revision: Oct 7, 2010, MH, created ; Nov 7, 2010, MH, added more read statments ; ;--------------------------------------------------------------------------------------------------------------------- ;- open the file id = ncdf_open(file) glob = ncdf_inquire(id) ;- echo the file contents glob = ncdf_inquire(id) varname = strarr(glob.nvars) ; this will contain the variable names for i = 0,glob.nvars-1 do begin info = ncdf_varinq(id, i) varname(i) = info.name if (idump eq 1) then begin print,info.name for j=0,info.natts-1 do begin attname = ncdf_attname(id,i,j) ncdf_attget,id,i,attname,attvalue print,' ',attname, ' = ', string(attvalue) endfor endif endfor ;- get the global attributes ncdf_diminq,id,'event',name,nevent ; number of events ncdf_diminq,id,'altitude',name,nz ; number of points in profiles ncdf_attget,id,/global,'instrument',out & instrument = string(out) ncdf_attget,id,/global,'version',out & version = string(out) ncdf_attget,id,/global,'season',out & season = string(out) ncdf_attget,id,/global,'hemisphere',out & hemisphere = string(out) ncdf_attget,id,/global,'missing_data_value',missing print,nevent,' events' ;- Comments remarks=' ' & k=where(varname eq 'remarks',nk) & if nk gt 0 then ncdf_varget,id,'remarks', remarks maxgap =0 & k=where(varname eq 'maxgap',nk) & if nk gt 0 then ncdf_varget,id,'maxgap', maxgap e_noi =0 & k=where(varname eq 'extintion_noise',nk) & if nk gt 0 then ncdf_varget,id,'extintion_noise', e_noi edv_noi =0 & k=where(varname eq 'dv_extintion_noise',nk) & if nk gt 0 then ncdf_varget,id,'dv_extintion_noise',edv_noi zlow =0 & k=where(varname eq 'zlow',nk) & if nk gt 0 then ncdf_varget,id,'zlow', zlow tmax =0 & k=where(varname eq 'tmax',nk) & if nk gt 0 then ncdf_varget,id,'tmax', tmax mes_opt =0 & k=where(varname eq 'mesopause_option',nk) & if nk gt 0 then ncdf_varget,id,'mesopause_option', mes_opt mes_lo =0 & k=where(varname eq 'mesopause_lo',nk) & if nk gt 0 then ncdf_varget,id,'mesopause_lo', mes_lo mes_hi =0 & k=where(varname eq 'mesopause_hi',nk) & if nk gt 0 then ncdf_varget,id,'mesopause_hi', mes_hi ;- Houskeeping ncdf_varget,id,'event' , event ncdf_varget,id,'orbit' , orbit ncdf_varget,id,'date' , date ncdf_varget,id,'time' , time ncdf_varget,id,'mode' , mode ncdf_varget,id,'longitude', lon ncdf_varget,id,'latitude' , lat ncdf_varget,id,'local_solar_time' , lst ncdf_varget,id,'days_from_solstice' , dfs ncdf_varget,id,'day_of_year' , doy los_head = doy*0 & k=where(varname eq 'LOS_heading_sofie',nk) & if nk gt 0 then ncdf_varget,id,'LOS_heading_sofie', los_head ;- State parameters, Z,P,T... ncdf_varget,id,'altitude' , z ncdf_varget,id,'pressure' , p ncdf_varget,id,'temperature', t ncdf_varget,id,'H2O_vmr' , h2o ncdf_varget,id,'O3_vmr' , o3 ncdf_varget,id,'temperature_zmax', tmax ncdf_varget,id,'pressure_zmax' , pmax ncdf_varget,id,'mesopause_temperature', tmes ncdf_varget,id,'mesopause_altitude' , zmes ncdf_varget,id,'Ozone_column_above60km', o3_col ncdf_varget,id,'Ozone_column_zhi' , o3_zhi ;- PMC layer info ncdf_varget,id,'Ztop', ztop ncdf_varget,id,'Zmax', zmax ncdf_varget,id,'Zbot', zbot zbota =fltarr(nevent) & k=where(varname eq 'Zbota',nk) & if nk gt 0 then ncdf_varget,id,'Zbota', zbota ice_pres =fltarr(nevent) & k=where(varname eq 'ice_presence',nk) & if nk gt 0 then ncdf_varget,id,'ice_presence', ice_pres nlay =fltarr(nevent) & k=where(varname eq 'n_ice_layers',nk) & if nk gt 0 then ncdf_varget,id,'n_ice_layers', nlay ztop2 =fltarr(nevent) & k=where(varname eq 'Ztop2',nk) & if nk gt 0 then ncdf_varget,id,'Ztop2', ztop2 zmax2 =fltarr(nevent) & k=where(varname eq 'Zmax2',nk) & if nk gt 0 then ncdf_varget,id,'Zmax2', zmax2 zbot2 =fltarr(nevent) & k=where(varname eq 'Zbot2',nk) & if nk gt 0 then ncdf_varget,id,'Zbot2', zbot2 zbota2=fltarr(nevent) & k=where(varname eq 'Zbota2',nk) & if nk gt 0 then ncdf_varget,id,'Zbota2', zbota2 nlay_lo=fltarr(nevent) & k=where(varname eq 'n_ice_layers_lo',nk) & if nk gt 0 then ncdf_varget,id,'n_ice_layers_lo', nlay_lo ztop_lo =fltarr(nevent) & k=where(varname eq 'Ztop_lo',nk) & if nk gt 0 then ncdf_varget,id,'Ztop_lo', ztop_lo ztop_lo =fltarr(nevent) & k=where(varname eq 'Zmax_lo',nk) & if nk gt 0 then ncdf_varget,id,'Zmax_lo', zmax_lo ztop_lo =fltarr(nevent) & k=where(varname eq 'Zbot_lo',nk) & if nk gt 0 then ncdf_varget,id,'Zbot_lo', zbot_lo ;- PMC microphysics etc... ncdf_varget,id,'H2O_ice' , h2o_ice ncdf_varget,id,'H2O_ice_zmax' , h2o_ice_zmax ncdf_varget,id,'ice_mass_density' , mice ncdf_varget,id,'ice_mass_density_zmax', mice_zmax ncdf_varget,id,'effective_radius' , re ncdf_varget,id,'effective_radius_zmax' , re_zmax ncdf_varget,id,'prolate_axial_ratio' , arp ncdf_varget,id,'prolate_axial_ratio_zmax' , arp_zmax ncdf_varget,id,'oblate_axial_ratio' , aro ncdf_varget,id,'oblate_axial_ratio_zmax' , aro_zmax aro2 = t*0 & k=where(varname eq 'oblate_axial_ratio_2',nk) & if nk gt 0 then ncdf_varget,id,'oblate_axial_ratio_2', aro2 aro2_zmax =fltarr(nevent) & k=where(varname eq 'oblate_axial_ratio_2_zmax',nk) & if nk gt 0 then ncdf_varget,id,'oblate_axial_ratio_2_zmax', aro2_zmax ncdf_varget,id,'concentration' , con ncdf_varget,id,'concentration_zmax' , con_zmax ncdf_varget,id,'median_radius' , rm ncdf_varget,id,'median_radius_zmax' , rm_zmax ncdf_varget,id,'width' , dr ncdf_varget,id,'width_zmax' , dr_zmax con_mre = t*0 & k=where(varname eq 'concentration_mre',nk) & if nk gt 0 then ncdf_varget,id,'concentration_mre', con_mre con_mre_zmax =fltarr(nevent) & k=where(varname eq 'concentration_mre_zmax',nk) & if nk gt 0 then ncdf_varget,id,'concentration_mre_zmax', con_mre_zmax icet = t*0 & k=where(varname eq 'ice_temperature',nk) & if nk gt 0 then ncdf_varget,id,'ice_temperature',icet icet_zmax =fltarr(nevent) & k=where(varname eq 'ice_temperature_zmax',nk) & if nk gt 0 then ncdf_varget,id,'ice_temperature_zmax',icet_zmax ;- PMC vertical column related ncdf_varget,id,'IWC', iwc ncdf_varget,id,'wavelength_sofie', wave ncdf_varget,id,'PMC_OD_sofie' , pmc_od ncdf_varget,id,'PMC_OD_dV_sofie' , pmc_od_dv con_od=fltarr(nevent) & k=where(varname eq 'concentration_od',nk) & if nk gt 0 then ncdf_varget,id,'concentration_od' , con_od rm_od =fltarr(nevent) & k=where(varname eq 'median_radius_od',nk) & if nk gt 0 then ncdf_varget,id,'median_radius_od' , rm_od dr_od =fltarr(nevent) & k=where(varname eq 'width_od',nk) & if nk gt 0 then ncdf_varget,id,'width_od' , dr_od re_od =fltarr(nevent) & k=where(varname eq 'effective_radius_od',nk) & if nk gt 0 then ncdf_varget,id,'effective_radius_od', re_od ncdf_varget,id,'column_ice_nd', col_nden ;- Extinctions ncdf_varget,id,'extinction_0330' , ex_b2 ncdf_varget,id,'extinction_0867' , ex_b3 ncdf_varget,id,'extinction_1037' , ex_b4 ncdf_varget,id,'extinction_3064' , ex_b9 ncdf_varget,id,'extinction_3186' , ex_b10 ncdf_varget,id,'extinction_1037dv', ex_c2 ;- Close the file ncdf_close,id ;- Done return end