; This procedure uses the read_netcdf procedure to read in ; TIME-GCM temperature and geopotential height results ; and define arrays that are the subset of the temperatures ; that correspond to the CSU lidar measurements (T. Singleton, july, 03) ; ; ******MUST********* .run read_netcdf ; *******BEFORE****** .run test ; close,1 openw,1,'dec1920' fpath='/hao/tamaras/timegcm/' fname='dec1920.nc' day=353 time1=18 time2=26 ;READING NETCDF FILES WITH READ_NETCDF.PRO read_netcdf, fpath+fname, data, data_att, status ;which variables are in the file? help, data, /struct ;which variables are in the file? help, data, /struct ;what are the attributes? ;for i=0, n_elements(data_att)-1 do print, data_att(i) ilat=26 lat=data.lat(ilat) ilon=15 lon=data.lon(ilon) ilevmin=14 ilevmax=20 nlev=ilevmax-ilevmin+1 nt=n_elements(data.time) plev=fltarr(nlev) temp=fltarr(nlev,nt) ht=fltarr(nlev,nt) ut=fltarr(nt) ut=data.time temp(*,*)=data.tn(ilon,ilat,ilevmin:ilevmax,*) ht(*,*)=data.Z(ilon,ilat,ilevmin:ilevmax,*)/1.e+5 ; convert from cm to km plev=data.lev(ilevmin:ilevmax) for i=0,47 do begin dummy=(day-1)*24.*60. ut(i)=(ut(i)-dummy)/60. if (ut(i) gt 23) then begin ut(i)=ut(i)-24 endif endfor for i=0,6 do begin for j=0,23 do begin ; if (ut(j) gt time1) and (ut(j) lt time2) then begin printf,1,ht(i,j),temp(i,j),plev(i),ut(j) ; endif endfor endfor close,1 stop end