; ; reader for GOCART aerosol aot output from online ccm ;Huisheng Bian, 12/14/2011 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;dir_in = '/misc/mcc20/common/arctas/GEOS5/HaoHe/' dir_in = 'where is your data' tail = ['00','03','06','09','12','15','18','21'] ;cycle for months ;cycle for days ;cycle for hours infile = dir_in+'bR_control.inst3d_aer_v.'+yr+mm(nm)+dd(nd)+'_'+tail(nh)+'00z.nc4' ; ;Does the filename exist? if(file_search(infile) eq '') then begin print, infile+': not found, continuing' continue endif print,infile ;Open nc4 file cdfid = ncdf_open(infile) constid = ncdf_varid(cdfid, 'lon') ncdf_varget,cdfid,constid,lon lon = reform(lon) nlon = n_elements(lon) constid = ncdf_varid(cdfid, 'lat') ncdf_varget,cdfid,constid,lat lat = reform(lat) nlat = n_elements(lat) constid = ncdf_varid(cdfid, 'lev') ncdf_varget,cdfid,constid,lev lev = reform(lev) nlev = n_elements(lev) constid = ncdf_varid(cdfid, 'ps') ; in Pa ncdf_varget,cdfid,constid,ps ps = reform(ps) constid = ncdf_varid(cdfid, 'delp') ; in Pa ncdf_varget,cdfid,constid,delp delp = reform(delp) dust = 0.0*fltarr(nlon,nlat,nlev) for ndu = 0,4 do begin ; cycle for dust bins var = 'du00'+strcompress(string(ndu+1),/rem) constid = ncdf_varid(cdfid, var) ; dust mass mixing ratio kg/kg ncdf_varget,cdfid,constid,var var= reform(var) dust(*,*,*) = dust(*,*,*) + var(*,*,*,0) ; dust for all bins print,'var=',max(var(*,*,*,*)), min(var(*,*,*)) endfor ncdf_close,cdfid ; end cycle hours ; end cycle days ; end cycle months end