reset : true  w 50 
backred : 255
backgreen : 255
backblue : 255
scriptmode : direct
helpmode : false
layoutmenu : 25plot w 1000
baseyear : 1850
stabconc&atlevel : 480
othgasemit : sresscale

$stab : 0 stabloop 
$mp : true
sub whichstab
sresmenu : A1B $b : 0 nextsres $b :+ 40 
climodmenu : gfdl $g : 0 nextgcm $g :+ 35 
$carbon : 0 $r : 0 nextcarbon $r :+ 35 sub carbonparam
if ( $carbon == 4 ) ( makebuf : true ) else ( makebuf : false )
$plot : 0 plotloop 
$name : ' ~ ' ~ climodmenu ~ othgasemit ~ sresmenu 
$col : $r ~ ' , ' ~ $g ~ ' , ' ~ $b 
sub makecurve 
$plot :+ 1 if ( $plot < 5 ) ( goto plotloop )
$carbon :+ 1  if ( $carbon < 5 ) ( goto nextcarbon )  
climodmenu : next  if ( climodmenu != ipccsar ) ( goto nextgcm )  
sresmenu : next  	if ( sresmenu !=  IS92a )  ( goto nextsres )
$stab :+ 1 if ( $stab < 5 ) ( goto stabloop )

end

carbonparam (
scriptmode : delay
if ( $carbon == 4 ) ( fertbeta : 0.144 lucfemit1990 : 825 ceddydiff : 1.0 )
if ( $carbon == 3 ) ( fertbeta : 0.287 lucfemit1990 : 1650 ceddydiff : 0.5 )
if ( $carbon == 2 ) ( fertbeta : 0.287 lucfemit1990 : 1650 ceddydiff : 1.0 )
if ( $carbon == 1 ) ( fertbeta : 0.287 lucfemit1990 : 1650 ceddydiff : 1.5 )
if ( $carbon == 0 ) ( fertbeta : 0.430 lucfemit1990 : 2475 ceddydiff : 1.0 )
go scriptmode : direct
)



makecurve (
	sub whichplot
	if ( $mp ) ( sub makeplot )
	$c : $curve ~ $name ~ ' ~true~ ' ~ $col 
	$c put $pname 	
	if ( $mp ) ( sub makescale )
	if ( $plot == 4 ) ( $mp : false )
)

makescale (
	$y : $pn ~ ' - ' ~ $sn ~ .tmh 0 put $y
	$y : $pn ~ ' - ' ~ $sn ~ .ymin $y1 put $y
	$y : $pn ~ ' - ' ~ $sn ~ .ymax $y2 put $y
	$y : $pn ~ ' - ' ~ $sn ~ .xmin 1850 put $y
	$y : $pn ~ ' - ' ~ $sn ~ .xmax 2250 put $y
)

makeplot (
	$a _ blankplot
	$t _ title~ ~ $pname $t put $a
	clear put $pname 
	$y _ scale~ ~ $yu $y put $pname 
	if ( $pn != $sn ) ( $y : $pn ~ ' - ' ~ $sn ~ .doubleline false put $y )
)

whichstab (
if ( $stab == 0 ) ( $sn _ E emitmenu _ stabemit )
if ( $stab == 1 ) ( $sn _ C emitmenu _ stabconc  )
if ( $stab == 2 ) ( $sn _ F emitmenu _ stabrf&allghgaero  )
if ( $stab == 3 ) ( $sn _ T emitmenu _ stabtemp  )
if ( $stab == 4 ) ( $sn _ S emitmenu _ stabsea  )
)

whichplot (
if ( $plot == 0 ) ( $pn _ E  $curve _ curve~carboncycle.totemit $y1 : 0 $y2 : 12000 $yu : giga&ton&carbon~1000~1000 )
if ( $plot == 1 ) ( $pn _ C  $curve _ curve~carboncycle.atppm $y1 : 250 $y2 : 600 $yu : ppm~50~1 )
if ( $plot == 2 ) ( $pn _ F  $curve _ curve~radfor.totalrf $y1 : -1  $y2 : 5 $yu : watt&per&m2~0.5~1 )
if ( $plot == 3 ) ( $pn _ T  $curve _ curve~heatflux.glotemp  $y1 : -0.5 $y2 : 3.5 $yu : degrees~0.5~1 )
if ( $plot == 4 ) ( $pn _ S  $curve _ curve~sealevel.total $y1 : 0  $y2 : 1.5 $yu : m~0.2~1 )
$pname : $pn ~ ' - ' ~ $sn 
)


 

	