pro read_haloe_aero_clim_netcdf2,filen,year,lat,z,month,num_obs,ztrop,ztrop_std,zctop,zctop_std,$ p,p_std,t,t_std,a245,a245_std,a340,a340_std,a346,a346_std,a526,a526_std ;----------------------------------------------------------------------------- ; Routine reads HALOE aerosol climatology data from a netcdf file. ; ; Input: ; filen......complete path + name of the HALOE file ; ; Output: ; year.......year of data (yyyy), scalar ; lat........latitude grid, bin centers (degrees), vector ; z..........altitude grid (km), vector ; month......month grid (month number), vector ; num_obs....# observations in a given latitude - month bin, fltarr(month, latitude) ; ; ztrop......tropopause altitude, median (km), fltarr(month, latitude) ; ztrop_std..tropopause altitude, median absolute deviation (km), fltarr(month, latitude) ; zctop......cloud top altitude, median of non-zero tops (km), fltarr(month, latitude) ; zctop_std..cloud top altitude, median absolute deviation of non-zero tops (km), fltarr(month, latitude) ; ; all variables below are matricies of fltarr(month, latitude, altitude) ; ; p..........pressure mean (mb) ; p_std......pressure standard deviation of the mean (mb) ; t..........temperature mean (K) ; t_std......temperature standard deviation of the mean (K) ; ; Below are the extinctions and extinction deviations, these could be mean and ; standard deviation of the mean, or mdian and median absolute deviation, ; see description in file. The units/descriptions are printed by this routine (lines 60-73). ; ; a245.......2.45 micron extinction (1/km) ; a245_std...2.45 micron extinction deviation (1/km) ; a340.......3.40 micron extinction (1/km) ; a340_std...3.40 micron extinction deviation (1/km) ; a346.......3.46 micron extinction (1/km) ; a346_std...3.46 micron extinction deviation (1/km) ; a526.......5.26 micron extinction (1/km) ; a526_std...5.26 micron extinction deviation (1/km) ; ; Source: Mark Hervig (GATS Inc.) ; ;----------------------------------------------------------------------------------- ;- open the file id = ncdf_open(filen) glob = ncdf_inquire(id) ;- echo information about the data print,'data dimensions: ' for i=0,glob.ndims-1 do begin ncdf_diminq,id,i,name,size print,' ', name, size endfor print, 'Variable information: ' for i=0,glob.nvars-1 do begin info = ncdf_varinq(id, i) 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 endfor ;- read the data ncdf_varget,id,'bin-center-latitude', lat ncdf_varget,id,'altitude', z ncdf_varget,id,'month', month ncdf_varget,id,'year', year ncdf_varget,id,'number-of-observations',num_obs ncdf_varget,id,'tropopause-height',ztrop ncdf_varget,id,'tropopause-height-deviation',ztrop_std ncdf_varget,id,'cloud-top-height',zctop ncdf_varget,id,'cloud-top-height-deviation',zctop_std ncdf_varget,id,'pressure', p ncdf_varget,id,'temperature', t ncdf_varget,id,'pressure-deviation', p_std ncdf_varget,id,'temperature-deviation', t_std ncdf_varget,id,'2.45-micron-extinction', a245 ncdf_varget,id,'3.40-micron-extinction', a340 ncdf_varget,id,'3.46-micron-extinction', a346 ncdf_varget,id,'5.26-micron-extinction', a526 ncdf_varget,id,'2.45-micron-extinction-deviation', a245_std ncdf_varget,id,'3.40-micron-extinction-deviation', a340_std ncdf_varget,id,'3.46-micron-extinction-deviation', a346_std ncdf_varget,id,'5.26-micron-extinction-deviation', a526_std ;- close the file ncdf_close,id ;- done return end