pro sofie_read_summary_s3,file,idump,$ version,remarks,hemisphere,season,nevent,nz,missing, $ orbit,event,mode,date,time,lat,lon,lst,doy,dfs,los_head, $ z,p,t,h2o,o3,ch4,zmes,pmes,tmes, $ ztop,zmax,zbot,zbot2,ice_pres,nlay_al,ztop_al,zmax_al,zbot_al, $ vice,mice,h2oi,aro,arp,aroi,icet,con,rm,dr,re,vfs,con_s,rm_s,dr_s,re_s, $ iwc,od,waves,oddv,con_od,rm_od,dr_od,re_od, vfs_od,con_s_od,rm_s_od,dr_s_od,re_s_od, $ ex_b2,ex_b3,ex_b4,ex_b8,ex_b9,ex_b10,ex_c2 ;-------------------------------------------------------------------------------------------------------------------- ; ; Routine reads a SOFIE NetCDF summary (version "s3") 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 ; hemisphere..hemisphere (NH = north, SH = south) ; season......e.g. 2007 or 2007-2008 ; nevent......number of events in this file ; nz..........number of altitude points in profiles ; missing.....missing data value ; remarks.....comments on lots of things, like noise values, assumed smoke composition.... ; "print,remarks" to check this out ; ; Houskeeping, arr(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, UT, hh.hh ; 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, e.g., -20.45) ; los_head..line-of-sight heading, 83 km tangent point to Sun (degrees) ; ; State variables: ; z.........altitude vector (km), common for all profiles, arr(nz) ; p.........pressure (hPa), arr(nz,nevent) ; t.........temperature (K), arr(nz,nevent) ; h2o.......water vapor mixing ratio (ppmv), arr(nz,nevent) ; o3........ozone mixing ratio (ppmv), arr(nz,nevent) ; ch4.......methane mixing ratio (ppmb), arr(nz,nevent) ; zmes......mesopause altitude (km), arr(event) ; pmes......mesopause pressure (mb), arr(event) ; tmes......mesopause temperature (K), arr(event) ; ; Ice layer info [e.g., Hervig et al., 2009]: ; ; ztop......ice layer top altitude (km), brightest layer, 0 if no ice present, arr(event) ; zmax......altitude of peak 3.064 micron ice extinction (km), brightest layer, 0 if no ice present, arr(event) ; zbot......ice layer bottom altitude (km), brightest layer, 0 if no ice present, arr(event) ; zbot2.....ice layer bottom altitude (km), brightest layer, defined where h2o_ice < 0.1 ppmv below Zmax, arr(event) ; ; ice_pres..1 = ice present somewhere in profile, 0 = no ice present, arr(event) ; nlay_al...total # of ice layers found, arr(event) ; ztop_al...ice layer top altitude (km), all layers, fltarr( max # layers, event) ; zmax_al...altitude of peak 3.064 micron ice extinction (km), all layers, fltarr( max # layers, event) ; zbot_al...ice layer bottom altitude (km), brightest layer, all layers, fltarr( max # layers, event) ; ; PMC properties: ; ; vice......ice volume density (um3/cm3), arr(z,event) [Hervig et al., 2009] ; mice......ice mass density (g/km3), arr(z,event) " ; h2oi......gas phase equivalent ice (ppmv), arr(z,event) " ; ; aro......axial ratio of oblate spheroid, arr(z,event) [Hervig et al., 2009] ; arp......axial ratio of prolate spheroid, arr(z,event) [Hervig et al., 2009] ; ; iceT......ice temperature (K), arr(z,event) [Hervig and Gordley, 2010] ; aroi......axial ratio of oblate spheroid, retrieved simultaneously w/ iceT, arr(z,event) ; ; Gaussian parameters & re from band9 & chan2, uses new chan2 formulation dV = B(0.867) - B(1.037), ; assumes AR=2, and dr = f(rm) (dr = ~0.4*rm for rm < ~40 nm, and dr = ~16 nm for rm > ~16 nm ; from Baumgarten et al, 2010, exact same function as used by CIPS): ; ; con......concentration (#/cm3), arr(z,event) ; rm.......median radius (nm), arr(z,event) ; dr.......width (nm), arr(z,event) ; re.......effective radius (nm), arr(z,event) ; ; Gaussian parameters & re from band2, band9, and chan2, for ice-smoke mixtures, only available ; after November 209 (see "remarks" for assumed smoke composition and AR, uses dr = f(rm) as above): ; ; vfs......volume fraction of smoke in ice, arr(z,event) ; con_s....concentration (#/cm3), arr(z,event) ; rm_s.....median radius (nm), arr(z,event) ; dr_s.....width (nm), arr(z,event) ; re_s.....effective radius (nm), arr(z,event) ; ; Vertical column variables, arr(event) except OD: ; ; iwc.........column ice abundance (g/km2) ; od..........PMC vertical optical depth (OD) from V extinctions (unitless), arr(event,wavelength) ; oddv........PMC vertical optical depth from ch. 2 dV extinctions (unitless) ; waves.......wavelengths for "od" (microns), arr(wavelength) ; ; Gaussian parameters & re from band9 & chan2 ODs (as described in lines 87-89): ; ; con_od......concentration from OD (#/cm2) ; rm_od.......median radius from OD (nm) ; dr_od.......width from OD (nm) ; re_od.......effective radius from OD (nm) ; ; Gaussian parameters & re from band2, band9, and chan2 ODs, for ice-smoke mixtures (as described in lines 96-97): ; ; vfs_od........volume fraction of smoke from OD ; con_s_od......concentration from OD (#/cm2), ice-smoke mixture ; rm_s_od.......median radius from OD (nm), ice-smoke mixture ; dr_s_od.......width from OD (nm), ice-smoke mixture ; re_s_od.......effective radius from OD (nm), ice-smoke mixture ; ; Extinction profiles, arr(z,event): ; 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_b8.....band 8 extinction, 2.939 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, new formulation = B(0.867) - B(1.037) (1/km) ; ; Source: Mark Hervig, GATS Inc. ; ; Revision: Jun 16, 2011, MH, created routine ; Aug 30, 2011: MH added more variables, documentation ; Mar 16, 2012: MH added read for band 8 ext ; Apr 24, 2012: MH fixed bug (waves variable), cleaned up comments ; ; References: given on SOFIE web page: sofie.gats-inc.com ; ;--------------------------------------------------------------------------------------------------------------------- ;- 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,'file_creation_date',out & file_creation_date = string(out) 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,'remarks', out & remarks = string(out) ncdf_attget,id,/global,'missing_data_value',missing ;- 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 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,'CH4_vmr' , ch4 ncdf_varget,id,'mesopause_temperature', tmes ncdf_varget,id,'mesopause_altitude' , zmes ncdf_varget,id,'mesopause_pressure' , pmes ;- PMC layer info ncdf_varget,id,'Ztop', ztop ncdf_varget,id,'Zmax', zmax ncdf_varget,id,'Zbot', zbot zbot2 = fltarr(nevent) & k=where(varname eq 'Zbot2',nk) & if nk gt 0 then ncdf_varget,id,'Zbot2' , zbot2 ice_pres = fltarr(nevent) & k=where(varname eq 'ice_presence',nk) & if nk gt 0 then ncdf_varget,id,'ice_presence' , ice_pres nlay_al = fltarr(nevent) & k=where(varname eq 'n_ice_layers_all',nk) & if nk gt 0 then ncdf_varget,id,'n_ice_layers_all', nlay_al ztop_al = fltarr(nevent) & k=where(varname eq 'Ztop_all',nk) & if nk gt 0 then ncdf_varget,id,'Ztop_all' , ztop_al zmax_al = fltarr(nevent) & k=where(varname eq 'Zmax_all',nk) & if nk gt 0 then ncdf_varget,id,'Zmax_all' , zmax_al zbot_al = fltarr(nevent) & k=where(varname eq 'Zbot_all',nk) & if nk gt 0 then ncdf_varget,id,'Zbot_all' , zbot_al ;- PMC properties ncdf_varget,id,'ice_volume_density' , vice ncdf_varget,id,'ice_mass_density' , mice ncdf_varget,id,'H2O_ice' , h2oi ncdf_varget,id,'prolate_axial_ratio' , arp ncdf_varget,id,'oblate_axial_ratio' , aro ncdf_varget,id,'oblate_axial_ratio_2' , aroi ncdf_varget,id,'ice_temperature' , icet ncdf_varget,id,'concentration' , con ncdf_varget,id,'median_radius' , rm ncdf_varget,id,'width' , dr ncdf_varget,id,'effective_radius' , re ncdf_varget,id,'volume_fraction_smoke' , vfs ncdf_varget,id,'concentration_ice_smoke' , con_s ncdf_varget,id,'median_radius_ice_smoke' , rm_s ncdf_varget,id,'width_ice_smoke' , dr_s ncdf_varget,id,'effective_radius_ice_smoke', re_s ;- PMC vertical column related ncdf_varget,id,'IWC', iwc ncdf_varget,id,'wavelength_sofie', waves ncdf_varget,id,'PMC_OD_sofie' , od ncdf_varget,id,'PMC_OD_dV_sofie' , oddv ncdf_varget,id,'concentration_od' , con_od ncdf_varget,id,'median_radius_od' , rm_od ncdf_varget,id,'width_od' , dr_od ncdf_varget,id,'effective_radius_od', re_od vfs_od = fltarr(nevent) & k=where(varname eq 'volume_fraction_smoke_od',nk) & if nk gt 0 then ncdf_varget,id,'volume_fraction_smoke_od', vfs_od con_s_od = fltarr(nevent) & k=where(varname eq 'concentration_od_ice_smoke',nk) & if nk gt 0 then ncdf_varget,id,'concentration_od_ice_smoke', con_s_od rm_s_od = fltarr(nevent) & k=where(varname eq 'median_radius_od_ice_smoke',nk) & if nk gt 0 then ncdf_varget,id,'median_radius_od_ice_smoke', rm_s_od dr_s_od = fltarr(nevent) & k=where(varname eq 'width_od_ice_smoke',nk) & if nk gt 0 then ncdf_varget,id,'width_od_ice_smoke', dr_s_od re_s_od = fltarr(nevent) & k=where(varname eq 'effective_radius_od_ice_smoke',nk) & if nk gt 0 then ncdf_varget,id,'effective_radius_od_ice_smoke', re_s_od ;- 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 ex_b8 = ex_b9*0 & k=where(varname eq 'extinction_2939',nk) & if nk gt 0 then ncdf_varget,id,'extinction_2939', ex_b8 ;- Close the file ncdf_close,id ;- Done return end