pro sat_profile ; This program can be used to create a smooth temperature profile starting from ; a specified slope at the year 2005 and stabilizing (with zero slope) at 2300. ; The starting slope can be calculated from the last 10 years of the simulation ; providing the initial condition at 2005. A starting temperature and final ; temperature also need to be specified. The final target temperature should be ; the modelled preindustrial temperature plus the temperature target (1.5, 2, 3, ; and 4 degrees C). An arbitrary mid point year and temperature (between 2005 ; and 2300) is also specified. This may need some adjustment in order to ; generate a smoothly changing profile without overshoot. The output is a text ; file with annual values from 2005 to 2500. This can be adjusted to provide ; interpolated values at other time intervals in the call to SPLINE_P. ; input parameters: these are only an example and many need to be changed t1 = 2005. ; starting year of synthetic profile t3 = 2300. ; year of stabilization t2 = 2100. ; mid point year (may be adjusted) y1 = 14. ; temperature at starting year (set to year 2005) y3 = 15.3 ; temperature at stabilization (set to PI + target) y2 = (y3-y1)*.7+y1 ; temperature at mid point (may be adjusted) ; starting slope can be derived from the last 10 years of a simulation to 2005 ybcbeg = 0.015 ; slope at t1 (degrees C year-1) ybcend = 0. ; slope at t3 (zero at stabilization) offset = 0.5 ; time offset (half of the averaging period) SPLINE_P, [t1,t2,t3], [y1,y2,y3], tval, yval, TAN0=[1,ybcbeg], TAN1=[1,ybcend], INTERVAL=1 openw, 10, 'sat.txt' for i=2005,2500 do begin y = y3 if (i lt 2300) then y = yval(i-2005) printf, 10, format ='(2f12.4)', i+offset, y print, format = '(2f12.4)', i+offset, y endfor close, 10 plot, tval, yval, /ynozero end