;------------------------------------------------------------------------------ ; The procedure calplot_lc.pro plots the calibration data and fits to a ; PostScript (.ps) file for the Lost Creek flux tower. It is used by ; calibrate_lc.pro. ; Use is as follows: ; calplot_lc,date,ndays,corq,count,counttot,$ ; mandb,stats,x,y,xev,yev,xrng,yrng,goodflag ; ; Where all parameters are inputs except count which initially is an input ; but is transferred back and forth with calibrate.pro until counttot is ; reached. ; ; mandb,stats,x,y,xev,yev,xrng,yrng are determined in calfit_lc.pro. ; ; Written by BWBerger 6/23/99 - Based on calplot.pro used for WLEF ; ; Modified by Dana Carrington - June 1999 - for use with Willow Creek data. ; Modified by BWB 3/1/00 to change output path from ; /data/davis2/wcreek/data/cal/plots ; to ; /data/davis/cheas/wcreek/data/cal/plots. ; Modified by Bruce Cook - November 2000 - for use with Lost Creek ;------------------------------------------------------------------------------ pro calplot_lc,date,ndays,corq,count,counttot,$ mandb,stats,x,y,xev,yev,xrng,yrng,goodflag yrls=strmid(strtrim(string(date),2),0,4) ;string of 4-digit year dates=strtrim(string(date),2) ;string of the yyyymmdd date if (count eq 1) then begin set_plot,'ps' fname = '/eddy/s4/lcreek/data/cal/plots/'+yrls+'/fit'+dates+'.ps' device,filename = fname,/landscape mplot,2,1 endif ; Get the appropriate subtitles for the plots if (corq eq 'c') then begin subtitle1 = 'CO2' subtitle2 = '(c*(!4e!3/(!4e!3+r))-cref)' subtitle3 = 'V*(p0/p)' endif if (corq eq 'q') then begin subtitle1 = 'H2O' subtitle2 = 'q*(!4e!3/(!4e!3+r))' subtitle3 = 'V*(p0/p)' endif ; Initialize vectors that define the locations of various labels ;------------------------------------------------------------------------------ ; DANA, THESE LABEL POSITION ARRAYS WILL HAVE TO BE ADJUSTED - I'LL HELP. BWB ;------------------------------------------------------------------------------ a = [.11,.61] ;x-coord of top labels for left and right plot b = [.91,.89,.87,.85,.83] ;y-coord of top labels for left and right plot c = [.25,.74] ;x-coord of bottom labels for left and right plot d = [.18,.16,.14,.12] ;y-coord of bottom labels for left and right plot ; Plot the fit data plot,x(*),y(*),xstyle = 1,ystyle = 1,xrange = xrng,yrange = yrng,$ title = subtitle1,$ xtitle = subtitle2+'*(T0/T)',$ ytitle = subtitle3 oplot,x(*),y(*) oplot,xev(*),yev(*),thick = 3 xyouts,a(count-1),b(0),'ma = '+strtrim(string(mandb(0)),2),/normal xyouts,a(count-1),b(1),'ba = '+strtrim(string(mandb(1)),2),/normal xyouts,a(count-1),b(2),'m = '+strtrim(string(mandb(2)),2),/normal xyouts,a(count-1),b(3),'b = '+strtrim(string(mandb(3)),2),/normal xyouts,a(count-1),b(4),'rsq = '+strtrim(string(stats(5)),2),/normal xyouts,c(count-1),d(0),'n = '+strtrim(string(fix(stats(4))),2),/normal xyouts,c(count-1),d(1),'sigmasq = '+strtrim(string(stats(0)),2),/normal xyouts,c(count-1),d(2),'sigbasq = '+strtrim(string(stats(1)),2),/normal xyouts,c(count-1),d(3),'goodflag = '+strtrim(string(fix(goodflag)),2),/normal if count eq counttot then begin ;write title on last call of calplot_lc xyouts,0.5,1.01,'LOST CREEK, Start date: '+dates+', No. of days: '+strtrim(string(ndays),2),alignment=0.5,chars=1.5,/normal endif ; Close and reset things if done if (count eq counttot) then begin device,/close set_plot,'x' cplot endif count = count+1 return end