pro sofie_read_cvo_ncdf,file,idump,$ sofie_version,cvo_version,cvo_remarks,nevent,missing,orbit,event,mode,$ date,time,lat,lon,doy,dfs,lst,svol_len,svol_wid,los_head,ice_pres,miss,$ ztop,zmax,zbot,zmes,tmes,iwc,mice_zmax,aro_zmax,arp_zmax,re_zmax,h2o_ice_zmax,$ con_zmax,rm_zmax,dr_zmax,o3_col,o3_zhi,wave,pmc_od,pmc_od_dv,col_nden,con_od,rm_od,dr_od,re_od ;----------------------------------------------------------------------------------- ; ; Routine reads a SOFIE common volume observation (CVO) ncdf file and returns named variables. ; ; ; Input: ; ; file.......path + name of the SOFIE netcdf summary file ; idump......1 = echo the variable names, 0 = be quiet ; ; Output: ; ; Scalar header info: ; ; sofie_version..SOFIE data product version, string ; cvo_version....SOFIE CVO version, string ; cvo_remarks....remarks on SOFIE data processing for the CVO, string ; nevent.........number of events in this file ; missing........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 ; doy........day of year (as decimal to include time of day) ; dfs........days from summer solstice (as decimal to include time of day) ; lst........local solar time (decimal hours) ; svol_len...sample volume length (km) ; svol_wid...sample volume width (km) ; los_head...line-of-sight heading (degrees) ; ; zmes.......mesopause altitude (km) ; tmes.......mesopause temperature (K) ; ; ice_pres...1 = ice present, 0 = no ice present ; ztop.......ice layer top altitude (km), 0 if no ice present ; zmax.......altitude of peak 3.064 micron ice extinction (km), 0 if no ice present ; zbot.......ice layer bottom altitude (km), 0 if no ice present ; ; IWC........vertical column ice water content (ug / m2) ; o3_col.....vertical column ozone abundance for Z > 60 km (#/cm2) ; col_nden...vertical column ice number density (#/cm2) ; col_nden...vertical column ice number density (#/cm2), the vertical integral of concentration from the Gaussian fit ; ; Ice parameters at the altitude of Zmax (vectors with 1 value per event): ; ; mice_zmax.....ice mass density (ng / m3) ; 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) ; ; PMC optical depth parameters: ; ; pmc_od........PMC vertical optical depth from the radiometers (unitless), arr(event,wavelength) ; wave..........SOFIE wavelengths coresponding to pmc_od (microns) ; pmc_od_dv.....PMC vertical optical depth 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) ; ; Source: Mark Hervig, GATS Inc. ; ; Revision: Sep 10, 2008 ; May 19, 2009: MH added read for pmc_od_dv ; Nov 4, 2010, MH added new read statements ;----------------------------------------------------------------------------------- ;- 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 print,info.name for j=0,info.natts-1 do begin attname = ncdf_attname(id,i,j) ncdf_attget,id,i,attname,attvalue if (idump eq 1) then print,' Attribute: ', attname, ' = ', string(attvalue) endfor endfor ;- get the global attributes ncdf_diminq,id,'event_sofie',name,nevent ; number of events ncdf_attget,id,/global,'instrument',out & instrument = string(out) ncdf_attget,id,/global,'sofie_version',out & sofie_version = string(out) ncdf_attget,id,/global,'sofie_cvo_version',out & cvo_version = string(out) ncdf_attget,id,/global,'sofie_cvo_remarks',out & cvo_remarks = string(out) ncdf_attget,id,/global,'missing_data_value',missing ncdf_attget,id,/global,'file_creation_date',out & create_date = string(out) print,'file created: ',create_date print,'number of events: ',nevent ;- Read the data ncdf_varget,id,'event_sofie' , event ncdf_varget,id,'aim_orbit' , orbit ncdf_varget,id,'date_sofie' , date ncdf_varget,id,'time_sofie' , time ncdf_varget,id,'mode_sofie' , mode ncdf_varget,id,'longitude_sofie', lon ncdf_varget,id,'latitude_sofie' , lat ncdf_varget,id,'day_of_year_sofie',doy ncdf_varget,id,'days_from_solstice_sofie', dfs ncdf_varget,id,'local_solar_time_sofie' , lst ncdf_varget,id,'svolume_length_sofie' , svol_len ncdf_varget,id,'svolume_width_sofie' , svol_wid ncdf_varget,id,'LOS_heading_sofie' , los_head ncdf_varget,id,'ice_presence_sofie' , ice_pres ncdf_varget,id,'Ztop_sofie' , ztop ncdf_varget,id,'Zmax_sofie' , zmax ncdf_varget,id,'Zbot_sofie' , zbot ncdf_varget,id,'IWC_sofie' , iwc ncdf_varget,id,'mesopause_altitude_sofie', zmes tmes = lat * 0. k = where(varname eq 'mesopause_temperature_sofie',nk) & if nk gt 0 then ncdf_varget,id,'mesopause_temperature_sofie', tmes ncdf_varget,id,'H2O_ice_zmax_sofie' , h2o_ice_zmax ncdf_varget,id,'ice_mass_density_zmax_sofie' , mice_zmax ncdf_varget,id,'effective_radius_zmax_sofie' , re_zmax ncdf_varget,id,'prolate_axial_ratio_zmax_sofie', arp_zmax ncdf_varget,id,'oblate_axial_ratio_zmax_sofie' , aro_zmax ncdf_varget,id,'concentration_zmax_sofie' , con_zmax ncdf_varget,id,'median_radius_zmax_sofie' , rm_zmax ncdf_varget,id,'width_zmax_sofie' , dr_zmax ncdf_varget,id,'Ozone_column_above60km_sofie' , o3_col ncdf_varget,id,'Ozone_column_zhi_sofie' , o3_zhi ncdf_varget,id,'column_ice_nd_sofie' , col_nden ncdf_varget,id,'wavelength_sofie', wave ncdf_varget,id,'PMC_OD_sofie' , pmc_od pmc_od_dv = lat*0. k = where(varname eq 'PMC_OD_dV_sofie',nk) & if nk gt 0 then ncdf_varget,id,'PMC_OD_dV_sofie' , pmc_od_dv con_od = lat*0. k = where(varname eq 'concentration_od',nk) & if nk gt 0 then ncdf_varget,id,'concentration_od' , con_od rm_od = lat*0. k = where(varname eq 'median_radius_od',nk) & if nk gt 0 then ncdf_varget,id,'median_radius_od' , rm_od dr_od = lat*0. k = where(varname eq 'width_od',nk) & if nk gt 0 then ncdf_varget,id,'width_od' , dr_od re_od = lat*0. k = where(varname eq 'effective_radius_od',nk) & if nk gt 0 then ncdf_varget,id,'effective_radius_od' , re_od col_nden = lat*0. k = where(varname eq 'column_ice_nd',nk) & if nk gt 0 then ncdf_varget,id,'column_ice_nd' , col_nden ;- Close the file ncdf_close,id ;- Done return end